]> git.mjollnir.org Git - moodle.git/commitdiff
New upgrade.php file added for this module. MDL-7214
authorstronk7 <stronk7>
Thu, 26 Oct 2006 17:33:40 +0000 (17:33 +0000)
committerstronk7 <stronk7>
Thu, 26 Oct 2006 17:33:40 +0000 (17:33 +0000)
18 files changed:
mod/assignment/db/upgrade.php [new file with mode: 0644]
mod/chat/db/upgrade.php [new file with mode: 0644]
mod/choice/db/upgrade.php [new file with mode: 0644]
mod/data/db/upgrade.php [new file with mode: 0644]
mod/exercise/db/upgrade.php [new file with mode: 0644]
mod/forum/db/upgrade.php [new file with mode: 0644]
mod/glossary/db/upgrade.php
mod/hotpot/db/upgrade.php [new file with mode: 0644]
mod/journal/db/upgrade.php [new file with mode: 0644]
mod/label/db/upgrade.php [new file with mode: 0644]
mod/lams/db/upgrade.php [new file with mode: 0644]
mod/lesson/db/upgrade.php [new file with mode: 0644]
mod/quiz/db/upgrade.php [new file with mode: 0644]
mod/resource/db/upgrade.php [new file with mode: 0644]
mod/scorm/db/upgrade.php [new file with mode: 0644]
mod/survey/db/upgrade.php [new file with mode: 0644]
mod/wiki/db/upgrade.php [new file with mode: 0644]
mod/workshop/db/upgrade.php [new file with mode: 0644]

