## Reports: Roles' capabilities

report_rolescapabilities
Maintained by Daniel Neis Araujo
!!!Deprecated by the core Capabilites Report (Site Administration > Users > Permissions > Capability report. )!!! A report that compares the permissions of all roles, side by side, to assist the coordinator to give capabilities and avoid inconsistencies in roles hierarch.
36 sites
1 fans

!!!Deprecated by the core Capabilites Report (Site Administration > Users > Permissions > Capability report. )!!!

A report that compares the permissions of all roles, side by side, to assist the coordinator to give capabilities and avoid inconsistencies in roles hierarch.

### Contributors

• Tue, 27 Nov 2012, 7:11 PM
The zip file for version 2012070500.00 contains a .git directory. Would it be possible for you to remove this directory from the downloadable zip file?
• Tue, 27 Nov 2012, 11:54 PM
The "alternative download url" now points to github's snapshot, that do not contain the .git directory.
For the next code change i will generate a new version without .git directory too.
Kind regards,
Daniel
• Tue, 26 Feb 2013, 3:39 PM
I've installed the 2.3/2.4 version on our 2.4 Moodle server per the directions (unpacked and put the directory into the ../moodle/reports directory, then visited Notifications. Everything appeared to go fine, but there are no roles listed in the righthand box to be selected. Am I missing something?
• Wed, 27 Feb 2013, 8:14 PM
Hello, Doug

you must select which roles will be displayed going to block Administration > Site administration > Plugins > Reports > Roles's capabilities.

Kind regards,
Daniel
• Wed, 19 Jun 2013, 1:10 AM
I'm having the same problem as Doug - and when I go to Administration > Site administration > Plugins > Reports > Roles's capabilities - that selection box is empty too - I've seen this before in Moodle 2.4.
• Mon, 24 Feb 2014, 9:40 PM
list($usql,$params) = $DB->get_in_or_equal(explode(',',$CFG->report_rolescapabilities_available_roles));
What is this variableCFG accessing???
• Mon, 24 Feb 2014, 9:43 PM
This variable is the global configuration of moodle.
In this case it is accessing the list of roles that you selected to be shown the in Roles Capabilities report.
• Mon, 24 Feb 2014, 9:47 PM
I am okay with CFG but is it the syntax to like \$CFG->report_rolescapabilities_available_roles what roles does it give back??
All defined in access.php?
• Mon, 24 Feb 2014, 9:57 PM
Nope.
CFG is a global variable
When you install the Roles Capabilities report, you select the roles that will appear in the list
Then, there is some code that saves that roles ids in the config table of the database
It is a comma separated list of the ids of the roles you selected
When you run the report, that value is already in the CFG because Moodle does it for the report
You can change the list of the roles in the administration part of the report that is under Administration Block -> Plugins -> Report -> Roles Capabilites
• Mon, 24 Feb 2014, 10:26 PM
Note, I made a similar plugin https://moodle.org/plugins/view.php?plugin=tool_editrolesbycap that not only shows you the role set-ups (for a particular capability) but lets you edit them in one place. If you like this report, you might like that too.
• Mon, 24 Feb 2014, 11:21 PM
Hi Daniel, thanks for updating your plugin to make it compatible with Moodle v2.6. This is going to save me a lot of time each time we upgrade Moodle to a new version.

If you don't mind a suggestion, it would be great if each capability had a link to take you directly to Tim Hunt's Edit Roles by Capability plugin page, if also installed, to allow you to edit the capabilities. I really think that these two plugins complement each other. Alternatively you could simply add a similar screen to your plugin, which would be available if you had permission to make such changes.

Best regards,

Michael MIlette
• Tue, 25 Feb 2014, 3:40 AM
Hello,

here at Universidade Federal de Santa Catarina we use this another good tool, Edit Roles By Capability. Also, we already have some code to add the links to edit the capabilities. I've added the missing checks (is the other plugin installed and can user edit roles) and published a new 0.6 release.
Hope that you like.

Kind regards,
Daniel
• Wed, 26 Feb 2014, 12:53 AM
Hi Daniel,

Thank you very much for your quick response. Yes, the other plugin is installed and I am an administrator so I should have sufficient permissions. I will try out your new 0.6 version.

I also just tried to install the latest version of your plugin on Moodle 2.5.1 for testing purposes. I discovered that It is not compatible and won't even install. Is there a version recommended for Moodle 2.5.1? The previous version indicates that it is for Moodle 2.3 and 2.4.
• Wed, 26 Feb 2014, 1:07 AM
Hi again,

The integration with Edit Roles by Capability is seamless and works great in Moodle 2.6. Thank you Daniel!
• Wed, 26 Feb 2014, 10:18 PM
Hello, Michael

i think that the 2.4 version works on 2.5
The latest version is 2.6 only due some changes on the original "edit role report" and to the way role names are handled on this version...

Kind regards,
Daniel