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 qbank_managecategories/move_context_list
19
 
20
    Modal to move a category.
21
 
22
    Context variables required for this template:
23
    * contexts - Array of contexts containing question categories
24
        * contextid - The id of the context.
25
        * contextname - The name of the context to display as a heading.
26
        * categories - Array of category objects. See qbank_managecategories/move_category_list partial for details.
27
 
28
    Example context (json):
29
    {
30
        "contexts": [
31
            {
32
                "contexid": 1,
33
                "contextname": "Course 1",
34
                "categories": [
35
                    {
36
                        "categoryname": "Default category for course 1",
37
                        "categoryid": 3,
38
                        "firstchild": true,
39
                        "current": false,
40
                        "hascategories": false,
41
                        "categories": []
42
                    },
43
                    {
44
                        "categoryname": "Default category for course category 1",
45
                        "categoryid": 4,
46
                        "firstchild": false,
47
                        "current": true,
48
                        "hascategories": false,
49
                        "categories": []
50
                    }
51
                ]
52
            },
53
            {
54
                "contexid": 3,
55
                "contextname": "Course 2",
56
                "categories": [
57
                    {
58
                        "categoryname": "Default category for course 2",
59
                        "categoryid": 5,
60
                        "firstchild": true,
61
                        "current": false,
62
                        "hascategories": false,
63
                        "categories": []
64
                    },
65
                    {
66
                        "categoryname": "Default category for course category 2",
67
                        "categoryid": 6,
68
                        "firstchild": false,
69
                        "current": false,
70
                        "hascategories": false,
71
                        "categories": []
72
                    }
73
                ]
74
            }
75
        ]
76
    }
77
}}
78
<div role="tree">
79
    {{#contexts}}
80
        <h3>{{{contextname}}}</h3>
81
        {{>qbank_managecategories/move_category_list}}
82
    {{/contexts}}
83
</div>