From: defacer Date: Sun, 22 Aug 2004 16:49:40 +0000 (+0000) Subject: Fix for bug 1678: X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=ac6c89c5b06576f48b0ebe7ebb755eb07af82e99;p=moodle.git Fix for bug 1678: When a course's format is changed, blocks which are not appropriate for the new format are automatically purged. --- diff --git a/course/edit.php b/course/edit.php index 1210f67ace..a07024645e 100644 --- a/course/edit.php +++ b/course/edit.php @@ -53,6 +53,11 @@ $form->timemodified = time(); if (!empty($course)) { + // Test for and remove blocks which aren't appropriate anymore + $form->blockinfo = $course->blockinfo; + block_remove_inappropriate_from_course($form); + + // Update with the new data if (update_record("course", $form)) { add_to_log($course->id, "course", "update", "edit.php?id=$id", ""); fix_course_sortorder();