MDL-59287 core_completion: Bulk completion now updates events.
[moodle.git] / completion / classes / manager.php
index 17f7696..2f66775 100644 (file)
@@ -320,6 +320,9 @@ class manager {
                     $needreset[] = $cm->id;
                 }
             }
+            // Update completion calendar events.
+            $completionexpected = ($data['completionexpected']) ? $data['completionexpected'] : null;
+            \core_completion\api::update_completion_date_event($cm->id, $cm->modname, $cm->instance, $completionexpected);
         }
         if ($updated) {
             // Now that modules are fully updated, also update completion data if required.