diff --git a/mod/assignment/db/upgrade.php b/mod/assignment/db/upgrade.php
new file mode 100644 (file)
index 0000000..ab02225
--- /dev/null
@@ -0,0 +1,38 @@
+<?php  //$Id$
+
+// This file keeps track of upgrades to 
+// the assignment module
+//
+// Sometimes, changes between versions involve
+// alterations to database structures and other
+// major things that may break installations.
+//
+// The upgrade function in this file will attempt
+// to perform all the necessary actions to upgrade
+// your older installtion to the current version.
+//
+// If there's something it cannot do itself, it
+// will tell you what you need to do.
+//
+// The commands in here will all be database-neutral,
+// using the functions defined in lib/ddllib.php
+
+function xmldb_assignment_upgrade($oldversion=0) {
+
+    global $CFG, $THEME, $db;
+
+    $result = true;
+
+/// And upgrade begins here. For each one, you'll need one 
+/// block of code similar to the next one. Please, delete 
+/// this comment lines once this file start handling proper
+/// upgrade code.
+
+/// if ($result && $oldversion < YYYYMMDD00) { //New version in version.php
+///     $result = result of "/lib/ddllib.php" function calls
+/// }
+
+    return $result;
+}
+
+?>
diff --git a/mod/chat/db/upgrade.php b/mod/chat/db/upgrade.php
new file mode 100644 (file)
index 0000000..4e9bfdf
--- /dev/null
@@ -0,0 +1,38 @@
+<?php  //$Id$
+
+// This file keeps track of upgrades to 
+// the chat module
+//
+// Sometimes, changes between versions involve
+// alterations to database structures and other
+// major things that may break installations.
+//
+// The upgrade function in this file will attempt
+// to perform all the necessary actions to upgrade
+// your older installtion to the current version.
+//
+// If there's something it cannot do itself, it
+// will tell you what you need to do.
+//
+// The commands in here will all be database-neutral,
+// using the functions defined in lib/ddllib.php
+
+function xmldb_chat_upgrade($oldversion=0) {
+
+    global $CFG, $THEME, $db;
+
+    $result = true;
+
+/// And upgrade begins here. For each one, you'll need one 
+/// block of code similar to the next one. Please, delete 
+/// this comment lines once this file start handling proper
+/// upgrade code.
+
+/// if ($result && $oldversion < YYYYMMDD00) { //New version in version.php
+///     $result = result of "/lib/ddllib.php" function calls
+/// }
+
+    return $result;
+}
+
+?>
diff --git a/mod/choice/db/upgrade.php b/mod/choice/db/upgrade.php
new file mode 100644 (file)
index 0000000..36a6c08
--- /dev/null
@@ -0,0 +1,38 @@
+<?php  //$Id$
+
+// This file keeps track of upgrades to 
+// the choice module
+//
+// Sometimes, changes between versions involve
+// alterations to database structures and other
+// major things that may break installations.
+//
+// The upgrade function in this file will attempt
+// to perform all the necessary actions to upgrade
+// your older installtion to the current version.
+//
+// If there's something it cannot do itself, it
+// will tell you what you need to do.
+//
+// The commands in here will all be database-neutral,
+// using the functions defined in lib/ddllib.php
+
+function xmldb_choice_upgrade($oldversion=0) {
+
+    global $CFG, $THEME, $db;
+
+    $result = true;
+
+/// And upgrade begins here. For each one, you'll need one 
+/// block of code similar to the next one. Please, delete 
+/// this comment lines once this file start handling proper
+/// upgrade code.
+
+/// if ($result && $oldversion < YYYYMMDD00) { //New version in version.php
+///     $result = result of "/lib/ddllib.php" function calls
+/// }
+
+    return $result;
+}
+
+?>
diff --git a/mod/data/db/upgrade.php b/mod/data/db/upgrade.php
new file mode 100644 (file)
index 0000000..c5105db
--- /dev/null
@@ -0,0 +1,38 @@
+<?php  //$Id$
+
+// This file keeps track of upgrades to 
+// the data module
+//
+// Sometimes, changes between versions involve
+// alterations to database structures and other
+// major things that may break installations.
+//
+// The upgrade function in this file will attempt
+// to perform all the necessary actions to upgrade
+// your older installtion to the current version.
+//
+// If there's something it cannot do itself, it
+// will tell you what you need to do.
+//
+// The commands in here will all be database-neutral,
+// using the functions defined in lib/ddllib.php
+
+function xmldb_data_upgrade($oldversion=0) {
+
+    global $CFG, $THEME, $db;
+
+    $result = true;
+
+/// And upgrade begins here. For each one, you'll need one 
+/// block of code similar to the next one. Please, delete 
+/// this comment lines once this file start handling proper
+/// upgrade code.
+
+/// if ($result && $oldversion < YYYYMMDD00) { //New version in version.php
+///     $result = result of "/lib/ddllib.php" function calls
+/// }
+
+    return $result;
+}
+
+?>
diff --git a/mod/exercise/db/upgrade.php b/mod/exercise/db/upgrade.php
new file mode 100644 (file)
index 0000000..066a8dc
--- /dev/null
@@ -0,0 +1,38 @@
+<?php  //$Id$
+
+// This file keeps track of upgrades to 
+// the exercise module
+//
+// Sometimes, changes between versions involve
+// alterations to database structures and other
+// major things that may break installations.
+//
+// The upgrade function in this file will attempt
+// to perform all the necessary actions to upgrade
+// your older installtion to the current version.
+//
+// If there's something it cannot do itself, it
+// will tell you what you need to do.
+//
+// The commands in here will all be database-neutral,
+// using the functions defined in lib/ddllib.php
+
+function xmldb_exercise_upgrade($oldversion=0) {
+
+    global $CFG, $THEME, $db;
+
+    $result = true;
+
+/// And upgrade begins here. For each one, you'll need one 
+/// block of code similar to the next one. Please, delete 
+/// this comment lines once this file start handling proper
+/// upgrade code.
+
+/// if ($result && $oldversion < YYYYMMDD00) { //New version in version.php
+///     $result = result of "/lib/ddllib.php" function calls
+/// }
+
+    return $result;
+}
+
+?>
diff --git a/mod/forum/db/upgrade.php b/mod/forum/db/upgrade.php
new file mode 100644 (file)
index 0000000..3825b67
--- /dev/null
@@ -0,0 +1,38 @@
+<?php  //$Id$
+
+// This file keeps track of upgrades to 
+// the forum module
+//
+// Sometimes, changes between versions involve
+// alterations to database structures and other
+// major things that may break installations.
+//
+// The upgrade function in this file will attempt
+// to perform all the necessary actions to upgrade
+// your older installtion to the current version.
+//
+// If there's something it cannot do itself, it
+// will tell you what you need to do.
+//
+// The commands in here will all be database-neutral,
+// using the functions defined in lib/ddllib.php
+
+function xmldb_forum_upgrade($oldversion=0) {
+
+    global $CFG, $THEME, $db;
+
+    $result = true;
+
+/// And upgrade begins here. For each one, you'll need one 
+/// block of code similar to the next one. Please, delete 
+/// this comment lines once this file start handling proper
+/// upgrade code.
+
+/// if ($result && $oldversion < YYYYMMDD00) { //New version in version.php
+///     $result = result of "/lib/ddllib.php" function calls
+/// }
+
+    return $result;
+}
+
+?>
index 5acf8544ad40265f358331c4c2ea483be33ca378..e22f49c1fc0a4124663de19f9533b09ccaf13274 100644 (file)
@@ -1,4 +1,4 @@
-<?PHP  //$Id$
+<?php  //$Id$
 
 // This file keeps track of upgrades to 
 // the glossary module
