fixing new gradebookroles settings

This commit is contained in:
toyomoyo
2006-10-30 08:43:41 +00:00
parent 6ef50f6983
commit 45c65f2b7e
+1 -7
View File
@@ -2327,13 +2327,7 @@ class admin_setting_special_gradebookroles extends admin_setting {
if (!empty($CFG->{$this->name})) {
return explode(',', $CFG->{$this->name});
} else {
$value = array();
if ($studentroles = get_roles_with_capability('moodle/legacy:student', CAP_ALLOW)) {
foreach ($studentroles as $roleid=>$studentrole) {
$value[] = $roleid;
}
}
return $value;
return null;
}
}