From: pichetp Date: Sat, 10 Oct 2009 01:08:11 +0000 (+0000) Subject: MDL-20296 setting get_correct_responses() X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=78d2d5763af17a7e019ad1d84a05a6104982b929;p=moodle.git MDL-20296 setting get_correct_responses() --- 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; }