From: moodler Date: Thu, 28 Sep 2006 14:48:29 +0000 (+0000) Subject: Guest should not see My Courses MDL-6736 X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=5e6893720e23e14d0dc9249c1ecb5862d8eef911;p=moodle.git Guest should not see My Courses MDL-6736 --- diff --git a/blocks/course_list/block_course_list.php b/blocks/course_list/block_course_list.php index aa7221e077..5bd473eeae 100644 --- a/blocks/course_list/block_course_list.php +++ b/blocks/course_list/block_course_list.php @@ -34,7 +34,10 @@ class block_course_list extends block_list { } } - if (empty($CFG->disablemycourses) and !empty($USER->id) and !(has_capability('moodle/course:update', get_context_instance(CONTEXT_SYSTEM, SITEID)) and $adminseesall)) { // Just print My Courses + if (empty($CFG->disablemycourses) and + !empty($USER->id) and + !(has_capability('moodle/course:update', get_context_instance(CONTEXT_SYSTEM, SITEID)) and $adminseesall)and + !isguest()) { // Just print My Courses if ($courses = get_my_courses($USER->id)) { foreach ($courses as $course) { if ($course->id == SITEID) {