From: gustav_delius Date: Tue, 1 Jun 2004 09:47:28 +0000 (+0000) Subject: Make sure course list block is never empty. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=c293c07a5e7050aa48deec5fd102ccb062333ca4;p=moodle.git Make sure course list block is never empty. --- diff --git a/blocks/course_list/block_course_list.php b/blocks/course_list/block_course_list.php index 7dfc134624..ec2c56726c 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; + } } }