Is there a way to create a Configurable Report that is only accessible to Moodle Site Administrators?
Example of what I want to achieve:
I've added the Configurable Reports block to my Moodle Site Home page. I then created a 'custom profile field' report that is not course specific, e.g.:
SELECT prefix_user.username, prefix_user.firstname, prefix_user.lastname, prefix_user_info_data.data AS profile_field_test
FROM prefix_user
INNER JOIN prefix_user_info_data ON prefix_user.id = prefix_user_info_data.userid
WHERE prefix_user_info_data.fieldid = 123
AND prefix_user_info_data.data LIKE N'xyz'
I only want Site Administrators to be able to access and run this report - non-admin users should not have access to it. Creating the report is simple, but how do I do restrict it to Site Administrators only?
Thanks.
When you are in the report, click on the "Permissions" tab. You can specify a role which can see the report.
Alternatively, you can also specify "User field value" and enter the user ID (or last name etc.) of the user who is able to see the report.
Thanks Michael. Yes, I'm using that now. But it restricts me to just one user. I'd like to give two or three admin users access to the report, so that solution isn't ideal. Alternatively, I could create the same report for each of the admin users, but that's a really ugly "solution".
Just create a new role that has access to configurable reports block and then add your users to that...