Permalink
Browse files

MDL-29216 multianswer qtype needs intereactive elements on the form.

  • Loading branch information...
1 parent 3973662 commit 22ba72591cde5c7c5c416afc00b21f021a39ad6f @timhunt timhunt committed Sep 30, 2011
@@ -254,6 +254,7 @@ protected function definition_inner($mform) {
$mform->addElement('hidden', 'confirm', 0);
}
+ $this->add_interactive_settings();
}
@@ -424,6 +425,7 @@ public function set_data($question) {
if ($default_values != "") {
$question = (object)((array)$question + $default_values);
}
+ $question = $this->data_preprocessing_hints($question);
parent::set_data($question);
}
@@ -75,6 +75,9 @@ public function get_question_options($question) {
$question->options->questions[$sequence[$wrapped->id]] = $wrapped;
}
+ $question->hints = $DB->get_records('question_hints',
+ array('questionid' => $question->id), 'id ASC');
+
return true;
}
@@ -164,6 +167,8 @@ public function save_question_options($question) {
$DB->insert_record('question_multianswer', $multianswer);
}
}
+
+ $this->save_hints($question);
}
public function save_question($authorizedquestion, $form) {

0 comments on commit 22ba725

Please sign in to comment.