Admin tools: Capability explorer
Capability explorer is a small admin tool designed to help explain exactly how Moodle's capability system works. Given a user, capability and context the tool will provide a detailed breakdown of the process used to calculate if the capability would be granted to the user in the context specified.
The tool uses the existing system data so you can use it to figure out why a particular user does or doesn't have a capability. It is designed to be complementary to Moodle's other permission tools such as Check system permissions or the Capability Overview Report.