MDL-18083 (including MDL-15680, MDL-17829, MDL-17807, MDL-18004, MDL-12631, MDL-16913)
This commit is contained in:
@@ -141,13 +141,9 @@ class edit_scale_form extends moodleform {
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($data['scale'])) {
|
||||
$errors['scale'] = get_string('error');
|
||||
} else {
|
||||
$options = explode(',', $data['scale']);
|
||||
if (count($options) < 1) { // single-item scales are allowed, see MDL-16474
|
||||
$errors['scale'] = get_string('error');
|
||||
}
|
||||
$options = explode(',', $data['scale']);
|
||||
if (count($options) < 2) {
|
||||
$errors['scale'] = get_string('badlyformattedscale', 'grades');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user