From: moodler Date: Sun, 13 Aug 2006 13:17:38 +0000 (+0000) Subject: Adding roles to front page course list "add" button X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=b63ec9db78d7b5efe5ca4e7663132dea040f8658;p=moodle.git Adding roles to front page course list "add" button --- diff --git a/course/lib.php b/course/lib.php index cba819d437..675e5f929f 100644 --- a/course/lib.php +++ b/course/lib.php @@ -1500,7 +1500,8 @@ function print_courses($category, $width="100%", $hidesitecourse = false) { } } else { print_heading(get_string("nocoursesyet")); - if (iscreator()) { // Make it obvious for newbies on new sites how to add a course + $context = get_context_instance(CONTEXT_SYSTEM, SITEID); + if (has_capability('moodle/course:create', $context->id)) { $options = array(); $options['category'] = $category->id; echo '
'; @@ -2156,4 +2157,4 @@ function move_courses ($courseids, $categoryid) { return true; } -?> \ No newline at end of file +?>