From: toyomoyo Date: Wed, 14 Mar 2007 04:31:04 +0000 (+0000) Subject: merged fix for MDL-8885, teachers should not be able to set course as hidden if they... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=cbc943f7553360afe595e771bedd633f662d8c20;p=moodle.git merged fix for MDL-8885, teachers should not be able to set course as hidden if they can not view hidden courses --- diff --git a/course/category.php b/course/category.php index 09215d0acc..9770e08992 100644 --- a/course/category.php +++ b/course/category.php @@ -330,7 +330,8 @@ ''.$strdelete.' '; } - if (has_capability('moodle/course:visibility', $coursecontext)) { + // MDL-8885, users with no capability to view hidden courses, should not be able to lock themselves out + if (has_capability('moodle/course:visibility', $coursecontext) && has_capability('moodle/course:viewhiddencourses', $coursecontext)) { if (!empty($acourse->visible)) { echo ''.