bdaloukas / moodle-mod_game

moodle-mod_game
GNU General Public License v3.0
15 stars 40 forks source link

Error: Wrong questions are shown in Moodle 4.0+ for quizzes #64

Closed AraPraxis closed 8 months ago

AraPraxis commented 8 months ago

I noticed that in the 04.00+ version of the plugin, a specfic select is used to get all question_references on a quiz_slot image

This has given an error when the quiz_slot id and question_reference id is not the same, wrong questions are shown on the correct chosen quiz.

I've looked at Moodle's ERD and it looks like the correct SQL should be: "qs.quizid='$game->quizid' AND qs.id=qr.itemid ";

https://www.examulator.com/er/4.2/tables/quiz_slots.html https://www.examulator.com/er/4.2/tables/question_references.html

bdaloukas commented 8 months ago

Thank you. I accept your proposal in version 20231102