From 22a98145cf903f648f4b49a518c3c7994d93c1fd Mon Sep 17 00:00:00 2001 From: Dan Marsden Date: Fri, 12 May 2017 13:04:30 +1200 Subject: [PATCH] Improve error when incorrect password used. --- attendance.php | 2 +- lang/en/attendance.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/attendance.php b/attendance.php index 091628a..f8825ab 100644 --- a/attendance.php +++ b/attendance.php @@ -73,7 +73,7 @@ if ($mform->is_cancelled()) { $attforsession->studentpassword !== $fromform->studentpassword) { $url = new moodle_url('/mod/attendance/attendance.php', array('sessid' => $id, 'sesskey' => sesskey())); - redirect($url, get_string('incorrectpassword', 'mod_attendance')); + redirect($url, get_string('incorrectpassword', 'mod_attendance'), null, \core\output\notification::NOTIFY_ERROR); } if (!empty($fromform->status)) { diff --git a/lang/en/attendance.php b/lang/en/attendance.php index b8ec66d..242ad5f 100644 --- a/lang/en/attendance.php +++ b/lang/en/attendance.php @@ -133,7 +133,7 @@ $string['identifyby'] = 'Identify student by'; $string['includeall'] = 'Select all sessions'; $string['includenottaken'] = 'Include not taken sessions'; $string['includeremarks'] = 'Include remarks'; -$string['incorrectpassword'] = 'You have entered an incorrect password'; +$string['incorrectpassword'] = 'You have entered an incorrect password and your attendance has not been recorded, please enter the correct password.'; $string['indetail'] = 'In detail...'; $string['invalidsessionenddate'] = 'This date can not be earlier than the session date'; $string['invalidaction'] = 'You must select an action';