Skip to content

Commit

Permalink
reinstate creation of letterhints from upgrades before v1.97
Browse files Browse the repository at this point in the history
  • Loading branch information
marcusgreen committed Jul 28, 2023
1 parent b9fdb1c commit dfb53aa
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ Fix for PHP 8.1 deprecation messages. Thanks to Joseph Rézeau for
creating the ticket for that.
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/104

Re-instate the creation of letterhints field in the dbfor upgrades from
before v1.97 in 2018

### Version 2.137 of the Moodle Gapfill question type April 2023
Fix compatibility on mobile with dark theme (css tweak)
https://github.com/marcusgreen/moodle-qtype_gapfill/pull/100
Expand Down
8 changes: 8 additions & 0 deletions db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,13 @@ function xmldb_qtype_gapfill_upgrade($oldversion = 0) {
upgrade_plugin_savepoint(true, 2020091100, 'qtype', 'gapfill');

}
if ($oldversion < 2023072899) {
if (!$dbman->field_exists('question_gapfill', 'letterhints')) {
$field = new xmldb_field('letterhints', XMLDB_TYPE_INTEGER, '1', null, null, null, '0', 'optionsaftertext');
$table = new xmldb_table('question_gapfill');
$dbman->add_field($table, $field);
}
}

return true;
}
4 changes: 2 additions & 2 deletions version.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
defined('MOODLE_INTERNAL') || die();

$plugin->component = 'qtype_gapfill';
$plugin->version = 2023042000;
$plugin->version = 2023072899;
$plugin->requires = 2022040100; // Moodle 4.0.
$plugin->release = '2.137';
$plugin->release = '2.138';
$plugin->maturity = MATURITY_STABLE;

0 comments on commit dfb53aa

Please sign in to comment.