From 11402bbdbcb73b6c5e40a76eb80c12eb8f2375b2 Mon Sep 17 00:00:00 2001 From: moodler Date: Fri, 15 Aug 2003 14:30:30 +0000 Subject: [PATCH] Do a check to create the default scale if it isn't already --- lib/db/mysql.php | 6 ++++++ lib/db/postgres7.php | 4 ++++ version.php | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/db/mysql.php b/lib/db/mysql.php index 172aa4aa7f..6110873b11 100644 --- a/lib/db/mysql.php +++ b/lib/db/mysql.php @@ -475,6 +475,12 @@ function main_upgrade($oldversion=0) { ) TYPE=MyISAM COMMENT='Defines grading scales'"); } + + if ($oldversion < 2003081503) { + get_scales_menu(0); // Just to force the default scale to be created + } + + return $result; } diff --git a/lib/db/postgres7.php b/lib/db/postgres7.php index b648d27b1e..8c02ab7ca6 100644 --- a/lib/db/postgres7.php +++ b/lib/db/postgres7.php @@ -220,6 +220,10 @@ function main_upgrade($oldversion=0) { )"); } + if ($oldversion < 2003081503) { + get_scales_menu(0); // Just to force the default scale to be created + } + return $result; } diff --git a/version.php b/version.php index d4d3a36d60..c8f312e1cd 100644 --- a/version.php +++ b/version.php @@ -5,7 +5,7 @@ // database to determine whether upgrades should // be performed (see lib/db/*.php) -$version = 2003081502; // The current version is a date (YYYYMMDDXX) +$version = 2003081503; // The current version is a date (YYYYMMDDXX) $release = "1.1 development"; // User-friendly version number -- 2.39.5