MDL-67795 contentbank: delete content API

This commit is contained in:
Sara Arjona
2020-04-23 13:09:40 +02:00
parent 7fc73af69b
commit c0d615e8f9
8 changed files with 234 additions and 1 deletions
+21 -1
View File
@@ -2501,5 +2501,25 @@ $capabilities = array(
'coursecreator' => CAP_ALLOW,
'editingteacher' => CAP_ALLOW,
)
)
),
// Delete any content from the content bank.
'moodle/contentbank:deleteanycontent' => [
'riskbitmask' => RISK_DATALOSS,
'captype' => 'write',
'contextlevel' => CONTEXT_COURSE,
'archetypes' => [
'manager' => CAP_ALLOW,
'coursecreator' => CAP_ALLOW,
]
],
// Delete content created by yourself.
'moodle/contentbank:deleteowncontent' => [
'captype' => 'write',
'contextlevel' => CONTEXT_COURSE,
'archetypes' => [
'user' => CAP_ALLOW,
]
],
);