]> git.mjollnir.org Git - moodle.git/commitdiff
proper initialisation of $oldquestionid; merged from MOODLE_16_STABLE
authorskodak <skodak>
Tue, 23 May 2006 09:32:26 +0000 (09:32 +0000)
committerskodak <skodak>
Tue, 23 May 2006 09:32:26 +0000 (09:32 +0000)
question/question.php

index 398e97275ca91aaeff9aa986a5d046bc3a14ac67..4644179d4628c6e5cb5348baadefbac28d864bae 100644 (file)
                 $replaceold   = !$hasresponses && $replaceinall;
             }
 
+            $oldquestionid = false;
             if (!$replaceold) { // create a new question
                 $oldquestionid = $question->id;
                 if (!$makecopy) {
                 error("Failed to save the question!");
             }
 
-            if(isset($oldquestionid)) {
+            if(!empty($oldquestionid)) {
                 // create version entries for different quizzes
                 $version = new object();
                 $version->oldquestion = $oldquestionid;