MDL-35260 Course formats may have settings, be enabled, disabled and uninstalled

This commit is contained in:
Marina Glancy
2012-11-10 15:34:29 +08:00
parent 8ccaa296fa
commit 3776335ce2
14 changed files with 432 additions and 13 deletions
+2 -1
View File
@@ -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