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:
Rajesh Taneja
2013-10-28 11:06:47 +08:00
parent 68291f2d57
commit 045d913d11
4 changed files with 2 additions and 6 deletions
+1 -2
View File
@@ -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,
+1 -2
View File
@@ -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
)
);