From ad14a10e4b69f5f180cb6cccf8ef607a87ec2087 Mon Sep 17 00:00:00 2001 From: martin Date: Thu, 15 Aug 2002 02:58:06 +0000 Subject: [PATCH] Fixed bug with creation of new weeks in weekly view --- course/weeks.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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)) { -- 2.39.5