From 797c881a01007743f238c1b57b3e88e53e477338 Mon Sep 17 00:00:00 2001 From: toyomoyo Date: Tue, 13 Feb 2007 04:09:11 +0000 Subject: [PATCH] limit the number of courses to 20 on mymoodle page --- my/index.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/my/index.php b/my/index.php index 40c45bd536..20506423e1 100644 --- a/my/index.php +++ b/my/index.php @@ -53,7 +53,9 @@ echo ''; /// The main overview in the middle of the page - $courses = get_my_courses($USER->id); + + // limits the number of courses showing up + $courses = get_my_courses($USER->id, 'visible DESC,sortorder ASC', '*', false, 21); $site = get_site(); $course = $site; //just in case we need the old global $course hack @@ -74,7 +76,11 @@ } else { print_overview($courses); } - + + // if more than 20 courses + if (count($courses) > 20) { + echo '
...'; + } echo ''; -- 2.39.5