Error adding DB question to first page of quiz

Error adding DB question to first page of quiz

by Susana L. -
Number of replies: 2

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... mixed


Thank you,
susana

Average of ratings: -
In reply to Susana L.

Re: Error adding DB question to first page of quiz

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

This looks like MDL-57228 - already fixed in Moodle 3.2.6 and later.

Average of ratings: Useful (1)
In reply to Tim Hunt

Re: Error adding DB question to first page of quiz

by Susana L. -

Yes. It seems to be the same problem.
Thank you!