]> git.mjollnir.org Git - moodle.git/commitdiff
Added new capability to switch roles (replaces old student view)
authormoodler <moodler>
Thu, 21 Sep 2006 07:44:53 +0000 (07:44 +0000)
committermoodler <moodler>
Thu, 21 Sep 2006 07:44:53 +0000 (07:44 +0000)
lib/db/access.php
version.php

index 94e22bd52b9ffa34f9de6b65828ad287d96363a9..43d210a4e8a9cb0e131840256879a5a0c03e592e 100644 (file)
@@ -406,6 +406,20 @@ $moodle_capabilities = array(
         )
     ),
 
+    'moodle/role:switchroles' => array(
+        'riskbitmask' => RISK_XSS,
+        'captype' => 'read',
+        'contextlevel' => CONTEXT_SYSTEM,
+        'legacy' => array(
+            'guest' => CAP_PREVENT,
+            'student' => CAP_PREVENT,
+            'teacher' => CAP_PREVENT,
+            'editingteacher' => CAP_ALLOW,
+            'coursecreator' => CAP_PREVENT,
+            'admin' => CAP_ALLOW
+        )
+    ),
+
     'moodle/category:create' => array(
 
         'captype' => 'write',
index 52babca8ae7dc36c2551af6015e3195ce2c9ca4d..ccdc5702388e6ad91ea2a7985d24f1a10cbea0bf 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 = 2006092000;  // YYYYMMDD = date
+   $version = 2006092100;  // YYYYMMDD = date
                            //       XY = increments within a single day
 
    $release = '1.7 dev';    // Human-friendly version name