proper initialisation of $oldquestionid; merged from MOODLE_16_STABLE

This commit is contained in:
skodak
2006-05-23 09:32:26 +00:00
parent 0629da47d2
commit b01a2fcd0f
+2 -1
View File
@@ -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;