From: toyomoyo Date: Tue, 13 Feb 2007 04:09:11 +0000 (+0000) Subject: limit the number of courses to 20 on mymoodle page X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=797c881a01007743f238c1b57b3e88e53e477338;p=moodle.git limit the number of courses to 20 on mymoodle page --- 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 '';