diff --git a/question/type/numerical/questiontype.php b/question/type/numerical/questiontype.php index a4526b1b1a4..4a490061d51 100644 --- a/question/type/numerical/questiontype.php +++ b/question/type/numerical/questiontype.php @@ -428,7 +428,7 @@ 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[''] != ''){ + if (isset($state->responses['']) && $state->responses[''] != '' && !isset($state->responses['answer'])){ $this->split_old_answer($state->responses[''], $question->options->units, $state->responses['answer'] ,$state->responses['unit'] ); } if (isset($state->responses['answer']) && $state->responses['answer']!='') {