Proyectos de Subversion Moodle

Rev

Rev 11 | | Comparar con el anterior | 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/content
19
 
20
    The internal content of a section.
21
 
22
    Example context (json):
23
    {
24
        "num": 3,
25
        "id": 35,
26
        "controlmenu": "[tools menu]",
27
        "header": {
28
            "name": "Section title",
29
            "title": "<a href=\"http://moodle/course/view.php?id=5#section-0\">Section title</a>",
30
            "url": "#",
1441 ariadna 31
            "ishidden": true,
32
            "headinglevel": 3
1 efrain 33
        },
34
        "cmlist": {
35
            "cms": [
36
                {
37
                    "cmitem": {
38
                        "cmformat": {
39
                            "cmname": "<a class=\"aalink\" href=\"#\"><span class=\"instancename\">Forum example</span></a>",
40
                            "hasname": "true"
41
                        },
42
                        "id": 3,
43
                        "cmid": 3,
44
                        "module": "forum",
45
                        "anchor": "activity-3",
46
                        "extraclasses": "newmessages"
47
                    }
48
                },
49
                {
50
                    "cmitem": {
51
                        "cmformat": {
52
                            "cmname": "<a class=\"aalink\" href=\"#\"><span class=\"instancename\">Assign example</span></a>",
53
                            "hasname": "true"
54
                        },
55
                        "id": 4,
56
                        "cmid": 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 bg-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 icon-no-margin\">Edit<b class=\"caret\"></b></a>",
77
            "hasmenu": true
78
        },
79
        "cmcontrols": "[Add an activity or resource]",
80
        "iscoursedisplaymultipage": true,
1441 ariadna 81
        "sectionreturnnum": 0,
1 efrain 82
        "contentcollapsed": false,
83
        "insertafter": true,
84
        "numsections": 42,
85
        "sitehome": false,
1441 ariadna 86
        "isstealth": false,
1 efrain 87
        "highlightedlabel" : "Highlighted"
88
    }
89
}}
1441 ariadna 90
<div class="course-section-header d-flex"
91
     data-for="section_title"
92
     data-id="{{id}}"
93
     data-number="{{num}}"
94
>
95
    {{#singleheader}}
96
        {{$ core_courseformat/local/content/section/header }}
97
            {{> core_courseformat/local/content/section/header }}
98
        {{/ core_courseformat/local/content/section/header }}
99
    {{/singleheader}}
100
    {{#header}}
101
        {{$ core_courseformat/local/content/section/header }}
102
            {{> core_courseformat/local/content/section/header }}
103
        {{/ core_courseformat/local/content/section/header }}
104
    {{/header}}
105
    {{^singleheader}}
106
        {{#restrictionlock}}
107
            <div class="align-self-center ms-2">
108
                {{#pix}}t/unlock, core{{/pix}}
109
            </div>
110
        {{/restrictionlock}}
111
    {{/singleheader}}
112
    <div data-region="sectionbadges" class="sectionbadges d-flex align-items-center">
113
        {{$ core_courseformat/local/content/section/badges }}
114
            {{> core_courseformat/local/content/section/badges }}
115
        {{/ core_courseformat/local/content/section/badges }}
1 efrain 116
    </div>
1441 ariadna 117
    {{#collapsemenu}}
1 efrain 118
        {{^displayonesection}}
1441 ariadna 119
            <div class="flex-fill d-flex justify-content-end me-2 align-self-start mt-2">
120
                <a id="collapsesections"
121
                   class="section-collapsemenu"
122
                   href="#"
123
                   aria-expanded="true"
124
                   role="button"
125
                   data-toggle="toggleall"
126
                >
127
                    <span class="collapseall text-nowrap">{{#str}}collapseall{{/str}}</span>
128
                    <span class="expandall text-nowrap">{{#str}}expandall{{/str}}</span>
129
                </a>
130
            </div>
131
        {{/displayonesection}}
132
    {{/collapsemenu}}
133
    {{#controlmenu}}
134
        {{^displayonesection}}
135
            {{$ core_courseformat/local/content/section/controlmenu }}
136
                {{> core_courseformat/local/content/section/controlmenu }}
137
            {{/ core_courseformat/local/content/section/controlmenu }}
138
        {{/displayonesection}}
139
    {{/controlmenu}}
140
    {{#header}}
141
        {{#headerdisplaymultipage}}
142
            {{^displayonesection}}
143
                {{^controlmenu}}
144
                    <div class="section_goto bulk-hidden ms-auto" data-sectionid="{{id}}">
145
                        <a href="{{{url}}}"
146
                           class="btn btn-icon d-flex"
147
                           title="{{#str}}gotosection, course, {{name}}{{/str}}">
1 efrain 148
                            <span class="dir-rtl-hide">
149
                                {{#pix}}t/right, moodle{{/pix}}
150
                            </span>
151
                            <span class="dir-ltr-hide">
152
                                {{#pix}}t/left, moodle, {{#str}}gotosection, course, {{name}}{{/str}}{{/pix}}
153
                            </span>
1441 ariadna 154
                            <span class="visually-hidden">
1 efrain 155
                                {{#str}}gotosection, course, {{name}}{{/str}}
156
                            </span>
1441 ariadna 157
                        </a>
158
                    </div>
159
                {{/controlmenu}}
160
            {{/displayonesection}}
161
        {{/headerdisplaymultipage}}
162
    {{/header}}
1 efrain 163
</div>
1441 ariadna 164
<div id="coursecontentcollapseid{{id}}"
165
     class="content {{^iscoursedisplaymultipage}}{{^sitehome}}{{^displayonesection}}course-content-item-content collapse {{^contentcollapsed}}show{{/contentcollapsed}}{{/displayonesection}}{{/sitehome}}{{/iscoursedisplaymultipage}}">
1 efrain 166
    <div class="{{#hasavailability}}description{{/hasavailability}} my-3" data-for="sectioninfo">
1441 ariadna 167
        {{#isstealth}}
168
        <div class="alert alert-warning">
169
            {{#str}} orphansectionwarning, core_courseformat {{/str}}
170
        </div>
171
        {{/isstealth}}
172
        {{#summary}}
173
            {{$ core_courseformat/local/content/section/summary }}
174
                {{> core_courseformat/local/content/section/summary }}
175
            {{/ core_courseformat/local/content/section/summary }}
176
        {{/summary}}
177
        {{#availability}}
178
            {{$ core_courseformat/local/content/section/availability }}
179
                {{> core_courseformat/local/content/section/availability }}
180
            {{/ core_courseformat/local/content/section/availability }}
181
        {{/availability}}
182
    </div>
183
    {{#cmsummary}}
184
        {{$ core_courseformat/local/content/section/cmsummary }}
185
            {{> core_courseformat/local/content/section/cmsummary }}
186
        {{/ core_courseformat/local/content/section/cmsummary }}
187
    {{/cmsummary}}
188
    {{#cmlist}}
189
        {{$ core_courseformat/local/content/section/cmlist }}
190
            {{> core_courseformat/local/content/section/cmlist }}
191
        {{/ core_courseformat/local/content/section/cmlist }}
192
    {{/cmlist}}
193
    {{{cmcontrols}}}
1 efrain 194
</div>