]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-19519 , MDL-1728 setting correctly synchonize value when saving question
authorpichetp <pichetp>
Sun, 13 Sep 2009 13:49:50 +0000 (13:49 +0000)
committerpichetp <pichetp>
Sun, 13 Sep 2009 13:49:50 +0000 (13:49 +0000)
from datasetdefinitions_form.php

question/type/calculated/questiontype.php

index 8327bc8c1496b44935f7ce093a99e35c5914d214..b962efe545b61bcc1cf82a2f743d5ffa413bc4cb 100644 (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)";