mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
MDL-8455 - merged from MOODLE_18_STABLE
This commit is contained in:
parent
20fe12b4a2
commit
650408a336
@ -1743,7 +1743,7 @@ function print_courses($category, $hidesitecourse = false) {
|
||||
|
||||
if (empty($category)) {
|
||||
$categories = get_categories(0); // Parent = 0 ie top-level categories only
|
||||
if (count($categories) == 1) {
|
||||
if ($categories != null and count($categories) == 1) {
|
||||
$category = array_shift($categories);
|
||||
$courses = get_courses($category->id, 'c.sortorder ASC', 'c.id,c.category,c.sortorder,c.visible,c.fullname,c.shortname,c.password,c.summary,c.teacher,c.cost,c.currency,c.enrol,c.guest');
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user