Proyectos de Subversion Moodle

Rev

Rev 1 | | Comparar con el anterior | 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 mod_quiz/overrides_actions
19
    Actions bar at the top of the overrides page UI.
20
 
21
    Classes required for JS:
22
    * none
23
 
24
    Data attributes required for JS:
25
    * none
26
 
27
    Context variables required for this template:
28
    * overridesnav - must alwasy be present.
29
    * addoverridebutton - should only be present if the user has permission to add a new override.
30
 
31
    Example context (json):
32
    {
33
        "overridesnav": {
11 efrain 34
            "id": "url_select_test",
35
            "action": "https://example.com/post",
36
            "formid": "url_select_form",
37
            "sesskey": "sesskey",
38
            "label": "core/url_select",
1 efrain 39
            "options": [{
40
                    "name": "User overrides",
41
                    "value": "/mod/quiz/overrides.php?cmid=71&mode=user"
42
                },
43
                {
44
                    "name": "Group overrides",
45
                    "value": "/mod/quiz/overrides.php?cmid=71&mode=group"
46
                }
11 efrain 47
            ],
48
            "disabled": false,
49
            "title": "Some cool title"
1 efrain 50
        },
51
        "addoverridebutton": {
52
            "id": "single_button1234",
11 efrain 53
            "type": "primary",
1 efrain 54
            "method": "get",
55
            "url": "http://localhost/moodle/mod/quiz/overrideedit.php",
11 efrain 56
            "label": "Add user override",
1 efrain 57
            "classes": "singlebutton",
58
            "disabled": false,
59
            "params": [
60
                {
61
                    "name": "cmid",
62
                    "value": "73"
63
                },
64
                {
65
                    "name": "action",
66
                    "value": "adduser"
67
                }
68
            ]
69
        }
70
    }
71
}}
72
<div class="container-fluid tertiary-navigation">
73
    <div class="row">
74
        {{#overridesnav}}
75
            <div class="navitem">
76
                {{>core/url_select}}
77
            </div>
78
        {{/overridesnav}}
79
        {{#addoverridebutton}}
80
            <div class="navitem">
81
                {{>core/single_button}}
82
            </div>
83
        {{/addoverridebutton}}
84
    </div>
85
</div>