1 |
efrain |
1 |
{{!
|
|
|
2 |
This file is part of Moodle - http://moodle.org/
|
|
|
3 |
|
|
|
4 |
Moodle is free software: you can redistribute it and/or modify
|
|
|
5 |
it under the terms of the GNU General Public License as published by
|
|
|
6 |
the Free Software Foundation, either version 3 of the License, or
|
|
|
7 |
(at your option) any later version.
|
|
|
8 |
|
|
|
9 |
Moodle is distributed in the hope that it will be useful,
|
|
|
10 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
11 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
12 |
GNU General Public License for more details.
|
|
|
13 |
|
|
|
14 |
You should have received a copy of the GNU General Public License
|
|
|
15 |
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
|
|
16 |
}}
|
|
|
17 |
{{!
|
|
|
18 |
@template mod_forum/local/grades/local/grader/user_picker/user
|
|
|
19 |
|
|
|
20 |
Classes required for JS:
|
|
|
21 |
* none
|
|
|
22 |
|
|
|
23 |
Data attributes required for JS:
|
|
|
24 |
* data-userid="42"
|
|
|
25 |
* data-region="index"
|
|
|
26 |
|
|
|
27 |
Context variables required for this template:
|
|
|
28 |
* id: The ID of the user
|
|
|
29 |
* fullname: The user's full name
|
|
|
30 |
* displayIndex: The index of the user in the userpicker array + 1
|
|
|
31 |
* total: The length of the user array in the userpicker
|
|
|
32 |
|
|
|
33 |
Example context (json):
|
|
|
34 |
{
|
|
|
35 |
"id": 4,
|
|
|
36 |
"fullname": "Phillip J. Fry",
|
|
|
37 |
"displayIndex": 3,
|
|
|
38 |
"total": 7
|
|
|
39 |
}
|
|
|
40 |
}}
|
|
|
41 |
{{#profileimageurl}}
|
|
|
42 |
<img
|
|
|
43 |
class="rounded-circle userpicture mr-2"
|
|
|
44 |
src="{{.}}"
|
|
|
45 |
aria-hidden="true"
|
|
|
46 |
>
|
|
|
47 |
{{/profileimageurl}}
|
|
|
48 |
<div class="overflow-hidden">
|
|
|
49 |
<h5
|
|
|
50 |
class="mb-0 font-weight-bold user-full-name text-truncate"
|
|
|
51 |
data-region="name"
|
|
|
52 |
data-userid="{{id}}"
|
|
|
53 |
>
|
|
|
54 |
{{fullname}}
|
|
|
55 |
</h5>
|
|
|
56 |
</div>
|
|
|
57 |
|