Skip to content

Commit

Permalink
Ensure 'verifyany' length is valid on all sites (#597)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdjnelson committed Jan 23, 2024
1 parent fe5b025 commit f473ec7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,5 +222,18 @@ function xmldb_customcert_upgrade($oldversion) {
upgrade_mod_savepoint(true, 2022041907, 'customcert');
}

if ($oldversion < 2022041908) {
// Changing precision of field verifyany on table customcert to (1).
$table = new xmldb_table('customcert');
$field = new xmldb_field('verifyany', XMLDB_TYPE_INTEGER, '1', null, XMLDB_NOTNULL, null, '0',
'requiredtime');

// Launch change of precision for field verifyany.
$dbman->change_field_precision($table, $field);

// Customcert savepoint reached.
upgrade_mod_savepoint(true, 2022041908, 'customcert');
}

return true;
}
2 changes: 1 addition & 1 deletion version.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

defined('MOODLE_INTERNAL') || die('Direct access to this script is forbidden.');

$plugin->version = 2022041907; // The current module version (Date: YYYYMMDDXX).
$plugin->version = 2022041908; // The current module version (Date: YYYYMMDDXX).
$plugin->requires = 2022041900; // Requires this Moodle version (4.0).
$plugin->cron = 0; // Period for cron to check this module (secs).
$plugin->component = 'mod_customcert';
Expand Down

0 comments on commit f473ec7

Please sign in to comment.