Added check for $CFG->disablemycourses

This commit is contained in:
moodler 2006-06-16 04:28:56 +00:00
parent e3ec7995a7
commit 2de48ff93d

View File

@ -34,7 +34,7 @@ class block_course_list extends block_list {
}
}
if (isset($USER->id) and !(isadmin() and $adminseesall)) { // Just print My Courses
if (empty($CFG->disablemycourses) and isset($USER->id) and !(isadmin() and $adminseesall)) { // Just print My Courses
if ($courses = get_my_courses($USER->id)) {
foreach ($courses as $course) {
if ($course->id == SITEID) {