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/>.
18 @template gradingform_rubric/grades/grader/gradingpanel
20 Classes required for JS:
23 Data attributes required for JS:
26 Context variables required for this template:
27 * instanceid: Instance of the module this grading form belongs too
28 * criteria: A gradeable item in the Marking Guide
29 * id: The ID of the criteria
30 * description: Description of the criteria
31 * levels: The level that a criteria can be graded at
32 * criterionid: The ID of the criteria
33 * checked: Flag for if this is the currently selected level
34 * definition: Definition of the level
35 * remark: Text input for the teacher to relay to the student
37 Example context (json):
43 "description": "Show your motivation to rock climbing",
48 "definition": "Great work!"
51 "remark": "That's great!"
56 <form id="gradingform_rubric-{{uniqid}}">
57 <input type="hidden" name="instanceid" value="{{instanceid}}">
58 <div id="rubric-advancedgrading-{{uniqid}}" class="criterion">
61 <div class="d-flex align-items-center mb-2">
62 <h5 class="px-0 mb-0 description font-weight-bold">{{{description}}}</h5>
63 <button class="criterion-toggle btn btn-icon icon-no-margin text-reset p-0 font-weight-bold mb-0 ml-auto"
65 data-toggle="collapse"
66 data-target="#criteria-{{id}}"
68 aria-controls="criteria-{{id}}">
69 <span class="collapsed-icon">
70 {{#pix}} t/collapsed, core {{/pix}}
71 <span class="sr-only">{{#str}} expandcriterion, core_grades {{/str}}</span>
73 <span class="expanded-icon">
74 {{#pix}} t/expanded, core {{/pix}}
75 <span class="sr-only">{{#str}} collapsecriterion, core_grades {{/str}}</span>
79 <div class="collapse show" id="criteria-{{id}}">
81 <div class="form-check">
82 <input class="form-check-input level"
84 name="advancedgrading[criteria][{{criterionid}}][levelid]"
85 id="advancedgrading-criteria-{{criterionid}}-levels-{{id}}-definition"
97 <label class="w-100" for="advancedgrading-criteria-{{criterionid}}-levels-{{id}}-definition">
101 <span class="pull-right">
102 {{#str}}pointsvalue, gradingform_rubric, {{score}}{{/str}}
107 <div class="form-group">
108 <label class="text-muted" for="advancedgrading-criteria-{{id}}-remark">{{#str}} additionalfeedback, core_grades {{/str}}</label>
109 <textarea class="form-control"
110 name="advancedgrading[criteria][{{id}}][remark]"
111 id="advancedgrading-criteria-{{id}}-remark"
115 data-auto-rows="true"
116 >{{{remark}}}</textarea>
124 require(['core/auto_rows'], function(AutoRows) {
125 AutoRows.init(document.getElementById('gradingform_rubric-{{uniqid}}'));