MDL-42560 Events: Removed use of role->name
role->name is usually empty or localized, so should not be used in events
This commit is contained in:
@@ -201,8 +201,7 @@ if (optional_param('savechanges', false, PARAM_BOOL) && confirm_sesskey() && $de
|
||||
$event = \core\event\role_capabilities_updated::create(
|
||||
array(
|
||||
'context' => $systemcontext,
|
||||
'objectid' => $roleid,
|
||||
'other' => array('name' => $definitiontable->get_role_name())
|
||||
'objectid' => $roleid
|
||||
)
|
||||
);
|
||||
$event->set_legacy_logdata(array(SITEID, 'role', $action, 'admin/roles/define.php?action=view&roleid=' . $tableroleid,
|
||||
|
||||
@@ -130,8 +130,7 @@ if (optional_param('savechanges', false, PARAM_BOOL) && confirm_sesskey()) {
|
||||
array(
|
||||
'context' => $context,
|
||||
'objectid' => $roleid,
|
||||
'courseid' => $courseid,
|
||||
'other' => array('name' => $rolename)
|
||||
'courseid' => $courseid
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user