MDL-50800 question: Add missing make_answer method

question/type/calculatedmulti/questiontype.php:
        - Add public make_answer method so that apply_attempt_state
          method in qtype_multichoice_base does not cause a fatal
          error when attempting to call make_answer.
This commit is contained in:
Adam Riddell 2015-07-08 15:28:55 +10:00
parent 9325cd963f
commit faf01a4f82

View File

@ -204,6 +204,17 @@ class qtype_calculatedmulti extends qtype_calculated {
$question->datasetloader = new qtype_calculated_dataset_loader($questiondata->id);
}
/**
* Public override method, created so that make_answer will be available
* for use by classes which extend qtype_multichoice_base.
*
* @param stdClass $answer Moodle DB question_answers object.
* @return question_answer
*/
public function make_answer($answer) {
return parent::make_answer($answer);
}
public function comment_header($question) {
$strheader = '';
$delimiter = '';