Adding roles to front page course list "add" button

This commit is contained in:
moodler
2006-08-13 13:17:38 +00:00
parent 624f2fea76
commit b63ec9db78
+3 -2
View File
@@ -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 '<div class="addcoursebutton" align="center">';
@@ -2156,4 +2157,4 @@ function move_courses ($courseids, $categoryid) {
return true;
}
?>
?>