From: skodak Date: Tue, 23 May 2006 09:32:26 +0000 (+0000) Subject: proper initialisation of $oldquestionid; merged from MOODLE_16_STABLE X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=b01a2fcd0f4c328c818059e3b157640667374fcc;p=moodle.git proper initialisation of $oldquestionid; merged from MOODLE_16_STABLE --- diff --git a/question/question.php b/question/question.php index 398e97275c..4644179d46 100644 --- a/question/question.php +++ b/question/question.php @@ -146,6 +146,7 @@ $replaceold = !$hasresponses && $replaceinall; } + $oldquestionid = false; if (!$replaceold) { // create a new question $oldquestionid = $question->id; if (!$makecopy) { @@ -161,7 +162,7 @@ error("Failed to save the question!"); } - if(isset($oldquestionid)) { + if(!empty($oldquestionid)) { // create version entries for different quizzes $version = new object(); $version->oldquestion = $oldquestionid;