From: samhemelryk Date: Mon, 14 Sep 2009 04:19:28 +0000 (+0000) Subject: quiz-report-overview MDL-20260 Fixed misnamed upgrade function and bumped version... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=7f7b8cdf262ad140cbc161a39a8b9e63a9db6f44;p=moodle.git quiz-report-overview MDL-20260 Fixed misnamed upgrade function and bumped version number --- diff --git a/mod/quiz/report/overview/db/upgrade.php b/mod/quiz/report/overview/db/upgrade.php index d7d793cecd..6c6ccaf4c3 100644 --- a/mod/quiz/report/overview/db/upgrade.php +++ b/mod/quiz/report/overview/db/upgrade.php @@ -1,6 +1,6 @@ get_manager(); @@ -8,7 +8,7 @@ function xmldb_quizreport_overview_upgrade($oldversion) { //===== 1.9.0 upgrade line ======// - if ($result && $oldversion < 2008062700) { + if ($result && $oldversion < 2009091400) { /// Define table quiz_question_regrade to be created $table = new xmldb_table('quiz_question_regrade'); @@ -17,8 +17,8 @@ function xmldb_quizreport_overview_upgrade($oldversion) { $table->add_field('id', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, XMLDB_SEQUENCE, null); $table->add_field('questionid', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null); $table->add_field('attemptid', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null); - $table->add_field('newgrade', XMLDB_TYPE_NUMBER, '10, 5', null, XMLDB_NOTNULL, null, null); - $table->add_field('oldgrade', XMLDB_TYPE_NUMBER, '10, 5', null, XMLDB_NOTNULL, null, null); + $table->add_field('newgrade', XMLDB_TYPE_NUMBER, '12, 7', null, XMLDB_NOTNULL, null, null); + $table->add_field('oldgrade', XMLDB_TYPE_NUMBER, '12, 7', null, XMLDB_NOTNULL, null, null); $table->add_field('regraded', XMLDB_TYPE_INTEGER, '4', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null); $table->add_field('timemodified', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null); @@ -31,26 +31,7 @@ function xmldb_quizreport_overview_upgrade($oldversion) { } /// overview savepoint reached - upgrade_plugin_savepoint($result, 2008062700, 'quizreport', 'overview'); - } - - if ($result && $oldversion < 2009030500) { - /// Changing precision of field newgrade on table quiz_question_regrade to (12, 7). - $table = new xmldb_table('quiz_question_regrade'); - $field = new xmldb_field('newgrade', XMLDB_TYPE_NUMBER, '12, 7', null, XMLDB_NOTNULL, null, null, 'attemptid'); - - /// Launch change of precision for field newgrade - $dbman->change_field_precision($table, $field); - - /// Changing precision of field oldgrade on table quiz_question_regrade to (12, 7). - $table = new xmldb_table('quiz_question_regrade'); - $field = new xmldb_field('oldgrade', XMLDB_TYPE_NUMBER, '12, 7', null, XMLDB_NOTNULL, null, null, 'newgrade'); - - /// Launch change of precision for field newgrade - $dbman->change_field_precision($table, $field); - - /// overview savepoint reached - upgrade_plugin_savepoint($result, 2009030500, 'quizreport', 'overview'); + upgrade_plugin_savepoint($result, 2009091400, 'quizreport', 'overview'); } return $result; diff --git a/mod/quiz/report/overview/version.php b/mod/quiz/report/overview/version.php index e17349bd3a..837fbf593a 100644 --- a/mod/quiz/report/overview/version.php +++ b/mod/quiz/report/overview/version.php @@ -5,6 +5,6 @@ // This fragment is called by moodle_needs_upgrading() and /admin/index.php //////////////////////////////////////////////////////////////////////////////// -$plugin->version = 2009030500; // The (date) version of this module +$plugin->version = 2009091400; // The (date) version of this module ?>