diff --git a/blocks/course_list/block_course_list.php b/blocks/course_list/block_course_list.php index 7dfc134624a..ec2c56726c6 100644 --- a/blocks/course_list/block_course_list.php +++ b/blocks/course_list/block_course_list.php @@ -71,7 +71,9 @@ class CourseBlock_course_list extends MoodleBlock { } $this->title = get_string('mycourses'); $this->content->footer = "wwwroot/course/index.php\">".get_string("fulllistofcourses")."..."; - return $this->content; + if ($this->content->items) { // make sure we don't return an empty list + return $this->content; + } } }