From: moodler Date: Tue, 11 Jan 2005 08:00:26 +0000 (+0000) Subject: Don't show "No courses in this category" if there are sub-categories X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=15cf5d2174e3fbf542c80bcddaf7881ff86397b4;p=moodle.git Don't show "No courses in this category" if there are sub-categories --- diff --git a/course/category.php b/course/category.php index 920ad1a22b..b0356a2487 100644 --- a/course/category.php +++ b/course/category.php @@ -226,6 +226,7 @@ $firstentry = true; foreach ($subcategories as $subcategory) { if ($subcategory->visible or iscreator()) { + $subcategorieswereshown = true; if ($firstentry) { echo ''; echo ''; @@ -253,7 +254,9 @@ $numcourses = count($courses); if (!$courses) { - print_heading(get_string("nocoursesyet")); + if (empty($subcategorieswereshown)) { + print_heading(get_string("nocoursesyet")); + } } else if ($numcourses <= COURSE_MAX_SUMMARIES_PER_PAGE and !$page and !$creatorediting) { print_courses($category, "80%");
'.get_string('subcategories').'