From 22c45da5e4fa1b19a6c38f402b61b888acf622cb Mon Sep 17 00:00:00 2001 From: Dan Marsden Date: Thu, 27 Sep 2018 11:00:02 +1200 Subject: [PATCH] Prevent teacher marking page from being cached in device. --- classes/output/mobile.php | 1 + templates/mobile_view_page.mustache | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/classes/output/mobile.php b/classes/output/mobile.php index 19c4f8a..6914cae 100644 --- a/classes/output/mobile.php +++ b/classes/output/mobile.php @@ -64,6 +64,7 @@ class mobile { $data['cmid'] = $cmid; $data['courseid'] = $courseid; $data['attendance'] = $attendance; + $data['timestamp'] = time(); // Used to prevent attendance session marking page to be cached. $data['attendancefunction'] = 'mobile_user_form'; $isteacher = false; diff --git a/templates/mobile_view_page.mustache b/templates/mobile_view_page.mustache index 1e4a0dd..217d12b 100644 --- a/templates/mobile_view_page.mustache +++ b/templates/mobile_view_page.mustache @@ -43,7 +43,8 @@ "pointssessionscompleted": "2", "percentagesessionscompleted": "2" }, - "cmid": "25" + "cmid": "25", + "timestamp": "1234" } }} {{=<% %>=}} @@ -61,7 +62,7 @@

<% time %>

<% currentstatus %>

<%#sessid%> - <%/sessid%>