MDL-43230 badges: manually revoke awarded badges

A user can be manually awarded a badge, but if given by mistake an
awarded badge cannot be removed.
This commit is contained in:
Matt Davidson
2016-10-12 05:06:38 +00:00
committed by Ryan Wyllie
parent d9520bc04e
commit b7374faca6
11 changed files with 292 additions and 31 deletions
+12
View File
@@ -2025,6 +2025,18 @@ $capabilities = array(
)
),
// Revoke badge from a user.
'moodle/badges:revokebadge' => array(
'riskbitmask' => RISK_SPAM,
'captype' => 'write',
'contextlevel' => CONTEXT_COURSE,
'archetypes' => array(
'manager' => CAP_ALLOW,
'teacher' => CAP_ALLOW,
'editingteacher' => CAP_ALLOW,
)
),
// View users who earned a specific badge without being able to award a badge.
'moodle/badges:viewawarded' => array(
'riskbitmask' => RISK_PERSONAL,