From: pichetp Date: Tue, 27 Jan 2009 15:00:19 +0000 (+0000) Subject: MDL-18034 saving answers data in $question->answer if they come from edit from. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=0a6555f8545e031de72f2bd58dcaa47b880ee8f7;p=moodle.git MDL-18034 saving answers data in $question->answer if they come from edit from. --- diff --git a/question/type/calculated/questiontype.php b/question/type/calculated/questiontype.php index 7db4575546..b7c20d669a 100644 --- a/question/type/calculated/questiontype.php +++ b/question/type/calculated/questiontype.php @@ -149,6 +149,9 @@ class question_calculated_qtype extends default_questiontype { $units = &$result->units; } // Insert all the new answers + if (isset($question->answer) && !isset($question->answers)) { + $question->answers=$question->answer; + } foreach ($question->answers as $key => $dataanswer) { if ( trim($dataanswer) != '' ) { $answer = new stdClass;