Project: moodle
Issue MDL-40044: Replace add_to_log with an event trigger - role
Replace the add_to_log calls for the following area, with a call to the get_legacy_logdata function in the event class. *role* /admin/roles/manage.php:93: add_to_log(SITEID, 'role', 'delete', 'admin/roles/manage.php', $roles[$roleid]->localname, '', $USER->id); /admin/roles/override.php:128: add_to_log($course->id, 'role', 'override', 'admin/roles/override.php?contextid='.$context->id.'&roleid='.$roleid, $rolename, '', $USER->id); /admin/roles/assign.php:114: add_to_log($course->id, 'role', 'assign', 'admin/roles/assign.php?contextid='.$context->id.'&roleid='.$roleid, $rolename, '', $USER->id); /admin/roles/assign.php:134: add_to_log($course->id, 'role', 'unassign', 'admin/roles/assign.php?contextid='.$context->id.'&roleid='.$roleid, $rolename, '', $USER->id); /admin/roles/define.php:199: add_to_log(SITEID, 'role', $action, 'admin/roles/define.php?action=view&roleid=' . /admin/roles/allow.php:49: add_to_log(SITEID, 'role', 'edit allow ' . $mode, str_replace($CFG->wwwroot . '/', '', $baseurl), '', '', $USER->id); /lib/accesslib.php:1524: add_to_log(SITEID, 'role', 'delete', 'admin/roles/action=delete&roleid='.$roleid, $rolename, '');
Story points: 13