Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 15... Línea 15...
15
    along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
15
    along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
16
}}
16
}}
17
{{!
17
{{!
18
    @template qbank_bulkmove/bulk_move
18
    @template qbank_bulkmove/bulk_move
Línea 19... Línea 19...
19
 
19
 
20
    The move form to move selested questions.
-
 
21
 
-
 
22
    Context variables required for this template:
-
 
23
    * categorydropdown - dropdown html from the managecategories plugin for the list of categories
-
 
24
    * moveurl - the url to post the selected category
-
 
Línea 25... Línea 20...
25
    * returnurl - the base page to return to
20
    Template for qbank_bulkmove/modal_question_bank_bulkmove
-
 
21
 
-
 
22
    Example context (json):
-
 
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": [
26
 
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
            },
27
    Example context (json):
47
            {
-
 
48
                "value": "124,456",
-
 
49
                "label": "Category 2"
-
 
50
            }
-
 
51
        ]
28
    {
52
    },
-
 
53
    "save": {
-
 
54
        "id": "single_button669e368d496707",
-
 
55
        "formid": null,
29
        "categorydropdown": "<select class='select custom-select custom-select'><optgroup label='Course: tes'><option value='2,13'>Default for test (5)</option></optgroup></select>",
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
        ],
30
        "moveurl": "/question/bank/bulkmove/move.php?courseid=2",
79
        "actions": [],
-
 
80
        "hasactions": false
-
 
81
    },
31
        "returnurl": "/question/edit.php?courseid=2"
82
    "contextid": 1000
Línea -... Línea 83...
-
 
83
}
-
 
84
}}
-
 
85
 
-
 
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>
32
    }
97
        {{/bank}}
33
}}
98
    </select>
-
 
99
</div>
-
 
100
<div class="search-categories mt-3">
-
 
101
    <h5>{{#str}}questioncategories, question{{/str}}</h5>
-
 
102
    {{#categories}}
34
 
103
        {{> core_question/question_category_selector }}
35
<div class="bulkmovequestion-header">
-
 
-
 
104
    {{/categories}}
36
    <h3>{{#str}} bulkmoveheader, qbank_bulkmove {{/str}}</h3>
105
    <div id="searchcatwarning" class="d-none">{{#str}}warning, qbank_bulkmove{{/str}}</div>
37
</div>
-
 
38
<form action="{{{moveurl}}}" method="post" id="bulkmovequestion">
106
</div>
39
    {{{categorydropdown}}}
107
 
40
    <input type="submit" value="{{#str}} moveto, question {{/str}}" class="btn btn-primary" name="move" data-action="toggle" data-togglegroup="qbank"
108
{{#save}}
-
 
109
    <div class="move-questions mt-3">