Link to add new courses only shown to course creators when there are no

courses available. Bug 3420.
This commit is contained in:
ikawhero
2005-06-04 10:39:57 +00:00
parent cf26a12c62
commit 3e41bf36a3
+4 -3
View File
@@ -77,9 +77,10 @@ class block_course_list extends block_list {
} else {
$this->content->items = array();
$this->content->icons = array();
$this->content->footer = get_string('nocoursesyet').'<br /><br />'.
'<a href="'.$CFG->wwwroot.'/course/edit.php?category='.$category->id.'">'.
get_string("addnewcourse").'</a>...';
$this->content->footer = get_string('nocoursesyet').'<br /><br />';
if (iscreator()) {
$this->content .= '<a href="'.$CFG->wwwroot.'/course/edit.php?category='.$category->id.'">'.get_string("addnewcourse").'</a>...';
}
}
$this->title = get_string('courses');
}