Roles debugger now available for 1.9

Roles debugger now available for 1.9

by John Isner -
Number of replies: 0
I recently added a Role debugger to the Modules and plugins database and wrote an article about it in the documentation wiki. The debugger is for Moodle 1.9.

The debugger is a self-contained script (just one file) called rolesdebug.php. Drop it in your Moodle root directory or anywhere under the root directory. Then point your browser at it. The script requires a login, so only someone with a Moodle user account who is currently logged in can use it. Since it is a php script, you will see the output in your browser. No one else will see it -- unless they're looking over your shoulder smile

Here's a quick overview of a debugger session:

Log in to Moodle and navigate to the context of interest. Perhaps it's a quiz which, for some unknown reason, Moodle is preventing you from attempting. Without logging out of Moodle, point your browser at the debugging script. Enter the context you're interested in and (optionally) the name of a capability to investigate. Press the Go button. The script returns a page with a table presenting a spatial view of your role assignments and overrides. From the table, you will be able to see why Moodle concluded that you either have or do not have a certain permission in the context.

As I say in the article, the script is easy to use, but interpreting the output does require a basic understanding of the Roles and capabilities system. If you use the script and need help interpreting the output, copy and paste the output into a post to this forum and I'll help you. Be sure to include a meaningful subject line so I don't overlook your post.
Average of ratings: -