mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
proper initialisation of $oldquestionid; merged from MOODLE_16_STABLE
This commit is contained in:
parent
0629da47d2
commit
b01a2fcd0f
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user