Merge branch 'MDL-69166-310-4' of git://github.com/rezaies/moodle into MOODLE_310_STABLE
[moodle.git] / lib / db / access.php
index 4d833cb..bc812d5 100644 (file)
@@ -2577,13 +2577,34 @@ $capabilities = array(
         ]
     ],
 
+    // Allow users to download course content.
+    'moodle/course:downloadcoursecontent' => [
+        'captype' => 'read',
+        'contextlevel' => CONTEXT_COURSE,
+        'archetypes' => array(
+            'student' => CAP_ALLOW,
+            'teacher' => CAP_ALLOW,
+            'editingteacher' => CAP_ALLOW,
+            'manager' => CAP_ALLOW
+        )
+    ],
+
+    // Allow users to configure download course content functionality within a course, if the feature is available.
+    'moodle/course:configuredownloadcontent' => [
+        'captype' => 'write',
+        'contextlevel' => CONTEXT_COURSE,
+        'archetypes' => array(
+            'editingteacher' => CAP_ALLOW,
+            'manager' => CAP_ALLOW
+        ),
+    ],
+
     // Allow to manage payment accounts.
     'moodle/payment:manageaccounts' => [
         'captype' => 'write',
         'riskbitmask' => RISK_PERSONAL | RISK_CONFIG | RISK_DATALOSS,
         'contextlevel' => CONTEXT_COURSE,
-        'archetypes' => [
-        ]
+        'archetypes' => [],
     ],
 
     // Allow to view payments.
@@ -2591,7 +2612,6 @@ $capabilities = array(
         'captype' => 'read',
         'riskbitmask' => RISK_PERSONAL,
         'contextlevel' => CONTEXT_COURSE,
-        'archetypes' => [
-        ]
+        'archetypes' => [],
     ],
 );