About
The role assignments data source allows you to list roles assigned to users within Moodle. This data source is useful for auditing permissions, identifying users with specific roles like teachers or managers, or displaying a directory of staff members to students.
You can find these settings when opening the preferences of a Dash block.
Available fields
These are the building blocks available for your layout:
Role
Role name
Short name
Original name
Description
Context
Context name
Context URL
Context level
Parent
Role assignment
Time modified
Users
First name
Last name
Full name
Full name linked
Email address
Username
ID number
City/town
Country
Last login
Department
Institution
Address
Alternate name
First access
Description
User picture URL
User picture
User picture (linked to profile)
User profile URL
User profile link
Message URL
Message
Group
Custom user fields (setup individual on your Moodle installation)
Details area
Details button
Details link
Note: For how to enable and arrange these fields, see Fields preferences. To configure how the details button and link behave, see the Details area preferences.
Available filters
These are the filters available in the data source:
User
Context level
Context name
Role name
Note: For how to enable these for your users, see Filters preferences.
Available conditions
You can restrict which role assignments are included in the block using the following rules:
Role – Filter by specific Moodle roles or relationships.
Context level – Filter data based on the Moodle context level, such as system, category, or course.
Course categories – Limits data to courses within selected Moodle categories.
Courses – Manually select specific courses to display.
Current course – Limits data to the course the block is currently displayed in.
Current category – Limits data to the course category the block is displayed in.
Note: For how to apply these restrictions, see Conditions preferences.