Added moodle/role:unassignself which replaces $CFG->allowunenroll
This commit is contained in:
@@ -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);
|
||||
|
||||
+15
-1
@@ -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
|
||||
)
|
||||
)
|
||||
|
||||
);
|
||||
|
||||
?>
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user