diff --git a/question/type/calculatedmulti/questiontype.php b/question/type/calculatedmulti/questiontype.php index 0c2df5f0bb9..5715f3e2624 100644 --- a/question/type/calculatedmulti/questiontype.php +++ b/question/type/calculatedmulti/questiontype.php @@ -215,6 +215,10 @@ class qtype_calculatedmulti extends qtype_calculated { return parent::make_answer($answer); } + protected function make_hint($hint) { + return question_hint_with_parts::load_from_record($hint); + } + public function comment_header($question) { $strheader = ''; $delimiter = ''; diff --git a/question/type/calculatedmulti/tests/walkthrough_test.php b/question/type/calculatedmulti/tests/walkthrough_test.php index 10037d14af8..fdaadf4d953 100644 --- a/question/type/calculatedmulti/tests/walkthrough_test.php +++ b/question/type/calculatedmulti/tests/walkthrough_test.php @@ -44,8 +44,8 @@ class qtype_calculatedmulti_walkthrough_test extends qbehaviour_walkthrough_test $q = test_question_maker::make_question('calculatedmulti', 'singleresponse'); $q->shuffleanswers = false; $q->hints = array( - new question_hint(1, 'This is the first hint.', FORMAT_HTML), - new question_hint(2, 'This is the second hint.', FORMAT_HTML), + new question_hint_with_parts(1, 'This is the first hint.', FORMAT_HTML, true, false), + new question_hint_with_parts(2, 'This is the second hint.', FORMAT_HTML, true, false), ); $this->start_attempt_at_question($q, 'interactive', 3, 2); $values = $q->vs->get_values(); @@ -108,8 +108,8 @@ class qtype_calculatedmulti_walkthrough_test extends qbehaviour_walkthrough_test $q = test_question_maker::make_question('calculatedmulti', 'multiresponse'); $q->shuffleanswers = false; $q->hints = array( - new question_hint(1, 'This is the first hint.', FORMAT_HTML), - new question_hint(2, 'This is the second hint.', FORMAT_HTML), + new question_hint_with_parts(1, 'This is the first hint.', FORMAT_HTML, true, false), + new question_hint_with_parts(2, 'This is the second hint.', FORMAT_HTML, true, false), ); $this->start_attempt_at_question($q, 'interactive', 3, 2); $values = $q->vs->get_values();