-
Bug
-
Resolution: Fixed
-
Blocker
-
2.1
-
MySQL
-
MOODLE_21_STABLE
-
MOODLE_21_STABLE
-
Restoring a very simple quiz backup generated in 2.0 to 2.1 ends with error.
To reproduce:
- Restore into existing course, adding, the backup file created by
MDL-28035in one Moodle 2.1 site (I'm attaching also one copy here from my own tests.
Expected:
- Course should restore ok and the quiz and its attempts should be shown ok.
Current:
Debug info: Duplicate entry '0' for key 'mdl_quizatte_uni_uix'
|
|
INSERT INTO mdl_quiz_attempts (uniqueid,userid,sumgrades,timestart,timefinish,timemodified,layout,preview,quiz,attempt) VALUES(?,?,?,?,?,?,?,?,?,?)
|
[array (
|
0 => 0,
|
1 => '5',
|
2 => '1.00000',
|
3 => 1287061174,
|
4 => 1287061181,
|
5 => 1287061181,
|
6 => '1,0',
|
7 => '0',
|
8 => 66,
|
9 => '1',
|
)]
|
Stack trace:
|
line 396 of /lib/dml/moodle_database.php: dml_write_exception thrown
|
line 878 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
|
line 920 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()
|
line 291 of /mod/quiz/backup/moodle2/restore_quiz_stepslib.php: call to mysqli_native_moodle_database->insert_record()
|
line 300 of /mod/quiz/backup/moodle2/restore_quiz_stepslib.php: call to restore_quiz_activity_structure_step->process_quiz_attempt()
|
line 131 of /backup/util/plan/restore_structure_step.class.php: call to restore_quiz_activity_structure_step->process_quiz_attempt_legacy()
|
...
|
...
|