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/childlist
19
 
20
    This template a sub-list of children within a category.
21
 
22
    Context variables required for this template:
23
    * categoryid - The parent category of the child categories.
24
    * children - Children category item to curent category (same variables as qbank_managecategories/category).
25
 
26
    Example context (json):
27
    {
28
        "categoryid": "1",
29
        "children": [
30
            {
31
                "categoryid": "2",
32
                "questionbankurl": "question/edit.php?cmid=123",
33
                "categoryname": "Default for Miscellaneous",
34
                "idnumber": "1",
35
                "questioncount": " 1",
36
                "categorydesc": "The default category for questions shared in context Miscellaneous",
37
                "editactionmenu": "<div class='action-menu moodle-actionmenu'>...</div>",
38
                "draghandle": true
39
            }
40
        ]
41
    }
42
}}
43
<ul class="qbank_managecategories-categorylist d-flex flex-wrap mt-1 col-12" data-categoryid="{{categoryid}}">
44
    {{#children}}
45
        {{> qbank_managecategories/category }}
46
    {{/children}}
47
</ul>
48
{{#js}}
49
    require(['qbank_managecategories/categorylist'], function(component) {
50
        component.init('.qbank_managecategories-categorylist[data-categoryid="{{categoryid}}"]');
51
    });
52
{{/js}}