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-xs badge-sq badge-warning 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 badge-sq badge-warning">
79
                <svg width="14" height="14" fill="none" viewBox="0 0 24 24">
80
                    <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M18.6247 10C19.0646 10.8986 19.25 11.6745 19.25 12C19.25 13 17.5 18.25 12 18.25C11.2686 18.25 10.6035 18.1572 10 17.9938M7 16.2686C5.36209 14.6693 4.75 12.5914 4.75 12C4.75 11 6.5 5.75 12 5.75C13.7947 5.75 15.1901 6.30902 16.2558 7.09698"></path>
81
                    <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M19.25 4.75L4.75 19.25"></path>
82
                    <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M10.409 13.591C9.53033 12.7123 9.53033 11.2877 10.409 10.409C11.2877 9.5303 12.7123 9.5303 13.591 10.409"></path>
83
                </svg>
84
                <span class="ml-1">{{#str}}hiddenfromstudents{{/str}}</span>
85
            </span>
86
        </div>
87
    {{/modhiddenfromstudents}}
88
    {{#modstealth}}
89
        <div class="activity-badges my-1 d-flex align-self-start align-items-center" data-region="visibility">
90
            <span class="badge badge-sq badge-warning">
91
                <svg width="14" height="14" fill="none" viewBox="0 0 24 24">
92
                    <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M18.6247 10C19.0646 10.8986 19.25 11.6745 19.25 12C19.25 13 17.5 18.25 12 18.25C11.2686 18.25 10.6035 18.1572 10 17.9938M7 16.2686C5.36209 14.6693 4.75 12.5914 4.75 12C4.75 11 6.5 5.75 12 5.75C13.7947 5.75 15.1901 6.30902 16.2558 7.09698"></path>
93
                    <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M19.25 4.75L4.75 19.25"></path>
94
                    <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M10.409 13.591C9.53033 12.7123 9.53033 11.2877 10.409 10.409C11.2877 9.5303 12.7123 9.5303 13.591 10.409"></path>
95
                </svg>
96
                <span class="ml-1">{{#str}}hiddenoncoursepage{{/str}}</span>
97
            </span>
98
        </div>
99
    {{/modstealth}}
100
{{/isInteractive}}