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 quiz_overview/regrade_modal_body
|
|
|
19 |
|
|
|
20 |
Example context (json):
|
|
|
21 |
{
|
|
|
22 |
"actionurl": "https://example.com/moodle/mod/quiz/report.php?mode=overview?id=123",
|
|
|
23 |
"hasselectedattempts": false,
|
|
|
24 |
"questions": [
|
|
|
25 |
{"slot": 3, "name": "Question 1"},
|
|
|
26 |
{"slot": 5, "name": "Question 2"}
|
|
|
27 |
],
|
|
|
28 |
"hiddeninputs": [
|
|
|
29 |
{"name": "cmid", "value": 123}
|
|
|
30 |
]
|
|
|
31 |
}
|
|
|
32 |
}}
|
|
|
33 |
<form action="{{actionurl}}" method="post">
|
|
|
34 |
{{#hiddeninputs}}
|
|
|
35 |
<input type="hidden" name="{{name}}" value="{{value}}">
|
|
|
36 |
{{/hiddeninputs}}
|
|
|
37 |
<div class="form-row">
|
|
|
38 |
<div class="col">
|
|
|
39 |
<div class="form-check">
|
|
|
40 |
<input class="form-check-input" type="radio" name="regradeselectedattempts"
|
|
|
41 |
id="regradeallattempts" value="0" {{^hasselectedattempts}}checked{{/hasselectedattempts}}>
|
|
|
42 |
<label class="form-check-label" for="regradeallattempts">
|
|
|
43 |
{{# str }} regrade_allattempts, quiz_overview {{/str}}
|
|
|
44 |
</label>
|
|
|
45 |
</div>
|
|
|
46 |
</div>
|
|
|
47 |
<div class="col">
|
|
|
48 |
<div class="form-check">
|
|
|
49 |
<input class="form-check-input" type="radio" name="regradeselectedattempts"
|
|
|
50 |
id="regradeselectedattempts" value="1" {{#hasselectedattempts}}checked{{/hasselectedattempts}}
|
|
|
51 |
{{^hasselectedattempts}}disabled{{/hasselectedattempts}}>
|
|
|
52 |
<label class="form-check-label" for="regradeselectedattempts">
|
|
|
53 |
{{# str }} regrade_selectedattempts, quiz_overview {{/str}}
|
|
|
54 |
</label>
|
|
|
55 |
</div>
|
|
|
56 |
</div>
|
|
|
57 |
</div>
|
|
|
58 |
<div class="form-row mt-2">
|
|
|
59 |
<div class="col">
|
|
|
60 |
<div class="form-check">
|
|
|
61 |
<input class="form-check-input" type="radio" name="regradeselectedquestions"
|
|
|
62 |
id="regradeallquestions" value="0" checked>
|
|
|
63 |
<label class="form-check-label" for="regradeallquestions">
|
|
|
64 |
{{# str }} regrade_allquestions, quiz_overview {{/str}}
|
|
|
65 |
</label>
|
|
|
66 |
</div>
|
|
|
67 |
</div>
|
|
|
68 |
<div class="col">
|
|
|
69 |
<div class="form-check">
|
|
|
70 |
<input class="form-check-input" type="radio" name="regradeselectedquestions"
|
|
|
71 |
id="regradeselectedquestions" value="1">
|
|
|
72 |
<label class="form-check-label" for="regradeselectedquestions">
|
|
|
73 |
{{# str }} regrade_selectedquestions, quiz_overview {{/str}}
|
|
|
74 |
</label>
|
|
|
75 |
</div>
|
|
|
76 |
<fieldset>
|
|
|
77 |
{{#questions}}
|
|
|
78 |
<div class="form-check">
|
|
|
79 |
<input class="form-check-input" type="checkbox" name="regradeslot[]"
|
|
|
80 |
id="regradeslot{{slot}}" value="{{slot}}" disabled>
|
|
|
81 |
<label class="form-check-label" for="regradeslot{{slot}}">
|
|
|
82 |
{{name}}
|
|
|
83 |
</label>
|
|
|
84 |
</div>
|
|
|
85 |
{{/questions}}
|
|
|
86 |
</fieldset>
|
|
|
87 |
</div>
|
|
|
88 |
</div>
|
|
|
89 |
<div class="modal-footer mt-2 pb-0" data-region="footer">
|
|
|
90 |
<input type="submit" class="btn btn-primary" id="regradebutton" name="regrade" value="{{#str}} regrade_regradenow, quiz_overview {{/str}}">
|
|
|
91 |
<input type="submit" class="btn btn-primary" id="dryrunbutton" name="dryrunregrade" value="{{#str}} regrade_dryrun, quiz_overview {{/str}}">
|
|
|
92 |
</div>
|
|
|
93 |
</form>
|