Error adding DB question to first page of quiz

Error adding DB question to first page of quiz

Susana L. -
Кількість відповідей: 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... збитий з пантелику


Thank you,
susana

У відповідь на Susana L.

Re: Error adding DB question to first page of quiz

Tim Hunt -
Фото Core developers Фото Documentation writers Фото Particularly helpful Moodlers Фото Peer reviewers Фото Plugin developers

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