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 mod_quiz/edit_grading_page
|
|
|
19 |
|
|
|
20 |
Display the Quiz complex grading page, from below tertiary nav, to above the footer.
|
|
|
21 |
|
|
|
22 |
Classes required for JS:
|
|
|
23 |
* none.
|
|
|
24 |
|
|
|
25 |
Data attributes required for JS:
|
|
|
26 |
* Many. See mod_quiz/edit_grading module.
|
|
|
27 |
|
|
|
28 |
Context variables required for this template:
|
|
|
29 |
* TBC
|
|
|
30 |
|
|
|
31 |
Example context (json):
|
|
|
32 |
{
|
|
|
33 |
"quizid": 42,
|
|
|
34 |
"hasgradeitems": true,
|
|
|
35 |
"gradeitems": [
|
|
|
36 |
{
|
|
|
37 |
"id": 123,
|
|
|
38 |
"sortorder": 1,
|
|
|
39 |
"name": "Reading & writing",
|
|
|
40 |
"displayname": "Reading & writing",
|
|
|
41 |
"summarks": "10.00",
|
|
|
42 |
"isused": true
|
|
|
43 |
}
|
|
|
44 |
],
|
|
|
45 |
"hasslots": true,
|
|
|
46 |
"sections": [
|
|
|
47 |
{
|
|
|
48 |
"displayname": "Section title",
|
|
|
49 |
"slots": [
|
|
|
50 |
{
|
|
|
51 |
"id": 234,
|
|
|
52 |
"displaynumber": "1",
|
|
|
53 |
"displayname": "Question name",
|
|
|
54 |
"maxmark": "10.00",
|
|
|
55 |
"choices": [
|
|
|
56 |
{
|
|
|
57 |
"id": 0,
|
|
|
58 |
"choice": "[none]",
|
|
|
59 |
"isselected": false
|
|
|
60 |
},
|
|
|
61 |
{
|
|
|
62 |
"id": 123,
|
|
|
63 |
"choice": "Reading & writing",
|
|
|
64 |
"isselected": true
|
|
|
65 |
}
|
|
|
66 |
]
|
|
|
67 |
}
|
|
|
68 |
]
|
|
|
69 |
}
|
|
|
70 |
],
|
|
|
71 |
"nogradeitems": {
|
|
|
72 |
"message": "This quiz does not yet have any grade items defined."
|
|
|
73 |
},
|
|
|
74 |
"noslots": {
|
|
|
75 |
"message": "No questions have been added to the quiz yet. Please add the questions to the quiz before setting up grading."
|
|
|
76 |
}
|
|
|
77 |
}
|
|
|
78 |
}}
|
|
|
79 |
|
|
|
80 |
<div id="edit_grading_page-contents">
|
|
|
81 |
|
|
|
82 |
<h2>{{#str}} gradeitemsetup, quiz {{/str}}</h2>
|
|
|
83 |
|
|
|
84 |
{{^hasgradeitems}}
|
|
|
85 |
{{#nogradeitems}}
|
|
|
86 |
{{> core/notification_info}}
|
|
|
87 |
{{/nogradeitems}}
|
|
|
88 |
{{/hasgradeitems}}
|
|
|
89 |
|
|
|
90 |
{{#hasgradeitems}}
|
|
|
91 |
<table class="generaltable table-responsive" id="mod_quiz-grade-item-list" data-quiz-id="{{quizid}}">
|
|
|
92 |
<caption class="sr-only"> {{#str}} gradeitems, grades {{/str}} </caption>
|
|
|
93 |
<thead>
|
|
|
94 |
<tr>
|
|
|
95 |
<th scope="col">{{#str}} gradeitem, grades {{/str}}</th>
|
|
|
96 |
<th scope="col">{{#str}} totalmarks, quiz {{/str}}</th>
|
|
|
97 |
<th scope="col">{{#str}} actions {{/str}}</th>
|
|
|
98 |
</tr>
|
|
|
99 |
</thead>
|
|
|
100 |
<tbody>
|
|
|
101 |
{{#gradeitems}}
|
|
|
102 |
<tr data-quiz-grade-item-id="{{id}}">
|
|
|
103 |
<th scope="row" class="align-middle font-weight-normal py-1">
|
|
|
104 |
<span class="inplaceeditable inplaceeditable-text w-100"
|
|
|
105 |
data-raw-name="{{name}}" data-edit-label="{{#str}} gradeitemnewname, quiz, {{{displayname}}} {{/str}}">
|
|
|
106 |
<a href="#" class="quickeditlink w-100" data-action-edit="1" title="{{#str}} gradeitemedit, quiz, {{{displayname}}} {{/str}}">
|
|
|
107 |
<span class="displayvalue">{{{displayname}}}</span>
|
|
|
108 |
<span class="quickediticon">
|
|
|
109 |
{{#pix}}t/editstring, core{{/pix}}
|
|
|
110 |
</span>
|
|
|
111 |
</a>
|
|
|
112 |
</span>
|
|
|
113 |
</th>
|
|
|
114 |
<td class="align-middle text-right py-1">
|
|
|
115 |
{{summarks}}
|
|
|
116 |
</td>
|
|
|
117 |
<td class="align-middle text-center py-1">
|
|
|
118 |
{{^isused}}
|
|
|
119 |
<a href="#" data-action-delete="1">
|
|
|
120 |
{{#pix}} t/delete, core, {{#str}} gradeitemdelete, quiz, {{{name}}} {{/str}} {{/pix}}
|
|
|
121 |
</a>
|
|
|
122 |
{{/isused}}
|
|
|
123 |
</td>
|
|
|
124 |
</tr>
|
|
|
125 |
{{/gradeitems}}
|
|
|
126 |
</tbody>
|
|
|
127 |
</table>
|
|
|
128 |
{{/hasgradeitems}}
|
|
|
129 |
|
|
|
130 |
<div class="mb-5">
|
|
|
131 |
<button type="button" class="btn btn-secondary" id="mod_quiz-add_grade_item"
|
|
|
132 |
data-quiz-id="{{quizid}}">{{#str}} additem, grades{{/str}}</button>
|
|
|
133 |
{{^hasgradeitems}}
|
|
|
134 |
{{#hasmultiplesections}}
|
|
|
135 |
<button type="button" class="btn btn-secondary" id="mod_quiz-grades_auto_setup"
|
|
|
136 |
data-quiz-id="{{quizid}}">{{#str}} gradeitemsautosetup, quiz{{/str}}</button>
|
|
|
137 |
{{/hasmultiplesections}}
|
|
|
138 |
{{/hasgradeitems}}
|
|
|
139 |
</div>
|
|
|
140 |
|
|
|
141 |
<h3>{{#str}} gradeitemmarkscheme, quiz {{/str}}</h3>
|
|
|
142 |
|
|
|
143 |
{{^hasslots}}
|
|
|
144 |
{{#noslots}}
|
|
|
145 |
{{> core/notification_info}}
|
|
|
146 |
{{/noslots}}
|
|
|
147 |
{{/hasslots}}
|
|
|
148 |
|
|
|
149 |
{{#hasslots}}
|
|
|
150 |
<table class="generaltable table-responsive" id="mod_quiz-slot-list" data-quiz-id="{{quizid}}">
|
|
|
151 |
<caption class="sr-only"> {{#str}} gradeitemmarkscheme, quiz {{/str}} </caption>
|
|
|
152 |
<thead>
|
|
|
153 |
<tr>
|
|
|
154 |
<th scope="col">{{#str}} numberabbr, quiz {{/str}}</th>
|
|
|
155 |
<th scope="col">{{#str}} question, quiz {{/str}}</th>
|
|
|
156 |
<th scope="col">{{#str}} marks, quiz {{/str}}</th>
|
|
|
157 |
<th scope="col">{{#str}} gradeitem, grades {{/str}}</th>
|
|
|
158 |
</tr>
|
|
|
159 |
</thead>
|
|
|
160 |
<tbody>
|
|
|
161 |
{{#sections}}
|
|
|
162 |
<tr class="mod_quiz-new-section">
|
|
|
163 |
<td colspan="4">
|
|
|
164 |
<h4>{{{displayname}}}</h4>
|
|
|
165 |
</td>
|
|
|
166 |
</tr>
|
|
|
167 |
|
|
|
168 |
{{#slots}}
|
|
|
169 |
<tr>
|
|
|
170 |
<td class="align-middle py-1">{{displaynumber}}</td>
|
|
|
171 |
<th scope="row" class="align-middle py-1"><label for="grade-item-choice-{{id}}" class="my-1">{{{displayname}}}</label></th>
|
|
|
172 |
<td class="align-middle text-right py-1">{{maxmark}}</td>
|
|
|
173 |
<td class="align-middle py-1">
|
|
|
174 |
<select id="grade-item-choice-{{id}}" class="form-control" data-slot-id="{{id}}">
|
|
|
175 |
{{#choices}}
|
|
|
176 |
<option value="{{id}}"{{#isselected}} selected="selected"{{/isselected}}>{{{choice}}}</option>
|
|
|
177 |
{{/choices}}
|
|
|
178 |
</select>
|
|
|
179 |
</td>
|
|
|
180 |
</tr>
|
|
|
181 |
{{/slots}}
|
|
|
182 |
{{/sections}}
|
|
|
183 |
</tbody>
|
|
|
184 |
</table>
|
|
|
185 |
{{/hasslots}}
|
|
|
186 |
|
|
|
187 |
<div>
|
|
|
188 |
{{#hasgradeitems}}
|
|
|
189 |
<h3>{{#str}} gradeitemsremovealltitle, quiz {{/str}}</h3>
|
|
|
190 |
<button type="button" class="btn btn-danger" id="mod_quiz-grades_reset_all"
|
|
|
191 |
data-quiz-id="{{quizid}}">{{#str}} gradeitemsremoveall, quiz {{/str}}</button>
|
|
|
192 |
{{/hasgradeitems}}
|
|
|
193 |
</div>
|
|
|
194 |
</div>
|