mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 17:06:53 +02:00
MDL-29216 multianswer qtype needs intereactive elements on the form.
This commit is contained in:
parent
228d24fd97
commit
a44995325e
2 changed files with 7 additions and 0 deletions
|
@ -253,6 +253,7 @@ class qtype_multianswer_edit_form extends question_edit_form {
|
||||||
$mform->addElement('hidden', 'confirm', 0);
|
$mform->addElement('hidden', 'confirm', 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->add_interactive_settings();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -423,6 +424,7 @@ class qtype_multianswer_edit_form extends question_edit_form {
|
||||||
if ($default_values != "") {
|
if ($default_values != "") {
|
||||||
$question = (object)((array)$question + $default_values);
|
$question = (object)((array)$question + $default_values);
|
||||||
}
|
}
|
||||||
|
$question = $this->data_preprocessing_hints($question);
|
||||||
parent::set_data($question);
|
parent::set_data($question);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -75,6 +75,9 @@ class qtype_multianswer extends question_type {
|
||||||
$question->options->questions[$sequence[$wrapped->id]] = $wrapped;
|
$question->options->questions[$sequence[$wrapped->id]] = $wrapped;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$question->hints = $DB->get_records('question_hints',
|
||||||
|
array('questionid' => $question->id), 'id ASC');
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -164,6 +167,8 @@ class qtype_multianswer extends question_type {
|
||||||
$DB->insert_record('question_multianswer', $multianswer);
|
$DB->insert_record('question_multianswer', $multianswer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->save_hints($question);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function save_question($authorizedquestion, $form) {
|
public function save_question($authorizedquestion, $form) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue