From 1725216aee2c308bbbad8ac3d171a86c76b1f711 Mon Sep 17 00:00:00 2001 From: Stephen Bourget Date: Thu, 7 Jul 2016 15:10:17 -0400 Subject: [PATCH] MDL-49029 mod_choice: Add view permissions --- mod/choice/db/access.php | 9 +++++++++ mod/choice/lang/en/choice.php | 1 + mod/choice/version.php | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/mod/choice/db/access.php b/mod/choice/db/access.php index 1f5d5970959..2996472377c 100644 --- a/mod/choice/db/access.php +++ b/mod/choice/db/access.php @@ -80,6 +80,15 @@ $capabilities = array( 'editingteacher' => CAP_ALLOW, 'manager' => CAP_ALLOW ) + ), + + 'mod/choice:view' => array( + 'captype' => 'read', + 'contextlevel' => CONTEXT_MODULE, + 'archetypes' => array( + 'user' => CAP_ALLOW, + 'guest' => CAP_ALLOW + ) ) ); diff --git a/mod/choice/lang/en/choice.php b/mod/choice/lang/en/choice.php index d7d4df09a59..bdfa60a7aab 100644 --- a/mod/choice/lang/en/choice.php +++ b/mod/choice/lang/en/choice.php @@ -63,6 +63,7 @@ If limits are disabled then any number of participants can select each of the op $string['choice:readresponses'] = 'View responses'; $string['choicesaved'] = 'Your choice has been saved'; $string['choicetext'] = 'Choice text'; +$string['choice:view'] = 'View choice activity'; $string['chooseaction'] = 'Choose an action ...'; $string['description'] = 'Description'; $string['includeinactive'] = 'Include responses from inactive/suspended users'; diff --git a/mod/choice/version.php b/mod/choice/version.php index a1089781dec..2a1e112e353 100644 --- a/mod/choice/version.php +++ b/mod/choice/version.php @@ -24,7 +24,7 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2016052300; // The current module version (Date: YYYYMMDDXX) +$plugin->version = 2016070700; // The current module version (Date: YYYYMMDDXX) $plugin->requires = 2016051900; // Requires this Moodle version $plugin->component = 'mod_choice'; // Full name of the plugin (used for diagnostics) $plugin->cron = 0;