PROBLEM:
Moodle 3.6.2, mod_game version 2019010500.
Trying to get property of non-object in /var/www/demo/lib/completionlib.php on line 255
Debug info: SELECT * FROM {course} WHERE id IS NULL
[array (
)]
Error code: invalidrecord
RESOLUTION:
In file hangman/play.php in function hangman_onincorrect() you call game_hangman_show_nextword() with last argument "true" but game_hangman_show_nextword() expects the last argument to be object $course.
Secondly, functions hangman_onincorrect() first argument is "id" but should be object $cm because game_hangman_show_nextword(), when called, expects the fist argument to be object $cm.
PROBLEM: Moodle 3.6.2, mod_game version 2019010500. Trying to get property of non-object in /var/www/demo/lib/completionlib.php on line 255 Debug info: SELECT * FROM {course} WHERE id IS NULL [array ( )] Error code: invalidrecord
RESOLUTION: In file hangman/play.php in function hangman_onincorrect() you call game_hangman_show_nextword() with last argument "true" but game_hangman_show_nextword() expects the last argument to be object $course.
Secondly, functions hangman_onincorrect() first argument is "id" but should be object $cm because game_hangman_show_nextword(), when called, expects the fist argument to be object $cm.