mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 21:49:15 +01:00
Merged new variable $CFG->allowvisiblecoursesinhiddencategories from stable
This commit is contained in:
parent
a36f058e53
commit
418b4e5a5f
@ -281,6 +281,9 @@ $CFG->admin = 'admin';
|
||||
//
|
||||
// $CFG->emailconnectionerrorsto = 'your@emailaddress.com';
|
||||
//
|
||||
// Restore pre-1.6 behaviour where courses could still be available
|
||||
// even if the category they were in was hidden
|
||||
// $CFG->allowvisiblecoursesinhiddencategories = true;
|
||||
//
|
||||
// NOTE: if you are using custompix in your theme, see /fixpix.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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user