} 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';
}
<td colspan="2" align="center">
<input type="submit" '.$submitscript.' value="'.get_string('savechanges').'" /> ';
if ($question->id) {
-// Switched off until bug 3445 is fixed
-// echo '<input type="submit" name="makecopy" '.$submitscript.' value="'.get_string("makecopy", "quiz").'" /> ';
+ echo '<input type="submit" name="makecopy" '.$submitscript.' value="'.get_string("makecopy", "quiz").'" /> ';
}
echo '<input type="submit" name="cancel" value="'.get_string("cancel").'" />
<input type="hidden" name="sesskey" value="'.$USER->sesskey.'" />