From d3dbcf5b58e3a6d90856f9c865ab70838bf59c1e Mon Sep 17 00:00:00 2001 From: Andrew Davis Date: Tue, 19 Oct 2010 07:17:45 +0000 Subject: [PATCH] gradebook MDL-24721 new installs of Moodle 2.0 were missing the hidden column from grade_categories --- lib/db/install.xml | 5 +++-- lib/db/upgrade.php | 13 +++++++++++++ version.php | 2 +- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/lib/db/install.xml b/lib/db/install.xml index f29f1955d8b..148d95ee2d4 100644 --- a/lib/db/install.xml +++ b/lib/db/install.xml @@ -1,5 +1,5 @@ - @@ -1629,7 +1629,8 @@ - + + diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index f677480558e..79ac9372486 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -5295,6 +5295,19 @@ WHERE gradeitemid IS NOT NULL AND grademax IS NOT NULL"); upgrade_main_savepoint(true, 2010101300); } + //MDL-24721 -add hidden column to grade_categories. This was done previously but it wasn't included in + //install.xml so there are 2.0 sites that are missing it. + if ($oldversion < 2010101900) { + $table = new xmldb_table('grade_categories'); + $field = new xmldb_field('hidden', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, 0); + + if (!$dbman->field_exists($table, $field)) { + $dbman->add_field($table, $field); + } + + upgrade_main_savepoint(true, 2010101900); + } + return true; } diff --git a/version.php b/version.php index b9539016c00..bac13ef23da 100644 --- a/version.php +++ b/version.php @@ -29,7 +29,7 @@ defined('MOODLE_INTERNAL') || die(); -$version = 2010101400; // YYYYMMDD = date of the last version bump +$version = 2010101900; // YYYYMMDD = date of the last version bump // XX = daily increments $release = '2.0 RC1 (Build: 20101019)'; // Human-friendly version name