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
|
|
|
19 |
|
|
|
20 |
Displays a course section.
|
|
|
21 |
|
|
|
22 |
Note: This template is a wrapper around the section/content template to allow course formats and theme designers to
|
|
|
23 |
modify parts of the wrapper without having to copy/paste the entire template.
|
|
|
24 |
|
|
|
25 |
Example context (json):
|
|
|
26 |
{
|
|
|
27 |
"num": 3,
|
|
|
28 |
"id": 35,
|
|
|
29 |
"controlmenu": "[tools menu]",
|
|
|
30 |
"header": {
|
|
|
31 |
"name": "Section title",
|
|
|
32 |
"title": "<a href=\"http://moodle/course/view.php?id=5#section-0\">Section title</a>",
|
|
|
33 |
"url": "#",
|
|
|
34 |
"ishidden": true
|
|
|
35 |
},
|
|
|
36 |
"cmlist": {
|
|
|
37 |
"cms": [
|
|
|
38 |
{
|
|
|
39 |
"cmitem": {
|
|
|
40 |
"cmformat": {
|
|
|
41 |
"cmname": "<a class=\"aalink\" href=\"#\"><span class=\"instancename\">Forum example</span></a>",
|
|
|
42 |
"hasname": "true"
|
|
|
43 |
},
|
|
|
44 |
"id": 3,
|
|
|
45 |
"module": "forum",
|
|
|
46 |
"anchor": "activity-3",
|
|
|
47 |
"extraclasses": "newmessages"
|
|
|
48 |
}
|
|
|
49 |
},
|
|
|
50 |
{
|
|
|
51 |
"cmitem": {
|
|
|
52 |
"cmformat": {
|
|
|
53 |
"cmname": "<a class=\"aalink\" href=\"#\"><span class=\"instancename\">Assign example</span></a>",
|
|
|
54 |
"hasname": "true"
|
|
|
55 |
},
|
|
|
56 |
"id": 4,
|
|
|
57 |
"anchor": "activity-4",
|
|
|
58 |
"module": "assign",
|
|
|
59 |
"extraclasses": ""
|
|
|
60 |
}
|
|
|
61 |
}
|
|
|
62 |
],
|
|
|
63 |
"hascms": true
|
|
|
64 |
},
|
|
|
65 |
"ishidden": false,
|
|
|
66 |
"iscurrent": true,
|
|
|
67 |
"currentlink": "<span class=\"accesshide\">This topic</span>",
|
|
|
68 |
"availability": {
|
|
|
69 |
"info": "<span class=\"badge badge-info\">Hidden from students</span>",
|
|
|
70 |
"hasavailability": true
|
|
|
71 |
},
|
|
|
72 |
"summary": {
|
|
|
73 |
"summarytext": "Summary text!"
|
|
|
74 |
},
|
|
|
75 |
"controlmenu": {
|
|
|
76 |
"menu": "<a href=\"#\" class=\"d-inline-block dropdown-toggle rui-icon-no-margin\">Edit<b class=\"caret\"></b></a>",
|
|
|
77 |
"hasmenu": true
|
|
|
78 |
},
|
|
|
79 |
"cmcontrols": "[Add an activity or resource]",
|
|
|
80 |
"iscoursedisplaymultipage": true,
|
|
|
81 |
"sectionreturnid": 0,
|
|
|
82 |
"contentcollapsed": false,
|
|
|
83 |
"insertafter": true,
|
|
|
84 |
"numsections": 42,
|
|
|
85 |
"sitehome": false,
|
|
|
86 |
"highlightedlabel" : "Highlighted"
|
|
|
87 |
}
|
|
|
88 |
}}
|
|
|
89 |
<li id="section-{{num}}"
|
|
|
90 |
class="section course-section main {{#onlysummary}} section-summary {{/onlysummary}} clearfix
|
|
|
91 |
{{#ishidden}} hidden {{/ishidden}} {{#iscurrent}} current {{/iscurrent}}
|
|
|
92 |
{{#isstealth}} orphaned {{/isstealth}}"
|
|
|
93 |
data-sectionid="{{num}}"
|
|
|
94 |
data-sectionreturnid="{{sectionreturnid}}"
|
|
|
95 |
data-for="section"
|
|
|
96 |
data-id="{{id}}"
|
|
|
97 |
data-number="{{num}}"
|
|
|
98 |
>
|
|
|
99 |
|
|
|
100 |
|
|
|
101 |
<div class="course-section-header d-flex flex-wrap align-items-center"
|
|
|
102 |
data-for="section_title"
|
|
|
103 |
data-id="{{id}}"
|
|
|
104 |
data-number="{{num}}"
|
|
|
105 |
>
|
|
|
106 |
{{$ core_courseformat/local/content/section/content }}
|
|
|
107 |
{{> core_courseformat/local/content/section/content }}
|
|
|
108 |
{{/ core_courseformat/local/content/section/content }}
|
|
|
109 |
</div>
|
|
|
110 |
</li>
|