Hi,
Moodle 3.1- PostgreSQL, production server, when trying to add a question from database to the first page of a quiz:
Debug info: ERROR: duplicate key value violates unique constraint "mdl_quizsect_quifir_uix"
DETAIL: Key (quizid, firstslot)=(2035, 23) already exists.
UPDATE mdl_quiz_sections
SET firstslot = firstslot + 1
WHERE quizid = $1
AND firstslot > $2
[array (
0 => '2035',
1 => '5',
)]
Error code: dmlwriteexception
Stack trace:
line 482 of /lib/dml/moodle_database.php: dml_write_exception thrown
line 250 of /lib/dml/pgsql_native_moodle_database.php: call to moodle_database->query_end()
line 718 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
line 2065 of /mod/quiz/locallib.php: call to pgsql_native_moodle_database->execute()
line 129 of /mod/quiz/edit.php: call to quiz_add_quiz_question()
Anyone?
As a workaround added the question to the last page successfully and then moved the question to the previous, previou, previous page and finally to the first page...
Thank you,
susana