MDL-66697 gradingform_rubric: Support new grading panel
[moodle.git] / grade / grading / form / rubric / templates / grades / grader / gradingpanel.mustache
CommitLineData
eb9df053
MM
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 gradingform_rubric/grades/grader/gradingpanel
19
20 Classes required for JS:
21 * TODO
22
23 Data attributes required for JS:
24 * TODO
25
26 Context variables required for this template:
27 * TODO
28
29 Example context (json):
30 {
31 }
32}}
33<form id="gradingform_rubric-{{uniqid}}">
34 <input type="hidden" name="instanceid" value="{{instanceid}}">
35 <div class="gradingform_rubric-description">{{{teacherdescription}}}</div>
36 <div id="rubric-advancedgrading-{{uniqid}}" class="criterion">
37 {{#criteria}}
38 <div class="d-block mb-2">
39 <h5 class="d-inline px-0 font-weight-bold mb-0">{{{description}}}</h5>
40 <button class="d-inline btn p-0 font-weight-bold mb-0 pull-right collapse"
41 type="button"
42 data-toggle="collapse"
43 data-target="#criteria-{{id}}"
44 aria-expanded="true"
45 aria-controls="criteria-{{id}}">
46 </button>
47 </div>
48 <div class="collapse show" id="criteria-{{id}}">
49 {{#levels}}
50 <div class="form-check">
51 <input class="form-check-input level"
52 type="radio"
53 name="advancedgrading[criteria][{{criterionid}}][levelid]"
54 id="advancedgrading-criteria-{{criterionid}}-levels-{{id}}-definition"
55 value="{{id}}"
56 {{#checked}}
57 aria-checked="true"
58 tabindex="0"
59 checked
60 {{/checked}}
61 {{^checked}}
62 aria-checked="false"
63 tabindex="-1"
64 {{/checked}}
65 >
66 <label class="w-100" for="advancedgrading-criteria-{{criterionid}}-levels-{{id}}-definition">
67 <label class="font-weight-bold">
68 {{{definition}}}
69 </label>
70 <label class="pull-right font-weight-bold">
71 {{#str}}pointsvalue, gradingform_rubric, {{score}}{{/str}}
72 </label>
73 </label>
74 </div>
75 {{/levels}}
76 <div class="form-group">
77 <label for="advancedgrading-criteria-{{id}}-remark">Additional feedback</label>
78 <textarea class="form-control" name="advancedgrading[criteria][{{id}}][remark]" id="advancedgrading-criteria-{{id}}-remark" cols="10" rows="5">{{{remark}}}</textarea>
79 </div>
80 </div>
81 {{/criteria}}
82 </div>
83</form>