From: martin Date: Thu, 15 Aug 2002 02:58:06 +0000 (+0000) Subject: Fixed bug with creation of new weeks in weekly view X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=ad14a10e4b69f5f180cb6cccf8ef607a87ec2087;p=moodle.git Fixed bug with creation of new weeks in weekly view --- diff --git a/course/weeks.php b/course/weeks.php index a371152c0c..2c8f333fa2 100644 --- a/course/weeks.php +++ b/course/weeks.php @@ -141,9 +141,11 @@ 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)) {