From 78d2d5763af17a7e019ad1d84a05a6104982b929 Mon Sep 17 00:00:00 2001 From: pichetp Date: Sat, 10 Oct 2009 01:08:11 +0000 Subject: [PATCH] MDL-20296 setting get_correct_responses() --- question/type/numerical/questiontype.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/question/type/numerical/questiontype.php b/question/type/numerical/questiontype.php index 2deeec97c0..fa7fd31745 100644 --- a/question/type/numerical/questiontype.php +++ b/question/type/numerical/questiontype.php @@ -515,9 +515,11 @@ class question_numerical_qtype extends question_shortanswer_qtype { function get_correct_responses(&$question, &$state) { $correct = parent::get_correct_responses($question, $state); $unit = $this->get_default_numerical_unit($question); + $correct['answer']= $correct['']; if (isset($correct['']) && $correct[''] != '*' && $unit) { $correct[''] .= ' '.$unit->unit; - } + $correct['unit']= $unit->unit; + } return $correct; } -- 2.39.5