-
Bug
-
Resolution: Fixed
-
Blocker
-
2.0.6, 2.1.3, 2.2
-
MySQL
-
MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
-
MOODLE_20_STABLE, MOODLE_21_STABLE
-
wip-mdl-30466
-
I set up a course as per the instructions in MDLQA-1356. I had previously run an unrelated QA test testing course completion so it contained a database activity that required students to get a grade to before the activity would be marked complete. One student had completed the activity.
I performed a full back up then restored into a new course and got the following error.
Error writing to database
More information about this error
Debug info: Duplicate entry '3-8' for key 'mdl_courmoducomp_usecou_uix'
|
INSERT INTO mdl_course_modules_completion (userid,completionstate,viewed,timemodified,coursemoduleid) VALUES(?,?,?,?,?)
|
[array (
|
0 => '3',
|
1 => '1',
|
2 => '0',
|
3 => 1322192283,
|
4 => 8,
|
)]
|
Stack trace:
|
|
line 397 of /lib/dml/moodle_database.php: dml_write_exception thrown
|
line 893 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
|
line 935 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()
|
line 2489 of /backup/moodle2/restore_stepslib.php: call to mysqli_native_moodle_database->insert_record()
|
line 131 of /backup/util/plan/restore_structure_step.class.php: call to restore_userscompletion_structure_step->process_completion()
|
line 103 of /backup/util/helper/restore_structure_parser_processor.class.php: call to restore_structure_step->process()
|
line 125 of /backup/util/xml/parser/processors/grouped_parser_processor.class.php: call to restore_structure_parser_processor->dispatch_chunk()
|
line 91 of /backup/util/helper/restore_structure_parser_processor.class.php: call to grouped_parser_processor->postprocess_chunk()
|
line 148 of /backup/util/xml/parser/processors/simplified_parser_processor.class.php: call to restore_structure_parser_processor->postprocess_chunk()
|
line 92 of /backup/util/xml/parser/processors/progressive_parser_processor.class.php: call to simplified_parser_processor->process_chunk()
|
line 169 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser_processor->receive_chunk()
|
line 253 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser->publish()
|
line ? of unknownfile: call to progressive_parser->end_tag()
|
line 158 of /backup/util/xml/parser/progressive_parser.class.php: call to xml_parse()
|
line 137 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser->parse()
|
line 105 of /backup/util/plan/restore_structure_step.class.php: call to progressive_parser->process()
|
line 153 of /backup/util/plan/base_task.class.php: call to restore_structure_step->execute()
|
line 182 of /backup/moodle2/restore_activity_task.class.php: call to base_task->execute()
|
line 148 of /backup/util/plan/base_plan.class.php: call to restore_activity_task->execute()
|
line 157 of /backup/util/plan/restore_plan.class.php: call to base_plan->execute()
|
line 302 of /backup/controller/restore_controller.class.php: call to restore_plan->execute()
|
line 147 of /backup/util/ui/restore_ui.class.php: call to restore_controller->execute_plan()
|
line 46 of /backup/restore.php: call to restore_ui->execute()
|
- duplicates
-
MDL-28116 Backup fails when restoring completion data
- Closed
- Testing discovered
-
MDLQA-1356 CLONE - Gradebook restore works
- Passed