Details
-
Bug
-
Status: Closed
-
Blocker
-
Resolution: Fixed
-
2.2.2
-
MOODLE_22_STABLE
-
MOODLE_22_STABLE, MOODLE_23_STABLE
-
MDL-32499_master -
Description
As part of my review for MDL-31270 I have been working on creating a test suite of assignments that I can upgrade.
As part of that test suite I have a course that contains several assignments, a couple of which are using advanced grading, some using rubrics, and some using the marking guide plugin (MDL-31731) that will be arriving in master in the next couple of weeks in time for 2.3.
I've just tried restoring a backup of the course that I have just taken and found that I get the following fatal error.
Debug info: ERROR: duplicate key value violates unique constraint "mdl_gradrubrfill_inscri_uix"
DETAIL: Key (instanceid, criterionid)=(34, 0) already exists.
INSERT INTO mdl_gradingform_rubric_fillings (criterionid,levelid,remark,remarkformat,instanceid) VALUES($1,$2,$3,$4,$5) RETURNING id
[array (
'criterionid' => 0,
'levelid' => 0,
'remark' => 'Good',
'remarkformat' => '0',
'instanceid' => 34,
)]
Stack trace:line 413 of /lib/dml/moodle_database.php: dml_write_exception thrown
line 237 of /lib/dml/pgsql_native_moodle_database.php: call to moodle_database->query_end()
line 795 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
line 847 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->insert_record_raw()
line 112 of /grade/grading/form/rubric/backup/moodle2/restore_gradingform_rubric_plugin.class.php: call to pgsql_native_moodle_database->insert_record()
line 131 of /backup/util/plan/restore_structure_step.class.php: call to restore_gradingform_rubric_plugin->process_gradinform_rubric_filling()
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 187 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 310 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()
Of course to be sure I can reproduce it I have tried to restore the course a couple of times and in a couple of different ways but always the same outcome.
I'll attach my course backup after I create this issue so that you can test it out as well, please note though you will need to install the marking guide plugin (MDL-31731) in order to test this.
The restore may work without it, it may not, I don't know but either way its not the issue at hand
Cheers
Sam