diff --git a/question/question.php b/question/question.php index 87e30673a3d..63f8fad38e9 100644 --- a/question/question.php +++ b/question/question.php @@ -274,6 +274,11 @@ } else { // use the old code which simply overwrites old versions // it is also used for creating new questions + + if (isset($form->makecopy)) { + $question->hidden = 0; // explicitly requested copies should be unhidden + $question->id = 0; // This will prompt save_question to create a new question + } $question = $QTYPES[$qtype]->save_question($question, $form, $course); $replaceinquiz = 'all'; } diff --git a/question/questiontypes/questiontype.php b/question/questiontypes/questiontype.php index d246d0d1d76..a84b45f4252 100644 --- a/question/questiontypes/questiontype.php +++ b/question/questiontypes/questiontype.php @@ -966,8 +966,7 @@ class default_questiontype {