Revert "MDL-33063 course: Reuse get_all_sections()"
authorDan Poltawski <dan@moodle.com>
Thu, 24 May 2012 12:42:58 +0000 (20:42 +0800)
committerDan Poltawski <dan@moodle.com>
Thu, 24 May 2012 12:42:58 +0000 (20:42 +0800)
course/lib.php

index 371666f..8e07373 100644 (file)
@@ -1070,7 +1070,7 @@ function get_array_of_activities($courseid) {
         return $mod; // always return array
     }
 
-    if ($sections = get_all_sections($courseid)) {
+    if ($sections = $DB->get_records("course_sections", array("course"=>$courseid), "section ASC")) {
        foreach ($sections as $section) {
            if (!empty($section->sequence)) {
                $sequence = explode(",", $section->sequence);