From cbc943f7553360afe595e771bedd633f662d8c20 Mon Sep 17 00:00:00 2001 From: toyomoyo Date: Wed, 14 Mar 2007 04:31:04 +0000 Subject: [PATCH] merged fix for MDL-8885, teachers should not be able to set course as hidden if they can not view hidden courses --- course/category.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 ''. -- 2.39.5