From 9ef4f2323dac186fdcbfc3ddccf28819ec594c72 Mon Sep 17 00:00:00 2001 From: moodler Date: Sat, 20 Mar 2004 13:16:04 +0000 Subject: [PATCH] Fix up some old Beta sites that may have lessons --- mod/lesson/db/mysql.php | 4 ++++ mod/lesson/version.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/mod/lesson/db/mysql.php b/mod/lesson/db/mysql.php index a6de795ec7..3fbf630d38 100644 --- a/mod/lesson/db/mysql.php +++ b/mod/lesson/db/mysql.php @@ -27,6 +27,10 @@ function lesson_upgrade($oldversion) { } + if ($oldversion < 2004032000) { // Upgrade some old beta lessons + execute_sql(" UPDATE `{$CFG->prefix}lesson_pages` SET qtype = 3 WHERE qtype = 0"); + } + return true; } diff --git a/mod/lesson/version.php b/mod/lesson/version.php index 5ef4ec2f75..fea9b63d61 100644 --- a/mod/lesson/version.php +++ b/mod/lesson/version.php @@ -5,7 +5,7 @@ /// This fragment is called by moodle_needs_upgrading() and /admin/index.php ///////////////////////////////////////////////////////////////////////////////// -$module->version = 2004022200; // The current module version (Date: YYYYMMDDXX) +$module->version = 2004032000; // The current module version (Date: YYYYMMDDXX) $module->requires = 2004013101; // Requires this Moodle version $module->cron = 0; // Period for cron to check this module (secs) -- 2.39.5