From: toyomoyo Date: Wed, 9 May 2007 05:56:34 +0000 (+0000) Subject: dropping gradescale for grade_raw and grade_final table X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=48b8bba9442666d20c360dde292b145a8c89daaa;p=moodle.git dropping gradescale for grade_raw and grade_final table --- diff --git a/lib/db/install.xml b/lib/db/install.xml index 1216c62d85..7df4bfcc75 100644 --- a/lib/db/install.xml +++ b/lib/db/install.xml @@ -1,5 +1,5 @@ - @@ -1309,9 +1309,8 @@ - - - + + @@ -1330,9 +1329,8 @@ - - - + + diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index b62eed55b4..72b7575eab 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -1180,6 +1180,25 @@ function xmldb_main_upgrade($oldversion=0) { /// Launch add field feedbackformat $result = $result && add_field($table, $field); } + + + if ($result && $oldversion < 2007050900) { + + /// Define field gradescale to be dropped from grade_grades_raw + $table = new XMLDBTable('grade_grades_raw'); + $field = new XMLDBField('gradescale'); + + /// Launch drop field gradescale + $result = $result && drop_field($table, $field); + + + /// Define field gradescale to be dropped from grade_grades_final + $table = new XMLDBTable('grade_grades_final'); + $field = new XMLDBField('gradescale'); + + /// Launch drop field gradescale + $result = $result && drop_field($table, $field); + } return $result; } diff --git a/version.php b/version.php index f566c236f7..976059864a 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 = 2007050400; // YYYYMMDD = date + $version = 2007050900; // YYYYMMDD = date // XY = increments within a single day $release = '1.9 dev'; // Human-friendly version name