]> git.mjollnir.org Git - moodle.git/commitdiff
Bit more checking while creating new section
authormartin <martin>
Thu, 15 Aug 2002 02:59:57 +0000 (02:59 +0000)
committermartin <martin>
Thu, 15 Aug 2002 02:59:57 +0000 (02:59 +0000)
course/topics.php

index 3e9426ebad3202766a4791e2b502858f82c65658..8198ce4952fdf6bd8f928fffff45dfd49cccb38c 100644 (file)
             $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)) {