From 7f989948163f95d4329da22e899b7cd6e8b715d5 Mon Sep 17 00:00:00 2001 From: moodler Date: Tue, 21 Oct 2003 02:25:22 +0000 Subject: [PATCH] Don't display search buttons if all the courses are being displayed anyway --- course/lib.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/course/lib.php b/course/lib.php index 6f9e311995..a2a482f879 100644 --- a/course/lib.php +++ b/course/lib.php @@ -1199,11 +1199,13 @@ function print_my_moodle() { echo "
\n"; } - echo "
"; - print_course_search("", false, "short"); - echo ""; - print_single_button("$CFG->wwwroot/course/index.php", NULL, get_string("fulllistofcourses"), "get"); - echo "
\n"; + if (count_records("course") > (count($courses) + 1) ) { // Some courses not being displayed + echo "
"; + print_course_search("", false, "short"); + echo ""; + print_single_button("$CFG->wwwroot/course/index.php", NULL, get_string("fulllistofcourses"), "get"); + echo "
\n"; + } } else { if (count_records("course_categories") > 1) { print_simple_box_start("center", "100%", "#FFFFFF", 5, "categorybox"); -- 2.39.5