Moodle version 3.0.5 - coming from 2.9.1
Attempting to add questions to a quiz in a course that has been restored from a previous course. All of the questions are in a question bank in the course and they would have come with the restored course. When attempting to add a question, a database error will be thrown and then this shows up in the apache log file. In looking at the data, I see how the error is getting thrown but I'm not sure why. I'm not very familiar with the quiz sections table or the index that's throwing the error.
The behavior is sporadic but could indicate it has something to do with the backup and restore process as a result of going to version 3.0.5. Any help or suggestions would be greatly appreciated.
Error writing to database Debug: Duplicate entry '36932-6' for key 'mdl_quizsect_quifir_uix' UPDATE mdl_quiz_sections SET firstslot = firstslot + 1 WHERE quizid = ? AND firstslot > ? [array ( 0 => '36932', 1 => '4', )] Error code: dmlwriteexception * line 446 of /lib/dml/moodle_database.php: dml_write_exception thrown * line 974 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end() * line 2045 of /mod/quiz/locallib.php: call to mysqli_native_moodle_database->execute() * line 129 of /mod/quiz/edit.php: call to quiz_add_quiz_question() , referer: http://<<urlofsite>>/mod/quiz/edit.php?cmid=329118&cat=111894%2C401510&qpage=0&recurse=0&showhidden=0