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/completepage
|
|
|
19 |
|
|
|
20 |
Template which defines a questionnaire completion page.
|
|
|
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: (Note sections have been used to allow non-inclusion)
|
|
|
29 |
* notifications - string: HTML of any notifications loaded.
|
|
|
30 |
* respondentinfo - string: HTML of any specific response/respondent information.
|
|
|
31 |
* title - string: Text title of the questionnaire.
|
|
|
32 |
* printblank - string: HTML of optional print blank questionnaire control.
|
|
|
33 |
* subtitle - string: Optional text subtitle.
|
|
|
34 |
* addinfo - string: Optional HTML additional information.
|
|
|
35 |
* message - string: Any message HTML text.
|
|
|
36 |
* formstart - string: Form start HTML.
|
|
|
37 |
* questions - array: Array of questions HTML.
|
|
|
38 |
* pageinfo - string: Page navigation HTML if present.
|
|
|
39 |
* controlbuttons - string: Questionnaire response management control HTML.
|
|
|
40 |
* formend - string: Form end HTML.
|
|
|
41 |
|
|
|
42 |
Example context (json):
|
|
|
43 |
{
|
|
|
44 |
"notifications": "<div>Notification one</div>",
|
|
|
45 |
"respondentinfo": "<div>This is respondent information</div>",
|
|
|
46 |
"title": "Test Questionnaire",
|
|
|
47 |
"subtitle": "This is a subtitle",
|
|
|
48 |
"addinfo": "<div>This is additional information.</div>",
|
|
|
49 |
"message": "<div>This is a message.</div>",
|
|
|
50 |
"formstart": "<form id=\"formid\" method=\"post\" action=\"index.php\">",
|
|
|
51 |
"questions": [
|
|
|
52 |
"<div>Question 1 HTML</div>",
|
|
|
53 |
"<div>Question 2 HTML</div>"
|
|
|
54 |
],
|
|
|
55 |
"pageinfo": "<div>This is the page information.</div>",
|
|
|
56 |
"controlbuttons": "<div>control button HTML</div>",
|
|
|
57 |
"formend": "</form>"
|
|
|
58 |
}
|
|
|
59 |
}}
|
|
|
60 |
<div class="mod_questionnaire_completepage generalbox">
|
|
|
61 |
{{#notifications}}{{{.}}}{{/notifications}}
|
|
|
62 |
{{{respondentinfo}}}
|
|
|
63 |
{{#title}}<h3 class="surveyTitle">{{.}}</h3>{{/title}}{{{printblank}}}
|
|
|
64 |
{{#subtitle}}<h4 class="surveySubTitle">{{.}}</h4>{{/subtitle}}
|
|
|
65 |
{{#progressbar}}<div class="progressbar">{{{.}}}</div>{{/progressbar}}
|
|
|
66 |
{{#addinfo}}<div class="addInfo">{{{.}}}</div>{{/addinfo}}
|
|
|
67 |
{{#message}}<div class="message">{{{.}}}</div>{{/message}}
|
|
|
68 |
{{#continue}}{{{continue}}}{{/continue}}
|
|
|
69 |
<div class="generalbox">
|
|
|
70 |
{{{formstart}}}
|
|
|
71 |
{{#questions}}{{{.}}}{{/questions}}
|
|
|
72 |
{{#pageinfo}}{{{.}}}{{/pageinfo}}
|
|
|
73 |
<div class="notice">
|
|
|
74 |
<div class="buttons mod_questionnaire_controlbuttons">
|
|
|
75 |
{{{controlbuttons}}}
|
|
|
76 |
</div>
|
|
|
77 |
</div>
|
|
|
78 |
{{{formend}}}
|
|
|
79 |
</div>
|
|
|
80 |
</div>
|