diff --git a/course/lib.php b/course/lib.php index 8e073737607..371666fd55f 100644 --- a/course/lib.php +++ b/course/lib.php @@ -1070,7 +1070,7 @@ function get_array_of_activities($courseid) { return $mod; // always return array } - if ($sections = $DB->get_records("course_sections", array("course"=>$courseid), "section ASC")) { + if ($sections = get_all_sections($courseid)) { foreach ($sections as $section) { if (!empty($section->sequence)) { $sequence = explode(",", $section->sequence);