Deleting one "add course" button that shouldn't be there

if we aren't inside a category. MDL-12076
This commit is contained in:
stronk7
2007-12-07 23:53:59 +00:00
parent 9cdfe34923
commit 32932231fd
+1 -7
View File
@@ -298,13 +298,7 @@
echo '</table>';
echo '<div class="buttons">';
/// 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');
}