MDL-58188 mod_label: fixed call to update_completion_date_event()
authorMark Nelson <markn@moodle.com>
Fri, 24 Mar 2017 04:47:31 +0000 (12:47 +0800)
committerDan Poltawski <dan@moodle.com>
Tue, 4 Apr 2017 10:01:45 +0000 (11:01 +0100)
Part of MDL-55611 epic.

mod/label/lib.php

index b36e04d..a057f13 100644 (file)
@@ -111,7 +111,7 @@ function label_delete_instance($id) {
     $result = true;
 
     $cm = get_coursemodule_from_instance('label', $id);
-    \core_completion\api::update_completion_date_event('label', $label->id, null);
+    \core_completion\api::update_completion_date_event($cm->id, 'label', $label->id, null);
 
     if (! $DB->delete_records("label", array("id"=>$label->id))) {
         $result = false;