Capability explorer

Jump to: navigation, search

Note: You are currently viewing documentation for Moodle 3.2. Up-to-date documentation for the latest stable version of Moodle is probably available here: 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.

Installation

Download the plugin code from:

https://github.com/simoncoggins/moodle-tool_capexplorer

Install this plugin into the 'admin/tool' folder, in a subfolder called 'capexplorer', then visit the Site Administration > Notifications page to install.

Requirements

At present this plugin requires Moodle 2.7 or greater.

Usage

Login as a user with access to the tool (by default a "Manager" or Site Administrator).

You can then find the tool in the Site Administration menu:

Site Administration > Users > Permissions > Capability Explorer

Submit the form by providing:

  • Username. The username of a user. The tool will check if this user has permission to do something. The field uses autocomplete so start typing a user's name, username or email address and select one of the options that appears.
  • Capability. The name of one of Moodle's capabilities. A full list of capabilities can be accessed via Site Administration > Users > Permissions > Define system roles > Manager. This field uses autocomplete so start typing a capability string and select one of the options that appears.
  • Context. A specific context in which to check the capability. You can select a context from the tree by clicking the name, or expand part of the tree using the arrows. The icons represent the type of item (e.g. course, category, block, module). The tree represents the hierarchical structure of the contexts in your site. If you aren't sure just select 'System context'.


Capability explorer form

The results page will give a summary of whether the user is granted the capability in the context you chose. Also shown is a step-by-step guide explaining how the capability was calculated. Click the help icons for more detailed information. If you have permission you can follow the change links to modify some of your existing permission settings.

Capability explorer results page

External Links