]> git.mjollnir.org Git - moodle.git/commitdiff
limit the number of courses to 20 on mymoodle page
authortoyomoyo <toyomoyo>
Tue, 13 Feb 2007 04:09:11 +0000 (04:09 +0000)
committertoyomoyo <toyomoyo>
Tue, 13 Feb 2007 04:09:11 +0000 (04:09 +0000)
my/index.php

index 40c45bd5363d02446ce72c08feecc0bb8298eeec..20506423e16de5ce19b00c4a85354219b743a016 100644 (file)
@@ -53,7 +53,9 @@
     echo '<td valign="top" id="middle-column">';
 
 /// 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
 
     } else {
         print_overview($courses);
     }
-
+    
+    // if more than 20 courses
+    if (count($courses) > 20) {
+        echo '<br />...';  
+    }
     
     echo '</td>';