Proyectos de Subversion Moodle

Rev

Rev 914 | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
912 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
{{!
918 ariadna 18
    @template theme_universe_child/courseindex/courseindex
912 ariadna 19
 
20
    Displays the course index.
21
 
22
    Example context (json):
23
    {
24
        "editmode": true,
25
        "sections": [
26
            {
27
                "title": "General",
28
                "id": 42,
29
                "number": 1,
30
                "sectionurl": "#",
31
                "indexcollapsed": 0,
32
                "cms": [
33
                    {
34
                        "name": "Glossary of characters",
35
                        "id": "10",
36
                        "url": "#",
37
                        "visible": 1,
38
                        "isactive": 0,
39
                        "uniqid": "0",
40
                        "accessvisible": 1
41
                    },
42
                    {
43
                        "name": "World Cinema forum",
44
                        "id": "11",
45
                        "url": "#",
46
                        "visible": 1,
47
                        "isactive": 0,
48
                        "uniqid": "0",
49
                        "accessvisible": 1
50
                    },
51
                    {
52
                        "name": "Announcements",
53
                        "id": "12",
54
                        "url": "#",
55
                        "visible": 1,
56
                        "isactive": 1,
57
                        "uniqid": "0",
58
                        "accessvisible": 1
59
                    }
60
                ]
61
            },
62
            {
63
                "title": "City of God or Cidade de Deus",
64
                "id": "43",
65
                "number": "2",
66
                "sectionurl": "#",
67
                "indexcollapsed": 1,
68
                "cms": [
69
                    {
70
                        "name": "Resources",
71
                        "id": "13",
72
                        "url": "#",
73
                        "visible": 1,
74
                        "isactive": 0,
75
                        "uniqid": "0",
76
                        "accessvisible": 1
77
                    },
78
                    {
79
                        "name": "Studying City of God by Stephen Smith Bergman-Messerschmidt",
80
                        "id": "14",
81
                        "url": "#",
82
                        "visible": 1,
83
                        "isactive": 0,
84
                        "uniqid": "0",
85
                        "accessvisible": 1
86
                    },
87
                    {
88
                        "name": "Film education study guide",
89
                        "id": "15",
90
                        "url": "#",
91
                        "visible": 1,
92
                        "isactive": 0,
93
                        "uniqid": "0",
94
                        "accessvisible": 1
95
                    }
96
                ]
97
            }
98
        ]
99
    }
100
 
101
}}
102
<div id="course-index" class="courseindex {{#editmode}} editing {{/editmode}}" role="tree">
103
    {{#sections}}
914 ariadna 104
    {{> theme_universe_child/courseindex/section }}
912 ariadna 105
    {{/sections}}
106
</div>
107
{{#js}}
918 ariadna 108
require(['core_courseformat/local/courseindex/courseindex'], function(component) {
912 ariadna 109
    component.init('course-index');
110
});
111
{{/js}}