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_courseformat/local/content/section/visibility
19
 
20
    Template to displays if an section is in hidden or not.
21
 
22
    Example context (json):
23
    {
24
        "editing": "1",
25
        "notavailable": 1,
26
        "hiddenfromstudents": 0,
27
        "dropwdown": {
28
            "buttonid": "dropwdownbutton_648b1549b929e30",
29
            "buttoncontent": "Show on course page",
30
            "choices": {
31
                "description": null,
32
                "options": [
33
                    {
34
                        "value": "show",
35
                        "name": "Show on course page",
36
                        "description": "Available to students.",
37
                        "url": null,
38
                        "icon": null,
39
                        "disabled": false,
40
                        "hasicon": false,
41
                        "hasurl": false,
42
                        "selected": true,
43
                        "optionnumber": 1,
44
                        "first": true,
45
                        "optionuniqid": "choice_option_648b1549b929e31"
46
                    },
47
                    {
48
                        "value": "hide",
49
                        "name": "Hide on course page",
50
                        "description": "Not available to students.",
51
                        "url": null,
52
                        "icon": null,
53
                        "disabled": false,
54
                        "hasicon": false,
55
                        "hasurl": false,
56
                        "optionnumber": 2,
57
                        "first": false,
58
                        "optionuniqid": "choice_option_648b1549b929e32"
59
                    }
60
                ],
61
                "hasoptions": true
62
            }
63
        }
64
    }
65
}}
66
{{#editing}}
67
    <div class="order-2" data-region="visibility">
68
        {{#dropwdown}}
69
            {{< core/local/dropdown/status}}
70
                {{$ buttonclasses }} badge rounded-pill bg-secondary text-dark dropdown-toggle border-0{{/ buttonclasses }}
71
            {{/ core/local/dropdown/status}}
72
        {{/dropwdown}}
73
    </div>
74
    <span class="badge rounded-pill bg-secondary text-dark order-3 {{^notavailable}}d-none{{/notavailable}}">
75
        {{#str}}notavailable{{/str}}
76
    </span>
77
{{/editing}}
78
{{^editing}}
79
    {{#hiddenfromstudents}}
80
        <span class="badge rounded-pill bg-secondary text-dark order-2">{{#pix}}i/show, core{{/pix}}{{#str}}hiddenfromstudents{{/str}}</span>
81
    {{/hiddenfromstudents}}
82
    {{#notavailable}}
83
        <span class="badge rounded-pill bg-secondary text-dark order-3">{{#str}}notavailable{{/str}}</span>
84
    {{/notavailable}}
85
{{/editing}}