MDL-63002 core_grade: fixed deletion of overriden letters
authorAdrian Perez <adrian.perez@ffhs.ch>
Fri, 20 Jul 2018 12:25:25 +0000 (14:25 +0200)
committerMark Nelson <markn@moodle.com>
Mon, 30 Jul 2018 12:47:21 +0000 (20:47 +0800)
grade/edit/letter/index.php

index 393afe4..dedd4bf 100644 (file)
@@ -141,7 +141,7 @@ if (!$edit) {
         if (!$admin and empty($data->override)) {
             $records = $DB->get_records('grade_letters', array('contextid' => $context->id));
             foreach ($records as $record) {
-                $DB->delete_record('grade_letters', array('id' => $record->id));
+                $DB->delete_records('grade_letters', array('id' => $record->id));
                 // Trigger the letter grade deleted event.
                 $event = \core\event\grade_letter_deleted::create(array(
                     'objectid' => $record->id,