error("Could not update question!");
}
} else { // Question is a new one
+ $question->stamp = make_unique_id_code(); // Set the unique code (not to be changed)
if (!$question->id = insert_record("quiz_questions", $question)) {
error("Could not insert new question!");
}
$question->questiontext = "---";
$question->image = "";
$question->defaultgrade = $form->randomgrade;
+ $question->stamp = make_unique_id_code(); // Set the unique code (not to be changed)
for ($i=0; $i<$randomcreate; $i++) {
if (!$newquestionids[] = insert_record("quiz_questions", $question)) {
error("Could not insert new random question!");