| 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 qtype_ordering/feedback
|
|
|
19 |
|
|
|
20 |
Renders the feedback for the question.
|
|
|
21 |
|
|
|
22 |
Context variables required for this template:
|
|
|
23 |
* specificfeedback - Any specific feedback for the question.
|
|
|
24 |
* numpartscorrect - The number of parts correct.
|
|
|
25 |
* specificgradedetailfeedback - The specific grade detail feedback.
|
|
|
26 |
* hint - The hint for the question.
|
|
|
27 |
* generalfeedback - The general feedback for the question.
|
|
|
28 |
* rightanswer - The right answer for the question.
|
|
|
29 |
|
|
|
30 |
Example context (json):
|
|
|
31 |
{
|
|
|
32 |
"specificfeedback": "Maybe you should try again.",
|
|
|
33 |
"numpartscorrect": {
|
|
|
34 |
"numcorrect": 1,
|
|
|
35 |
"numpartial": 3,
|
|
|
36 |
"numincorrect": 0
|
|
|
37 |
},
|
|
|
38 |
"specificgradedetailfeedback": {
|
|
|
39 |
"showpartialwrong": true,
|
|
|
40 |
"gradingtype": "Grading type: Absolute position",
|
|
|
41 |
"gradedetails": "93",
|
|
|
42 |
"orderinglayoutclass": "vertical",
|
|
|
43 |
"scoredetails": [
|
|
|
44 |
{
|
|
|
45 |
"score": "1",
|
|
|
46 |
"maxscore": "1",
|
|
|
47 |
"percent": "100"
|
|
|
48 |
},
|
|
|
49 |
{
|
|
|
50 |
"score": "0",
|
|
|
51 |
"maxscore": "1",
|
|
|
52 |
"percent": "0"
|
|
|
53 |
}
|
|
|
54 |
]
|
|
|
55 |
},
|
|
|
56 |
"hint": "The cake is a lie.",
|
|
|
57 |
"generalfeedback": "Here is some general feedback.",
|
|
|
58 |
"rightanswer": {
|
|
|
59 |
"hascorrectresponse": true,
|
|
|
60 |
"showcorrect": "true",
|
|
|
61 |
"orderinglayoutclass": "vertical",
|
|
|
62 |
"correctanswers": [
|
|
|
63 |
{
|
|
|
64 |
"answertext": "Correct answer 1"
|
|
|
65 |
},
|
|
|
66 |
{
|
|
|
67 |
"answertext": "Correct answer 2"
|
|
|
68 |
}
|
|
|
69 |
]
|
|
|
70 |
}
|
|
|
71 |
}
|
|
|
72 |
}}
|
|
|
73 |
{{#specificfeedback}}
|
|
|
74 |
<div class="specificfeedback">
|
|
|
75 |
{{{.}}}
|
|
|
76 |
</div>
|
|
|
77 |
{{/specificfeedback}}
|
|
|
78 |
{{#numpartscorrect}}
|
|
|
79 |
<div class="numpartscorrect">
|
|
|
80 |
{{>qtype_ordering/num_parts_correct}}
|
|
|
81 |
</div>
|
|
|
82 |
{{/numpartscorrect}}
|
|
|
83 |
{{#specificgradedetailfeedback}}
|
|
|
84 |
{{>qtype_ordering/specific_grade_detail_feedback}}
|
|
|
85 |
{{/specificgradedetailfeedback}}
|
|
|
86 |
{{#hint}}
|
|
|
87 |
<div class="hint">
|
|
|
88 |
{{{.}}}
|
|
|
89 |
</div>
|
|
|
90 |
{{/hint}}
|
|
|
91 |
{{#generalfeedback}}
|
|
|
92 |
<div class="generalfeedback">
|
|
|
93 |
{{{.}}}
|
|
|
94 |
</div>
|
|
|
95 |
{{/generalfeedback}}
|
|
|
96 |
{{#rightanswer}}
|
|
|
97 |
<div class="rightanswer">
|
|
|
98 |
{{>qtype_ordering/correct_response}}
|
|
|
99 |
</div>
|
|
|
100 |
{{/rightanswer}}
|