From ac6c89c5b06576f48b0ebe7ebb755eb07af82e99 Mon Sep 17 00:00:00 2001 From: defacer Date: Sun, 22 Aug 2004 16:49:40 +0000 Subject: [PATCH] Fix for bug 1678: When a course's format is changed, blocks which are not appropriate for the new format are automatically purged. --- course/edit.php | 5 +++++ 1 file changed, 5 insertions(+) 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(); -- 2.39.5