I have been getting a related error when attempting to restore quizzes backed up using the normal backup form, that have Multianswer type questions in them, as per the following output.
- backup file has been limited to just contain the quiz (no course resource or user data)
- using an existing unit
- having selected the option to add data to it (not deleting)
The output from the restore was as follows:
Creating topics and questions
Category "Default"
. . . . .
Notice: Undefined index: ANSWERS in /var/www/html/gcm77/moodle5/question/type/multianswer/questiontype.php on line 511
Notice: Undefined index: POSITIONKEY in /var/www/html/gcm77/moodle5/question/type/multianswer/questiontype.php on line 512
Notice: Undefined index: ANSWERTYPE in /var/www/html/gcm77/moodle5/question/type/multianswer/questiontype.php on line 513
Notice: Undefined index: NORM in /var/www/html/gcm77/moodle5/question/type/multianswer/questiontype.php on line 514
ERROR: column "positionkey" does not exist
SELECT * FROM mdl5_question_multianswer WHERE question = '796' AND positionkey = ''
line 779 of lib/dmllib.php: call to debugging()
line 576 of lib/dmllib.php: call to get_recordset_sql()
line 516 of lib/dmllib.php: call to get_record_sql()
line 523 of question/type/multianswer/questiontype.php: call to get_record()
line 290 of question/restorelib.php: call to embedded_cloze_qtype->restore_map()
line 149 of question/restorelib.php: call to restore_questions()
line 2038 of backup/restorelib.php: call to restore_question_categories()
line 6066 of backup/restorelib.php: call to restore_create_questions()
line 49 of backup/restore_execute.html: call to restore_execute()
line 162 of backup/restore.php: call to include_once()
.
ERROR: current transaction is aborted, commands ignored until end of transaction block
SELECT * FROM mdl5_question_answers WHERE question = '797' AND answer = 'Il y a énormément de monde aux terrasses des cafés.'
line 779 of lib/dmllib.php: call to debugging()
line 576 of lib/dmllib.php: call to get_recordset_sql()
line 516 of lib/dmllib.php: call to get_record_sql()
line 407 of question/restorelib.php: call to get_record()
line 287 of question/restorelib.php: call to question_restore_map_answers()
line 149 of question/restorelib.php: call to restore_questions()
line 2038 of backup/restorelib.php: call to restore_question_categories()
line 6066 of backup/restorelib.php: call to restore_create_questions()
line 49 of backup/restore_execute.html: call to restore_execute()
line 162 of backup/restore.php: call to include_once()
re-assigning....to Tim