From 9119d4513f935359d7d1abc2ee2f36f2da63c757 Mon Sep 17 00:00:00 2001 From: Jun Pataleta Date: Wed, 19 Jul 2023 12:07:52 +0800 Subject: [PATCH] MDL-77328 qtype_caclulatedsimple: Use qtype_calculated_answer The question answers for question type plugins extending \qtype_calculated now have the type \qtype_calculated\qtype_calculated_answer. So the answers for make_calculatedsimple_question_sum() should be changed accordingly. --- question/type/calculatedsimple/tests/helper.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/question/type/calculatedsimple/tests/helper.php b/question/type/calculatedsimple/tests/helper.php index c3bca397d58..eaa3d6af1fe 100644 --- a/question/type/calculatedsimple/tests/helper.php +++ b/question/type/calculatedsimple/tests/helper.php @@ -54,10 +54,10 @@ class qtype_calculatedsimple_test_helper extends question_test_helper { $q->generalfeedback = 'Generalfeedback: {={a} + {b}} is the right answer.'; $q->answers = array( - 13 => new qtype_numerical_answer(13, '{a} + {b}', 1.0, 'Very good.', FORMAT_HTML, 0), - 14 => new qtype_numerical_answer(14, '{a} - {b}', 0.0, 'Add. not subtract!.', + 13 => new \qtype_calculated\qtype_calculated_answer(13, '{a} + {b}', 1.0, 'Very good.', FORMAT_HTML, 0), + 14 => new \qtype_calculated\qtype_calculated_answer(14, '{a} - {b}', 0.0, 'Add. not subtract!.', FORMAT_HTML, 0), - 17 => new qtype_numerical_answer(17, '*', 0.0, 'Completely wrong.', FORMAT_HTML, 0), + 17 => new \qtype_calculated\qtype_calculated_answer(17, '*', 0.0, 'Completely wrong.', FORMAT_HTML, 0), ); foreach ($q->answers as $answer) { $answer->correctanswerlength = 2;