If you’ve ever tried to duplicate quizzes in Moodle only to be greeted by an error which looked like or similar to “error_question_answers_missing_in_db & subquestion_error” and was left scratching your head because something didn’t work as expected, you’re not alone. Many Moodle users have run into this issue in Moodle version 4x, and it can feel overwhelming, especially if you don’t consider yourself a tech-savvy person.
I recently migrated my site to Mindfield from another host, and the experience couldn’t have been better. Mindfield kept working until they were certain that my site was operating as well as it was before, and they even helped clean up a few issues to improve my site’s performance – issues my prior host never mentioned. I also found Mindfield’s communication to be excellent. Before the migration, they prepared me for what to expect, and during the migration they kept me well-informed. No small feat considering that changing hosts is inherently stressful! They also provided clear and concise explanations when required. I’d highly recommend Mindfield if you’re looking for an IT consultant, developer, or host.
Jim Benedek
Owner, Student First Media Inc.
Review Source: Google Reviews
Outline
What’s the quiz duplication error?
Is there a solution for the Moodle version 4x quiz duplication error?
How can we still navigate the massive question bank?
Benefits of hiring Moodle experts for the Moodle quiz and question duplication error
What’s the quiz duplication error?
The question bank within Moodle has always been a major issue. Why is that? The core code has never been written to include a separate copy code for quiz or question duplications, it shares code with the backup and restore process. The backup and restore was fundamentally designed for migration purposes or if something dire happens, and an entire platform required restoration. How does this apply to the current quiz duplication error? Over the various versions of patches/fixes released, a fix released caused a specific error to occur during the duplication (backup and restore) process of quizzes. You may have encountered an error which looked like “error_question_answers_missing_in_db & subquestion_error“.
For some, you might’ve tried to revert the section of code that was preventing the duplication and in result allowed the backup and restore to duplicate the quiz. You aren’t the only one if you tried this, we did too! The error thrown was like a gate. In reverting the code, you opened the flood gate. Many have experienced this, where this allowed the duplication of quizzes but then also allowed for thousand, maybe even millions of duplications of their questions. This created a whole new issue. The instructors/teachers weren’t able to navigate the question bank from the amount of duplicated questions. This is an understandable headache especially during exam/testing periods.
Here’s an example of what the question duplications may look like for you in your Moodle database.
Is there a solution for the Moodle version 4x quiz duplication error?
Good news! As of December 2024, the devs working on bugs and fixes through Moodle tracker released a temporary fix. To learn more, https://tracker.moodle.org/browse/MDL-83541. We recommend testing this update on your test or staging site first. Test a duplication of a quiz there before implementing this to your production site.
How can we still navigate the massive question bank?
As mentioned, many may have experienced the massive duplication issue in result of this error. You may have teachers trying to navigate through the huge question banks trying to create their new quizzes or exams. At Mindfield Consulting, we’ve had clients also affected by this problem. We need a quick work around to allow them to create their quizzes during testing seasons or end of semester. Our temporary solution while we were working on a way to clean up the duplications was to hide the duplications from the front-end. What did we do? We created something called a review questions plugin.
What does the review questions plugin do? It’s a plugin built with a set of conditions, and if met, would hide the questions from view in the question bank. Our conditions were the questions had was a duplicated stamp, shared the same created and/or edit timestamp and was never used. If the question met these conditions, only the oldest copy would be kept and all others would be hidden. Why hide and not delete? At the time, we didn’t have the time to investigate and find a sure-fire way to safely only delete duplications of questions. This method allowed us to hide duplications but also still have them existing to restore in the case, a copy which was meant to exist could still be available. This method allowed us to provide a way for teacher and instructors to still navigate through their question banks and gave us the time we needed to do further investigation into the real underlying issue or error.
Benefits of hiring Moodle experts for the Moodle quiz and question duplication error
When faced with complex issues like the Moodle quiz duplication error, hiring a Moodle expert can save you time, stress, and costly mistakes. Moodle experts have the technical know-how to diagnose and resolve problems quickly, ensuring minimal disruption to your courses. They can implement tailored solutions, such as custom plugins or database cleanups, that not only address the immediate issue but also enhance the overall functionality of your Moodle platform. Additionally, experts can guide you in adopting best practices, keeping your site secure, optimized, and free of future errors. Whether it’s troubleshooting bugs, streamlining your question bank, or ensuring smooth updates, a Moodle expert brings peace of mind and professional-grade results.