From db723d0297be0e53fe9569a19d4cefaf15d9fa5b Mon Sep 17 00:00:00 2001 From: Vasilis Daloukas Date: Sun, 13 Jul 2014 10:06:18 +0300 Subject: [PATCH] Fix: Images in questions --- lib.php | 3 +-- version.php | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib.php b/lib.php index 3ec9889..4ad79d2 100755 --- a/lib.php +++ b/lib.php @@ -1068,8 +1068,7 @@ function mod_game_pluginfile($course, $cm, $context, $filearea, $args, $forcedow $questionid = $args[ 0]; $file = $args[ 1]; $a = explode( '/', $context->path); - $courseid = $a[ 2]; - if (!$contextcourse = get_context_instance(CONTEXT_COURSE, $courseid)) { + if (!$contextcourse = get_context_instance(CONTEXT_COURSE, $course->id)) { print_error('nocontext'); } $a = array( 'component' => 'question', 'filearea' => 'questiontext', diff --git a/version.php b/version.php index a4c8761..0fef05f 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 = 2014061803; // The current module version (Date: YYYYMMDDXX) +$module->version = 20140713; // 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.18.18.3'; +$module->release = '3.19.13';