Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
{{!
2
    This file is part of Moodle - http://moodle.org/
3
    Moodle is free software: you can redistribute it and/or modify
4
    it under the terms of the GNU General Public License as published by
5
    the Free Software Foundation, either version 3 of the License, or
6
    (at your option) any later version.
7
    Moodle is distributed in the hope that it will be useful,
8
    but WITHOUT ANY WARRANTY; without even the implied warranty of
9
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10
    GNU General Public License for more details.
11
    You should have received a copy of the GNU General Public License
12
    along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
13
}}
14
{{!
15
    @template gradereport_grader/search/resultitem
16
 
17
    Template for the individual result item.
18
 
19
    Context variables required for this template:
20
    * id - User system ID.
21
    * fullname - Users' full name.
22
    * profileimageurl - Link for the users' large profile image.
23
    * matchingField - The field in the user object that matched the search criteria.
24
    * matchingFieldName - The name of the field that was matched upon for A11y purposes.
25
    * link - The link used to redirect upon self to show only this specific user.
26
 
27
    Example context (json):
28
    {
29
        "id": 2,
30
        "fullname": "Foo bar",
31
        "profileimageurl": "http://foo.bar/pluginfile.php/79/user/icon/alpha/f1?rev=7630",
32
        "matchingField": "<span class=\"font-weight-bold\">Foo</span> bar",
33
        "matchingFieldName": "Fullname",
34
        "link": "http://foo.bar/grade/report/grader/index.php?id=42&userid=2"
35
    }
36
}}
37
<li class="w-100 result-row" role="none" id="result-row-{{id}}">
38
    <a role="option" id="user-{{id}}" href="{{{link}}}" class="dropdown-item d-flex p-2 align-items-center" tabindex="-1" aria-label="{{#str}}viewresultsuser, gradereport_grader, {{fullname}}{{/str}}">
39
        <div class="d-block p-0 ml-0 mr-2">
40
            {{#profileimageurl}}
41
                <img class="userpicture d-block" width="40" height="40" src="{{profileimageurl}}" alt=""/>
42
            {{/profileimageurl}}
43
            {{^profileimageurl}}
44
                <span class="userinitials"></span>
45
            {{/profileimageurl}}
46
        </div>
47
        <div class="d-block pr-2 w-75">
48
            <span class="d-block w-100 p-0 text-truncate font-weight-bold">
49
                {{fullname}}
50
            </span>
51
            <span class="d-block w-100 pull-left text-truncate small" aria-hidden="true">
52
                {{{matchingField}}}
53
            </span>
54
            <span class="sr-only" aria-label="{{#str}}usermatchedon, core_grades{{/str}}">{{matchingFieldName}}</span>
55
        </div>
56
    </a>
57
</li>