diff --git a/blocks/course_list/block_course_list.php b/blocks/course_list/block_course_list.php index 9e9f962eed2..c8880649ba7 100644 --- a/blocks/course_list/block_course_list.php +++ b/blocks/course_list/block_course_list.php @@ -55,7 +55,7 @@ class block_course_list extends block_list { $categories = get_categories("0"); // Parent = 0 ie top-level categories only if ($categories) { //Check we have categories - if (count($categories) > 1) { // Just print top level category links + if (count($categories) > 1 || (count($categories) == 1 && count_records('course') > 200)) { // Just print top level category links foreach ($categories as $category) { $linkcss = $category->visible ? "" : " class=\"dimmed\" "; $this->content->items[]="wwwroot/course/category.php?id=$category->id\">$category->name"; diff --git a/course/index.php b/course/index.php index d0d39292513..424bddbab86 100644 --- a/course/index.php +++ b/course/index.php @@ -41,7 +41,7 @@ if (!$adminediting) { $countcategories = count_records("course_categories"); - if ($countcategories > 1) { + if ($countcategories > 1 || ($countcategories == 1 && count_records('course') > 200)) { $strcourses = get_string("courses"); $strcategories = get_string("categories"); print_header("$site->shortname: $strcategories", $strcourses,