From b01a2fcd0f4c328c818059e3b157640667374fcc Mon Sep 17 00:00:00 2001 From: skodak Date: Tue, 23 May 2006 09:32:26 +0000 Subject: [PATCH] proper initialisation of $oldquestionid; merged from MOODLE_16_STABLE --- question/question.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/question/question.php b/question/question.php index 398e97275ca..4644179d462 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;