MDL-53010 core_role: add missing coursecatlib include

This commit is contained in:
Simey Lameze 2016-02-29 14:25:45 +08:00
parent 03b8b55f10
commit 73ea963215

View File

@ -413,7 +413,7 @@ class core_role_define_role_table_advanced extends core_role_capability_table_wi
}
public function save_changes() {
global $DB;
global $DB, $CFG;
if (!$this->roleid) {
// Creating role.
@ -427,6 +427,7 @@ class core_role_define_role_table_advanced extends core_role_capability_table_wi
// the UI. It would be better to do this only when we know that fields affected are
// updated. But thats getting into the weeds of the coursecat cache and role edits
// should not be that frequent, so here is the ugly brutal approach.
require_once($CFG->libdir . '/coursecatlib.php');
coursecat::role_assignment_changed($this->role->id, context_system::instance());
}