Fix link on subnet error.
authorDan Marsden <dan@danmarsden.com>
Tue, 20 Feb 2018 23:26:47 +0000 (12:26 +1300)
committerDan Marsden <dan@danmarsden.com>
Tue, 20 Feb 2018 23:26:47 +0000 (12:26 +1300)
attendance.php

index 1818972..3f08027 100644 (file)
@@ -47,7 +47,8 @@ if (!attendance_can_student_mark($attforsession)) {
 
 // Check if subnet is set and if the user is in the allowed range.
 if (!empty($attforsession->subnet) && !address_in_subnet(getremoteaddr(), $attforsession->subnet)) {
-    notice(get_string('subnetwrong', 'attendance'));
+    $url = new moodle_url('/mod/attendance/view.php', array('id' => $cm->id));
+    notice(get_string('subnetwrong', 'attendance'), $url);
     exit; // Notice calls this anyway.
 }