From faf01a4f82bb077dd06dd49d0cc9fa4f4f621055 Mon Sep 17 00:00:00 2001 From: Adam Riddell Date: Wed, 8 Jul 2015 15:28:55 +1000 Subject: [PATCH] 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. --- question/type/calculatedmulti/questiontype.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/question/type/calculatedmulti/questiontype.php b/question/type/calculatedmulti/questiontype.php index 2f90d7be183..72d6306763e 100644 --- a/question/type/calculatedmulti/questiontype.php +++ b/question/type/calculatedmulti/questiontype.php @@ -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 = '';