2 This file is part of Moodle - http://moodle.org/
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.
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.
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/>.
18 @template core_grades/cellmenu
20 This template renders action menu for a given cell.
21 Example context (json):
23 "editurl": "<a class='dropdown-item' aria-label='Edit grade' role='menuitem' href='grade/edit/tree/grade.php?courseid=13&itemid=608&userid=85&gpr_type=report&gpr_plugin=grader&gpr_courseid=13'>Edit grade</a>",
24 "hideurl": "<a class='dropdown-item' aria-label='Hide' role='menuitem' href='grade/edit/tree/action.php?id=13&sesskey=sMAOMLAAN5&eid=n608u85&gpr_type=report&gpr_plugin=grader&gpr_courseid=13&action=hide'>Hide</a>",
25 "reporturl0": "<a class='dropdown-item' aria-label='Single view for this user' role='menuitem' href='grade/report/singleview/index.php?id=13&itemid=39&item=user&gpr_type=report&gpr_plugin=grader&gpr_courseid=13'>Single view for this user</a>",
26 "reporturl1": "<a class='dropdown-item' aria-label='User report' role='menuitem' href='grade/report/user/index.php?userid=39&id=13&gpr_type=report&gpr_plugin=grader&gpr_courseid=13'>User report</a>",
27 "ascendingurl": "<a class='dropdown-item' aria-label='Ascending' role='menuitem' href='index.php?id=13&sortitemid=email&sort=asc&gpr_type=report&gpr_plugin=grader&gpr_courseid=13'>Ascending</a>",
28 "descendingurl": "<a class='dropdown-item' aria-label='Descending' role='menuitem' href='index.php?id=13&sortitemid=email&sort=desc&gpr_type=report&gpr_plugin=grader&gpr_courseid=13'>Descending</a>",
29 "ascendingfirstnameurl": "<a class='dropdown-item' aria-label='Ascending' role='menuitem' href='index.php?id=13&sortitemid=firstname&sort=asc&gpr_type=report&gpr_plugin=grader&gpr_courseid=13'>Ascending</a>",
30 "descendingfirstnameurl": "<a class='dropdown-item' aria-label='Descending' role='menuitem' href='index.php?id=13&sortitemid=firstname&sort=desc&gpr_type=report&gpr_plugin=grader&gpr_courseid=13'>Descending</a>",
31 "ascendinglastnameurl": "<a class='dropdown-item' aria-label='Ascending' role='menuitem' href='index.php?id=13&sortitemid=lastname&sort=asc&gpr_type=report&gpr_plugin=grader&gpr_courseid=13'>Ascending</a>",
32 "descendinglastnameurl": "<a class='dropdown-item' aria-label='Descending' role='menuitem' href='index.php?id=13&sortitemid=lastname&sort=desc&gpr_type=report&gpr_plugin=grader&gpr_courseid=13'>Descending</a>",
39 <div class="action-menu mb-1 moodle-actionmenu grader">
40 <div class="dropdown">
41 <button class="btn btn-link btn-icon icon-size-3 cellmenubtn"
42 type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"
43 {{#datatype}}data-type="{{datatype}}"{{/datatype}}
44 {{#dataid}}data-id="{{dataid}}"{{/dataid}}>
45 <i class="icon fa fa-ellipsis-h fa-fw m-0" title="{{#str}} cellactions, gradereport_grader {{/str}}" aria-hidden="true"></i>
46 <span class="sr-only">{{#str}} cellactions, gradereport_grader {{/str}}</span>
49 <div role="menu" class="dropdown-menu">
50 {{#editurl}}{{{editurl}}}{{/editurl}}
51 {{#editcalculationurl}}{{{editcalculationurl}}}{{/editcalculationurl}}
52 {{#reporturl0}}{{{reporturl0}}}{{/reporturl0}}
53 {{#reporturl1}}{{{reporturl1}}}{{/reporturl1}}
54 {{#gradesonlyurl}}{{{gradesonlyurl}}}{{/gradesonlyurl}}
55 {{#aggregatesonlyurl}}{{{aggregatesonlyurl}}}{{/aggregatesonlyurl}}
56 {{#fullmodeurl}}{{{fullmodeurl}}}{{/fullmodeurl}}
57 {{#deleteurl}}{{{deleteurl}}}{{/deleteurl}}
58 {{#duplicateurl}}{{{duplicateurl}}}{{/duplicateurl}}
59 {{#gradeanalysisurl}}{{{gradeanalysisurl}}}{{/gradeanalysisurl}}
61 <div class="dropdown-divider" role="separator"></div>
63 {{#ascendingfirstnameurl}}
64 <h6 class="dropdown-header">{{#str}} firstname, moodle {{/str}}</h6>
65 {{{ascendingfirstnameurl}}}
66 {{{descendingfirstnameurl}}}
67 <h6 class="dropdown-header">{{#str}} lastname, moodle {{/str}}</h6>
68 {{{ascendinglastnameurl}}}
69 {{{descendinglastnameurl}}}
70 {{/ascendingfirstnameurl}}
76 <div class="dropdown-divider" role="separator"></div>
78 {{#hideurl}}{{{hideurl}}}{{/hideurl}}
79 {{#lockurl}}{{{lockurl}}}{{/lockurl}}
80 {{#resetweightsurl}}{{{resetweightsurl}}}{{/resetweightsurl}}