bdaloukas / moodle-mod_game

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

hiding game-type doesn´t work with Moodle 4.2 and pg #54

Closed ksteitz closed 8 months ago

ksteitz commented 1 year ago

Today we updated our testing system from Moodle 4.1 to Moodle 4.2. Since then the config for hiding game-types doesn´t work anymore. Though types under /admin/settings.php?section=modsettinggame are set to hide (e.g. game | hidecross), they are shown in the activity chooser. The settings don´t matter, always most game-types are displyed in the chooser, except bookquiz and snakes. bookquiz and snakes are never shown in the chooser, even if the hidebookquiz and hidesnakes checkbox isn´t set.

Moodle 4.2 PostgreSQL 13 PHP 8.0 mod_game: 2023-04-25 (2023042500)

general bug or just with our setting (using game already for many many years)? any ideas?

thanks! Klaus

AmelieSOUBRAT commented 1 year ago

We have the same problem

azrek commented 1 year ago

That's because this line:

https://github.com/bdaloukas/moodle-mod_game/blob/MOODLE_20_STABLE/lib.php#L1233

Should be checking for:

$name = 'hide'.$kind;

not $type.

Thank you.

t6nis commented 12 months ago

add config too before.. $config = get_config('game');

$name = 'hide'.$kind;

bdaloukas commented 10 months ago

The problem is fixed.

ksteitz commented 10 months ago

Thanks a lot Vasilis!

cheers Klaus