Skip to content
Browse files

In Moodle 1.6 the behaviour of course access was changed so that visible

courses would be invisible if they were within a hidden category.

However, the old behaviour was useful in many instances, so I've added
a $CFG->coursesinhiddencategoriesarehidden that will return to that old
behaviour if required.
  • Loading branch information...
1 parent f450edd commit e714706c42f26a7752e8d3df51b1f269afb5b18f moodler committed Jul 13, 2006
Showing with 6 additions and 0 deletions.
  1. +6 −0 lib/datalib.php
View
6 lib/datalib.php
@@ -3111,6 +3111,12 @@ function check_db_compat() {
}
function course_parent_visible($course = null) {
+ if (empty($course)) {
+ return true;
+ }
+ if (!empty($CFG->allowvisiblecoursesinhiddencategories)) {
+ return true;
+ }
return category_parent_visible($course->category);
}

0 comments on commit e714706

Please sign in to comment.
Something went wrong with that request. Please try again.