mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 21:49:15 +01:00
MDL-82335 qbank_columnsortorder: Fix upgrade code coding style
This commit is contained in:
parent
91d352a085
commit
805ff1806a
@ -80,7 +80,7 @@ function xmldb_qbank_columnsortorder_upgrade(int $oldversion): bool {
|
||||
if ($oldversion < 2024042203) {
|
||||
// When upgrading to version 2024042201, if there were any values for colsize in qbank_columnsortorder plugin,
|
||||
// they were getting incorrectly updated, resulting in corrupted colsize value,
|
||||
// e.g., '"width":"30"}-"width":"30"},"width":"180"}-"width":"180"} and thus breaking the question bank page.
|
||||
// e.g., '"width":"30"}-"width":"30"},"width":"180"}-"width":"180"}' and thus breaking the question bank page.
|
||||
$pluginconfig = $DB->get_record('config_plugins', ['plugin' => 'qbank_columnsortorder', 'name' => 'colsize']);
|
||||
$pattern = '/"width":"[^"]*"}-"width":"[^"]*"}/';
|
||||
if ($pluginconfig && preg_match($pattern, $pluginconfig->value)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user