diff --git a/course/manage.php b/course/manage.php index 8a95b28a035..c3bb8724323 100644 --- a/course/manage.php +++ b/course/manage.php @@ -505,7 +505,7 @@ if (!$courses) { // Change visibility. // Users with no capability to view hidden courses, should not be able to lock themselves out. - if (has_all_capability(array('moodle/course:visibility', 'moodle/course:viewhiddencourses'), $coursecontext)) { + if (has_any_capability(array('moodle/course:visibility', 'moodle/course:viewhiddencourses'), $coursecontext)) { if (!empty($acourse->visible)) { $url = new moodle_url($baseurl, array('hide' => $acourse->id)); $icons[] = $OUTPUT->action_icon($url, new pix_icon('t/hide', get_string('hide'))); @@ -755,4 +755,4 @@ function print_category_edit(html_table $table, $category, $displaylist, $parent print_category_edit($table, $cat, $displaylist, $parentslist, $depth+1, $up, $down); } } -} \ No newline at end of file +}