MDL-59140 core: upgrade 'navcourselimit' if set to old default value

This commit is contained in:
Mark Nelson
2017-06-13 18:22:58 +08:00
parent d47b680074
commit 481220cb4c
2 changed files with 11 additions and 1 deletions
+10
View File
@@ -2865,5 +2865,15 @@ function xmldb_main_upgrade($oldversion) {
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
if ($oldversion < 2017051500.06) {
// Check if the value of 'navcourselimit' is set to the old default value, if so, change it to the new default.
if ($CFG->navcourselimit == 20) {
set_config('navcourselimit', 10);
}
// Main savepoint reached.
upgrade_main_savepoint(true, 2017051500.06);
}
return true;
}
+1 -1
View File
@@ -29,7 +29,7 @@
defined('MOODLE_INTERNAL') || die();
$version = 2017051500.05; // 20170515 = branching date YYYYMMDD - do not modify!
$version = 2017051500.06; // 20170515 = branching date YYYYMMDD - do not modify!
// RR = release increments - 00 in DEV branches.
// .XX = incremental changes.