Deleting one "add course" button that shouldn't be there
if we aren't inside a category. MDL-12076
This commit is contained in:
+1
-7
@@ -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');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user