diff --git a/db/upgrade.php b/db/upgrade.php index a60d6d73..7522367e 100644 --- a/db/upgrade.php +++ b/db/upgrade.php @@ -343,6 +343,17 @@ function xmldb_hsuforum_upgrade($oldversion) { upgrade_mod_savepoint(true, 2018120301, 'hsuforum'); } + if ($oldversion < 2021061100) { + // Set correct default value for showrecent column. + $table = new xmldb_table('hsuforum'); + $field = new xmldb_field('showrecent', XMLDB_TYPE_INTEGER, '1', null, XMLDB_NOTNULL, null, '1', 'displaywordcount'); + if ($dbman->field_exists($table, $field)) { + $dbman->change_field_default($table, $field); + } + // Open Forum savepoint reached. + upgrade_mod_savepoint(true, 2021061100, 'hsuforum'); + } + return true; } diff --git a/version.php b/version.php index 4bea8076..ad7c3e4a 100644 --- a/version.php +++ b/version.php @@ -27,7 +27,7 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2021060100; // The current module version (Date: YYYYMMDDXX) +$plugin->version = 2021061100; // The current module version (Date: YYYYMMDDXX) $plugin->requires = 2020110900; // Requires this Moodle version $plugin->component = 'mod_hsuforum'; // Full name of the plugin (used for diagnostics). $plugin->release = '3.10.3';