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
 
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 core_grades/cellmenu
19
 
20
    This template renders action menu for a given cell.
21
    Example context (json):
22
    {
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&amp;itemid=39&amp;item=user&amp;gpr_type=report&amp;gpr_plugin=grader&amp;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&amp;id=13&amp;gpr_type=report&amp;gpr_plugin=grader&amp;gpr_courseid=13'>User report</a>",
27
        "ascendingurl": "<a class='dropdown-item' aria-label='Ascending' role='menuitem' href='index.php?id=13&amp;sortitemid=email&amp;sort=asc&amp;gpr_type=report&amp;gpr_plugin=grader&amp;gpr_courseid=13'>Ascending</a>",
28
        "descendingurl": "<a class='dropdown-item' aria-label='Descending' role='menuitem' href='index.php?id=13&amp;sortitemid=email&amp;sort=desc&amp;gpr_type=report&amp;gpr_plugin=grader&amp;gpr_courseid=13'>Descending</a>",
29
        "ascendingfirstnameurl": "<a class='dropdown-item' aria-label='Ascending' role='menuitem' href='index.php?id=13&amp;sortitemid=firstname&amp;sort=asc&amp;gpr_type=report&amp;gpr_plugin=grader&amp;gpr_courseid=13'>Ascending</a>",
30
        "descendingfirstnameurl": "<a class='dropdown-item' aria-label='Descending' role='menuitem' href='index.php?id=13&amp;sortitemid=firstname&amp;sort=desc&amp;gpr_type=report&amp;gpr_plugin=grader&amp;gpr_courseid=13'>Descending</a>",
31
        "ascendinglastnameurl": "<a class='dropdown-item' aria-label='Ascending' role='menuitem' href='index.php?id=13&amp;sortitemid=lastname&amp;sort=asc&amp;gpr_type=report&amp;gpr_plugin=grader&amp;gpr_courseid=13'>Ascending</a>",
32
        "descendinglastnameurl": "<a class='dropdown-item' aria-label='Descending' role='menuitem' href='index.php?id=13&amp;sortitemid=lastname&amp;sort=desc&amp;gpr_type=report&amp;gpr_plugin=grader&amp;gpr_courseid=13'>Descending</a>",
33
        "viewfeedbackurl": "<a href='#' class='dropdown-item' aria-label='View feedback' role='menuitem'>View feedback</a>",
34
        "divider1": "true",
35
        "divider2": "true",
36
        "datatype": "item",
37
        "dataid": "123",
38
        "columncollapse": "<a class='dropdown-item' data-hider='hide' aria-label='Collapse' role='menuitem' href='#'>Collapse</a>"
39
    }
40
}}
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>
50
        </button>
51
 
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}}
64
            {{#divider1}}
65
                <div class="dropdown-divider" role="separator"></div>
66
            {{/divider1}}
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}}}
72
            </div>
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}}}
77
            </div>
78
            {{/ascendingfirstnameurl}}
79
            {{#ascendingurl}}
80
                {{{ascendingurl}}}
81
                {{{descendingurl}}}
82
            {{/ascendingurl}}
83
            {{#divider2}}
84
                <div class="dropdown-divider" role="separator"></div>
85
            {{/divider2}}
86
            {{#hideurl}}{{{hideurl}}}{{/hideurl}}
87
            {{#lockurl}}{{{lockurl}}}{{/lockurl}}
88
            {{#columncollapse}}{{{columncollapse}}}{{/columncollapse}}
89
            {{#resetweightsurl}}{{{resetweightsurl}}}{{/resetweightsurl}}
90
            {{#viewfeedbackurl}}{{{viewfeedbackurl}}}{{/viewfeedbackurl}}
91
        </div>
92
    </div>
93
</div>