AutorÃa | Ultima modificación | Ver Log |
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template gradereport_grader/search/resultitem
Template for the individual result item.
Context variables required for this template:
* id - User system ID.
* fullname - Users' full name.
* profileimageurl - Link for the users' large profile image.
* matchingField - The field in the user object that matched the search criteria.
* matchingFieldName - The name of the field that was matched upon for A11y purposes.
* link - The link used to redirect upon self to show only this specific user.
Example context (json):
{
"id": 2,
"fullname": "Foo bar",
"profileimageurl": "http://foo.bar/pluginfile.php/79/user/icon/monocolor/f1?rev=7630",
"matchingField": "<span class=\"font-weight-bold\">Foo</span> bar",
"matchingFieldName": "Fullname",
"link": "http://foo.bar/grade/report/grader/index.php?id=42&userid=2"
}
}}
<li class="w-100 result-row" role="none" id="result-row-{{id}}">
<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}}">
<div class="d-block p-0 ml-0 mr-2">
{{#profileimageurl}}
<img class="userpicture d-block" width="40" height="40" src="{{profileimageurl}}" alt=""/>
{{/profileimageurl}}
{{^profileimageurl}}
<span class="userinitials"></span>
{{/profileimageurl}}
</div>
<div class="d-block pr-2 w-75">
<span class="d-block w-100 p-0 text-truncate font-weight-bold">
{{fullname}}
</span>
<span class="d-block w-100 pull-left text-truncate small" aria-hidden="true">
{{{matchingField}}}
</span>
<span class="sr-only" aria-label="{{#str}}usermatchedon, core_grades{{/str}}">{{matchingFieldName}}</span>
</div>
</a>
</li>