]> git.mjollnir.org Git - moodle.git/commitdiff
Fixed bug with creation of new weeks in weekly view
authormartin <martin>
Thu, 15 Aug 2002 02:58:06 +0000 (02:58 +0000)
committermartin <martin>
Thu, 15 Aug 2002 02:58:06 +0000 (02:58 +0000)
course/weeks.php

index a371152c0c4b25563292ff73c3b316513278c82a..2c8f333fa2c7d54596d4afbc76c8229680e7e921 100644 (file)
 
         if (! $thisweek = $sections[$week]) {
             $thisweek->course = $course->id;   // Create a new week structure
-            $thisweek->week = $week;
+            $thisweek->section = $week;
             $thisweek->summary = "";
-            $thisweek->id = insert_record("course_sections", $thisweek);
+            if (!$thisweek->id = insert_record("course_sections", $thisweek)) {
+                notify("Error inserting new week!");
+            }
         }
 
         if (isediting($course->id)) {