Index: index.php =================================================================== --- index.php (revision 645) +++ index.php (working copy) @@ -218,11 +218,17 @@ break; case FRONTPAGECOURSELIST: - - if (isloggedin() and !has_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM)) and !isguest() and empty($CFG->disablemycourses)) { + echo 'Course list limit:'.FRONTPAGECOURSELIMIT; + if (isloggedin() and !has_capability('moodle/site:hidecourselist', get_context_instance(CONTEXT_SYSTEM)) and !isguest() and empty($CFG->disablemycourses)) { print_heading_block(get_string('mycourses')); print_my_moodle(); - } else if ((!has_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM)) and !isguest()) or (count_records('course') <= FRONTPAGECOURSELIMIT)) { + } else if ( + ( + !has_capability('moodle/site:hidecourselist', get_context_instance(CONTEXT_SYSTEM)) + and + !isguest() + ) + 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);