force Moodle gradebook grades to be recalculated when HotPot grade method is changed: http://moodle.org/mod/forum/discuss.php?d=117691

This commit is contained in:
gbateson
2009-03-16 01:46:54 +00:00
parent 10ec29097f
commit a1e836ace4
2 changed files with 15 additions and 15 deletions
+13 -13
View File
@@ -10,8 +10,20 @@ function xmldb_hotpot_upgrade($oldversion=0) {
//===== 1.9.0 upgrade line ======//
if ($result && $oldversion < 2007101512) {
// save and disable setting to display debugging messages
$debug = $db->debug;
$db->debug = false;
notify('Fixing hotpot grades, this may take a while if there are many hotpots...', 'notifysuccess');
hotpot_fix_grades();
// restore $db->debug
$db->debug = $debug;
}
// update hotpot grades from sites earlier than Moodle 1.9, 27th March 2008
if ($result && $oldversion < 2007101511) {
if ($result && $oldversion < 2007101513) {
// ensure "hotpot_update_grades" function is available
require_once $CFG->dirroot.'/mod/hotpot/lib.php';
@@ -27,18 +39,6 @@ function xmldb_hotpot_upgrade($oldversion=0) {
$db->debug = $debug;
}
if ($result && $oldversion < 2007101512) {
// save and disable setting to display debugging messages
$debug = $db->debug;
$db->debug = false;
notify('Fixing hotpot grades, this may take a while if there are many hotpots...', 'notifysuccess');
hotpot_fix_grades();
// restore $db->debug
$db->debug = $debug;
}
return $result;
}
+2 -2
View File
@@ -3,8 +3,8 @@
/// Code fragment to define the version of hotpot
/// This fragment is called by moodle_needs_upgrading() and /admin/index.php
/////////////////////////////////////////////////////////////////////////////////
$module->version = 2007101512; // release date of this version (see note below)
$module->release = 'v2.4.12'; // human-friendly version name (used in mod/hotpot/lib.php)
$module->version = 2007101513; // release date of this version (see note below)
$module->release = 'v2.4.13'; // human-friendly version name (used in mod/hotpot/lib.php)
$module->requires = 2007101509; // Requires this Moodle version
$module->cron = 0; // period for cron to check this module (secs)
// interpretation of YYYYMMDDXY version numbers