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 |
"hiddenfromstudents" : "1",
|
|
|
28 |
"notavailable" : "0",
|
|
|
29 |
"highlightedlabel" : "Highlighted"
|
|
|
30 |
}
|
|
|
31 |
}}
|
|
|
32 |
{{#editing}}
|
|
|
33 |
<span class="badge badge-xs badge-primary order-1 ml-2 {{^iscurrent}}d-none{{/iscurrent}}" data-type="iscurrent">
|
|
|
34 |
{{ highlightedlabel }}
|
|
|
35 |
</span>
|
|
|
36 |
<span class="badge badge-xs badge-warning order-2 {{^hiddenfromstudents}}d-none{{/hiddenfromstudents}}" data-type="hiddenfromstudents">
|
|
|
37 |
{{#str}}hiddenfromstudents{{/str}}
|
|
|
38 |
</span>
|
|
|
39 |
<span class="badge badge-xs badge-secondary order-3 {{^notavailable}}d-none{{/notavailable}}">
|
|
|
40 |
{{#str}}notavailable{{/str}}
|
|
|
41 |
</span>
|
|
|
42 |
{{/editing}}
|
|
|
43 |
{{^editing}}
|
|
|
44 |
{{#iscurrent}}
|
|
|
45 |
<span class="badge badge-xs badge-primary order-1 ml-2">{{ highlightedlabel }}</span>
|
|
|
46 |
{{/iscurrent}}
|
|
|
47 |
{{#hiddenfromstudents}}
|
|
|
48 |
<span class="badge badge-xs badge-warning order-2">{{#str}}hiddenfromstudents{{/str}}</span>
|
|
|
49 |
{{/hiddenfromstudents}}
|
|
|
50 |
{{#notavailable}}
|
|
|
51 |
<span class="badge badge-xs badge-secondary order-3">{{#str}}notavailable{{/str}}</span>
|
|
|
52 |
{{/notavailable}}
|
|
|
53 |
{{/editing}}
|