Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merged fix for bugs 2199 and 2200 from stable
  • Loading branch information
moodler committed Nov 20, 2004
1 parent c95aa08 commit 76ca0f3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions course/lib.php
Expand Up @@ -1224,14 +1224,14 @@ function print_courses($category, $width="100%") {
$categories = get_categories(0); // Parent = 0 ie top-level categories only
if (count($categories) == 1) {
$category = array_shift($categories);
$courses = get_courses($category->id, NULL, 'c.id,c.sortorder,c.visible,c.fullname,c.shortname,c.password,c.summary');
$courses = get_courses($category->id, 'c.sortorder ASC', 'c.id,c.sortorder,c.visible,c.fullname,c.shortname,c.password,c.summary,c.teacher');
} else {
$courses = get_courses("all", NULL, 'c.id,c.sortorder,c.visible,c.fullname,c.shortname,c.password,c.summary');
$courses = get_courses("all", 'c.sortorder ASC', 'c.id,c.sortorder,c.visible,c.fullname,c.shortname,c.password,c.summary,c.teacher');
}
unset($categories);
} else {
$categories = get_categories($category->id); // sub categories
$courses = get_courses($category->id, NULL, 'c.id,c.sortorder,c.visible,c.fullname,c.shortname,c.password,c.summary');
$courses = get_courses($category->id, 'c.sortorder ASC', 'c.id,c.sortorder,c.visible,c.fullname,c.shortname,c.password,c.summary,c.teacher');
}

if ($courses) {
Expand Down

0 comments on commit 76ca0f3

Please sign in to comment.