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/badges
19
 
20
    Convenience mustache to displays if an activity is in hidden or stealth mode.
21
 
22
    Format plugins are free to implement an alternative inplace editable for activities.
23
 
24
    Example context (json):
25
    {
26
        "iscurrent" : true,
27
        "highlightedlabel" : "Highlighted",
28
        "visibility": {
29
            "editing": "1",
30
            "dropwdown": {
31
                "buttonid": "dropwdownbutton_648b1549b929e30",
32
                "buttoncontent": "Show on course page",
33
                "choices": {
34
                    "description": null,
35
                    "options": [
36
                        {
37
                            "value": "show",
38
                            "name": "Show on course page",
39
                            "description": "Available to students.",
40
                            "url": null,
41
                            "icon": null,
42
                            "disabled": false,
43
                            "hasicon": false,
44
                            "hasurl": false,
45
                            "selected": true,
46
                            "optionnumber": 1,
47
                            "first": true,
48
                            "optionuniqid": "choice_option_648b1549b929e31"
49
                        },
50
                        {
51
                            "value": "hide",
52
                            "name": "Hide on course page",
53
                            "description": "Not available to students.",
54
                            "url": null,
55
                            "icon": null,
56
                            "disabled": false,
57
                            "hasicon": false,
58
                            "hasurl": false,
59
                            "optionnumber": 2,
60
                            "first": false,
61
                            "optionuniqid": "choice_option_648b1549b929e32"
62
                        }
63
                    ],
64
                    "hasoptions": true
65
                }
66
            }
67
        }
68
    }
69
}}
70
{{#editing}}
71
    <span class="badge rounded-pill bg-primary text-white order-1 {{^iscurrent}}d-none{{/iscurrent}}" data-type="iscurrent">
72
        {{ highlightedlabel }}
73
    </span>
74
{{/editing}}
75
{{^editing}}
76
    {{#iscurrent}}
77
        <span class="badge rounded-pill bg-primary text-white order-1">{{ highlightedlabel }}</span>
78
    {{/iscurrent}}
79
{{/editing}}
80
{{#visibility}}
81
    {{>core_courseformat/local/content/section/visibility}}
82
{{/visibility}}