mirror of
https://github.com/moodle/moodle.git
synced 2025-04-25 10:26:17 +02:00
Merge branch 'MDL-48773_m32v1' of https://github.com/sbourget/moodle
This commit is contained in:
commit
0969f0da5b
@ -34,6 +34,12 @@ class mod_choice_mod_form extends moodleform_mod {
|
||||
$mform->addElement('selectyesno', 'allowupdate', get_string("allowupdate", "choice"));
|
||||
|
||||
$mform->addElement('selectyesno', 'allowmultiple', get_string('allowmultiple', 'choice'));
|
||||
if ($this->_instance) {
|
||||
if ($DB->count_records('choice_answers', array('choiceid' => $this->_instance)) > 0) {
|
||||
// Prevent user from toggeling the number of allowed answers once there are submissions.
|
||||
$mform->freeze('allowmultiple');
|
||||
}
|
||||
}
|
||||
|
||||
$mform->addElement('selectyesno', 'limitanswers', get_string('limitanswers', 'choice'));
|
||||
$mform->addHelpButton('limitanswers', 'limitanswers', 'choice');
|
||||
|
Loading…
x
Reference in New Issue
Block a user