mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
MDL-44952 mod_feedback: validate required multichoice
This commit is contained in:
parent
83a951023e
commit
8ad534bd9f
@ -578,7 +578,7 @@ class feedback_item_multichoice extends feedback_item_base {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!isset($value) OR !is_array($value) OR $value[0] == '' OR $value[0] == 0) {
|
||||
if (empty($value) OR !is_array($value) OR $value[0] == '' OR $value[0] == 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -63,6 +63,7 @@ class feedback_multichoice_form extends feedback_item_form {
|
||||
$mform->addElement('selectyesno',
|
||||
'hidenoselect',
|
||||
get_string('hide_no_select_option', 'feedback'));
|
||||
$mform->disabledIf('hidenoselect', 'subtype', 'ne', 'r');
|
||||
|
||||
$mform->addElement('static',
|
||||
'hint',
|
||||
|
Loading…
x
Reference in New Issue
Block a user