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/cm/visibility
19
 
20
    Template to displays if an activity is in hidden or stealth mode.
21
 
22
    Example context (json):
23
    {
24
        "modhiddenfromstudents" : "1",
25
        "modstealth" : "1",
26
        "isInteractive": "1",
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
{{#isInteractive}}
67
    <div class="activity-badges my-1" 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
{{/isInteractive}}
75
{{^isInteractive}}
76
    {{#modhiddenfromstudents}}
77
        <div class="activity-badges my-1 d-flex align-self-start align-items-center" data-region="visibility">
78
            <span class="badge rounded-pill bg-secondary text-dark">{{#pix}}i/show, core{{/pix}}{{#str}}hiddenfromstudents{{/str}}</span>
79
        </div>
80
    {{/modhiddenfromstudents}}
81
    {{#modstealth}}
82
        <div class="activity-badges my-1 d-flex align-self-start align-items-center" data-region="visibility">
83
            <span class="badge rounded-pill bg-secondary text-dark">{{#pix}}t/stealth, core{{/pix}}{{#str}}hiddenoncoursepage{{/str}}</span>
84
        </div>
85
    {{/modstealth}}
86
{{/isInteractive}}