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_questionnaire/response_check
|
|
|
19 |
|
|
|
20 |
Template which defines a check type question survey display.
|
|
|
21 |
|
|
|
22 |
Classes required for JS:
|
|
|
23 |
* /mod/questionnaire/module.js
|
|
|
24 |
|
|
|
25 |
Data attributes required for JS:
|
|
|
26 |
* none
|
|
|
27 |
|
|
|
28 |
Context variables required for this template:
|
|
|
29 |
|
|
|
30 |
Example context (json):
|
|
|
31 |
{
|
|
|
32 |
"choices": [
|
|
|
33 |
{
|
|
|
34 |
"selected": "1",
|
|
|
35 |
"name": "choice1",
|
|
|
36 |
"content": "HTML for choice 1",
|
|
|
37 |
"othercontent": "HTML for other content"
|
|
|
38 |
},
|
|
|
39 |
{
|
|
|
40 |
"selected": "",
|
|
|
41 |
"name": "choice2",
|
|
|
42 |
"content": "HTML for choice 2"
|
|
|
43 |
}
|
|
|
44 |
]
|
|
|
45 |
}
|
|
|
46 |
}}
|
|
|
47 |
<!-- Begin HTML generated from response_check template. -->
|
|
|
48 |
<div class="questionnaire_response questionnaire_check">{{!
|
|
|
49 |
}}{{#choices}}{{!
|
|
|
50 |
}}{{#selected}}{{!
|
|
|
51 |
}}<span class="selected">{{^pdf}}<input type="checkbox" name="{{name}}" checked="checked" disabled="disabled" />{{/pdf}}
|
|
|
52 |
{{{content}}}{{#pdf}} ✓{{/pdf}}</span>
|
|
|
53 |
{{#othercontent}}<span class="response text">{{{.}}}</span>{{/othercontent}}
|
|
|
54 |
{{/selected}}
|
|
|
55 |
{{^selected}}
|
|
|
56 |
<span class="unselected"{{#pdf}} color="gray"{{/pdf}}>{{^pdf}}<input type="checkbox" name="{{name}}" disabled="disabled" />{{/pdf}}
|
|
|
57 |
{{{content}}}</span>
|
|
|
58 |
{{/selected}}
|
|
|
59 |
<br />
|
|
|
60 |
{{/choices}}
|
|
|
61 |
</div>
|
|
|
62 |
<!-- End HTML generated from response_check template. -->
|