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>",
33 "viewfeedbackurl": "<a href='#' class='dropdown-item' aria-label='View feedback' role='menuitem'>View feedback</a>",
38 "columncollapse": "<a class='dropdown-item' data-hider='hide' aria-label='Collapse' role='menuitem' href='#'>Collapse</a>"
41 <div class="action-menu moodle-actionmenu grader" data-collapse="menu">
42 <div class="dropdown">
43 <button class="btn btn-link btn-icon icon-size-3 cellmenubtn"
44 type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"
45 {{#databoundary}}data-boundary="{{databoundary}}"{{/databoundary}}
46 {{#datatype}}data-type="{{datatype}}"{{/datatype}}
47 {{#dataid}}data-id="{{dataid}}"{{/dataid}}>
48 <i class="icon fa fa-ellipsis-h fa-fw m-0" title="{{#str}} cellactions, gradereport_grader {{/str}}" aria-hidden="true"></i>
49 <span class="sr-only">{{#str}} cellactions, gradereport_grader {{/str}}</span>
52 <div role="menu" class="dropdown-menu">
53 {{#editurl}}{{{editurl}}}{{/editurl}}
54 {{#editcalculationurl}}{{{editcalculationurl}}}{{/editcalculationurl}}
55 {{#reporturl0}}{{{reporturl0}}}{{/reporturl0}}
56 {{#reporturl1}}{{{reporturl1}}}{{/reporturl1}}
57 {{#advancedgradingurl}}{{{advancedgradingurl}}}{{/advancedgradingurl}}
58 {{#gradesonlyurl}}{{{gradesonlyurl}}}{{/gradesonlyurl}}
59 {{#aggregatesonlyurl}}{{{aggregatesonlyurl}}}{{/aggregatesonlyurl}}
60 {{#fullmodeurl}}{{{fullmodeurl}}}{{/fullmodeurl}}
61 {{#deleteurl}}{{{deleteurl}}}{{/deleteurl}}
62 {{#duplicateurl}}{{{duplicateurl}}}{{/duplicateurl}}
63 {{#gradeanalysisurl}}{{{gradeanalysisurl}}}{{/gradeanalysisurl}}
65 <div class="dropdown-divider" role="separator"></div>
67 {{#ascendingfirstnameurl}}
68 <div role="group" aria-label="{{#str}} sortbyfirstname, core_grades {{/str}}">
69 <div class="h6 dropdown-header">{{#str}} firstname, moodle {{/str}}</div>
70 {{{ascendingfirstnameurl}}}
71 {{{descendingfirstnameurl}}}
73 <div role="group" aria-label="{{#str}} sortbylastname, core_grades {{/str}}">
74 <div class="h6 dropdown-header">{{#str}} lastname, moodle {{/str}}</div>
75 {{{ascendinglastnameurl}}}
76 {{{descendinglastnameurl}}}
78 {{/ascendingfirstnameurl}}
84 <div class="dropdown-divider" role="separator"></div>
86 {{#hideurl}}{{{hideurl}}}{{/hideurl}}
87 {{#lockurl}}{{{lockurl}}}{{/lockurl}}
88 {{#columncollapse}}{{{columncollapse}}}{{/columncollapse}}
89 {{#resetweightsurl}}{{{resetweightsurl}}}{{/resetweightsurl}}
90 {{#viewfeedbackurl}}{{{viewfeedbackurl}}}{{/viewfeedbackurl}}