Details
Description
Clicking the "Add section header" on first quiz page, I am getting a fatal error:
Debug info: Duplicate entry '896-1' for key 'mdl_quizsect_quifir_uix'
|
INSERT INTO mdl_quiz_sections (heading,quizid,firstslot,shufflequestions) VALUES(?,?,?,?)
|
[array (
|
0 => 'Section heading ...',
|
1 => '896',
|
2 => '1',
|
3 => 0,
|
)]
|
Error code: dmlwriteexception
|
Stack trace:
|
line 446 of /lib/dml/moodle_database.php: dml_write_exception thrown
|
line 1164 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
|
line 1210 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()
|
line 985 of /mod/quiz/classes/structure.php: call to mysqli_native_moodle_database->insert_record()
|
line 140 of /mod/quiz/edit.php: call to mod_quiz\structure->add_section_heading()
|
We are using Moodle 2.9.2 which was upgraded recently from Moodle 2.7.2 (and over the years from version to version)
So it is not a clean Moodle 2.9 install.
And I think we have some legacy non empty mdl_quiz_sections table with rows like:
id, quizid, firstslot, heading, shufflequestions
|
"256","446","1",,"0"
|
"512","914","1",,"0"
|
"768","1340","1",,"0"
|
...
|
Attachments
Issue Links
- has a non-specific relationship to
-
MDL-57228 Editing a quiz with section headings can cause a unique key violation
-
- Closed
-