From ce76e69ab09e13856c991ac1748c8879f2d41411 Mon Sep 17 00:00:00 2001 From: poltawski Date: Fri, 25 Jan 2008 20:46:36 +0000 Subject: [PATCH] MDL-13117 - course info was unavailable to students. There was broken logic... course_parent_visible() always returns true if $CFG->allowvisiblecoursesinhiddencategories is true, --- course/info.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/course/info.php b/course/info.php index 27354c9eef4df..e5ecf3304f033 100644 --- a/course/info.php +++ b/course/info.php @@ -29,7 +29,7 @@ } $context = get_context_instance(CONTEXT_COURSE, $course->id); - if ((!(course_parent_visible($course) && $CFG->allowvisiblecoursesinhiddencategories) || (! $course->visible)) && !has_capability('moodle/course:viewhiddencourses', $context)) { + if ((!course_parent_visible($course) || (! $course->visible)) && !has_capability('moodle/course:viewhiddencourses', $context)) { error(get_string('coursehidden'), $CFG->wwwroot .'/'); }