mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
Merge branch 'MDL-52370-master' of git://github.com/danpoltawski/moodle
This commit is contained in:
commit
7e092a97d7
@ -422,6 +422,12 @@ class core_role_define_role_table_advanced extends core_role_capability_table_wi
|
||||
} else {
|
||||
// Updating role.
|
||||
$DB->update_record('role', $this->role);
|
||||
|
||||
// This will ensure the course contacts cache is purged so name changes get updated in
|
||||
// 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.
|
||||
coursecat::role_assignment_changed($this->role->id, context_system::instance());
|
||||
}
|
||||
|
||||
// Assignable contexts.
|
||||
|
@ -2519,6 +2519,8 @@ function save_local_role_names($courseid, $data) {
|
||||
$rolename->name = $value;
|
||||
$DB->insert_record('role_names', $rolename);
|
||||
}
|
||||
// This will ensure the course contacts cache is purged..
|
||||
coursecat::role_assignment_changed($roleid, $context);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user