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/question_container
|
|
|
19 |
|
|
|
20 |
Template which defines a check type question survey display. This template uses a simple level of HTML, suitable for being
|
|
|
21 |
translated into a PDF file by the TCPDF library.
|
|
|
22 |
|
|
|
23 |
Classes required for JS:
|
|
|
24 |
* /mod/questionnaire/module.js
|
|
|
25 |
|
|
|
26 |
Data attributes required for JS:
|
|
|
27 |
* none
|
|
|
28 |
|
|
|
29 |
Context variables required for this template:
|
|
|
30 |
|
|
|
31 |
Example context (json):
|
|
|
32 |
{
|
|
|
33 |
"fieldset": {
|
|
|
34 |
"id": "7",
|
|
|
35 |
"class": "questionclass"
|
|
|
36 |
},
|
|
|
37 |
"qnum": "7",
|
|
|
38 |
"required": "<div>*</div>",
|
|
|
39 |
"skippedclass": "skippedclass",
|
|
|
40 |
"qcontent": "HTML for the question content",
|
|
|
41 |
"qformelement": "<div>HTML for the question form element</div>",
|
|
|
42 |
"notifications": "<div>HTML for the notifications area</div>"
|
|
|
43 |
}
|
|
|
44 |
}}
|
|
|
45 |
<!-- Begin fieldset generated from question_container template. -->
|
|
|
46 |
<fieldset id="qn-{{fieldset.id}}" class="{{fieldset.class}}">
|
|
|
47 |
{{{dependencylist}}}
|
|
|
48 |
<table><tr style="padding: 8px;">
|
|
|
49 |
{{#qnum}}<td style="width: 10%;"><span style="background-color: #eee; font-weight: bold; font-size: large;">{{qnum}}</span></td>{{/qnum}}
|
|
|
50 |
<td style="background-color: #e4f1fa; width: 90%;">{{{qcontent}}}</td>
|
|
|
51 |
</tr></table>
|
|
|
52 |
<div class="qn-answer">
|
|
|
53 |
{{{qformelement}}}
|
|
|
54 |
</div>
|
|
|
55 |
</fieldset>
|
|
|
56 |
{{#notifications}}{{{.}}}{{/notifications}}
|
|
|
57 |
<!-- End fieldset generated from question_container template. -->
|