From 3e41bf36a3fea9262865ad713bc1cf6b3cb28600 Mon Sep 17 00:00:00 2001 From: ikawhero Date: Sat, 4 Jun 2005 10:39:57 +0000 Subject: [PATCH] Link to add new courses only shown to course creators when there are no courses available. Bug 3420. --- blocks/course_list/block_course_list.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/blocks/course_list/block_course_list.php b/blocks/course_list/block_course_list.php index 3b2faff9885..39c857ddb5e 100644 --- a/blocks/course_list/block_course_list.php +++ b/blocks/course_list/block_course_list.php @@ -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').'

'. - ''. - get_string("addnewcourse").'...'; + $this->content->footer = get_string('nocoursesyet').'

'; + if (iscreator()) { + $this->content .= ''.get_string("addnewcourse").'...'; + } } $this->title = get_string('courses'); }