Proyectos de Subversion Moodle

Rev

Rev 1 | | 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": "#",
31
            "ishidden": true
32
        },
33
        "cmlist": {
34
            "cms": [
35
                {
36
                    "cmitem": {
37
                        "cmformat": {
38
                            "cmname": "<a class=\"aalink\" href=\"#\"><span class=\"instancename\">Forum example</span></a>",
39
                            "hasname": "true"
40
                        },
41
                        "id": 3,
42
                        "cmid": 3,
43
                        "module": "forum",
44
                        "anchor": "activity-3",
45
                        "extraclasses": "newmessages"
46
                    }
47
                },
48
                {
49
                    "cmitem": {
50
                        "cmformat": {
51
                            "cmname": "<a class=\"aalink\" href=\"#\"><span class=\"instancename\">Assign example</span></a>",
52
                            "hasname": "true"
53
                        },
54
                        "id": 4,
55
                        "cmid": 4,
56
                        "anchor": "activity-4",
57
                        "module": "assign",
58
                        "extraclasses": ""
59
                    }
60
                }
61
            ],
62
            "hascms": true
63
        },
64
        "ishidden": false,
65
        "iscurrent": true,
66
        "currentlink": "<span class=\"accesshide\">This topic</span>",
67
        "availability": {
68
            "info": "<span class=\"badge bg-info\">Hidden from students</span>",
69
            "hasavailability": true
70
        },
71
        "summary": {
72
            "summarytext": "Summary text!"
73
        },
74
        "controlmenu": {
75
            "menu": "<a href=\"#\" class=\"d-inline-block dropdown-toggle icon-no-margin\">Edit<b class=\"caret\"></b></a>",
76
            "hasmenu": true
77
        },
78
        "cmcontrols": "[Add an activity or resource]",
79
        "iscoursedisplaymultipage": true,
80
        "sectionreturnid": 0,
81
        "contentcollapsed": false,
82
        "insertafter": true,
83
        "numsections": 42,
84
        "sitehome": false,
85
        "highlightedlabel" : "Highlighted"
86
    }
87
}}
88
{{#singleheader}}
89
{{$ core_courseformat/local/content/section/header }}
90
    {{> core_courseformat/local/content/section/header }}
91
{{/ core_courseformat/local/content/section/header }}
92
{{/singleheader}}
93
{{#header}}
94
{{$ core_courseformat/local/content/section/header }}
95
    {{> core_courseformat/local/content/section/header }}
96
{{/ core_courseformat/local/content/section/header }}
97
{{/header}}
11 efrain 98
{{^singleheader}}
99
    {{#restrictionlock}}
100
        <div class="align-self-center ml-2">
101
            {{#pix}}t/unlock, core{{/pix}}
102
        </div>
103
    {{/restrictionlock}}
104
{{/singleheader}}
1 efrain 105
<div data-region="sectionbadges" class="sectionbadges d-flex align-items-center">
106
    {{$ core_courseformat/local/content/section/badges }}
107
        {{> core_courseformat/local/content/section/badges }}
108
    {{/ core_courseformat/local/content/section/badges }}
109
</div>
110
{{#collapsemenu}}
111
    {{^displayonesection}}
112
    <div class="flex-fill d-flex justify-content-end mr-2 align-self-start mt-2">
113
        <a
114
            id="collapsesections"
115
            class="section-collapsemenu"
116
            href="#"
117
            aria-expanded="true"
118
            role="button"
119
            data-toggle="toggleall"
120
        >
121
            <span class="collapseall text-nowrap">{{#str}}collapseall{{/str}}</span>
122
            <span class="expandall text-nowrap">{{#str}}expandall{{/str}}</span>
123
        </a>
124
    </div>
125
    {{/displayonesection}}
126
{{/collapsemenu}}
127
{{#controlmenu}}
128
    {{^displayonesection}}
129
        {{$ core_courseformat/local/content/section/controlmenu }}
130
            {{> core_courseformat/local/content/section/controlmenu }}
131
        {{/ core_courseformat/local/content/section/controlmenu }}
132
    {{/displayonesection}}
133
{{/controlmenu}}
134
{{#header}}
135
    {{#headerdisplaymultipage}}
136
        {{^displayonesection}}
137
            {{^controlmenu}}
138
                <div class="section_goto bulk-hidden ml-auto" data-sectionid="{{id}}">
139
                    <a href="{{{url}}}"
140
                    class="btn btn-icon d-flex align-items-center justify-content-center icon-no-margin"
141
                    title="{{#str}}gotosection, course, {{name}}{{/str}}">
142
                            <span class="dir-rtl-hide">
143
                                {{#pix}}t/right, moodle{{/pix}}
144
                            </span>
145
                            <span class="dir-ltr-hide">
146
                                {{#pix}}t/left, moodle, {{#str}}gotosection, course, {{name}}{{/str}}{{/pix}}
147
                            </span>
148
                            <span class="sr-only">
149
                                {{#str}}gotosection, course, {{name}}{{/str}}
150
                            </span>
151
                    </a>
152
                </div>
153
            {{/controlmenu}}
154
        {{/displayonesection}}
155
    {{/headerdisplaymultipage}}
156
{{/header}}
157
</div>
158
<div id="coursecontentcollapse{{num}}"
159
    class="content {{^iscoursedisplaymultipage}}{{^sitehome}}{{^displayonesection}}course-content-item-content collapse {{^contentcollapsed}}show{{/contentcollapsed}}{{/displayonesection}}{{/sitehome}}{{/iscoursedisplaymultipage}}">
160
    <div class="{{#hasavailability}}description{{/hasavailability}} my-3" data-for="sectioninfo">
161
    {{#summary}}
162
        {{$ core_courseformat/local/content/section/summary }}
163
            {{> core_courseformat/local/content/section/summary }}
164
        {{/ core_courseformat/local/content/section/summary }}
165
    {{/summary}}
166
    {{#availability}}
167
        {{$ core_courseformat/local/content/section/availability }}
168
            {{> core_courseformat/local/content/section/availability }}
169
        {{/ core_courseformat/local/content/section/availability }}
170
    {{/availability}}
171
</div>
172
{{#cmsummary}}
173
    {{$ core_courseformat/local/content/section/cmsummary }}
174
        {{> core_courseformat/local/content/section/cmsummary }}
175
    {{/ core_courseformat/local/content/section/cmsummary }}
176
{{/cmsummary}}
177
{{#cmlist}}
178
    {{$ core_courseformat/local/content/section/cmlist }}
179
        {{> core_courseformat/local/content/section/cmlist }}
180
    {{/ core_courseformat/local/content/section/cmlist }}
181
{{/cmlist}}
182
{{{cmcontrols}}}