From 982e45af49858310a84652d29f730cc073acce71 Mon Sep 17 00:00:00 2001 From: stronk7 Date: Tue, 6 Oct 2009 01:14:47 +0000 Subject: [PATCH] MDL-12922 adding 'moodle/restore:rolldates' cap to control who can roll dates on restore (defaults to current settings: only course creators (and admins) are able to roll) Merged from 19_STABLE --- lang/en_utf8/role.php | 1 + lib/db/access.php | 10 ++++++++++ version.php | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/lang/en_utf8/role.php b/lang/en_utf8/role.php index f704ba894f..58dcf52d68 100644 --- a/lang/en_utf8/role.php +++ b/lang/en_utf8/role.php @@ -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?

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'; diff --git a/lib/db/access.php b/lib/db/access.php index 304f629eae..ae0ae0466d 100644 --- a/lib/db/access.php +++ b/lib/db/access.php @@ -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, diff --git a/version.php b/version.php index 0235d1aeb2..2ad69cbcf0 100644 --- a/version.php +++ b/version.php @@ -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 -- 2.39.5