Querying for role overrides

Re: Querying for role overrides

by Rex Lorenzo -
Number of replies: 0

Thanks Tim. For anyone interested in getting a report of what role overrides were done on your system, here is what I used.

SELECT DISTINCT rc.contextid, CONCAT(u.firstname, ' ', u.lastname), cxt.instanceid, cxt.contextlevel, r.name, rc.capability, rc.permission
FROM `mdl_role_capabilities` rc
JOIN mdl_user u ON (rc.modifierid=u.id)
JOIN mdl_context cxt ON (cxt.id=rc.contextid)
JOIN mdl_role r ON (r.id=rc.roleid)
WHERE `contextid` != 1
This gives a list of person who assigned the role override, the context, and what capability was changed for which role.