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/category_details
19
 
20
    Partial template for rendering category details. Name, question count, tags, description, etc.
21
 
22
    Context variables required for this template:
23
    * categoryid - The id of the category this item represents.
24
    * questionbankurl - Url for corresponding question bank.
25
    * categoryname - Category name. Raw string. Will be HTML-escaped during rendering.
26
    * idnumber - Id number string (optional).
27
    * questioncount - Number of question in question bank.
28
    * categorydesc - Category description. HTML that is safe to output (e.g. from format_text).
29
    * editactionmenu - Edit action menu link.
30
    * draghandle - Boolean if handle should be displayed (if category is movable).
31
    * children - Children category item to curent category (same variables as those above).
32
 
33
    Example context (json):
34
    {
35
        "categoryid": "1",
36
        "questionbankurl": "question/edit.php?cmid=123",
37
        "categoryname": "Default for Miscellaneous & < > \" '",
38
        "idnumber": "1",
39
        "questioncount": " 1",
40
        "categorydesc": "The default category for questions shared in context Miscellaneous",
41
        "children": "",
42
        "newchildtooltip": "New child of Default for Miscellaneous"
43
    }
44
}}
45
<strong>
46
    <a title="{{#str}}editquestions, question{{/str}}" href="{{{questionbankurl}}}" role="button">
47
        {{categoryname}}
48
        {{#idnumber}}
49
            <span class="badge text-bg-primary">
50
                        <span class="accesshide">
51
                            {{#str}}idnumber, question{{/str}}
52
                        </span>
53
                {{idnumber}}
54
                    </span>
55
        {{/idnumber}}
56
        ({{questioncount}})
57
    </a>
58
</strong>
59
{{^children}}
60
    {{> qbank_managecategories/newchild }}
61
{{/children}}
62
<div class="qbank_managecategories-description">
63
    {{{categorydesc}}}
64
</div>