@@ -23,12 +23,14 @@ function xmldb_glossary_upgrade($oldversion=0) {
 
     $result = true;
 
-/// And upgrade begins here. For each one, you'll need on block of code similar to the
-/// next one. Please, delete this comment lines once this file start handling proper
+/// And upgrade begins here. For each one, you'll need one 
+/// block of code similar to the next one. Please, delete 
+/// this comment lines once this file start handling proper
 /// upgrade code.
-///    if ($oldversion < YYYYMMDDII) { // Version we are upgrading to (match version.php)
-///    
-///    }
+
+/// if ($result && $oldversion < YYYYMMDD00) { //New version in version.php
+///     $result = result of "/lib/ddllib.php" function calls
+/// }
 
     return $result;
 }
diff --git a/mod/hotpot/db/upgrade.php b/mod/hotpot/db/upgrade.php
new file mode 100644 (file)
index 0000000..2beaa55
--- /dev/null
@@ -0,0 +1,38 @@
+<?php  //$Id$
+
+// This file keeps track of upgrades to 
+// the hotpot module
+//
+// Sometimes, changes between versions involve
+// alterations to database structures and other
+// major things that may break installations.
+//
+// The upgrade function in this file will attempt
+// to perform all the necessary actions to upgrade
+// your older installtion to the current version.
+//
+// If there's something it cannot do itself, it
+// will tell you what you need to do.
+//
+// The commands in here will all be database-neutral,
+// using the functions defined in lib/ddllib.php
+
+function xmldb_hotpot_upgrade($oldversion=0) {
+
+    global $CFG, $THEME, $db;
+
+    $result = true;
+
+/// And upgrade begins here. For each one, you'll need one 
+/// block of code similar to the next one. Please, delete 
+/// this comment lines once this file start handling proper
+/// upgrade code.
+
+/// if ($result && $oldversion < YYYYMMDD00) { //New version in version.php
+///     $result = result of "/lib/ddllib.php" function calls
+/// }
+
+    return $result;
+}
+
+?>
diff --git a/mod/journal/db/upgrade.php b/mod/journal/db/upgrade.php
new file mode 100644 (file)
index 0000000..8169c2b
--- /dev/null
@@ -0,0 +1,38 @@
+<?php  //$Id$
+
+// This file keeps track of upgrades to 
+// the journal module
+//
+// Sometimes, changes between versions involve
+// alterations to database structures and other
+// major things that may break installations.
+//
+// The upgrade function in this file will attempt
+// to perform all the necessary actions to upgrade
+// your older installtion to the current version.
+//
+// If there's something it cannot do itself, it
+// will tell you what you need to do.
+//
+// The commands in here will all be database-neutral,
+// using the functions defined in lib/ddllib.php
+
+function xmldb_journal_upgrade($oldversion=0) {
+
+    global $CFG, $THEME, $db;
+
+    $result = true;
+
+/// And upgrade begins here. For each one, you'll need one 
+/// block of code similar to the next one. Please, delete 
+/// this comment lines once this file start handling proper
+/// upgrade code.
+
+/// if ($result && $oldversion < YYYYMMDD00) { //New version in version.php
+///     $result = result of "/lib/ddllib.php" function calls
+/// }
+
+    return $result;
+}
+
+?>
diff --git a/mod/label/db/upgrade.php b/mod/label/db/upgrade.php
new file mode 100644 (file)
index 0000000..ea656f1
--- /dev/null
@@ -0,0 +1,38 @@
+<?php  //$Id$
+
+// This file keeps track of upgrades to 
+// the label module
+//
+// Sometimes, changes between versions involve
+// alterations to database structures and other
+// major things that may break installations.
+//
+// The upgrade function in this file will attempt
+// to perform all the necessary actions to upgrade
+// your older installtion to the current version.
+//
+// If there's something it cannot do itself, it
+// will tell you what you need to do.
+//
+// The commands in here will all be database-neutral,
+// using the functions defined in lib/ddllib.php
+
+function xmldb_label_upgrade($oldversion=0) {
+
+    global $CFG, $THEME, $db;
+
+    $result = true;
+
+/// And upgrade begins here. For each one, you'll need one 
+/// block of code similar to the next one. Please, delete 
+/// this comment lines once this file start handling proper
+/// upgrade code.
+
+/// if ($result && $oldversion < YYYYMMDD00) { //New version in version.php
+///     $result = result of "/lib/ddllib.php" function calls
+/// }
+
+    return $result;
+}
+
+?>
diff --git a/mod/lams/db/upgrade.php b/mod/lams/db/upgrade.php
new file mode 100644 (file)
index 0000000..2c8ae36
--- /dev/null
@@ -0,0 +1,38 @@
+<?php  //$Id$
+
+// This file keeps track of upgrades to 
+// the lams module
+//
+// Sometimes, changes between versions involve
+// alterations to database structures and other
+// major things that may break installations.
+//
+// The upgrade function in this file will attempt
+// to perform all the necessary actions to upgrade
+// your older installtion to the current version.
+//
+// If there's something it cannot do itself, it
+// will tell you what you need to do.
+//
+// The commands in here will all be database-neutral,
+// using the functions defined in lib/ddllib.php
+
+function xmldb_lams_upgrade($oldversion=0) {
+
+    global $CFG, $THEME, $db;
+
+    $result = true;
+
+/// And upgrade begins here. For each one, you'll need one 
+/// block of code similar to the next one. Please, delete 
+/// this comment lines once this file start handling proper
+/// upgrade code.
+
+/// if ($result && $oldversion < YYYYMMDD00) { //New version in version.php
+///     $result = result of "/lib/ddllib.php" function calls
+/// }
+
+    return $result;
+}
+
+?>
diff --git a/mod/lesson/db/upgrade.php b/mod/lesson/db/upgrade.php
new file mode 100644 (file)
index 0000000..efaf7f1
--- /dev/null
@@ -0,0 +1,38 @@
+<?php  //$Id$
+
+// This file keeps track of upgrades to 
+// the lesson module
+//
+// Sometimes, changes between versions involve
+// alterations to database structures and other
+// major things that may break installations.
+//
+// The upgrade function in this file will attempt
+// to perform all the necessary actions to upgrade
+// your older installtion to the current version.
+//
+// If there's something it cannot do itself, it
+// will tell you what you need to do.
+//
+// The commands in here will all be database-neutral,
+// using the functions defined in lib/ddllib.php
+
+function xmldb_lesson_upgrade($oldversion=0) {
+
+    global $CFG, $THEME, $db;
+
+    $result = true;
+
+/// And upgrade begins here. For each one, you'll need one 
+/// block of code similar to the next one. Please, delete 
+/// this comment lines once this file start handling proper
+/// upgrade code.
+
+/// if ($result && $oldversion < YYYYMMDD00) { //New version in version.php
+///     $result = result of "/lib/ddllib.php" function calls
+/// }
+
+    return $result;
+}
+
+?>
diff --git a/mod/quiz/db/upgrade.php b/mod/quiz/db/upgrade.php
new file mode 100644 (file)
index 0000000..db8abd5
--- /dev/null
@@ -0,0 +1,38 @@
+<?php  //$Id$
+
+// This file keeps track of upgrades to 
+// the quiz module
+//
+// Sometimes, changes between versions involve
+// alterations to database structures and other
+// major things that may break installations.
+//
+// The upgrade function in this file will attempt
+// to perform all the necessary actions to upgrade
+// your older installtion to the current version.
+//
+// If there's something it cannot do itself, it
+// will tell you what you need to do.
+//
+// The commands in here will all be database-neutral,
+// using the functions defined in lib/ddllib.php
+
+function xmldb_quiz_upgrade($oldversion=0) {
+
+    global $CFG, $THEME, $db;
+
+    $result = true;
+
+/// And upgrade begins here. For each one, you'll need one 
+/// block of code similar to the next one. Please, delete 
+/// this comment lines once this file start handling proper
+/// upgrade code.
+
+/// if ($result && $oldversion < YYYYMMDD00) { //New version in version.php
+///     $result = result of "/lib/ddllib.php" function calls
+/// }
+
+    return $result;
+}
+
+?>
diff --git a/mod/resource/db/upgrade.php b/mod/resource/db/upgrade.php
new file mode 100644 (file)
index 0000000..d3c0fee
--- /dev/null
@@ -0,0 +1,38 @@
+<?php  //$Id$
+
+// This file keeps track of upgrades to 
+// the resource module
+//
+// Sometimes, changes between versions involve
+// alterations to database structures and other
+// major things that may break installations.
+//
+// The upgrade function in this file will attempt
+// to perform all the necessary actions to upgrade
+// your older installtion to the current version.
+//
+// If there's something it cannot do itself, it
+// will tell you what you need to do.
+//
+// The commands in here will all be database-neutral,
+// using the functions defined in lib/ddllib.php
+
+function xmldb_resource_upgrade($oldversion=0) {
+
+    global $CFG, $THEME, $db;
+
+    $result = true;
+
+/// And upgrade begins here. For each one, you'll need one 
+/// block of code similar to the next one. Please, delete 
+/// this comment lines once this file start handling proper
+/// upgrade code.
+
+/// if ($result && $oldversion < YYYYMMDD00) { //New version in version.php
+///     $result = result of "/lib/ddllib.php" function calls
+/// }
+
+    return $result;
+}
+
+?>
diff --git a/mod/scorm/db/upgrade.php b/mod/scorm/db/upgrade.php
new file mode 100644 (file)
index 0000000..94570d0
--- /dev/null
@@ -0,0 +1,38 @@
+<?php  //$Id$
+
+// This file keeps track of upgrades to 
+// the scorm module
+//
+// Sometimes, changes between versions involve
+// alterations to database structures and other
+// major things that may break installations.
+//
+// The upgrade function in this file will attempt
+// to perform all the necessary actions to upgrade
+// your older installtion to the current version.
+//
+// If there's something it cannot do itself, it
+// will tell you what you need to do.
+//
+// The commands in here will all be database-neutral,
+// using the functions defined in lib/ddllib.php
+
+function xmldb_scorm_upgrade($oldversion=0) {
+
+    global $CFG, $THEME, $db;
+
+    $result = true;
+
+/// And upgrade begins here. For each one, you'll need one 
+/// block of code similar to the next one. Please, delete 
+/// this comment lines once this file start handling proper
+/// upgrade code.
+
+/// if ($result && $oldversion < YYYYMMDD00) { //New version in version.php
+///     $result = result of "/lib/ddllib.php" function calls
+/// }
+
+    return $result;
+}
+
+?>
diff --git a/mod/survey/db/upgrade.php b/mod/survey/db/upgrade.php
new file mode 100644 (file)
index 0000000..75a3e5f
--- /dev/null
@@ -0,0 +1,38 @@
+<?php  //$Id$
+
+// This file keeps track of upgrades to 
+// the survey module
+//
+// Sometimes, changes between versions involve
+// alterations to database structures and other
+// major things that may break installations.
+//
+// The upgrade function in this file will attempt
+// to perform all the necessary actions to upgrade
+// your older installtion to the current version.
+//
+// If there's something it cannot do itself, it
+// will tell you what you need to do.
+//
+// The commands in here will all be database-neutral,
+// using the functions defined in lib/ddllib.php
+
+function xmldb_survey_upgrade($oldversion=0) {
+
+    global $CFG, $THEME, $db;
+
+    $result = true;
+
+/// And upgrade begins here. For each one, you'll need one 
+/// block of code similar to the next one. Please, delete 
+/// this comment lines once this file start handling proper
+/// upgrade code.
+
+/// if ($result && $oldversion < YYYYMMDD00) { //New version in version.php
+///     $result = result of "/lib/ddllib.php" function calls
+/// }
+
+    return $result;
+}
+
+?>
diff --git a/mod/wiki/db/upgrade.php b/mod/wiki/db/upgrade.php
new file mode 100644 (file)
index 0000000..3664109
--- /dev/null
@@ -0,0 +1,38 @@
+<?php  //$Id$
+
+// This file keeps track of upgrades to 
+// the wiki module
+//
+// Sometimes, changes between versions involve
+// alterations to database structures and other
+// major things that may break installations.
+//
+// The upgrade function in this file will attempt
+// to perform all the necessary actions to upgrade
+// your older installtion to the current version.
+//
+// If there's something it cannot do itself, it
+// will tell you what you need to do.
+//
+// The commands in here will all be database-neutral,
+// using the functions defined in lib/ddllib.php
+
+function xmldb_wiki_upgrade($oldversion=0) {
+
+    global $CFG, $THEME, $db;
+
+    $result = true;
+
+/// And upgrade begins here. For each one, you'll need one 
+/// block of code similar to the next one. Please, delete 
+/// this comment lines once this file start handling proper
+/// upgrade code.
+
+/// if ($result && $oldversion < YYYYMMDD00) { //New version in version.php
+///     $result = result of "/lib/ddllib.php" function calls
+/// }
+
+    return $result;
+}
+
+?>
diff --git a/mod/workshop/db/upgrade.php b/mod/workshop/db/upgrade.php
new file mode 100644 (file)
index 0000000..db8ef76
--- /dev/null
@@ -0,0 +1,38 @@
+<?php  //$Id$
+
+// This file keeps track of upgrades to 
+// the workshop module
+//
+// Sometimes, changes between versions involve
+// alterations to database structures and other
+// major things that may break installations.
+//
+// The upgrade function in this file will attempt
+// to perform all the necessary actions to upgrade
+// your older installtion to the current version.
+//
+// If there's something it cannot do itself, it
+// will tell you what you need to do.
+//
+// The commands in here will all be database-neutral,
+// using the functions defined in lib/ddllib.php
+
+function xmldb_workshop_upgrade($oldversion=0) {
+
+    global $CFG, $THEME, $db;
+
+    $result = true;
+
+/// And upgrade begins here. For each one, you'll need one 
+/// block of code similar to the next one. Please, delete 
+/// this comment lines once this file start handling proper
+/// upgrade code.
+
+/// if ($result && $oldversion < YYYYMMDD00) { //New version in version.php
+///     $result = result of "/lib/ddllib.php" function calls
+/// }
+
+    return $result;
+}
+
+?>