diff --git a/course/category.php b/course/category.php index 4a5e1c46cbb..4f1c13b006b 100644 --- a/course/category.php +++ b/course/category.php @@ -168,7 +168,7 @@ $movecourse = NULL; $swapcourse = NULL; - $courses = get_courses($category->id); + $courses = get_courses($category->id,'c.sortorder ASC', 'c.id,c.sortorder'); if (isset($moveup)) { if ($movecourse = get_record("course", "id", $moveup)) { diff --git a/course/index.php b/course/index.php index 085a50cbd96..3a6f3a315f3 100644 --- a/course/index.php +++ b/course/index.php @@ -245,7 +245,7 @@ } /// Find any orphan courses that don't yet have a valid category and set to default - if ($courses = get_courses()) { + if ($courses = get_courses(NULL,NULL,'c.category,c.id,c.sortorder')) { foreach ($courses as $course) { if ($course->category and !isset($categories[$course->category])) { set_field("course", "category", $default, "id", $course->id); diff --git a/course/lib.php b/course/lib.php index a29ccde8e8e..af3f705043b 100644 --- a/course/lib.php +++ b/course/lib.php @@ -1149,7 +1149,7 @@ function print_category_info($category, $depth) { echo "\n\n".'