From b63ec9db78d7b5efe5ca4e7663132dea040f8658 Mon Sep 17 00:00:00 2001 From: moodler Date: Sun, 13 Aug 2006 13:17:38 +0000 Subject: [PATCH] Adding roles to front page course list "add" button --- course/lib.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 +?> -- 2.39.5