]> git.mjollnir.org Git - moodle.git/commitdiff
Guest should not see My Courses MDL-6736
authormoodler <moodler>
Thu, 28 Sep 2006 14:48:29 +0000 (14:48 +0000)
committermoodler <moodler>
Thu, 28 Sep 2006 14:48:29 +0000 (14:48 +0000)
blocks/course_list/block_course_list.php

index aa7221e07722d52938d6dcdfc52d6bc2a17b5ed2..5bd473eeae117ce689b4cce31a8b7a91e7bdc241 100644 (file)
@@ -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) {