From a77b48a3fb5e71764cbe2f32909aa16b591c9e16 Mon Sep 17 00:00:00 2001 From: Vasilis Daloukas Date: Sun, 13 Jul 2014 21:44:19 +0300 Subject: [PATCH] Fix: version.php compatibility with Moodle 2.7 --- version.php | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/version.php b/version.php index 4e9a31f..e19edc1 100755 --- a/version.php +++ b/version.php @@ -10,8 +10,22 @@ defined('MOODLE_INTERNAL') || die(); -$module->component = 'mod_game'; // Full name of the plugin (used for diagnostics) -$module->version = 2014071300; // 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.19.13'; +if( !isset( $plugin)) +{ + $plugin = new stdClass; + $useplugin = 0; +}else if( $plugin == 'mod_game') +{ + $plugin = new stdClass; + $useplugin = 1; +}else + $useplugin = 2; + +$plugin->component = 'mod_game'; // Full name of the plugin (used for diagnostics) +$plugin->version = 2014071315; // The current module version (Date: YYYYMMDDXX) +$plugin->requires = 2010112400; // Requires Moodle 2.0 +$plugin->cron = 0; // Period for cron to check this module (secs) +$plugin->release = '3.19.13'; + +if( $useplugin != 2) + $module = $plugin;