]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-19519 , MDL-1728 Adding database question_calculated_options
authorpichetp <pichetp>
Sat, 22 Aug 2009 14:59:46 +0000 (14:59 +0000)
committerpichetp <pichetp>
Sat, 22 Aug 2009 14:59:46 +0000 (14:59 +0000)
final strings text will be added later after users comments

question/type/calculated/datasetdefinitions_form.php

index 8960e8a936b1e7fedfcb01923c28e3eeb7e07e07..5a0155e1d1f9cd525c61b2e5f6358632b5807934 100644 (file)
@@ -96,6 +96,14 @@ class question_dataset_dependent_definitions_form extends moodleform {
                 $key++;
             }
         }
+        $mform->addElement('header', 'synchronizehdr', get_string("Synchronize the data from shared datasets with other questions in a quiz", $stringfile));
+        $mform->addElement('checkbox', "synchronize", '', "For each question in a quiz using a given wild card {x..} from a <strong>shared </strong> dataset,  wild card {x..}will be substituted by the same numerical value.");
+        if (isset($this->question->options)&& isset($this->question->options->synchronize) ){
+            $mform->setDefault("synchronize", $this->question->options->synchronize);
+        } else {
+            $mform->setDefault("synchronize", 0 );
+        }
+
         $this->add_action_buttons(false, get_string('nextpage', 'qtype_calculated'));