From f67ebb0856f7f5ae81613eb20d4b3205b98fe767 Mon Sep 17 00:00:00 2001 From: Dan Marsden Date: Fri, 1 Sep 2017 13:02:04 +1200 Subject: [PATCH] Fixes #270 - allow activity level warnings to be deleted. --- warnings.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/warnings.php b/warnings.php index a8462c5..74518a2 100644 --- a/warnings.php +++ b/warnings.php @@ -144,9 +144,9 @@ if ($action == 'delete' && !empty($notid)) { } else { require_sesskey(); $params = array('id' => $notid); - if (!empty($id)) { + if (!empty($att)) { // Add id/level to array. - $params['idnumber'] = $id; + $params['idnumber'] = $att->id; } $DB->delete_records('attendance_warning', $params); echo $OUTPUT->notification(get_string('warningdeleted', 'mod_attendance'), 'success');