Browse Source

Prevent teacher marking page from being cached in device.

MOODLE_35_STABLE
Dan Marsden 6 years ago
parent
commit
22c45da5e4
  1. 1
      classes/output/mobile.php
  2. 5
      templates/mobile_view_page.mustache

1
classes/output/mobile.php

@ -64,6 +64,7 @@ class mobile {
$data['cmid'] = $cmid; $data['cmid'] = $cmid;
$data['courseid'] = $courseid; $data['courseid'] = $courseid;
$data['attendance'] = $attendance; $data['attendance'] = $attendance;
$data['timestamp'] = time(); // Used to prevent attendance session marking page to be cached.
$data['attendancefunction'] = 'mobile_user_form'; $data['attendancefunction'] = 'mobile_user_form';
$isteacher = false; $isteacher = false;

5
templates/mobile_view_page.mustache

@ -43,7 +43,8 @@
"pointssessionscompleted": "2", "pointssessionscompleted": "2",
"percentagesessionscompleted": "2" "percentagesessionscompleted": "2"
}, },
"cmid": "25" "cmid": "25",
"timestamp": "1234"
} }
}} }}
{{=<% %>=}} {{=<% %>=}}
@ -61,7 +62,7 @@
<h2><% time %></h2> <h2><% time %></h2>
<h3><% currentstatus %></h3> <h3><% currentstatus %></h3>
<%#sessid%> <%#sessid%>
<button ion-button core-site-plugins-new-content component="mod_attendance" method="<% attendancefunction %>" [args]="{cmid: <% cmid %>, courseid: <% courseid %>, sessid: <% sessid %>}"> <button ion-button core-site-plugins-new-content component="mod_attendance" method="<% attendancefunction %>" [args]="{cmid: <% cmid %>, courseid: <% courseid %>, sessid: <% sessid %>, timestamp: <% timestamp %>}">
{{ 'plugin.mod_attendance.submitattendance' | translate }} {{ 'plugin.mod_attendance.submitattendance' | translate }}
</button> </button>
<%/sessid%> <%/sessid%>

Loading…
Cancel
Save