Here is how to replicate:
1) Go to quiz questions and add a question from the question bank.
2) Apply a filter to view questions from another category.
3) Preview any question.
After the preview popup displays the original modal with the questions displays an error.
"Invalid Record. Can't find data record in database table course."
Here is a video replicating the issue.
I had this error happen on several themes with and without quiz question plugins.
This is a pretty serious issue with our teachers since Moodle 4.3
Moodle 4.3 up to Moodle 4.3.2 Question Preview Error when using filter in question bank "Invalid Record. Can't find data record in database table course."
by Chris Kenniburg -
Number of replies: 8
In reply to Chris Kenniburg
Re: Moodle 4.3 up to Moodle 4.3.2 Question Preview Error when using filter in question bank "Invalid Record. Can't find data record in database table course."
by Rick Jerz -
Chris, I am unsure, but this could have something to do with MDL-79708, which is supposed to be fixed in 4.3.3 (soon).
In reply to Rick Jerz
Re: Moodle 4.3 up to Moodle 4.3.2 Question Preview Error when using filter in question bank "Invalid Record. Can't find data record in database table course."
by Chris Kenniburg -
Hello Rick,
I don't think that pertains to my post. My issue might be new and I've had it occur on a dev site and live site. My issue is when building the quiz and adding new questions. When you use the filter to display quiz questions from another category in your course it will break the page when you preview a question and try to return to add a question.
Basically, using the filter to open a preview of a question breaks the quiz add question from bank modal window. The video walks you through how to break the function. I'd be interested to know if you get similar results on Moodle 4.3.2.
I don't think that pertains to my post. My issue might be new and I've had it occur on a dev site and live site. My issue is when building the quiz and adding new questions. When you use the filter to display quiz questions from another category in your course it will break the page when you preview a question and try to return to add a question.
Basically, using the filter to open a preview of a question breaks the quiz add question from bank modal window. The video walks you through how to break the function. I'd be interested to know if you get similar results on Moodle 4.3.2.
In reply to Chris Kenniburg
Re: Moodle 4.3 up to Moodle 4.3.2 Question Preview Error when using filter in question bank "Invalid Record. Can't find data record in database table course."
by Rick Jerz -
Sorry about that, Chris.
You are correct about the error. I tested with Moodle 4.3.2+ (Build: 20240125). Yes, I get an error, which is shown below.
You are correct about the error. I tested with Moodle 4.3.2+ (Build: 20240125). Yes, I get an error, which is shown below.

In reply to Rick Jerz
Re: Moodle 4.3 up to Moodle 4.3.2 Question Preview Error when using filter in question bank "Invalid Record. Can't find data record in database table course."
by Chris Kenniburg -
Thanks for the screen shot on the tracker issue! Much appreciated. I've had about 6 teachers complaining and many more that were just frustrated.
In reply to Chris Kenniburg
Re: Moodle 4.3 up to Moodle 4.3.2 Question Preview Error when using filter in question bank "Invalid Record. Can't find data record in database table course."
by Matthias Giger -
I could replicate the problem you are describing in Moodle Moodle 4.3.2 (Build: 20231222).
In reply to Matthias Giger
Re: Moodle 4.3 up to Moodle 4.3.2 Question Preview Error when using filter in question bank "Invalid Record. Can't find data record in database table course."
by Chris Kenniburg -
https://tracker.moodle.org/browse/MDL-80811 I just added a bug report.
In reply to Chris Kenniburg
Re: Moodle 4.3 up to Moodle 4.3.2 Question Preview Error when using filter in question bank "Invalid Record. Can't find data record in database table course."
by Tim Hunt -
And, I just reviewed the fix for this which Paul Holden developed, so it is looking good to get into 4.3.3.
In reply to Tim Hunt
Re: Moodle 4.3 up to Moodle 4.3.2 Question Preview Error when using filter in question bank "Invalid Record. Can't find data record in database table course."
by Chris Kenniburg -
Thank you so much Tim and Paul! That was a very speedy turnaround. I am sure our teachers will appreciate that!