]> git.mjollnir.org Git - moodle.git/commitdiff
Changes to suit new upgrading procedure (admin/index.html)
authormartin <martin>
Sat, 27 Jul 2002 06:07:49 +0000 (06:07 +0000)
committermartin <martin>
Sat, 27 Jul 2002 06:07:49 +0000 (06:07 +0000)
mod/assignment/module.php
mod/choice/module.php
mod/forum/module.php
mod/journal/module.php
mod/survey/module.php

index 9f60400b99916ade1a323c03c285288b9f9f6f21..afa4c246c1c5153b27c79d38a4bcd4f0bb256d06 100644 (file)
@@ -5,6 +5,18 @@
 //  This fragment is called by /admin/index.php
 ////////////////////////////////////////////////////////////////////////////////
 
+$module->fullname = "Assignment";
+$module->version  = 20020801;
+$module->cron     = 60;
+$module->search   = "";
+
+function assignment_upgrade($oldversion) {
+// This function does anything necessary to upgrade
+// older versions to match current functionality
+
+    return true;
+}
+
 
 ?>
 
index 6256b8dc334863b47b298af99a1eea38922aa9ee..31e1f4fa5661c5f75ee9064c79c5fcfc31e8aff3 100644 (file)
@@ -5,10 +5,18 @@
 //  This fragment is called by /admin/index.php
 ////////////////////////////////////////////////////////////////////////////////
 
-    $module->fullname = "Choice";
-    $module->version  = "20011110";
-    $module->cron     = 0;
-    $module->search   = "";
+$module->fullname = "Choice";
+$module->version  = 20011110;
+$module->cron     = 0;
+$module->search   = "";
+
+function choice_upgrade($oldversion) {
+// This function does anything necessary to upgrade
+// older versions to match current functionality
+
+    return true;
+}
+
 
 ?>
 
index 65f9fd4d2cca109967590ff25c29e276e51bfc4a..966b33067361f3e486576f07f3263c990b924d43 100644 (file)
@@ -5,10 +5,18 @@
 //  This fragment is called by /admin/index.php
 ////////////////////////////////////////////////////////////////////////////////
 
-    $module->fullname = "Forum";
-    $module->version  = "20020801";
-    $module->cron     =  0;
-    $module->search   = "";
+$module->fullname = "Forum";
+$module->version  = 20020801;
+$module->cron     =  0;
+$module->search   = "";
+
+function forum_upgrade($oldversion) {
+// This function does anything necessary to upgrade
+// older versions to match current functionality
+
+    return true;
+}
+
 
 ?>
 
index 608216d1d322d9c8ec661e692c10489ccbb00c5e..10bcf6e01f95a32baef3fea1d9663f635b9ca4c8 100644 (file)
@@ -5,10 +5,22 @@
 //  This fragment is called by /admin/index.php
 ////////////////////////////////////////////////////////////////////////////////
 
-    $module->fullname = "Journal";
-    $module->version  = "20011110";
-    $module->cron     = 0;
-    $module->search   = "";
+$module->fullname = "Journal";
+$module->version  = 200208010;
+$module->cron     = 60;
+$module->search   = "";
 
-?>
+function journal_upgrade($oldversion) {
+// This function does anything necessary to upgrade
+// older versions to match current functionality
 
+    $result = true;
+
+    if ($oldversion < 20020810) {
+        if (! execute_sql("ALTER TABLE `journal_entries` ADD `mailed` TINYINT(1) UNSIGNED DEFAULT '0' NOT NULL")) {
+            $result = false;
+        }
+    }
+    
+    return $result;
+}
index 82319a6f10804d974238db6857d31921f75b1a8c..8369de85151b0accb4e37672a2b9bf920fdee6fc 100644 (file)
@@ -5,10 +5,18 @@
 //  This fragment is called by /admin/index.php
 ////////////////////////////////////////////////////////////////////////////////
 
-    $module->fullname = "Survey";
-    $module->version  = "20011110";
-    $module->cron     = 0;
-    $module->search   = "";
+$module->fullname = "Survey";
+$module->version  = 20020727;
+$module->cron     = 0;
+$module->search   = "";
+
+function survey_upgrade($oldversion) {
+// This function does anything necessary to upgrade
+// older versions to match current functionality
+
+    return true;
+}
+
 
 ?>