]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-12922 adding 'moodle/restore:rolldates' cap to control who can roll dates on...
authorstronk7 <stronk7>
Tue, 6 Oct 2009 01:14:47 +0000 (01:14 +0000)
committerstronk7 <stronk7>
Tue, 6 Oct 2009 01:14:47 +0000 (01:14 +0000)
(defaults to current settings: only course creators (and admins) are able to roll) Merged from 19_STABLE

lang/en_utf8/role.php
lib/db/access.php
version.php

index f704ba894f452c45f40509d5efa287ea6a76b9db..58dcf52d684993534470d231c6d410e732430e49 100644 (file)
@@ -198,6 +198,7 @@ $string['resetrole'] = 'Reset to defaults';
 $string['resetrolenolegacy'] = 'Clear permissions';
 $string['resetrolesure'] = 'Are you sure that you want to reset role \"$a->name ($a->shortname)\" to defaults?<p></p>The defaults are taken from the selected legacy capability ($a->legacytype).';
 $string['resetrolesurenolegacy'] = 'Are you sure that you want to clear all permissions defined in this role \"$a->name ($a->shortname)\"?';
+$string['restore:rolldates'] = 'Allowed to roll activity configuration dates on restore';
 $string['risks'] = 'Risks';
 $string['role:assign'] = 'Assign roles to users';
 $string['role:manage'] = 'Create and manage roles';
index 304f629eaefa5f2a0c2acdde7db4c7bcb6cb2261..ae0ae0466db0df3f7e6939c5da45fe664379cfd1 100644 (file)
@@ -208,6 +208,16 @@ $moodle_capabilities = array(
         )
     ),
 
+    'moodle/restore:rolldates' => array(
+
+        'captype' => 'write',
+        'contextlevel' => CONTEXT_COURSE,
+        'legacy' => array(
+            'coursecreator' => CAP_ALLOW,
+            'admin' => CAP_ALLOW
+        )
+    ),
+
     'moodle/site:manageblocks' => array(
 
         'riskbitmask' => RISK_SPAM | RISK_XSS,
index 0235d1aeb2379630c6f9ff932d978262a3f82b80..2ad69cbcf0989a125937ee55f4b2266f6b87a03a 100644 (file)
@@ -6,7 +6,7 @@
 // This is compared against the values stored in the database to determine
 // whether upgrades should be performed (see lib/db/*.php)
 
-    $version = 2009100200;  // YYYYMMDD   = date of the last version bump
+    $version = 2009100600;  // YYYYMMDD   = date of the last version bump
                             //         XX = daily increments
 
     $release = '2.0 dev (Build: 20091006)';  // Human-friendly version name