Browse Source

Prevent teacher marking page from being cached in device.

MOODLE_36_STABLE
Dan Marsden 6 years ago
parent
commit
80143ce0e6
  1. 1
      classes/output/mobile.php
  2. 5
      templates/mobile_view_page.mustache
  3. 2
      version.php

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%>

2
version.php

@ -23,7 +23,7 @@
*/ */
defined('MOODLE_INTERNAL') || die(); defined('MOODLE_INTERNAL') || die();
$plugin->version = 2018091300; $plugin->version = 2018092700;
$plugin->requires = 2018050800; // Requires 3.5. $plugin->requires = 2018050800; // Requires 3.5.
$plugin->release = '3.6.1'; $plugin->release = '3.6.1';
$plugin->maturity = MATURITY_ALPHA; $plugin->maturity = MATURITY_ALPHA;

Loading…
Cancel
Save