MDL-19519 , MDL-1728 Adding database question_calculated_options

This commit is contained in:
pichetp
2009-08-22 15:38:51 +00:00
parent ac5230fe8e
commit 505f73421c
+7 -1
View File
@@ -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 "<pre> question";print_r($question);echo "</pre>";
$answers = $question['#']['answer'];
@@ -948,6 +948,12 @@ class qformat_xml extends qformat_default {
}
break;
case CALCULATED:
if (!empty($question->options->synchronize)) {
$expout .= " <synchronize>{$question->options->synchronize}</synchronize>\n";
}
else {
$expout .= " <synchronize>0</synchronize>\n";
}
case CALCULATEDSIMPLE:
foreach ($question->options->answers as $answer) {
$tolerance = $answer->tolerance;