MDL-37572 - fix typo in has_any_capability()
authorDan Poltawski <dan@moodle.com>
Wed, 6 Feb 2013 06:47:29 +0000 (14:47 +0800)
committerDan Poltawski <dan@moodle.com>
Wed, 6 Feb 2013 06:47:29 +0000 (14:47 +0800)
course/manage.php

index 8a95b28..c3bb872 100644 (file)
@@ -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
+}