Make sure course list block is never empty.

This commit is contained in:
gustav_delius
2004-06-01 09:47:28 +00:00
parent a5dc1376bf
commit c293c07a5e
+3 -1
View File
@@ -71,7 +71,9 @@ class CourseBlock_course_list extends MoodleBlock {
}
$this->title = get_string('mycourses');
$this->content->footer = "<a href=\"$CFG->wwwroot/course/index.php\">".get_string("fulllistofcourses")."</a>...";
return $this->content;
if ($this->content->items) { // make sure we don't return an empty list
return $this->content;
}
}
}