Proyectos de Subversion Moodle

Rev

Ir a la última revisión | | 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}}
98
{{#restrictionlock}}
99
    <div class="align-self-center ml-2">
100
        {{#pix}}t/unlock, core{{/pix}}
101
    </div>
102
{{/restrictionlock}}
103
<div data-region="sectionbadges" class="sectionbadges d-flex align-items-center">
104
    {{$ core_courseformat/local/content/section/badges }}
105
        {{> core_courseformat/local/content/section/badges }}
106
    {{/ core_courseformat/local/content/section/badges }}
107
</div>
108
{{#collapsemenu}}
109
    {{^displayonesection}}
110
    <div class="flex-fill d-flex justify-content-end mr-2 align-self-start mt-2">
111
        <a
112
            id="collapsesections"
113
            class="section-collapsemenu"
114
            href="#"
115
            aria-expanded="true"
116
            role="button"
117
            data-toggle="toggleall"
118
        >
119
            <span class="collapseall text-nowrap">{{#str}}collapseall{{/str}}</span>
120
            <span class="expandall text-nowrap">{{#str}}expandall{{/str}}</span>
121
        </a>
122
    </div>
123
    {{/displayonesection}}
124
{{/collapsemenu}}
125
{{#controlmenu}}
126
    {{^displayonesection}}
127
        {{$ core_courseformat/local/content/section/controlmenu }}
128
            {{> core_courseformat/local/content/section/controlmenu }}
129
        {{/ core_courseformat/local/content/section/controlmenu }}
130
    {{/displayonesection}}
131
{{/controlmenu}}
132
{{#header}}
133
    {{#headerdisplaymultipage}}
134
        {{^displayonesection}}
135
            {{^controlmenu}}
136
                <div class="section_goto bulk-hidden ml-auto" data-sectionid="{{id}}">
137
                    <a href="{{{url}}}"
138
                    class="btn btn-icon d-flex align-items-center justify-content-center icon-no-margin"
139
                    title="{{#str}}gotosection, course, {{name}}{{/str}}">
140
                            <span class="dir-rtl-hide">
141
                                {{#pix}}t/right, moodle{{/pix}}
142
                            </span>
143
                            <span class="dir-ltr-hide">
144
                                {{#pix}}t/left, moodle, {{#str}}gotosection, course, {{name}}{{/str}}{{/pix}}
145
                            </span>
146
                            <span class="sr-only">
147
                                {{#str}}gotosection, course, {{name}}{{/str}}
148
                            </span>
149
                    </a>
150
                </div>
151
            {{/controlmenu}}
152
        {{/displayonesection}}
153
    {{/headerdisplaymultipage}}
154
{{/header}}
155
</div>
156
<div id="coursecontentcollapse{{num}}"
157
    class="content {{^iscoursedisplaymultipage}}{{^sitehome}}{{^displayonesection}}course-content-item-content collapse {{^contentcollapsed}}show{{/contentcollapsed}}{{/displayonesection}}{{/sitehome}}{{/iscoursedisplaymultipage}}">
158
    <div class="{{#hasavailability}}description{{/hasavailability}} my-3" data-for="sectioninfo">
159
    {{#summary}}
160
        {{$ core_courseformat/local/content/section/summary }}
161
            {{> core_courseformat/local/content/section/summary }}
162
        {{/ core_courseformat/local/content/section/summary }}
163
    {{/summary}}
164
    {{#availability}}
165
        {{$ core_courseformat/local/content/section/availability }}
166
            {{> core_courseformat/local/content/section/availability }}
167
        {{/ core_courseformat/local/content/section/availability }}
168
    {{/availability}}
169
</div>
170
{{#cmsummary}}
171
    {{$ core_courseformat/local/content/section/cmsummary }}
172
        {{> core_courseformat/local/content/section/cmsummary }}
173
    {{/ core_courseformat/local/content/section/cmsummary }}
174
{{/cmsummary}}
175
{{#cmlist}}
176
    {{$ core_courseformat/local/content/section/cmlist }}
177
        {{> core_courseformat/local/content/section/cmlist }}
178
    {{/ core_courseformat/local/content/section/cmlist }}
179
{{/cmlist}}
180
{{{cmcontrols}}}