]> git.mjollnir.org Git - moodle.git/commitdiff
Added moodle/role:unassignself which replaces $CFG->allowunenroll
authormoodler <moodler>
Thu, 7 Sep 2006 08:35:30 +0000 (08:35 +0000)
committermoodler <moodler>
Thu, 7 Sep 2006 08:35:30 +0000 (08:35 +0000)
admin/settings/security.php
lib/db/access.php
version.php

index 3b1deee51e126e530ad748bc6c5d93721605dc5b..048d453e5b362695ec65ccc7ba6d6efeb6536e19 100644 (file)
@@ -52,7 +52,6 @@ $temp->add(new admin_setting_configmultiselect('hiddenuserfields', get_string('h
                                                                                                                                                                                                                                                                                                                                          'aimid' => get_string('aimid'),
                                                                                                                                                                                                                                                                                                                                          'msnid' => get_string('msnid'),
                                                                                                                                                                                                                                                                                                                                          'lastaccess' => get_string('lastaccess'))));
-$temp->add(new admin_setting_configcheckbox('allowunenroll', get_string('allowunenroll', 'admin'), get_string('configallowunenroll', 'admin'), 1));
 $temp->add(new admin_setting_configcheckbox('allusersaresitestudents', get_string('allusersaresitestudents', 'admin'), get_string('configallusersaresitestudents','admin'), 1));
 $temp->add(new admin_setting_special_adminseesall());
 $ADMIN->add('security', $temp);
index de5eed1189bc006f736fc69e99d1cd8e2aa2a9e1..8471940c6c64ed3f29887ac79e83488ea0755c00 100644 (file)
@@ -297,6 +297,19 @@ $moodle_capabilities = array(
             'admin' => CAP_ALLOW
         )
     ),
+
+    'moodle/role:unassignself' => array(
+        'captype' => 'write',
+        'contextlevel' => CONTEXT_SYSTEM,
+        'legacy' => array(
+            'guest' => CAP_PREVENT,
+            'student' => (empty($CFG->allowunenrol)) ? CAP_PREVENT : CAP_ALLOW,
+            'teacher' => CAP_ALLOW,
+            'editingteacher' => CAP_ALLOW,
+            'coursecreator' => CAP_ALLOW,
+            'admin' => CAP_ALLOW
+        )
+    ),
     
     'moodle/category:create' => array(
     
@@ -729,7 +742,7 @@ $moodle_capabilities = array(
         )
     ),
     
-    'moodle/question:managecateory' => array(
+    'moodle/question:managecategory' => array(
         'captype' => 'write',
         'contextlevel' => CONTEXT_COURSE,
         'legacy' => array(
@@ -845,6 +858,7 @@ $moodle_capabilities = array(
             'admin' => CAP_ALLOW
         )
     )
+
 );
 
 ?>
index b6337f6fa8f824791e92b87ab2d51fbe11af2b92..d9f6b19588fa4ffa84a97f529df4eb791f4c265d 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 = 2006090400;  // YYYYMMDD = date
+   $version = 2006090600;  // YYYYMMDD = date
                            //       XY = increments within a single day
 
    $release = '1.7 dev';    // Human-friendly version name