Merge branch 'MDL-74441-400' of https://github.com/cameron1729/moodle into MOODLE_400...
[moodle.git] / mod / quiz / templates / modal_add_random_question.mustache
blob5979eb6c5ca1831407fbb3a33b9a8de564a381fc
1 {{!
2     This file is part of Moodle - http://moodle.org/
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.
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.
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/>.
17 {{!
18     @template mod_quiz/modal_add_random_question
20     Modal for adding a random question to a quiz activity.
22     Classes required for JS:
23     * none
25     Data attributes required for JS:
26     * none
28     Context variables required for this template:
29     * title A cleaned string (use clean_text()) to display.
30     * body HTML content for the boday
32     Example context (json):
33     {
34         "title": "Example modal",
35         "body": "Some example content for the body"
36     }
39 {{< core/modal }}
40     {{$body}}
41     <ul class="nav nav-tabs" role="tablist">
42         <li class="nav-item">
43             <a class="nav-link active"
44                 data-toggle="tab"
45                 href="#existing-category-{{uniqid}}"
46                 role="tab">
47                 {{#str}} existingcategory, mod_quiz {{/str}}
48             </a>
49         </li>
50         {{#hidden}}
51         <li class="nav-item">
52             <a class="nav-link"
53                 data-toggle="tab"
54                 href="#new-category-{{uniqid}}"
55                 role="tab">
56                 {{#str}} newcategory, mod_quiz {{/str}}
57             </a>
58         </li>
59         {{/hidden}}
60     </ul>
61     <div class="tab-content" data-region="tab-content">
62         <div class="text-sm-center pt-5" data-region="loading-container">
63             {{> core/loading }}
64         </div>
65         <div class="tab-pane active pt-3"
66             id="existing-category-{{uniqid}}"
67             role="tabpanel"
68             data-region="existing-category-container">
69         </div>
70         {{#hidden}}
71         <div class="tab-pane pt-3"
72             id="new-category-{{uniqid}}"
73             role="tabpanel"
74             data-region="new-category-container">
75         </div>
76         {{/hidden}}
77     </div>
78     {{/body}}
79 {{/ core/modal }}