From 9bb3bc4e98cb52031dd2ae8439d0b3f7b3d115fd Mon Sep 17 00:00:00 2001 From: moodler Date: Thu, 21 Jul 2005 11:00:34 +0000 Subject: [PATCH] Run the online assignment cleanup code automatically on an upgrade. (SE) --- lib/db/mysql.php | 7 +++++++ lib/db/postgres7.php | 7 +++++++ version.php | 2 +- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/lib/db/mysql.php b/lib/db/mysql.php index fed8269e5c8..6439232affa 100644 --- a/lib/db/mysql.php +++ b/lib/db/mysql.php @@ -1449,6 +1449,13 @@ function main_upgrade($oldversion=0) { } } + if ($oldversion < 2005072100) { // run the online assignment cleanup code + include($CFG->dirroot.'/'.$CFG->admin.'/oacleanup.php'); + if (function_exists('online_assignment_cleanup')) { + online_assignment_cleanup(); + } + } + return $result; } diff --git a/lib/db/postgres7.php b/lib/db/postgres7.php index 32b53facb58..d53d8d28fca 100644 --- a/lib/db/postgres7.php +++ b/lib/db/postgres7.php @@ -1168,6 +1168,13 @@ function main_upgrade($oldversion=0) { } } + if ($oldversion < 2005072100) { // run the online assignment cleanup code + include($CFG->dirroot.'/'.$CFG->admin.'/oacleanup.php'); + if (function_exists('online_assignment_cleanup')) { + online_assignment_cleanup(); + } + } + return $result; } diff --git a/version.php b/version.php index f1e738a2fa9..e69aea58252 100644 --- a/version.php +++ b/version.php @@ -6,7 +6,7 @@ // This is compared against the values stored in the database to determine // whether upgrades should be performed (see lib/db/*.php) - $version = 2005060220; // YYYYMMDD = Moodle 1.5 Date + $version = 2005072100; // YYYYMMDD = Moodle 1.5 Date // X = Moodle 1.5 Point release (0,1,2...) // Y = Interim incrementer