From b79c7c289b6b0299a02a1a1f27cb63db1049f42f Mon Sep 17 00:00:00 2001 From: Pierre Pichet Date: Fri, 4 Jun 2010 03:53:02 +0000 Subject: [PATCH] MDL-20296 correcting fill with correct display in preview --- 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 0d15c6cb550..0dd1a61d8b5 100644 --- a/question/type/numerical/questiontype.php +++ b/question/type/numerical/questiontype.php @@ -424,7 +424,9 @@ class question_numerical_qtype extends question_shortanswer_qtype { // before i.e. at left or after at rigth of the unit variants. $nameunit = "name=\"".$question->name_prefix."unit\""; $nameanswer = "name=\"".$question->name_prefix."answer\""; - + if (isset($state->responses['']) && $state->responses[''] != ''){ + $this->split_old_answer($state->responses[''], $question->options->units, $state->responses['answer'] ,$state->responses['unit'] ); + } if (isset($state->responses['answer']) && $state->responses['answer']!='') { $valueanswer = ' value="'.s($state->responses['answer']).'" '; } else {