MDL-19519 , MDL-1728 setting correctly synchonize value when saving question

from datasetdefinitions_form.php
This commit is contained in:
pichetp
2009-09-13 13:49:50 +00:00
parent ccb542318c
commit bb02e41fe2
+5 -1
View File
@@ -629,7 +629,11 @@ class question_calculated_qtype extends default_questiontype {
$options = new stdClass;
$options->question = $question->id;
}
$options->synchronize = $form->synchronize;
if($form->synchronize == 1 ){
$options->synchronize = $form->synchronize;
}else {
$options->synchronize = 0 ;
}
if ($update) {
if (!$DB->update_record("question_calculated_options", $options)) {
$result->error = "Could not update calculated question options! (id=$options->id)";