From 505f73421cbf21144c215c8a2c726641de5222ed Mon Sep 17 00:00:00 2001 From: pichetp Date: Sat, 22 Aug 2009 15:38:51 +0000 Subject: [PATCH] MDL-19519 , MDL-1728 Adding database question_calculated_options --- question/format/xml/format.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/question/format/xml/format.php b/question/format/xml/format.php index 0d69e44f77..e089b4e6ef 100755 --- a/question/format/xml/format.php +++ b/question/format/xml/format.php @@ -415,7 +415,7 @@ class qformat_xml extends qformat_default { // header parts particular to numerical $qo->qtype = CALCULATED ;//CALCULATED; - + $qo->synchronize = $this->getpath( $question, array( '#','synchronize',0,'#' ), 0 ); // get answers array // echo "
 question";print_r($question);echo "
"; $answers = $question['#']['answer']; @@ -948,6 +948,12 @@ class qformat_xml extends qformat_default { } break; case CALCULATED: + if (!empty($question->options->synchronize)) { + $expout .= " {$question->options->synchronize}\n"; + } + else { + $expout .= " 0\n"; + } case CALCULATEDSIMPLE: foreach ($question->options->answers as $answer) { $tolerance = $answer->tolerance; -- 2.39.5