mirror of
https://github.com/moodle/moodle.git
synced 2025-08-03 16:13:28 +02:00
MDL-16474 Modifications to allow definition of 1-point scales
This commit is contained in:
parent
2b9feb5f0e
commit
b467ee7539
1 changed files with 6 additions and 2 deletions
|
@ -141,9 +141,13 @@ class edit_scale_form extends moodleform {
|
|||
}
|
||||
}
|
||||
|
||||
$options = explode(',', $data['scale']);
|
||||
if (count($options) < 2) {
|
||||
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');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue