]> git.mjollnir.org Git - moodle.git/commitdiff
merged, do not remove context information when deleting the site course
authortoyomoyo <toyomoyo>
Mon, 30 Oct 2006 06:34:14 +0000 (06:34 +0000)
committertoyomoyo <toyomoyo>
Mon, 30 Oct 2006 06:34:14 +0000 (06:34 +0000)
lib/moodlelib.php

index 8aa10b815c9afe097114ec3350da35e2ca3fd1ac..be0e264ddbc15bdc0552f9037a644dd9a43ab0d5 100644 (file)
@@ -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;
 }