diff --git a/classes/output/mobile.php b/classes/output/mobile.php index dcf05a6ac5f..4f408422887 100644 --- a/classes/output/mobile.php +++ b/classes/output/mobile.php @@ -53,7 +53,6 @@ public static function mobile_view_activity($args) { require_once($CFG->dirroot.'/mod/attendance/locallib.php'); - $versionname = $args['appversioncode'] >= 3950 ? 'latest' : 'ionic3'; $cmid = $args['cmid']; $courseid = $args['courseid']; $takenstatus = empty($args['status']) ? '' : $args['status']; @@ -252,7 +251,7 @@ public static function mobile_view_activity($args) { 'templates' => [ [ 'id' => 'main', - 'html' => $OUTPUT->render_from_template("mod_attendance/mobile_view_page_$versionname", $data), + 'html' => $OUTPUT->render_from_template("mod_attendance/mobile_view_page_latest", $data), ], ], 'javascript' => '', @@ -272,7 +271,7 @@ public static function mobile_user_form($args) { require_once($CFG->dirroot.'/mod/attendance/locallib.php'); $args = (object) $args; - $versionname = $args->appversioncode >= 3950 ? 'latest' : 'ionic3'; + $versionname = $args->appversioncode >= 44000 ? 'latest' : 'ionic5'; $cmid = $args->cmid; $courseid = $args->courseid; $sessid = $args->sessid; @@ -374,7 +373,7 @@ public static function mobile_teacher_form($args) { require_once($CFG->dirroot.'/mod/attendance/locallib.php'); $args = (object) $args; - $versionname = $args->appversioncode >= 3950 ? 'latest' : 'ionic3'; + $versionname = $args->appversioncode >= 44000 ? 'latest' : 'ionic5'; $cmid = $args->cmid; $courseid = $args->courseid; $sessid = $args->sessid; diff --git a/templates/mobile_teacher_form_ionic3.mustache b/templates/mobile_teacher_form_ionic5.mustache similarity index 64% rename from templates/mobile_teacher_form_ionic3.mustache rename to templates/mobile_teacher_form_ionic5.mustache index f25374f2a01..4beb511592e 100644 --- a/templates/mobile_teacher_form_ionic3.mustache +++ b/templates/mobile_teacher_form_ionic5.mustache @@ -52,53 +52,53 @@ <%#showmessage%> <%#messages%> - - {{ 'plugin.mod_attendance.<% string %>' | translate }} + + {{ 'plugin.mod_attendance.<% string %>' | translate }} <%/messages%> <%/showmessage%> - - {{ 'plugin.mod_attendance.setallstatuses' | translate }} - - + + {{ 'plugin.mod_attendance.setallstatuses' | translate }} + + <%#statuses%> - - + + <% acronym %> <%/statuses%> - + <%#users%> - - + + -

<% fullname %>

-
- + +

<% fullname %>

+
+ + <%#statuses%> - - <% acronym %> - - - + + <% acronym %> + + +
<%/statuses%> - + <%/users%> - - - + + {{ 'plugin.mod_attendance.submitattendance' | translate }} + \ No newline at end of file diff --git a/templates/mobile_teacher_form_latest.mustache b/templates/mobile_teacher_form_latest.mustache index 4beb511592e..cb9e2cc4d25 100644 --- a/templates/mobile_teacher_form_latest.mustache +++ b/templates/mobile_teacher_form_latest.mustache @@ -46,9 +46,17 @@ }} {{=<% %>=}}
+ <%#attendance.intro%> - + + + + + + + + <%/attendance.intro%> <%#showmessage%> <%#messages%> @@ -67,8 +75,7 @@ - <% acronym %> - + <% acronym %> <%/statuses%> @@ -89,8 +96,7 @@ <%#statuses%> - <% acronym %> - + <% acronym %> <%/statuses%> @@ -101,4 +107,4 @@ {{ 'plugin.mod_attendance.submitattendance' | translate }} -
\ No newline at end of file + diff --git a/templates/mobile_user_form_ionic3.mustache b/templates/mobile_user_form_ionic5.mustache similarity index 71% rename from templates/mobile_user_form_ionic3.mustache rename to templates/mobile_user_form_ionic5.mustache index b47502da52d..103fdc107e8 100644 --- a/templates/mobile_user_form_ionic3.mustache +++ b/templates/mobile_user_form_ionic5.mustache @@ -49,34 +49,34 @@ <%#showmessage%> <%#messages%> - - {{ 'plugin.mod_attendance.<% string %>' | translate }} + + {{ 'plugin.mod_attendance.<% string %>' | translate }} <%/messages%> <%/showmessage%> <%#showpassword%> - {{ 'plugin.mod_attendance.enterpassword' | translate }}: - + - <%/showpassword%> <%#showstatuses%> - + <%#statuses%> - + <% description %> - + <%/statuses%> - - + <%/showstatuses%> <%#disabledduetotime%> - {{ 'plugin.mod_attendance.somedisabledstatus' | translate }} + + {{ 'plugin.mod_attendance.somedisabledstatus' | translate }} + <%/disabledduetotime%> \ No newline at end of file diff --git a/templates/mobile_user_form_latest.mustache b/templates/mobile_user_form_latest.mustache index 103fdc107e8..1185a3558fc 100644 --- a/templates/mobile_user_form_latest.mustache +++ b/templates/mobile_user_form_latest.mustache @@ -45,7 +45,15 @@ }} {{=<% %>=}}
- + <%#attendance.intro%> + + + + + + + + <%/attendance.intro%> <%#showmessage%> <%#messages%> @@ -65,8 +73,7 @@ <%#statuses%> - <% description %> - + <% description %> <%/statuses%> @@ -79,4 +86,4 @@ {{ 'plugin.mod_attendance.somedisabledstatus' | translate }} <%/disabledduetotime%> -
\ No newline at end of file + diff --git a/templates/mobile_view_page_ionic3.mustache b/templates/mobile_view_page_ionic3.mustache deleted file mode 100644 index 8d134f17ab5..00000000000 --- a/templates/mobile_view_page_ionic3.mustache +++ /dev/null @@ -1,144 +0,0 @@ -{{! - This file is part of Moodle - http://moodle.org/ - - Moodle is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - Moodle is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Moodle. If not, see . -}} -{{! - @template mod_attendance/mobile_view_page - - The main page to view the attendance activity - - Classes required for JS: - * None - - Data attibutes required for JS: - * All data attributes are required - - Context variables required for this template: - * attendance - * summary - * cmid - - Example context (json): - { - "attendance": { - "id": "1", - "course": "2", - "name": "Class Attendance", - "intro": "Intro" - }, - "summary": { - "numtakensessions": "1", - "pointssessionscompleted": "2", - "percentagesessionscompleted": "2" - }, - "cmid": "25", - "timestamp": "1234" - } -}} -{{=<% %>=}} -
- - <%#showmessage%> - <%#messages%> - - - {{ 'plugin.mod_attendance.<% string %>' | translate }} - - - <%/messages%> - <%/showmessage%> - <%#sessions%> - -

<% time %>

-

<% groupname %>

-

<% currentstatus %>

- <%#sessid%> - - <%/sessid%> -
- <%/sessions%> - - - - - {{ 'plugin.mod_attendance.sessionscompleted' | translate }} - - - <% summary.numtakensessions %> - - - - - {{ 'plugin.mod_attendance.pointssessionscompleted' | translate }} - - - <% summary.pointssessionscompleted %> - - - - - {{ 'plugin.mod_attendance.percentagesessionscompleted' | translate }} - - - <% summary.percentagesessionscompleted %> - - - - - - {{ 'plugin.mod_attendance.sessionstotal' | translate }} - - - <% summary.numallsessions %> - - - - - {{ 'plugin.mod_attendance.pointsallsessions' | translate }} - - - <% summary.percentagesessionscompleted %> - - - - - {{ 'plugin.mod_attendance.percentageallsessions' | translate }} - - - <% summary.allsessionspercentage %> - - - - - {{ 'plugin.mod_attendance.maxpossiblepoints' | translate }} - - - <% summary.maxpossiblepoints %> - - - - - {{ 'plugin.mod_attendance.maxpossiblepercentage' | translate }} - - - <% summary.maxpossiblepercentage %> - - - - - -
\ No newline at end of file diff --git a/templates/mobile_view_page_latest.mustache b/templates/mobile_view_page_latest.mustache index af7746e80b9..b6da5fbbbc1 100644 --- a/templates/mobile_view_page_latest.mustache +++ b/templates/mobile_view_page_latest.mustache @@ -49,7 +49,9 @@ }} {{=<% %>=}}
- + + <%#showmessage%> <%#messages%> @@ -145,4 +147,4 @@ -
\ No newline at end of file +