]> git.mjollnir.org Git - moodle.git/commitdiff
Questions were being created here without a stamp
authormoodler <moodler>
Fri, 29 Aug 2003 01:14:38 +0000 (01:14 +0000)
committermoodler <moodler>
Fri, 29 Aug 2003 01:14:38 +0000 (01:14 +0000)
mod/quiz/editmultianswer.php
mod/quiz/multiple.php

index dc589129ef7da30e44635c73933b794f50a84af4..d52ec63729c916a6b169be41c2bc1bd11e172dab 100644 (file)
@@ -54,6 +54,7 @@
                     error("Could not update question!");
                 }
             } else {         // Question is a new one
+                $question->stamp = make_unique_id_code();  // Set the unique code (not to be changed)
                 if (!$question->id = insert_record("quiz_questions", $question)) {
                     error("Could not insert new question!");
                 }
index c0798779df08dc1f3d501891dfee640179547ac7..da9c910afd206001caf1da13886ee5794ec33230 100644 (file)
@@ -46,6 +46,7 @@
                 $question->questiontext = "---";
                 $question->image = "";
                 $question->defaultgrade = $form->randomgrade;
+                $question->stamp = make_unique_id_code();  // Set the unique code (not to be changed)
                 for ($i=0; $i<$randomcreate; $i++) {
                     if (!$newquestionids[] = insert_record("quiz_questions", $question)) {
                         error("Could not insert new random question!");