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
            <div title="{{#str}} cellactions, gradereport_grader {{/str}}" aria-hidden="true">
49
                <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
50
                    <path fill="currentColor" d="M13 12C13 12.5523 12.5523 13 12 13C11.4477 13 11 12.5523 11 12C11 11.4477 11.4477 11 12 11C12.5523 11 13 11.4477 13 12Z"></path>
51
                    <path fill="currentColor" d="M13 8C13 8.55228 12.5523 9 12 9C11.4477 9 11 8.55228 11 8C11 7.44772 11.4477 7 12 7C12.5523 7 13 7.44772 13 8Z"></path>
52
                    <path fill="currentColor" d="M13 16C13 16.5523 12.5523 17 12 17C11.4477 17 11 16.5523 11 16C11 15.4477 11.4477 15 12 15C12.5523 15 13 15.4477 13 16Z"></path>
53
                </svg>
54
            </div>
55
            <span class="sr-only">{{#str}} cellactions, gradereport_grader {{/str}}</span>
56
        </button>
57
 
58
        <div role="menu" class="dropdown-menu">
59
            {{#editurl}}{{{editurl}}}{{/editurl}}
60
            {{#editcalculationurl}}{{{editcalculationurl}}}{{/editcalculationurl}}
61
            {{#reporturl0}}{{{reporturl0}}}{{/reporturl0}}
62
            {{#reporturl1}}{{{reporturl1}}}{{/reporturl1}}
63
            {{#advancedgradingurl}}{{{advancedgradingurl}}}{{/advancedgradingurl}}
64
            {{#gradesonlyurl}}{{{gradesonlyurl}}}{{/gradesonlyurl}}
65
            {{#aggregatesonlyurl}}{{{aggregatesonlyurl}}}{{/aggregatesonlyurl}}
66
            {{#fullmodeurl}}{{{fullmodeurl}}}{{/fullmodeurl}}
67
            {{#deleteurl}}{{{deleteurl}}}{{/deleteurl}}
68
            {{#duplicateurl}}{{{duplicateurl}}}{{/duplicateurl}}
69
            {{#gradeanalysisurl}}{{{gradeanalysisurl}}}{{/gradeanalysisurl}}
70
            {{#divider1}}
71
                <div class="dropdown-divider" role="separator"></div>
72
            {{/divider1}}
73
            {{#ascendingfirstnameurl}}
74
                <h6 class="dropdown-header">{{#str}} firstname, moodle {{/str}}</h6>
75
                {{{ascendingfirstnameurl}}}
76
                {{{descendingfirstnameurl}}}
77
                <h6 class="dropdown-header">{{#str}} lastname, moodle {{/str}}</h6>
78
                {{{ascendinglastnameurl}}}
79
                {{{descendinglastnameurl}}}
80
            {{/ascendingfirstnameurl}}
81
            {{#ascendingurl}}
82
                {{{ascendingurl}}}
83
                {{{descendingurl}}}
84
            {{/ascendingurl}}
85
            {{#divider2}}
86
                <div class="dropdown-divider" role="separator"></div>
87
            {{/divider2}}
88
            {{#hideurl}}{{{hideurl}}}{{/hideurl}}
89
            {{#lockurl}}{{{lockurl}}}{{/lockurl}}
90
            {{#columncollapse}}{{{columncollapse}}}{{/columncollapse}}
91
            {{#resetweightsurl}}{{{resetweightsurl}}}{{/resetweightsurl}}
92
            {{#viewfeedbackurl}}{{{viewfeedbackurl}}}{{/viewfeedbackurl}}
93
        </div>
94
    </div>
95
</div>