diff --git a/classes/output/mobile.php b/classes/output/mobile.php
index 67bf9e64..0e3d0d28 100644
--- a/classes/output/mobile.php
+++ b/classes/output/mobile.php
@@ -40,7 +40,7 @@ public static function mobile_view_activity($args) {
$args = (object) $args;
- $versionname = $args->appversioncode >= 3950 ? 'latest' : 'ionic3';
+ $versionname = $args->appversioncode >= 44000 ? 'latest' : 'ionic5';
$cmid = $args->cmid;
$rid = isset($args->rid) ? $args->rid : 0;
$action = isset($args->action) ? $args->action : 'index';
diff --git a/templates/local/mobile/ionic3/boolean_question.mustache b/templates/local/mobile/ionic5/boolean_question.mustache
similarity index 85%
rename from templates/local/mobile/ionic3/boolean_question.mustache
rename to templates/local/mobile/ionic5/boolean_question.mustache
index a96fa2f8..1d5958dd 100644
--- a/templates/local/mobile/ionic3/boolean_question.mustache
+++ b/templates/local/mobile/ionic5/boolean_question.mustache
@@ -43,11 +43,11 @@
}
}}
{{=<% %>=}}
-">
+">
<%#choices%>
-
+
- disabled="true"<%#value%> checked="true"<%/value%><%/completed%> value="<%id%>">
+ disabled="true"<%#value%> checked="true"<%/value%><%/completed%> [value]="<%id%>">
<%/choices%>
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/templates/local/mobile/ionic3/checkbox_question.mustache b/templates/local/mobile/ionic5/checkbox_question.mustache
similarity index 63%
rename from templates/local/mobile/ionic3/checkbox_question.mustache
rename to templates/local/mobile/ionic5/checkbox_question.mustache
index 615a4f42..0a769fbd 100644
--- a/templates/local/mobile/ionic3/checkbox_question.mustache
+++ b/templates/local/mobile/ionic5/checkbox_question.mustache
@@ -44,27 +44,19 @@
}
}}
{{=<% %>=}}
-
+
<%#choices%>
-
-
-
-
-
- checked="true"<%/value%> value="<%id%>"
- <%#completed%> disabled="true"<%/completed%>
- [(ngModel)]="CONTENT_OTHERDATA.<%choicefieldkey%>">
-
-
- <%#otherchoicekey%>
-
-
- "
- <%#completed%> disabled="true"<%/completed%>>
-
-
- <%/otherchoicekey%>
-
-
+
+
+ checked="true"<%/value%> value="<%id%>"
+ <%#completed%> disabled="true"<%/completed%>
+ [(ngModel)]="CONTENT_OTHERDATA.<%choicefieldkey%>">
+
+ <%#otherchoicekey%>
+
+ "
+ <%#completed%> disabled="true"<%/completed%>>
+
+ <%/otherchoicekey%>
<%/choices%>
\ No newline at end of file
diff --git a/templates/local/mobile/ionic3/date_question.mustache b/templates/local/mobile/ionic5/date_question.mustache
similarity index 88%
rename from templates/local/mobile/ionic3/date_question.mustache
rename to templates/local/mobile/ionic5/date_question.mustache
index 7aef5c81..460c17f5 100644
--- a/templates/local/mobile/ionic3/date_question.mustache
+++ b/templates/local/mobile/ionic5/date_question.mustache
@@ -31,10 +31,12 @@
}}
{{=<% %>=}}
+
+ <%#completed%>
+
+ <%/completed%>
+
<%^completed%>
">
<%/completed%>
- <%#completed%>
-
- <%/completed%>
diff --git a/templates/local/mobile/ionic3/main_index_page.mustache b/templates/local/mobile/ionic5/main_index_page.mustache
similarity index 84%
rename from templates/local/mobile/ionic3/main_index_page.mustache
rename to templates/local/mobile/ionic5/main_index_page.mustache
index 06e87f7b..249b951e 100644
--- a/templates/local/mobile/ionic3/main_index_page.mustache
+++ b/templates/local/mobile/ionic5/main_index_page.mustache
@@ -92,16 +92,16 @@
<%#resume%>
-
+
<%/resume%>
<%^resume%>
-
+
<%/resume%>
@@ -110,10 +110,12 @@
<%#submissions%>
- , action: 'review', submissionid: <%submissionid%>}">
- {{ 'plugin.mod_questionnaire.submitted' | translate }} <%submissiondate%>
-
+
+ {{ 'plugin.mod_questionnaire.submitted' | translate }} <%submissiondate%>
+
+
<%/submissions%>
diff --git a/templates/local/mobile/ionic3/numeric_question.mustache b/templates/local/mobile/ionic5/numeric_question.mustache
similarity index 88%
rename from templates/local/mobile/ionic3/numeric_question.mustache
rename to templates/local/mobile/ionic5/numeric_question.mustache
index ef7663d8..f2988460 100644
--- a/templates/local/mobile/ionic3/numeric_question.mustache
+++ b/templates/local/mobile/ionic5/numeric_question.mustache
@@ -31,10 +31,12 @@
}}
{{=<% %>=}}
+
+ <%#completed%>
+
+ <%/completed%>
+
<%^completed%>
">
<%/completed%>
- <%#completed%>
-
- <%/completed%>
\ No newline at end of file
diff --git a/templates/local/mobile/ionic3/radio_question.mustache b/templates/local/mobile/ionic5/radio_question.mustache
similarity index 62%
rename from templates/local/mobile/ionic3/radio_question.mustache
rename to templates/local/mobile/ionic5/radio_question.mustache
index d530132d..3d57c2f7 100644
--- a/templates/local/mobile/ionic3/radio_question.mustache
+++ b/templates/local/mobile/ionic5/radio_question.mustache
@@ -43,27 +43,19 @@
}
}}
{{=<% %>=}}
-">
+">
<%#choices%>
-
-
-
-
-
- checked="true"<%/value%>
- value="<%id%>"
- <%#completed%> disabled="true"<%/completed%>>
-
-
- <%#otherchoicekey%>
-
-
- "
- <%#completed%> disabled="true"<%/completed%>>
-
-
- <%/otherchoicekey%>
-
-
+
+
+ checked="true"<%/value%>
+ value="<%id%>"
+ <%#completed%> disabled="true"<%/completed%>>
+
+ <%#otherchoicekey%>
+
+ "
+ <%#completed%> disabled="true"<%/completed%>>
+
+ <%/otherchoicekey%>
<%/choices%>
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/templates/local/mobile/ionic3/rate_question.mustache b/templates/local/mobile/ionic5/rate_question.mustache
similarity index 64%
rename from templates/local/mobile/ionic3/rate_question.mustache
rename to templates/local/mobile/ionic5/rate_question.mustache
index afd8e309..1d4eca2d 100644
--- a/templates/local/mobile/ionic3/rate_question.mustache
+++ b/templates/local/mobile/ionic5/rate_question.mustache
@@ -60,7 +60,7 @@
{{=<% %>=}}
-
+
<%#choices.0%>
<%#leftlabel%>
@@ -84,33 +84,37 @@
<%#choices%>
-
-
- {{ CONTENT_OTHERDATA.<%fieldkey%> }}
-
+
+
+
+
+ {{ CONTENT_OTHERDATA.<%fieldkey%> }}
+
- " justify-content-center align-items-center text-center>
- <%#leftlabel%>
-
- <%leftlabel%>
-
- <%/leftlabel%>
- <%#rates%>
-
- disabled="true"<%/completed%>>
-
- <%/rates%>
- <%#hasnacolumn%>
-
- disabled="true"<%/completed%>>
-
- <%/hasnacolumn%>
- <%#rightlabel%>
-
- <%rightlabel%>
-
- <%/rightlabel%>
-
+ ">
+
+ <%#leftlabel%>
+
+ <%leftlabel%>
+
+ <%/leftlabel%>
+ <%#rates%>
+
+ disabled="true"<%/completed%>>
+
+ <%/rates%>
+ <%#hasnacolumn%>
+
+ disabled="true"<%/completed%>>
+
+ <%/hasnacolumn%>
+ <%#rightlabel%>
+
+ <%rightlabel%>
+
+ <%/rightlabel%>
+
+
<%/choices%>
\ No newline at end of file
diff --git a/templates/local/mobile/ionic3/select_question.mustache b/templates/local/mobile/ionic5/select_question.mustache
similarity index 80%
rename from templates/local/mobile/ionic3/select_question.mustache
rename to templates/local/mobile/ionic5/select_question.mustache
index cf41de04..e609e22c 100644
--- a/templates/local/mobile/ionic3/select_question.mustache
+++ b/templates/local/mobile/ionic5/select_question.mustache
@@ -28,13 +28,11 @@
"fieldkey": 985,
"choices": [
{
- "id": 200,
"content": "Red",
"completed": 0,
"value": 1
},
{
- "id": 201,
"content": "Blue",
"completed": 0,
"value": 0
@@ -43,8 +41,11 @@
}
}}
{{=<% %>=}}
-">
- <%#choices%>
- disabled="true"<%/completed%><%#value%> selected="true"<%/value%> value="<%id%>"><%content%>
- <%/choices%>
-
\ No newline at end of file
+
+
+ ">
+ <%#choices%>
+ disabled="true"<%/completed%><%#value%> selected="true"<%/value%> value="<%id%>"><%content%>
+ <%/choices%>
+
+
\ No newline at end of file
diff --git a/templates/local/mobile/ionic3/slider_question.mustache b/templates/local/mobile/ionic5/slider_question.mustache
similarity index 60%
rename from templates/local/mobile/ionic3/slider_question.mustache
rename to templates/local/mobile/ionic5/slider_question.mustache
index 27ccb7c2..80623356 100644
--- a/templates/local/mobile/ionic3/slider_question.mustache
+++ b/templates/local/mobile/ionic5/slider_question.mustache
@@ -27,27 +27,31 @@
{
"fieldkey": 985,
"extradata": {
- "minrange" : 1,
- "maxrange" : 10,
- "startingvalue" : 5,
- "stepvalue" : 1,
- "leftlabel" : "left label",
- "rightlabel" : "right label",
+ "minrange" : 1
+ "maxrange" : 10
+ "startingvalue" : 5
+ "stepvalue" : 1
+ "leftlabel" : "left label"
+ "rightlabel" : "right label"
"centerlabel": "center label"
},
- "completed": 0
+ "completed": 0
}
+
}}
{{=<% %>=}}
<%#extradata%>
-
- disabled="true"<%/completed%>
- min="<%extradata.minrange%>" max="<%extradata.maxrange%>"
- pin="true" step="<%extradata.stepvalue%>"
- [(ngModel)]="CONTENT_OTHERDATA.<%fieldkey%>">
- <%extradata.leftlabel%>
- <%extradata.rightlabel%>
+
+ disabled="true"<%/completed%>
+ min="<%extradata.minrange%>" max="<%extradata.maxrange%>"
+ pin="true" step="<%extradata.stepvalue%>"
+ [(ngModel)]="CONTENT_OTHERDATA.<%fieldkey%>">
+ <%extradata.leftlabel%>
+ <%extradata.rightlabel%>
-<%extradata.centerlabel%>
+ class="disabled"<%/completed%>>
+
+
<%/extradata%>
diff --git a/templates/local/mobile/ionic3/text_question.mustache b/templates/local/mobile/ionic5/text_question.mustache
similarity index 88%
rename from templates/local/mobile/ionic3/text_question.mustache
rename to templates/local/mobile/ionic5/text_question.mustache
index c737a465..8113aea9 100644
--- a/templates/local/mobile/ionic3/text_question.mustache
+++ b/templates/local/mobile/ionic5/text_question.mustache
@@ -31,11 +31,13 @@
}}
{{=<% %>=}}
+
+ <%#completed%>
+
+ <%/completed%>
+
<%^completed%>
"
core-auto-rows>
<%/completed%>
- <%#completed%>
-
- <%/completed%>
\ No newline at end of file
diff --git a/templates/local/mobile/ionic3/view_activity_page.mustache b/templates/local/mobile/ionic5/view_activity_page.mustache
similarity index 55%
rename from templates/local/mobile/ionic3/view_activity_page.mustache
rename to templates/local/mobile/ionic5/view_activity_page.mustache
index 62e9ae53..ee5f508b 100644
--- a/templates/local/mobile/ionic3/view_activity_page.mustache
+++ b/templates/local/mobile/ionic5/view_activity_page.mustache
@@ -41,6 +41,7 @@
"pagenum": 0,
"nextpage": 1,
"prevpage": 0,
+ "hasmorepages": 1,
"completed": "1",
"complete_userdate": "Monday, 17 December 2018, 3:34pm",
"emptypage": "0",
@@ -92,78 +93,103 @@
<%#pagequestions%>
-
- <%#autonumquestions%><%qnum%><%/autonumquestions%>
-
- <%#required%>{{ 'plugin.mod_questionnaire.required' | translate }}<%/required%>
-
+
+ <%#autonumquestions%><%qnum%><%/autonumquestions%>
+
+
+
+ <%#required%>{{ 'plugin.mod_questionnaire.required' | translate }}<%/required%>
+
<%#isselect%>
- <%> mod_questionnaire/local/mobile/ionic3/select_question %>
+ <%> mod_questionnaire/local/mobile/ionic5/select_question %>
<%/isselect%>
<%#isbool%>
- <%> mod_questionnaire/local/mobile/ionic3/boolean_question %>
+ <%> mod_questionnaire/local/mobile/ionic5/boolean_question %>
<%/isbool%>
<%#isradiobutton%>
- <%> mod_questionnaire/local/mobile/ionic3/radio_question %>
+ <%> mod_questionnaire/local/mobile/ionic5/radio_question %>
<%/isradiobutton%>
<%#ischeckbox%>
- <%> mod_questionnaire/local/mobile/ionic3/checkbox_question %>
+ <%> mod_questionnaire/local/mobile/ionic5/checkbox_question %>
<%/ischeckbox%>
<%#istextessay%>
- <%> mod_questionnaire/local/mobile/ionic3/text_question %>
+ <%> mod_questionnaire/local/mobile/ionic5/text_question %>
<%/istextessay%>
<%#isnumeric%>
- <%> mod_questionnaire/local/mobile/ionic3/numeric_question %>
+ <%> mod_questionnaire/local/mobile/ionic5/numeric_question %>
<%/isnumeric%>
<%#isdate%>
- <%> mod_questionnaire/local/mobile/ionic3/date_question %>
+ <%> mod_questionnaire/local/mobile/ionic5/date_question %>
<%/isdate%>
<%#israte%>
- <%> mod_questionnaire/local/mobile/ionic3/rate_question %>
+ <%> mod_questionnaire/local/mobile/ionic5/rate_question %>
<%/israte%>
<%#isslider%>
- <%> mod_questionnaire/local/mobile/ionic3/slider_question %>
+ <%> mod_questionnaire/local/mobile/ionic5/slider_question %>
<%/isslider%>
<%/pagequestions%>
<%^pagequestions%>
- No questions found.
+
+
+ No questions found.
+
+
<%/pagequestions%>
- <%#prevpage%>
-
- <%/prevpage%>
+ <%#hasmorepages%>
+
+
+ <%#prevpage%>
+
+ ,
+ rid: <%rid%>,
+ completeq: 1,
+ action: 'previouspage',
+ pagenum: <%pagenum%>
+ }"
+ [useOtherData]="null"
+ [preSets]="{getFromCache: 0, saveToCache: 0}"
+ refreshOnSuccess="true"
+ samePage="true" type="submit"
+ >
+
+ {{ 'plugin.mod_questionnaire.previouspage' | translate }}
+
+
+ <%/prevpage%>
- <%#nextpage%>
-
- <%/nextpage%>
+ <%#nextpage%>
+
+ ,
+ rid: <%rid%>,
+ completeq: 1,
+ action: 'nextpage',
+ pagenum: <%pagenum%>
+ }"
+ [useOtherData]="null"
+ [preSets]="{getFromCache: 0, saveToCache: 0}"
+ refreshOnSuccess="true"
+ samePage="true" type="submit"
+ >
+
+ {{ 'plugin.mod_questionnaire.nextpage' | translate }}
+
+
+ <%/nextpage%>
+
+
+ <%/hasmorepages%>
<%^nextpage%><%^completed%>
-
+ >{{ 'plugin.mod_questionnaire.savechanges' | translate }}
<%/completed%><%/nextpage%>
<%#emptypage%>
<%/emptypage%>
-
\ No newline at end of file
+
diff --git a/templates/local/mobile/latest/boolean_question.mustache b/templates/local/mobile/latest/boolean_question.mustache
index 1d5958dd..bde7cd49 100644
--- a/templates/local/mobile/latest/boolean_question.mustache
+++ b/templates/local/mobile/latest/boolean_question.mustache
@@ -46,8 +46,9 @@
">
<%#choices%>
-
- disabled="true"<%#value%> checked="true"<%/value%><%/completed%> [value]="<%id%>">
+ disabled="true"<%#value%> checked="true"<%/value%><%/completed%> [value]="<%id%>">
+
+
<%/choices%>
-
\ No newline at end of file
+
diff --git a/templates/local/mobile/latest/checkbox_question.mustache b/templates/local/mobile/latest/checkbox_question.mustache
index 0a769fbd..86640f76 100644
--- a/templates/local/mobile/latest/checkbox_question.mustache
+++ b/templates/local/mobile/latest/checkbox_question.mustache
@@ -46,11 +46,12 @@
{{=<% %>=}}
<%#choices%>
-
-
+
checked="true"<%/value%> value="<%id%>"
<%#completed%> disabled="true"<%/completed%>
- [(ngModel)]="CONTENT_OTHERDATA.<%choicefieldkey%>">
+ [(ngModel)]="CONTENT_OTHERDATA.<%choicefieldkey%>">
+
+
<%#otherchoicekey%>
@@ -59,4 +60,4 @@
<%/otherchoicekey%>
<%/choices%>
-
\ No newline at end of file
+
diff --git a/templates/local/mobile/latest/date_question.mustache b/templates/local/mobile/latest/date_question.mustache
index 460c17f5..1554a6ed 100644
--- a/templates/local/mobile/latest/date_question.mustache
+++ b/templates/local/mobile/latest/date_question.mustache
@@ -37,6 +37,14 @@
<%/completed%>
<%^completed%>
- ">
+
+
+
+ " presentation="date-time"
+ max="2100-12-31" [showDefaultButtons]="true">
+ {{'core.date' | translate}}
+
+
+
<%/completed%>
diff --git a/templates/local/mobile/latest/main_index_page.mustache b/templates/local/mobile/latest/main_index_page.mustache
index 249b951e..b561bc1a 100644
--- a/templates/local/mobile/latest/main_index_page.mustache
+++ b/templates/local/mobile/latest/main_index_page.mustache
@@ -78,9 +78,8 @@
}}
{{=<% %>=}}
-
+
<%#notifications%>
@@ -122,4 +121,4 @@
<%/submissions.0%>
<%#emptypage%>
<%/emptypage%>
-
\ No newline at end of file
+
diff --git a/templates/local/mobile/latest/radio_question.mustache b/templates/local/mobile/latest/radio_question.mustache
index 3d57c2f7..ccffab0b 100644
--- a/templates/local/mobile/latest/radio_question.mustache
+++ b/templates/local/mobile/latest/radio_question.mustache
@@ -46,10 +46,11 @@
">
<%#choices%>
-
checked="true"<%/value%>
value="<%id%>"
- <%#completed%> disabled="true"<%/completed%>>
+ <%#completed%> disabled="true"<%/completed%>>
+
+
<%#otherchoicekey%>
@@ -58,4 +59,4 @@
<%/otherchoicekey%>
<%/choices%>
-
\ No newline at end of file
+
diff --git a/templates/local/mobile/latest/slider_question.mustache b/templates/local/mobile/latest/slider_question.mustache
index 80623356..318dce0b 100644
--- a/templates/local/mobile/latest/slider_question.mustache
+++ b/templates/local/mobile/latest/slider_question.mustache
@@ -51,7 +51,9 @@
<%extradata.rightlabel%>
- class="disabled"<%/completed%>>
-
-
+
+ class="disabled"<%/completed%>>
+
+
+
<%/extradata%>
diff --git a/templates/local/mobile/latest/view_activity_page.mustache b/templates/local/mobile/latest/view_activity_page.mustache
index 54a1bae8..eb7a8a47 100644
--- a/templates/local/mobile/latest/view_activity_page.mustache
+++ b/templates/local/mobile/latest/view_activity_page.mustache
@@ -79,9 +79,15 @@
}}
{{=<% %>=}}
-
+ <%#intro%>
+
+
+
+
+
+
+
+ <%/intro%>
<%#notifications%>
@@ -212,4 +218,4 @@
<%#emptypage%>
<%/emptypage%>
-
\ No newline at end of file
+