Hi,
This question was posed back in 2013 but there was no response.
What I want is a list of all users assigned a Category-level role across the site.
We are running 3.6.3
Can anyone help?
Ta,
Mark
Hi,
This question was posed back in 2013 but there was no response.
What I want is a list of all users assigned a Category-level role across the site.
We are running 3.6.3
Can anyone help?
Ta,
Mark
If you install https://moodle.org/plugins/report_customsql then
SELECT
cc.id AS categoryid,
cc.name AS categoryname,
r.shortname AS role,
u.username,
u.firstname,
u.lastname,
u.email
FROM mdl_user u
JOIN mdl_role_assignments ra ON ra.userid = u.id
JOIN mdl_context ctx ON ctx.id = ra.contextid
JOIN mdl_course_categories cc ON cc.id = ctx.instanceid
JOIN mdl_role r ON r.id = ra.roleid
WHERE ctx.contextlevel = 40