Browse Source

Fixes #270 - allow activity level warnings to be deleted.

MOODLE_33_STABLE
Dan Marsden 7 years ago
parent
commit
f67ebb0856
  1. 4
      warnings.php

4
warnings.php

@ -144,9 +144,9 @@ if ($action == 'delete' && !empty($notid)) {
} else { } else {
require_sesskey(); require_sesskey();
$params = array('id' => $notid); $params = array('id' => $notid);
if (!empty($id)) { if (!empty($att)) {
// Add id/level to array. // Add id/level to array.
$params['idnumber'] = $id; $params['idnumber'] = $att->id;
} }
$DB->delete_records('attendance_warning', $params); $DB->delete_records('attendance_warning', $params);
echo $OUTPUT->notification(get_string('warningdeleted', 'mod_attendance'), 'success'); echo $OUTPUT->notification(get_string('warningdeleted', 'mod_attendance'), 'success');

Loading…
Cancel
Save