Permalink
Browse files

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

courses available. Bug 3420.
  • Loading branch information...
1 parent cf26a12 commit 3e41bf36a3fea9262865ad713bc1cf6b3cb28600 ikawhero committed Jun 4, 2005
Showing with 4 additions and 3 deletions.
  1. +4 −3 blocks/course_list/block_course_list.php
View
7 blocks/course_list/block_course_list.php
@@ -77,9 +77,10 @@ function get_content() {
} 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');
}

0 comments on commit 3e41bf3

Please sign in to comment.