Whenever I import a questions file into the Question Bank or add questions manually and navigate to the Questions tab to edit them, I encounter an error "Subquery returns more than 1 row" as shown in image. Upon investigating the database, I found that there are duplicate records with the same question ID, which should not be the case.
When I attempt to delete one of the duplicate entries directly from the database, I receive another error indicating a "Coding error detected", as shown in the attached image.
Moodle Version: 4.2.5
Please help with this.
- line 494 of /lib/dml/moodle_database.php: dml_read_exception thrown
- line 293 of /lib/dml/moodle_read_slave_trait.php: call to moodle_database->query_end()
- line 1375 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->query_end()
- line 63 of /mod/quiz/classes/question/bank/qbank_helper.php: call to mysqli_native_moodle_database->get_records_sql()
- line 787 of /mod/quiz/classes/structure.php: call to mod_quiz\question\bank\qbank_helper::get_version_options()
- line 779 of /mod/quiz/classes/output/edit_renderer.php: call to mod_quiz\structure->get_version_choices_for_slot()
- line 549 of /mod/quiz/classes/output/edit_renderer.php: call to mod_quiz\output\edit_renderer->question()
- line 522 of /mod/quiz/classes/output/edit_renderer.php: call to mod_quiz\output\edit_renderer->question_row()
- line 94 of /mod/quiz/classes/output/edit_renderer.php: call to mod_quiz\output\edit_renderer->questions_in_section()
- line 208 of /mod/quiz/edit.php: call to mod_quiz\output\edit_renderer->edit_page()