From 4d9f2c368fcb7c00ee576cc13430ae4cbffff744 Mon Sep 17 00:00:00 2001 From: tjhunt Date: Tue, 29 Jul 2008 11:53:54 +0000 Subject: [PATCH] Remove 'regrade' report from the quiz_report table, since it no longer exists. --- mod/quiz/db/install.xml | 1 - mod/quiz/db/upgrade.php | 7 +++++++ mod/quiz/version.php | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/mod/quiz/db/install.xml b/mod/quiz/db/install.xml index e81b4825de..b40eab101b 100755 --- a/mod/quiz/db/install.xml +++ b/mod/quiz/db/install.xml @@ -328,7 +328,6 @@ - diff --git a/mod/quiz/db/upgrade.php b/mod/quiz/db/upgrade.php index a0ca4967a5..ade5e3e210 100644 --- a/mod/quiz/db/upgrade.php +++ b/mod/quiz/db/upgrade.php @@ -109,6 +109,13 @@ function xmldb_quiz_upgrade($oldversion=0) { upgrade_mod_savepoint($result, 2008072402, 'quiz'); } + if ($result && $oldversion < 2008072900) { + /// Delete the regrade report - it is now part of the overview report. + $result = $result && $DB->delete_records('quiz_report', array('name' => 'regrade')); + + /// quiz savepoint reached + upgrade_mod_savepoint($result, 2008072900, 'quiz'); + } return $result; } diff --git a/mod/quiz/version.php b/mod/quiz/version.php index 676568c21e..07f646d124 100644 --- a/mod/quiz/version.php +++ b/mod/quiz/version.php @@ -5,7 +5,7 @@ // This fragment is called by moodle_needs_upgrading() and /admin/index.php //////////////////////////////////////////////////////////////////////////////// -$module->version = 2008072402; // The (date) version of this module +$module->version = 2008072900; // The (date) version of this module $module->requires = 2008072401; // Requires this Moodle version $module->cron = 0; // How often should cron check this module (seconds)? -- 2.39.5