]> git.mjollnir.org Git - moodle.git/commitdiff
More little fixups for week 0
authormoodler <moodler>
Sun, 22 Dec 2002 06:45:09 +0000 (06:45 +0000)
committermoodler <moodler>
Sun, 22 Dec 2002 06:45:09 +0000 (06:45 +0000)
course/topics.php
course/view.php
course/weeks.php

index a750785d9ac059956f4ee47a7014a656c511cac3..ce65a11d1969bf0590623ae67e816789d6f69072 100644 (file)
@@ -8,15 +8,6 @@
 
     include_once("$CFG->dirroot/mod/forum/lib.php");
 
-    if (! $sections = get_all_sections($course->id) ) {
-        $section->course = $course->id;   // Create a default section.
-        $section->section = 0;
-        $section->id = insert_record("course_sections", $section);
-        if (! $sections = get_all_sections($course->id) ) {
-            error("Error finding or creating section structures for this course");
-        }
-    }
-    
     if (isset($topic)) {
         if ($topic == "all") {
             unset($USER->topic);
index 7c3dac1ce80ca294f29fdd21f7971458f639ec6e..fec827355f0d72bdb72141f826227343b2908837 100644 (file)
                   update_course_icon($course->id));
 
     get_all_mods($course->id, $mods, $modnames, $modnamesplural, $modnamesused, $modsectioncounts);
-    $sections = get_all_sections($course->id);
+
+    if (! $sections = get_all_sections($course->id)) {
+        $section->course = $course->id;   // Create a default section.
+        $section->section = 0;
+        $section->id = insert_record("course_sections", $section);
+        if (! $sections = get_all_sections($course->id) ) {
+            error("Error finding or creating section structures for this course");
+        }
+    }
 
     switch ($course->format) {
         case "weeks":
index 1c713474a990be3ac7183363446896700cf1ed23..e0abd4ec5d1b96fc023cd573f155ea38c4596aab 100644 (file)
@@ -4,14 +4,6 @@
 
     include_once("$CFG->dirroot/mod/forum/lib.php");
 
-    if (! $sections = get_all_sections($course->id)) {
-        $section->course = $course->id;   // Create a default section.
-        $section->section = 0;
-        $section->id = insert_record("course_sections", $section);
-        if (! $sections = get_all_sections($course->id) ) {
-            error("Error finding or creating section structures for this course");
-        }
-    }
 
     if (isset($week)) {
         if ($week == "all") {