MDL-78242 roles: consistently check course contact config.
This commit is contained in:
@@ -900,7 +900,7 @@ class core_course_category implements renderable, cacheable_object, IteratorAggr
|
||||
// Trigger a purge for all caches listening for changes to category enrolment.
|
||||
cache_helper::purge_by_event('changesincategoryenrolment');
|
||||
|
||||
if (!$CFG->coursecontact || !in_array($roleid, explode(',', $CFG->coursecontact))) {
|
||||
if (empty($CFG->coursecontact) || !in_array($roleid, explode(',', $CFG->coursecontact))) {
|
||||
// The role is not one of course contact roles.
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user