From: martin Date: Thu, 15 Aug 2002 02:59:57 +0000 (+0000) Subject: Bit more checking while creating new section X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=5657e2df50ddeea48b2a250fc449c69644b968b0;p=moodle.git Bit more checking while creating new section --- diff --git a/course/topics.php b/course/topics.php index 3e9426ebad..8198ce4952 100644 --- a/course/topics.php +++ b/course/topics.php @@ -148,7 +148,9 @@ $thissection->course = $course->id; // Create a new section structure $thissection->section = $section; $thissection->summary = ""; - $thissection->id = insert_record("course_sections", $thissection); + if (!$thissection->id = insert_record("course_sections", $thissection)) { + notify("Error inserting new topic!"); + } } if (isediting($course->id)) {