diff --git a/locallib.php b/locallib.php index ed7a6e0..595dcd5 100755 --- a/locallib.php +++ b/locallib.php @@ -2051,7 +2051,8 @@ function game_show_query( $game, $query, $text) return game_filterglossary(str_replace( '\"', '"', $text), $query->glossaryentryid, $contextglossary->id, $game->course); }else if( $query->questionid) { - $context = game_get_context_module_instance( $game->id); + $cmgame = get_coursemodule_from_instance('game', $game->id, $game->course); + $context = game_get_context_module_instance( $cmgame->id); $text = str_replace( array("\'", '\"'), array("'", '"'), $text); return game_filterquestion($text, $query->questionid, $context->id, $game->course); } diff --git a/version.php b/version.php index 3571479..300eed5 100755 --- a/version.php +++ b/version.php @@ -11,7 +11,7 @@ defined('MOODLE_INTERNAL') || die(); $module->component = 'mod_game'; // Full name of the plugin (used for diagnostics) -$module->version = 2014012001; // The current module version (Date: YYYYMMDDXX) +$module->version = 2014012101; // The current module version (Date: YYYYMMDDXX) $module->requires = 2010112400; // Requires Moodle 2.0 $module->cron = 0; // Period for cron to check this module (secs) -$module->release = '3.13.20'; +$module->release = '3.13.21';