MDL-34529: Fixed ordering of course sections when performing import/restore by adding...
authorJason Ilicic <jason.ilicic@netspot.com.au>
Wed, 25 Jul 2012 00:50:16 +0000 (10:20 +0930)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Mon, 20 Aug 2012 12:00:26 +0000 (14:00 +0200)
backup/util/dbops/backup_plan_dbops.class.php

index 2ce9434..30714ed 100644 (file)
@@ -112,7 +112,7 @@ abstract class backup_plan_dbops extends backup_dbops {
 
         // Get all sections belonging to requested course
         $sectionsarr = array();
-        $sections = $DB->get_records('course_sections', array('course' => $courseid));
+        $sections = $DB->get_records('course_sections', array('course' => $courseid), 'section');
         foreach ($sections as $section) {
             $sectionsarr[] = $section->id;
         }