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.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user