diff --git a/mod/quiz/db/upgrade.php b/mod/quiz/db/upgrade.php index 808cbda40a772..babdabd62226f 100644 --- a/mod/quiz/db/upgrade.php +++ b/mod/quiz/db/upgrade.php @@ -197,5 +197,15 @@ function xmldb_quiz_upgrade($oldversion) { // Automatically generated Moodle v4.3.0 release upgrade line. // Put any upgrade step following this. + if ($oldversion < 2023100902) { + + // Set the value for all existing rows to match the previous behaviour, + // but only where users have not already set another value. + $DB->set_field('quiz', 'reviewmaxmarks', 0x11110, ['reviewmaxmarks' => 0]); + + // Quiz savepoint reached. + upgrade_mod_savepoint(true, 2023100902, 'quiz'); + } + return true; } diff --git a/mod/quiz/version.php b/mod/quiz/version.php index 75e5bdde2be4d..df9a788750c1a 100644 --- a/mod/quiz/version.php +++ b/mod/quiz/version.php @@ -24,6 +24,6 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2023100900; +$plugin->version = 2023100902; $plugin->requires = 2023100400; $plugin->component = 'mod_quiz';