MDL-35260 Course formats may have settings, be enabled, disabled and uninstalled
This commit is contained in:
+2
-1
@@ -4572,7 +4572,8 @@ function delete_course($courseorid, $showfeedback = true) {
|
||||
// which should know about this updated property, as this event is meant to pass the full course record
|
||||
$course->timemodified = time();
|
||||
|
||||
$DB->delete_records("course", array("id"=>$courseid));
|
||||
$DB->delete_records("course", array("id" => $courseid));
|
||||
$DB->delete_records("course_format_options", array("courseid" => $courseid));
|
||||
|
||||
//trigger events
|
||||
$course->context = $context; // you can not fetch context in the event because it was already deleted
|
||||
|
||||
Reference in New Issue
Block a user