Automatic installer.php lang files by installer_builder (20070726)
[moodle-linuxchix.git] / mod / hotpot / db / postgres7.php
blobbda3cf92529b919b5394df7a355b4899fad6c079
1 <?PHP
3 // THIS FILE IS DEPRECATED! PLEASE DO NOT MAKE CHANGES TO IT!
4 //
5 // IT IS USED ONLY FOR UPGRADES FROM BEFORE MOODLE 1.7, ALL
6 // LATER CHANGES SHOULD USE upgrade.php IN THIS DIRECTORY.
8 function hotpot_upgrade($oldversion) {
9 global $CFG;
10 $ok = true;
12 // set path to update functions
13 $update_to_v2 = "$CFG->dirroot/mod/hotpot/db/update_to_v2.php";
15 // if the version number indicates this could be an early HotPot v2.1 (Moodle 1.6),
16 // check this is not actually HotPot v2.0 (Moodle 1.5) with an overly advanced version number
17 if ($oldversion>2005031400 && $oldversion<=2006082899) {
18 require_once $update_to_v2;
19 if (hotpot_db_field_exists('hotpot_attempts', 'details')) {
20 $oldversion = 2005031400;
24 // update from HotPot v1 to HotPot v2
25 if ($oldversion < 2005031400) {
26 require_once $update_to_v2;
27 $ok = $ok && hotpot_update_to_v2_from_v1();
30 // update to HotPot v2.1
31 if ($oldversion < 2005090700) {
32 require_once $update_to_v2;
33 $ok = $ok && hotpot_update_to_v2_1();
35 if ($oldversion > 2005031419 && $oldversion < 2005090702) {
36 require_once $update_to_v2;
37 $ok = $ok && hotpot_update_to_v2_1_2();
39 if ($oldversion < 2005090706) {
40 require_once $update_to_v2;
41 $ok = $ok && hotpot_update_to_v2_1_6();
43 if ($oldversion < 2005090708) {
44 require_once $update_to_v2;
45 $ok = $ok && hotpot_update_to_v2_1_8();
47 if ($oldversion < 2006042103) {
48 require_once $update_to_v2;
49 $ok = $ok && hotpot_update_to_v2_1_16();
51 if ($oldversion < 2006042602) {
52 require_once $update_to_v2;
53 $ok = $ok && hotpot_update_to_v2_1_17();
55 if ($oldversion < 2006042803) {
56 require_once $update_to_v2;
57 $ok = $ok && hotpot_update_to_v2_1_18();
59 if ($oldversion < 2006071600) {
60 require_once $update_to_v2;
61 $ok = $ok && hotpot_update_to_v2_1_21();
63 if ($oldversion < 2006083101) {
64 require_once $update_to_v2;
65 $ok = $ok && hotpot_update_to_v2_2();
68 ////// DO NOT ADD NEW THINGS HERE!! USE upgrade.php and the lib/ddllib.php functions.
70 return $ok;