Merge commit 'catalyst/MOODLE_19_STABLE' into mdl19-linuxchix
[moodle-linuxchix.git] / mod / hotpot / db / upgrade.php
blob50a9f5f00c9be03461a0c9e44e73bde640280071
1 <?php //$Id$
3 // This file keeps track of upgrades to the hotpot module
5 function xmldb_hotpot_upgrade($oldversion=0) {
7 global $CFG, $THEME, $db;
9 $result = true;
11 //===== 1.9.0 upgrade line ======//
13 // update hotpot grades from sites earlier than Moodle 1.9, 27th March 2008
14 if ($result && $oldversion < 2007101511) {
16 // ensure "hotpot_update_grades" function is available
17 require_once $CFG->dirroot.'/mod/hotpot/lib.php';
19 // disable display of debugging messages
20 $db_debug_save = $db->debug;
21 $db->debug = false;
23 notify('Processing hotpot grades, this may take a while if there are many hotpots...', 'notifysuccess');
24 hotpot_update_grades();
26 // restore $db->debug
27 $db->debug = $db_debug_save;
30 return $result;