MDL-50935 atto_equation: Add upgrade step to fix existing sites
This commit is contained in:
@@ -50,5 +50,15 @@ function xmldb_atto_equation_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.11.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
if ($oldversion < 2021051701) {
|
||||
$oldmatrix = '\left| \begin{matrix} a_1 & a_2 \\ a_3 & a_4 \end{matrix} \right|';
|
||||
$fixedmatrix = '\left| \begin{matrix} a_1 & a_2 \\\\ a_3 & a_4 \end{matrix} \right|';
|
||||
$config = get_config('atto_equation', 'librarygroup4');
|
||||
$newdefault = str_replace($oldmatrix, $fixedmatrix, $config);
|
||||
set_config('librarygroup4', $newdefault, 'atto_equation');
|
||||
// Atto equation savepoint reached.
|
||||
upgrade_plugin_savepoint(true, 2021051701, 'atto', 'equation');
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2021051700; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->version = 2021051701; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2021051100; // Requires this Moodle version.
|
||||
$plugin->component = 'atto_equation'; // Full name of the plugin (used for diagnostics).
|
||||
|
||||
Reference in New Issue
Block a user