Proyectos de Subversion Moodle

Rev

| 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
                        "module": "forum",
43
                        "anchor": "activity-3",
44
                        "extraclasses": "newmessages"
45
                    }
46
                },
47
                {
48
                    "cmitem": {
49
                        "cmformat": {
50
                            "cmname": "<a class=\"aalink\" href=\"#\"><span class=\"instancename\">Assign example</span></a>",
51
                            "hasname": "true"
52
                        },
53
                        "id": 4,
54
                        "anchor": "activity-4",
55
                        "module": "assign",
56
                        "extraclasses": ""
57
                    }
58
                }
59
            ],
60
            "hascms": true
61
        },
62
        "ishidden": false,
63
        "iscurrent": true,
64
        "currentlink": "<span class=\"accesshide\">This topic</span>",
65
        "availability": {
66
            "info": "<span class=\"badge badge-info\">Hidden from students</span>",
67
            "hasavailability": true
68
        },
69
        "summary": {
70
            "summarytext": "Summary text!"
71
        },
72
        "controlmenu": {
73
            "menu": "<a href=\"#\" class=\"d-inline-block dropdown-toggle icon-no-margin\">Edit<b class=\"caret\"></b></a>",
74
            "hasmenu": true
75
        },
76
        "cmcontrols": "[Add an activity or resource]",
77
        "iscoursedisplaymultipage": true,
78
        "sectionreturnid": 0,
79
        "contentcollapsed": false,
80
        "insertafter": true,
81
        "numsections": 42,
82
        "sitehome": false,
83
        "highlightedlabel" : "Highlighted"
84
    }
85
}}
86
{{#collapsemenu}}
87
<div class="w-100 flex-fill d-flex justify-content-end align-self-start my-2">
88
    <a
89
        id="collapsesections"
90
        class="section-collapsemenu"
91
        href="#"
92
        aria-expanded="true"
93
        role="button"
94
        data-toggle="toggleall"
95
    >
96
        <span class="collapseall text-nowrap">{{#str}}collapseall{{/str}}</span>
97
        <span class="expandall text-nowrap">{{#str}}expandall{{/str}}</span>
98
    </a>
99
    </div>
100
{{/collapsemenu}}
101
{{#singleheader}}
102
{{$ core_courseformat/local/content/section/header }}
103
    {{> core_courseformat/local/content/section/header }}
104
{{/ core_courseformat/local/content/section/header }}
105
{{/singleheader}}
106
{{#header}}
107
{{$ core_courseformat/local/content/section/header }}
108
    {{> core_courseformat/local/content/section/header }}
109
{{/ core_courseformat/local/content/section/header }}
110
{{/header}}
111
{{#restrictionlock}}
112
    <div class="align-self-center ml-2">
113
        {{#pix}}t/unlock, core{{/pix}}
114
    </div>
115
{{/restrictionlock}}
116
<div data-region="sectionbadges" class="sectionbadges d-flex align-items-center">
117
    {{$ core_courseformat/local/content/section/badges }}
118
        {{> core_courseformat/local/content/section/badges }}
119
    {{/ core_courseformat/local/content/section/badges }}
120
</div>
121
{{#controlmenu}}
122
    {{$ core_courseformat/local/content/section/controlmenu }}
123
        {{> core_courseformat/local/content/section/controlmenu }}
124
    {{/ core_courseformat/local/content/section/controlmenu }}
125
{{/controlmenu}}
126
</div>
127
<div id="coursecontentcollapse{{num}}"
128
    class="content {{^iscoursedisplaymultipage}}
129
        {{^sitehome}}course-content-item-content collapse {{^contentcollapsed}}show{{/contentcollapsed}}{{/sitehome}}
130
    {{/iscoursedisplaymultipage}}">
131
    <div class="{{#hasavailability}}description my-3{{/hasavailability}}" data-for="sectioninfo">
132
    {{#summary}}
133
        {{$ core_courseformat/local/content/section/summary }}
134
            {{> core_courseformat/local/content/section/summary }}
135
        {{/ core_courseformat/local/content/section/summary }}
136
    {{/summary}}
137
    {{#availability}}
138
        {{$ core_courseformat/local/content/section/availability }}
139
            {{> core_courseformat/local/content/section/availability }}
140
        {{/ core_courseformat/local/content/section/availability }}
141
    {{/availability}}
142
</div>
143
{{#cmsummary}}
144
    {{$ core_courseformat/local/content/section/cmsummary }}
145
        {{> core_courseformat/local/content/section/cmsummary }}
146
    {{/ core_courseformat/local/content/section/cmsummary }}
147
{{/cmsummary}}
148
{{#cmlist}}
149
    {{$ core_courseformat/local/content/section/cmlist }}
150
        {{> core_courseformat/local/content/section/cmlist }}
151
    {{/ core_courseformat/local/content/section/cmlist }}
152
{{/cmlist}}
153
{{{cmcontrols}}}
154
{{#insertafter}}
155
    {{#numsections}}
156
        {{$ core_courseformat/local/content/addsection}}
157
            {{> core_courseformat/local/content/addsection}}
158
        {{/ core_courseformat/local/content/addsection}}
159
    {{/numsections}}
160
{{/insertafter}}