MDL-49029 mod_choice: Add view permissions
authorStephen Bourget <steve.bourget@sau19.org>
Thu, 7 Jul 2016 19:10:17 +0000 (15:10 -0400)
committerStephen Bourget <steve.bourget@sau19.org>
Thu, 7 Jul 2016 19:10:17 +0000 (15:10 -0400)
mod/choice/db/access.php
mod/choice/lang/en/choice.php
mod/choice/version.php

index 1f5d597..2996472 100644 (file)
@@ -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
+        )
     )
 );
 
index d7d4df0..bdfa60a 100644 (file)
@@ -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';
index a108978..2a1e112 100644 (file)
@@ -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;