From: martin Date: Sat, 27 Jul 2002 06:07:49 +0000 (+0000) Subject: Changes to suit new upgrading procedure (admin/index.html) X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=12b820c2275251f279cf711114fc5562f13f1566;p=moodle.git Changes to suit new upgrading procedure (admin/index.html) --- diff --git a/mod/assignment/module.php b/mod/assignment/module.php index 9f60400b99..afa4c246c1 100644 --- a/mod/assignment/module.php +++ b/mod/assignment/module.php @@ -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; +} + ?> diff --git a/mod/choice/module.php b/mod/choice/module.php index 6256b8dc33..31e1f4fa56 100644 --- a/mod/choice/module.php +++ b/mod/choice/module.php @@ -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; +} + ?> diff --git a/mod/forum/module.php b/mod/forum/module.php index 65f9fd4d2c..966b330673 100644 --- a/mod/forum/module.php +++ b/mod/forum/module.php @@ -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; +} + ?> diff --git a/mod/journal/module.php b/mod/journal/module.php index 608216d1d3..10bcf6e01f 100644 --- a/mod/journal/module.php +++ b/mod/journal/module.php @@ -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; +} diff --git a/mod/survey/module.php b/mod/survey/module.php index 82319a6f10..8369de8515 100644 --- a/mod/survey/module.php +++ b/mod/survey/module.php @@ -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; +} + ?>