Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1441 ariadna 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/overview/overviewpage
19
 
20
    Course activity overview page template.
21
 
22
    Example context (json):
23
    {
24
        "elements": [
25
            {
26
                "name": "Activity 1",
27
                "shortname": "forum",
28
                "icon": "<i class='icon fa fa-graduation-cap'></i>",
29
                "overviewurl": "https://moodle.org"
30
            },
31
            {
32
                "name": "Activity 2",
33
                "shortname": "activity2",
34
                "icon": "<i class='icon fa fa-graduation-cap'></i>",
35
                "overviewurl": "https://moodle.org"
36
            }
37
        ],
38
        "contextid": 1,
39
        "courseid": 1
40
    }
41
}}
42
<div id="course-overview-page">
43
    {{#elements}}
44
    {{<core/local/collapsable_section}}
45
        {{$titlecontent}}{{{icon}}} {{name}}{{/titlecontent}}
46
        {{$elementid}}{{shortname}}_overview{{/elementid}}
47
        {{$extraclasses}}border border-1 rounded-3 p-3{{/extraclasses}}
48
        {{$sectioncontent}}
49
            {{#fragment}}
50
                {{#preloadedcontent}} {{{preloadedcontent}}} {{/preloadedcontent}}
51
                {{^preloadedcontent}}
52
                <div
53
                    data-region="loading-icon-container"
54
                    data-courseid="{{courseid}}"
55
                    data-contextid="{{contextid}}"
56
                    data-modname="{{shortname}}"
57
                >
58
                    {{> core/loading }}
59
                </div>
60
                {{/preloadedcontent}}
61
            {{/fragment}}
62
        {{/sectioncontent}}
63
    {{/core/local/collapsable_section}}
64
    {{/elements}}
65
</div>
66
{{#js}}
67
require(['core_course/local/overview/overviewpage'], function(overviewpage) {
68
    overviewpage.init('#course-overview-page');
69
});
70
{{/js}}