Create a sudoku which is using glossary as source.
Try to launch the game.
Result
Unknown column 'qv.questionbankentryid' in 'field list'
SELECT ge.id,qv.questionbankentryid,qv.version FROM mdl_glossary_entries ge WHERE (glossaryid='1' OR sourceglossaryid='1') ORDER BY qv.questionbankentryid,qv.version DESC
[array (
)]
Error code: dmlreadexception
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 1282 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->query_end()
line 621 of /mod/game/locallib.php: call to mysqli_native_moodle_database->get_records_sql()
line 580 of /mod/game/locallib.php: call to game_questions_selectrandom_detail()
line 79 of /mod/game/sudoku/play.php: call to game_questions_selectrandom()
line 280 of /mod/game/attempt.php: call to game_sudoku_continue()
line 242 of /mod/game/attempt.php: call to game_create()
line 40 of /mod/game/attempt.php: call to game_do_attempt()
Steps to reproduce
Result
Analysis
In https://github.com/bdaloukas/moodle-mod_game/commit/9316457cfb5be3ffc17f6c36e4d3cd6252ec05e1 you introduced question/quiz specific fields in the query used in https://github.com/bdaloukas/moodle-mod_game/blob/e4109a7fb9af86d559fee1816f3cc40fe398978f/locallib.php#L620 making it no more compatible with glossary as source.
Solution / Workaround
Waiting a cleaner solution below an ugly patch I've done as workaround to prevent glossaries to crash.