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/mobile_main_index_page
|
|
|
19 |
|
|
|
20 |
Template which defines the main page that displays notices, submissions and the start answering link.
|
|
|
21 |
|
|
|
22 |
Context variables required for this template:
|
|
|
23 |
* questionnaire - object: "intro" and "autonumquestions" strings for first respondent link.
|
|
|
24 |
* previous - object: "url" and "title" strings for previous link.
|
|
|
25 |
* respnumber - object: Current positio ("currpos") and "total" number of responses.
|
|
|
26 |
* next - object: "url" and "title" strings for next link.
|
|
|
27 |
* lastrespondent - object: "url" and "title" strings for last respondent link.
|
|
|
28 |
* listlink - string: Url of the link back to the response list.
|
|
|
29 |
* printaction - string: HTML to launch the print function.
|
|
|
30 |
|
|
|
31 |
Example context (json):
|
|
|
32 |
{
|
|
|
33 |
"cmid": 985,
|
|
|
34 |
"userid": 267,
|
|
|
35 |
"intro": "Welcome to the questionnaire",
|
|
|
36 |
"autonumquestions": "1",
|
|
|
37 |
"id": "342",
|
|
|
38 |
"rid": 0,
|
|
|
39 |
"surveyid": "23",
|
|
|
40 |
"action": "index",
|
|
|
41 |
"pagenum": 0,
|
|
|
42 |
"nextpage": 1,
|
|
|
43 |
"prevpage": 0,
|
|
|
44 |
"completed": "1",
|
|
|
45 |
"complete_userdate": "Monday, 17 December 2018, 3:34pm",
|
|
|
46 |
"emptypage": "0",
|
|
|
47 |
"emptypage_content": "This is an empty page.",
|
|
|
48 |
"pagequestions": [
|
|
|
49 |
{
|
|
|
50 |
"id": 5432,
|
|
|
51 |
"type_id": 4,
|
|
|
52 |
"qnum": "Q1",
|
|
|
53 |
"content": "Answer this question",
|
|
|
54 |
"required": "1",
|
|
|
55 |
"fieldkey": "response_1_23",
|
|
|
56 |
"isselect": "0",
|
|
|
57 |
"isbool": "0",
|
|
|
58 |
"isradiobutton": "1",
|
|
|
59 |
"ischeckbox": "0",
|
|
|
60 |
"istextessay": "0",
|
|
|
61 |
"israte": "0",
|
|
|
62 |
"choices": [
|
|
|
63 |
{
|
|
|
64 |
"id": 745,
|
|
|
65 |
"content": "Red",
|
|
|
66 |
"value": " ",
|
|
|
67 |
"choice_id": 745,
|
|
|
68 |
"min": 0,
|
|
|
69 |
"max": 5,
|
|
|
70 |
"minstr": "Low",
|
|
|
71 |
"maxstr": "High",
|
|
|
72 |
"na": 0
|
|
|
73 |
}
|
|
|
74 |
]
|
|
|
75 |
}
|
|
|
76 |
]
|
|
|
77 |
}
|
|
|
78 |
}}
|
|
|
79 |
{{=<% %>=}}
|
|
|
80 |
<div>
|
|
|
81 |
<core-course-module-description description="<%intro%>"
|
|
|
82 |
component="mod_questionnaire" componentId="<%cmid%>"
|
|
|
83 |
pagenum="<%pagenum%>"></core-course-module-description>
|
|
|
84 |
<%#notifications%>
|
|
|
85 |
<ion-card>
|
|
|
86 |
<ion-card-content>
|
|
|
87 |
<%notifications%>
|
|
|
88 |
</ion-card-content>
|
|
|
89 |
</ion-card>
|
|
|
90 |
<%/notifications%>
|
|
|
91 |
<%^notifications%>
|
|
|
92 |
<ion-card>
|
|
|
93 |
<ion-card-content>
|
|
|
94 |
<%#resume%>
|
|
|
95 |
<ion-button expand="block" core-site-plugins-new-content component="mod_questionnaire"
|
|
|
96 |
method="mobile_view_activity" [args]="{cmid: <%cmid%>, action: 'resume'}">
|
|
|
97 |
{{ 'plugin.mod_questionnaire.resumesurvey' | translate }}
|
|
|
98 |
</ion-button>
|
|
|
99 |
<%/resume%>
|
|
|
100 |
<%^resume%>
|
|
|
101 |
<ion-button expand="block" core-site-plugins-new-content component="mod_questionnaire"
|
|
|
102 |
method="mobile_view_activity" [args]="{cmid: <%cmid%>, action: 'respond'}">
|
|
|
103 |
{{ 'plugin.mod_questionnaire.answerquestions' | translate }}
|
|
|
104 |
</ion-button>
|
|
|
105 |
<%/resume%>
|
|
|
106 |
</ion-card-content>
|
|
|
107 |
</ion-card>
|
|
|
108 |
<%/notifications%>
|
|
|
109 |
<%#submissions.0%>
|
|
|
110 |
<ion-card>
|
|
|
111 |
<ion-card-content>
|
|
|
112 |
<%#submissions%>
|
|
|
113 |
<ion-item button core-site-plugins-new-content component="mod_questionnaire" method="mobile_view_activity"
|
|
|
114 |
[args]="{cmid: <%cmid%>, action: 'review', submissionid: <%submissionid%>}">
|
|
|
115 |
<ion-label>
|
|
|
116 |
{{ 'plugin.mod_questionnaire.submitted' | translate }} <%submissiondate%>
|
|
|
117 |
</ion-label>
|
|
|
118 |
</ion-item>
|
|
|
119 |
<%/submissions%>
|
|
|
120 |
</ion-card-content>
|
|
|
121 |
</ion-card>
|
|
|
122 |
<%/submissions.0%>
|
|
|
123 |
<%#emptypage%>
|
|
|
124 |
<%/emptypage%>
|
|
|
125 |
</div>
|