Proyectos de Subversion Moodle

Rev

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

Rev Autor Línea Nro. Línea
1 efrain 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_bulkmove/bulk_move
19
 
1441 ariadna 20
    Template for qbank_bulkmove/modal_question_bank_bulkmove
1 efrain 21
 
22
    Example context (json):
1441 ariadna 23
{
24
    "bank": [
25
        {
26
            "name": "Question bank 1",
27
            "modid": "2",
28
            "contextid": 2,
29
            "coursenamebankname": "c1 - Question bank 1",
30
            "cminfo": {},
31
            "questioncategories": [
32
            ]
33
        }
34
    ],
35
    "categories": {
36
        "categories": [
37
            {
38
                "value": "0",
39
                "disabled": true,
40
                "label": "Bank name 1"
41
            },
42
            {
43
                "value": "123,456",
44
                "selected": true,
45
                "label": "Category 1"
46
            },
47
            {
48
                "value": "124,456",
49
                "label": "Category 2"
50
            }
51
        ]
52
    },
53
    "save": {
54
        "id": "single_button669e368d496707",
55
        "formid": null,
56
        "method": "post",
57
        "url": "#",
58
        "label": "Move questions",
59
        "classes": "singlebutton",
60
        "disabled": false,
61
        "tooltip": null,
62
        "type": "primary",
63
        "attributes": [
64
            {
65
                "name": "data-action",
66
                "value": "bulkmovesave"
67
            },
68
            {
69
                "name": "disabled",
70
                "value": "disabled"
71
            }
72
        ],
73
        "params": [
74
            {
75
                "name": "sesskey",
76
                "value": "abcde12345"
77
            }
78
        ],
79
        "actions": [],
80
        "hasactions": false
81
    },
82
    "contextid": 1000
83
}
1 efrain 84
}}
85
 
1441 ariadna 86
<div class="search-banks">
87
    <h5>{{#str}}questionbank, question{{/str}}</h5>
88
    <label for="searchbanks" class="visually-hidden">{{#str}}questionbank, question{{/str}}</label>
89
    <select
90
        class="form-select bulk-move d-none"
91
        id="searchbanks"
92
        data-contextid="{{contextid}}"
93
        data-requiredcapabilities='["add"]'
94
    >
95
        {{#bank}}
96
            <option value="{{modid}}">{{{coursenamebankname}}}</option>
97
        {{/bank}}
98
    </select>
1 efrain 99
</div>
1441 ariadna 100
<div class="search-categories mt-3">
101
    <h5>{{#str}}questioncategories, question{{/str}}</h5>
102
    {{#categories}}
103
        {{> core_question/question_category_selector }}
104
    {{/categories}}
105
    <div id="searchcatwarning" class="d-none">{{#str}}warning, qbank_bulkmove{{/str}}</div>
106
</div>
107
 
108
{{#save}}
109
    <div class="move-questions mt-3">
110
        {{>core/single_button}}
111
    </div>
112
{{/save}}