From: toyomoyo Date: Mon, 30 Oct 2006 06:34:14 +0000 (+0000) Subject: merged, do not remove context information when deleting the site course X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=39474844cbc9d47c71e31d87dcc1e326f5251d81;p=moodle.git merged, do not remove context information when deleting the site course --- diff --git a/lib/moodlelib.php b/lib/moodlelib.php index 8aa10b815c..be0e264ddb 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -2809,8 +2809,10 @@ function remove_course_contents($courseid, $showfeedback=true) { question_delete_course($course, $showfeedback); /// Delete all roles and overiddes in the course context (but keep the course context) - delete_context(CONTEXT_COURSE, $course->id); - + if ($courseid != SITEID) { + delete_context(CONTEXT_COURSE, $course->id); + } + return $result; }