Skip to main content

Permissions

By default, the permissions grant teachers and managers the rights to add the block and configure it, and grant students the ability to earn points and view the block and their level.

block/xp:earnxp

note

Given to the Student role by default.

Probably one of the most powerful capability, this controls whether a user can earn points for the actions they perform in the given context. Typically, non-students should not be given this permission in order to avoid for them to earn points and appear in the leaderboard.

Using this capability you may restrict entire sections of your course, or site from contributing to a user's experience points. For example, you may set this permission as Prohibited for the Student role for an entire category, subsequently any event occurring in a course or activity within this category will be ignored. You may do the same for a single course or even a single activity.

Note that by default administrators are forbidden from earning points as they always have all permissions and would earn points everywhere. To allow administrators to earn points, you can enable the setting adminscanearnxp from XP's admin settings.

block/xp:view

note

Given to the Authenticated user role by default.

This permission determines whether the block will be visible to a user. When prohibited, a user will not see the block, and won't be able to access any of its pages.

block/xp:manage

note

Given to the Teacher, Manager roles by default.

Users with this permission can manage all aspects a plugin's instance. They will be allowed to change any setting, the levels, the rules, the appearance, etc. This permission also allows to edit, import, and reset learners' points.

note

This permission was introduced in XP v3.6.1.

This permission also determined whether a user could access to the logs, and the report. Newer versions use block/xp:viewlogs and block/xp:viewreport.

block/xp:viewlogs

note

Given to the Teacher, Manager roles by default.

This permission is required for users to get access to the logs.

note

This permission was introduced in XP v3.10.0.

block/xp:viewreport

note

Given to the Teacher, Manager roles by default.

This permission is required for users to get access to the report.

note

This permission was introduced in XP v3.12.0.

block/xp:addinstance

note

Given to the Teacher, Manager roles by default.

This permission controls whether the user can add the block, and set some of its appearance settings. We strongly recommend that any user with this permission is also granted the permission block/xp:manage.

note

This permission use to manage all aspects of the plugin's instance, such as changing the settings, viewing the reports, etc. in more recent versions those permissions are used: block/xp:manage, block/xp:viewlogs and block/xp:viewreport.

block/xp:myaddinstance

note

Given to nobody by default.

Moodle requires for this permission to be defined, it controls whether a user can add the block to their dashboard. By default it is not given to anyone, instead we advise for administrators to customise the default dashboard of their users.