]> git.mjollnir.org Git - moodle.git/commitdiff
admin should not see list of courses on the frontpage when there are too many of...
authorskodak <skodak>
Wed, 19 Jul 2006 13:37:09 +0000 (13:37 +0000)
committerskodak <skodak>
Wed, 19 Jul 2006 13:37:09 +0000 (13:37 +0000)
index.php

index 1ae7eee3977cb85734171d56f312900b7f478fb3..7f36e3b5a76492365115705794ec3e09a47b689a 100644 (file)
--- a/index.php
+++ b/index.php
                 if (isloggedin() && !isset($USER->admin) && empty($CFG->disablemycourses)) {
                     print_heading_block(get_string('mycourses'));
                     print_my_moodle();
-                } else {
+                } else if (!isadmin() or (count_records('course') <= FRONTPAGECOURSELIMIT)) {
+                    // admin should not see list of courses when there are too many of them
                     print_heading_block(get_string('availablecourses'));
                     print_courses(0, '100%', true);
                 }