Skip to content

Commit

Permalink
force Moodle gradebook grades to be recalculated when HotPot grade me…
Browse files Browse the repository at this point in the history
  • Loading branch information
gbateson committed Mar 16, 2009
1 parent 10ec290 commit a1e836a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
22 changes: 11 additions & 11 deletions mod/hotpot/db/upgrade.php
Expand Up @@ -10,30 +10,30 @@ function xmldb_hotpot_upgrade($oldversion=0) {

//===== 1.9.0 upgrade line ======//

// update hotpot grades from sites earlier than Moodle 1.9, 27th March 2008
if ($result && $oldversion < 2007101511) {

// ensure "hotpot_update_grades" function is available
require_once $CFG->dirroot.'/mod/hotpot/lib.php';

if ($result && $oldversion < 2007101512) {
// save and disable setting to display debugging messages
$debug = $db->debug;
$db->debug = false;

notify('Processing hotpot grades, this may take a while if there are many hotpots...', 'notifysuccess');
hotpot_update_grades();
notify('Fixing hotpot grades, this may take a while if there are many hotpots...', 'notifysuccess');
hotpot_fix_grades();

// restore $db->debug
$db->debug = $debug;
}

if ($result && $oldversion < 2007101512) {
// update hotpot grades from sites earlier than Moodle 1.9, 27th March 2008
if ($result && $oldversion < 2007101513) {

// ensure "hotpot_update_grades" function is available
require_once $CFG->dirroot.'/mod/hotpot/lib.php';

// 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();
notify('Processing hotpot grades, this may take a while if there are many hotpots...', 'notifysuccess');
hotpot_update_grades();

// restore $db->debug
$db->debug = $debug;
Expand Down
4 changes: 2 additions & 2 deletions mod/hotpot/version.php
Expand Up @@ -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
Expand Down

0 comments on commit a1e836a

Please sign in to comment.