From 32932231fd88101c7acad7eae0b48fa09de976f2 Mon Sep 17 00:00:00 2001 From: stronk7 Date: Fri, 7 Dec 2007 23:53:59 +0000 Subject: [PATCH] Deleting one "add course" button that shouldn't be there if we aren't inside a category. MDL-12076 --- course/index.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/course/index.php b/course/index.php index 6282ea6e8c6..a37b18c0013 100644 --- a/course/index.php +++ b/course/index.php @@ -298,13 +298,7 @@ echo ''; echo '
'; - /// Print link to create a new course - if (has_capability('moodle/course:create', $context)) { - unset($options); - $options['category'] = $category->id; - print_single_button('edit.php', $options, get_string('addnewcourse'), 'get'); - } - + if (has_capability('moodle/site:approvecourse', get_context_instance(CONTEXT_SYSTEM, SITEID)) and !empty($CFG->enablecourserequests)) { print_single_button('pending.php',NULL, get_string('coursespending'), 'get'); }