mirror of
https://github.com/moodle/moodle.git
synced 2025-08-11 20:06:46 +02:00
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:
parent
6ec75e40e0
commit
9119d4513f
1 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue