mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-68568 editor_atto: Upgrade step for the new toolbar default layout
* emojipicker added to files * indent moved to list
This commit is contained in:
parent
b677d33d62
commit
01c8c667fc
2 changed files with 36 additions and 1 deletions
|
@ -67,5 +67,40 @@ function xmldb_editor_atto_upgrade($oldversion) {
|
||||||
// Automatically generated Moodle v3.8.0 release upgrade line.
|
// Automatically generated Moodle v3.8.0 release upgrade line.
|
||||||
// Put any upgrade step following this.
|
// Put any upgrade step following this.
|
||||||
|
|
||||||
|
if ($oldversion < 2020052100) {
|
||||||
|
// The old default toolbar config for 38 and below.
|
||||||
|
$oldtoolbar = 'collapse = collapse
|
||||||
|
style1 = title, bold, italic
|
||||||
|
list = unorderedlist, orderedlist
|
||||||
|
links = link
|
||||||
|
files = image, media, recordrtc, managefiles, h5p
|
||||||
|
style2 = underline, strike, subscript, superscript
|
||||||
|
align = align
|
||||||
|
indent = indent
|
||||||
|
insert = equation, charmap, table, clear
|
||||||
|
undo = undo
|
||||||
|
accessibility = accessibilitychecker, accessibilityhelper
|
||||||
|
other = html';
|
||||||
|
|
||||||
|
// Check if the current toolbar config matches the old toolbar config.
|
||||||
|
if (get_config('editor_atto', 'toolbar') === $oldtoolbar) {
|
||||||
|
// If the site is still using the old defaults, upgrade to the new default.
|
||||||
|
$newtoolbar = 'collapse = collapse
|
||||||
|
style1 = title, bold, italic
|
||||||
|
list = unorderedlist, orderedlist, indent
|
||||||
|
links = link
|
||||||
|
files = emojipicker, image, media, recordrtc, managefiles, h5p
|
||||||
|
style2 = underline, strike, subscript, superscript
|
||||||
|
align = align
|
||||||
|
insert = equation, charmap, table, clear
|
||||||
|
undo = undo
|
||||||
|
accessibility = accessibilitychecker, accessibilityhelper
|
||||||
|
other = html';
|
||||||
|
set_config('toolbar', $newtoolbar, 'editor_atto');
|
||||||
|
}
|
||||||
|
|
||||||
|
upgrade_plugin_savepoint(true, 2020052100, 'editor', 'atto');
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,6 +24,6 @@
|
||||||
|
|
||||||
defined('MOODLE_INTERNAL') || die();
|
defined('MOODLE_INTERNAL') || die();
|
||||||
|
|
||||||
$plugin->version = 2020051200; // The current plugin version (Date: YYYYMMDDXX).
|
$plugin->version = 2020052100; // The current plugin version (Date: YYYYMMDDXX).
|
||||||
$plugin->requires = 2019111200; // Requires this Moodle version.
|
$plugin->requires = 2019111200; // Requires this Moodle version.
|
||||||
$plugin->component = 'editor_atto'; // Full name of the plugin (used for diagnostics).
|
$plugin->component = 'editor_atto'; // Full name of the plugin (used for diagnostics).
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue