From 5e6893720e23e14d0dc9249c1ecb5862d8eef911 Mon Sep 17 00:00:00 2001 From: moodler Date: Thu, 28 Sep 2006 14:48:29 +0000 Subject: [PATCH] Guest should not see My Courses MDL-6736 --- blocks/course_list/block_course_list.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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) { -- 2.39.5