millionaire error afer update to latest version

millionaire error afer update to latest version

by Rob Johnson -
Number of replies: 5

I am using Moodle 2.4.5+.  I updated to the latest game module recently and am unable to create new millionaire games.  Existing games work fine.  Other games work fine.  The stack trace is below.

Debug info: SELECT id,course FROM {course_modules} WHERE id = ?
[array (
0 => '2718',
)]
Error code: invalidrecord
Stack trace:
  • line 1357 of /lib/dml/moodle_database.php: dml_missing_record_exception thrown
  • line 1333 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()
  • line 6816 of /lib/accesslib.php: call to moodle_database->get_record()
  • line 2040 of /mod/game/locallib.php: call to context_module::instance()
  • line 2054 of /mod/game/locallib.php: call to game_get_context_module_instance()
  • line 180 of /mod/game/millionaire/play.php: call to game_show_query()
  • line 277 of /mod/game/millionaire/play.php: call to game_millionaire_showgrid()
  • line 81 of /mod/game/millionaire/play.php: call to game_millionaire_ShowNextQuestion()
  • line 22 of /mod/game/millionaire/play.php: call to game_millionaire_play()
  • line 200 of /mod/game/attempt.php: call to game_millionaire_continue()
  • line 175 of /mod/game/attempt.php: call to game_create()
  • line 25 of /mod/game/attempt.php: call to game_do_attempt()

 

Average of ratings: -
In reply to Rob Johnson

Re: millionaire error afer update to latest version

by Vasilis Daloukas -
Picture of Particularly helpful Moodlers Picture of Plugin developers

The message is "Error code: invalidrecord" 

I think the problem is a database problem.

1) Try to run at database the sql "SELECT id,course FROM mdl_course_modules WHERE id = 2718" and tell me what it returns.

2) Try to check and fix table mdl_course_modules

 

In reply to Vasilis Daloukas

Re: millionaire error afer update to latest version

by Stefan Oertel -

The same problem applies in ALL of our instances (40+) for new and old millionaire games e. g. 

SELECT id,course FROM
{course_modules}

WHERE id = ?
[array (
 0 => '71',
)]
Error code: invalidrecord

I've tried "SELECT id,course FROM mdl_course_modules WHERE id = 71" with empty result - there is no course with an ID of 71.

I think the 71 is wrong. The table row for the course with the game in mdl_course_modules looks like:

id - course - module -instance -section

452 -   21 -  11 -  71 -  254

Maybe the expected result of the sql should be 452 - 21 ?

In reply to Vasilis Daloukas

Re: millionaire error afer update to latest version

by Stefan Oertel -

I have verified the error in an test environment with older backup files of moodle, moodledata, mod_game and the database.

The game in a course with the module version 2013090702 (3.9.7.2 from 07.09.2014 13:34) works fine. I updated the moodle version to the latest 2.5.x and everything is fine too. But if I update then game to the next version 2013120201 (3.12.2.1 from 03.12.2013, 01:45 ) the sql statement fails with the error above. So it should NOT be a database problem.

 

 

In reply to Stefan Oertel

Re: Re: millionaire error afer update to latest version

by Vasilis Daloukas -
Picture of Particularly helpful Moodlers Picture of Plugin developers

I fixed a problem.

Try the last version (3.13.21).

Average of ratings:Useful (1)