From 6eb87571347c36958d99a53d99f73ea34c30ae82 Mon Sep 17 00:00:00 2001 From: Dan Marsden Date: Fri, 26 Jan 2018 10:25:30 +1300 Subject: [PATCH] Fix issue that occurs when updating an individual warning. --- warnings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/warnings.php b/warnings.php index 74518a2..eeb1e87 100644 --- a/warnings.php +++ b/warnings.php @@ -124,7 +124,7 @@ if ($data = $mform->get_data()) { $notify->thirdpartyemails = implode(',', $data->thirdpartyemails); } $existingrecord = $DB->get_record('attendance_warning', array('idnumber' => $notify->idnumber, - 'warningpercent' => $notify->warningpercent)); + 'warningpercent' => $notify->warningpercent, 'warnafter' => $notify->warnafter)); if (empty($existingrecord) || $existingrecord->id == $notify->id) { $DB->update_record('attendance_warning', $notify); echo $OUTPUT->notification(get_string('warningupdated', 'mod_attendance'), 'success');