From e49af69a1d8d5ecacb3740d0cc2a81c8e9904ec1 Mon Sep 17 00:00:00 2001
From: Andrew Nicols
Date: Thu, 26 Sep 2024 21:45:18 +0800
Subject: [PATCH] MDL-83282 editor_atto: Remove Atto editor
This minor patch removes the Atto editor, and all of its subplugins from
Moodle core.
---
.upgradenotes/MDL-83282-2024112007284289.yml | 9 +
lib/db/upgrade.php | 19 +
lib/editor/atto/adminlib.php | 252 -
lib/editor/atto/amd/build/events.min.js | 12 -
lib/editor/atto/amd/build/events.min.js.map | 1 -
lib/editor/atto/amd/src/events.js | 65 -
lib/editor/atto/autosave-ajax.php | 221 -
lib/editor/atto/classes/plugininfo/atto.php | 87 -
lib/editor/atto/classes/privacy/provider.php | 244 -
.../classes/task/autosave_cleanup_task.php | 58 -
lib/editor/atto/db/install.xml | 25 -
lib/editor/atto/db/subplugins.json | 8 -
lib/editor/atto/db/tasks.php | 44 -
lib/editor/atto/db/upgrade.php | 44 -
lib/editor/atto/lang/en/editor_atto.php | 54 -
lib/editor/atto/lib.php | 207 -
lib/editor/atto/pix/logo.png | Bin 2795 -> 0 bytes
lib/editor/atto/pix/logo.svg | 91 -
.../classes/privacy/provider.php | 46 -
.../lang/en/atto_accessibilitychecker.php | 36 -
.../atto/plugins/accessibilitychecker/lib.php | 46 -
.../plugins/accessibilitychecker/styles.css | 4 -
.../tests/behat/accessibilitychecker.feature | 76 -
.../plugins/accessibilitychecker/version.php | 29 -
...-atto_accessibilitychecker-button-debug.js | 357 -
...le-atto_accessibilitychecker-button-min.js | 1 -
...moodle-atto_accessibilitychecker-button.js | 352 -
.../yui/src/button/build.json | 10 -
.../yui/src/button/js/button.js | 352 -
.../yui/src/button/meta/button.json | 8 -
.../classes/privacy/provider.php | 46 -
.../lang/en/atto_accessibilityhelper.php | 34 -
.../atto/plugins/accessibilityhelper/lib.php | 44 -
.../tests/behat/accessibilityhelper.feature | 32 -
.../plugins/accessibilityhelper/version.php | 29 -
...e-atto_accessibilityhelper-button-debug.js | 280 -
...dle-atto_accessibilityhelper-button-min.js | 1 -
.../moodle-atto_accessibilityhelper-button.js | 280 -
.../yui/src/button/build.json | 10 -
.../yui/src/button/js/button.js | 275 -
.../yui/src/button/meta/button.json | 7 -
.../align/classes/privacy/provider.php | 46 -
.../atto/plugins/align/lang/en/atto_align.php | 29 -
lib/editor/atto/plugins/align/lib.php | 35 -
.../plugins/align/tests/behat/align.feature | 52 -
lib/editor/atto/plugins/align/version.php | 29 -
.../moodle-atto_align-button-debug.js | 106 -
.../moodle-atto_align-button-min.js | 1 -
.../moodle-atto_align-button.js | 106 -
.../plugins/align/yui/src/button/build.json | 10 -
.../plugins/align/yui/src/button/js/button.js | 101 -
.../align/yui/src/button/meta/button.json | 7 -
.../backcolor/classes/privacy/provider.php | 46 -
.../backcolor/lang/en/atto_backcolor.php | 32 -
lib/editor/atto/plugins/backcolor/lib.php | 41 -
lib/editor/atto/plugins/backcolor/styles.css | 26 -
lib/editor/atto/plugins/backcolor/version.php | 29 -
.../moodle-atto_backcolor-button-debug.js | 97 -
.../moodle-atto_backcolor-button-min.js | 1 -
.../moodle-atto_backcolor-button.js | 97 -
.../backcolor/yui/src/button/build.json | 10 -
.../backcolor/yui/src/button/js/button.js | 92 -
.../backcolor/yui/src/button/meta/editor.js | 5 -
.../plugins/bold/classes/privacy/provider.php | 46 -
.../atto/plugins/bold/lang/en/atto_bold.php | 26 -
.../plugins/bold/tests/behat/bold.feature | 35 -
lib/editor/atto/plugins/bold/version.php | 29 -
.../moodle-atto_bold-button-debug.js | 72 -
.../moodle-atto_bold-button-min.js | 1 -
.../moodle-atto_bold-button.js | 72 -
.../plugins/bold/yui/src/button/build.json | 10 -
.../plugins/bold/yui/src/button/js/button.js | 67 -
.../bold/yui/src/button/meta/button.json | 7 -
.../charmap/classes/privacy/provider.php | 46 -
.../plugins/charmap/lang/en/atto_charmap.php | 293 -
lib/editor/atto/plugins/charmap/lib.php | 306 -
lib/editor/atto/plugins/charmap/styles.css | 4 -
.../charmap/tests/behat/charmap.feature | 20 -
lib/editor/atto/plugins/charmap/version.php | 29 -
.../moodle-atto_charmap-button-debug.js | 431 -
.../moodle-atto_charmap-button-min.js | 2 -
.../moodle-atto_charmap-button.js | 431 -
.../plugins/charmap/yui/src/button/build.json | 10 -
.../charmap/yui/src/button/js/button.js | 426 -
.../charmap/yui/src/button/meta/button.json | 7 -
.../clear/classes/privacy/provider.php | 46 -
.../atto/plugins/clear/lang/en/atto_clear.php | 26 -
.../plugins/clear/tests/behat/clear.feature | 21 -
lib/editor/atto/plugins/clear/version.php | 29 -
.../moodle-atto_clear-button-debug.js | 46 -
.../moodle-atto_clear-button-min.js | 1 -
.../moodle-atto_clear-button.js | 46 -
.../plugins/clear/yui/src/button/build.json | 10 -
.../plugins/clear/yui/src/button/js/button.js | 41 -
.../clear/yui/src/button/meta/button.json | 7 -
.../collapse/classes/privacy/provider.php | 46 -
.../collapse/lang/en/atto_collapse.php | 32 -
lib/editor/atto/plugins/collapse/lib.php | 53 -
lib/editor/atto/plugins/collapse/pix/icon.svg | 1 -
lib/editor/atto/plugins/collapse/settings.php | 43 -
lib/editor/atto/plugins/collapse/styles.css | 5 -
.../collapse/tests/behat/collapse.feature | 12 -
lib/editor/atto/plugins/collapse/version.php | 29 -
.../moodle-atto_collapse-button-debug.js | 153 -
.../moodle-atto_collapse-button-min.js | 1 -
.../moodle-atto_collapse-button.js | 149 -
.../collapse/yui/src/button/build.json | 10 -
.../collapse/yui/src/button/js/button.js | 148 -
.../collapse/yui/src/button/meta/button.json | 7 -
.../emojipicker/classes/privacy/provider.php | 46 -
.../emojipicker/lang/en/atto_emojipicker.php | 27 -
lib/editor/atto/plugins/emojipicker/lib.php | 48 -
.../atto/plugins/emojipicker/styles.css | 8 -
.../atto/plugins/emojipicker/version.php | 29 -
.../moodle-atto_emojipicker-button-debug.js | 143 -
.../moodle-atto_emojipicker-button-min.js | 1 -
.../moodle-atto_emojipicker-button.js | 143 -
.../emojipicker/yui/src/button/build.json | 10 -
.../emojipicker/yui/src/button/js/button.js | 138 -
.../yui/src/button/meta/button.json | 7 -
.../emoticon/classes/privacy/provider.php | 46 -
.../emoticon/lang/en/atto_emoticon.php | 27 -
lib/editor/atto/plugins/emoticon/lib.php | 54 -
lib/editor/atto/plugins/emoticon/styles.css | 20 -
lib/editor/atto/plugins/emoticon/version.php | 29 -
.../moodle-atto_emoticon-button-debug.js | 170 -
.../moodle-atto_emoticon-button-min.js | 1 -
.../moodle-atto_emoticon-button.js | 170 -
.../emoticon/yui/src/button/build.json | 10 -
.../emoticon/yui/src/button/js/button.js | 165 -
.../emoticon/yui/src/button/meta/button.json | 7 -
lib/editor/atto/plugins/equation/ajax.php | 51 -
.../equation/classes/privacy/provider.php | 46 -
.../atto/plugins/equation/db/upgrade.php | 44 -
.../equation/lang/en/atto_equation.php | 40 -
lib/editor/atto/plugins/equation/lib.php | 93 -
lib/editor/atto/plugins/equation/settings.php | 175 -
lib/editor/atto/plugins/equation/styles.css | 11 -
.../equation/tests/behat/equation.feature | 38 -
lib/editor/atto/plugins/equation/version.php | 29 -
.../moodle-atto_equation-button-debug.js | 791 -
.../moodle-atto_equation-button-min.js | 2 -
.../moodle-atto_equation-button.js | 789 -
.../equation/yui/src/button/build.json | 10 -
.../equation/yui/src/button/js/button.js | 777 -
.../equation/yui/src/button/meta/button.json | 12 -
.../fontcolor/classes/privacy/provider.php | 46 -
.../fontcolor/lang/en/atto_fontcolor.php | 32 -
lib/editor/atto/plugins/fontcolor/lib.php | 41 -
lib/editor/atto/plugins/fontcolor/styles.css | 26 -
lib/editor/atto/plugins/fontcolor/version.php | 29 -
.../moodle-atto_fontcolor-button-debug.js | 99 -
.../moodle-atto_fontcolor-button-min.js | 1 -
.../moodle-atto_fontcolor-button.js | 99 -
.../fontcolor/yui/src/button/build.json | 10 -
.../fontcolor/yui/src/button/js/button.js | 94 -
.../fontcolor/yui/src/button/meta/editor.js | 5 -
.../plugins/h5p/classes/privacy/provider.php | 46 -
lib/editor/atto/plugins/h5p/db/access.php | 35 -
.../atto/plugins/h5p/lang/en/atto_h5p.php | 38 -
lib/editor/atto/plugins/h5p/lib.php | 85 -
.../atto/plugins/h5p/pix/icon-white.png | Bin 6257 -> 0 bytes
.../atto/plugins/h5p/pix/icon-white.svg | 18 -
lib/editor/atto/plugins/h5p/pix/icon.png | Bin 4541 -> 0 bytes
lib/editor/atto/plugins/h5p/pix/icon.svg | 14 -
lib/editor/atto/plugins/h5p/styles.css | 20 -
.../atto/plugins/h5p/tests/behat/h5p.feature | 220 -
lib/editor/atto/plugins/h5p/version.php | 29 -
.../moodle-atto_h5p-button-debug.js | 605 -
.../moodle-atto_h5p-button-min.js | 3 -
.../moodle-atto_h5p-button.js | 605 -
.../plugins/h5p/yui/src/button/build.json | 10 -
.../plugins/h5p/yui/src/button/js/button.js | 600 -
.../h5p/yui/src/button/meta/button.json | 7 -
.../plugins/html/classes/privacy/provider.php | 46 -
.../atto/plugins/html/lang/en/atto_html.php | 26 -
lib/editor/atto/plugins/html/styles.css | 4 -
.../plugins/html/tests/behat/html.feature | 31 -
.../atto/plugins/html/thirdpartylibs.xml | 22 -
lib/editor/atto/plugins/html/version.php | 29 -
.../moodle-atto_html-beautify-debug.js | 8988 -----------
.../moodle-atto_html-beautify-min.js | 25 -
.../moodle-atto_html-beautify.js | 8988 -----------
.../moodle-atto_html-button-debug.js | 201 -
.../moodle-atto_html-button-min.js | 1 -
.../moodle-atto_html-button.js | 201 -
.../moodle-atto_html-codemirror-core.css | 346 -
.../sam/moodle-atto_html-codemirror-skin.css | 0
.../skins/sam/moodle-atto_html-codemirror.css | 1 -
.../moodle-atto_html-codemirror-debug.js | 12289 ----------------
.../moodle-atto_html-codemirror-min.js | 38 -
.../moodle-atto_html-codemirror.js | 12289 ----------------
.../plugins/html/yui/src/beautify/LICENSE | 9 -
.../plugins/html/yui/src/beautify/build.json | 16 -
.../html/yui/src/beautify/js/beautify-css.js | 1693 ---
.../html/yui/src/beautify/js/beautify-html.js | 3225 ----
.../html/yui/src/beautify/js/beautify.js | 4049 -----
.../html/yui/src/beautify/js/wrapper.js | 16 -
.../html/yui/src/beautify/meta/beautify.json | 4 -
.../html/yui/src/beautify/readme_moodle.txt | 7 -
.../plugins/html/yui/src/button/build.json | 10 -
.../plugins/html/yui/src/button/js/button.js | 188 -
.../html/yui/src/button/meta/button.json | 11 -
.../plugins/html/yui/src/codemirror/LICENSE | 21 -
.../moodle-atto_html-codemirror-core.css | 346 -
.../sam/moodle-atto_html-codemirror-skin.css | 0
.../html/yui/src/codemirror/build.json | 21 -
.../html/yui/src/codemirror/js/codemirror.js | 9884 -------------
.../plugins/html/yui/src/codemirror/js/css.js | 862 --
.../html/yui/src/codemirror/js/htmlmixed.js | 153 -
.../html/yui/src/codemirror/js/javascript.js | 960 --
.../html/yui/src/codemirror/js/wrapper-end.js | 5 -
.../html/yui/src/codemirror/js/wrapper-mid.js | 1 -
.../html/yui/src/codemirror/js/wrapper.js | 2 -
.../plugins/html/yui/src/codemirror/js/xml.js | 417 -
.../yui/src/codemirror/meta/codemirror.json | 7 -
.../html/yui/src/codemirror/readme_moodle.txt | 28 -
.../image/classes/privacy/provider.php | 46 -
.../atto/plugins/image/lang/en/atto_image.php | 48 -
lib/editor/atto/plugins/image/lib.php | 58 -
lib/editor/atto/plugins/image/styles.css | 53 -
.../plugins/image/tests/behat/image.feature | 93 -
lib/editor/atto/plugins/image/version.php | 29 -
.../moodle-atto_image-button-debug.js | 1116 --
.../moodle-atto_image-button-min.js | 3 -
.../moodle-atto_image-button.js | 1114 --
.../plugins/image/yui/src/button/build.json | 10 -
.../plugins/image/yui/src/button/js/button.js | 1111 --
.../image/yui/src/button/meta/button.json | 7 -
.../indent/classes/privacy/provider.php | 46 -
.../plugins/indent/lang/en/atto_indent.php | 28 -
lib/editor/atto/plugins/indent/lib.php | 35 -
.../plugins/indent/tests/behat/indent.feature | 37 -
lib/editor/atto/plugins/indent/version.php | 29 -
.../moodle-atto_indent-button-debug.js | 227 -
.../moodle-atto_indent-button-min.js | 1 -
.../moodle-atto_indent-button.js | 227 -
.../plugins/indent/yui/src/button/build.json | 10 -
.../indent/yui/src/button/js/button.js | 222 -
.../indent/yui/src/button/meta/button.json | 7 -
.../italic/classes/privacy/provider.php | 46 -
.../plugins/italic/lang/en/atto_italic.php | 26 -
.../plugins/italic/tests/behat/italic.feature | 35 -
lib/editor/atto/plugins/italic/version.php | 29 -
.../moodle-atto_italic-button-debug.js | 72 -
.../moodle-atto_italic-button-min.js | 1 -
.../moodle-atto_italic-button.js | 72 -
.../plugins/italic/yui/src/button/build.json | 10 -
.../italic/yui/src/button/js/button.js | 67 -
.../italic/yui/src/button/meta/button.json | 7 -
.../plugins/link/classes/privacy/provider.php | 46 -
.../atto/plugins/link/lang/en/atto_link.php | 32 -
lib/editor/atto/plugins/link/lib.php | 42 -
.../plugins/link/tests/behat/link.feature | 115 -
lib/editor/atto/plugins/link/version.php | 29 -
.../moodle-atto_link-button-debug.js | 557 -
.../moodle-atto_link-button-min.js | 2 -
.../moodle-atto_link-button.js | 557 -
.../plugins/link/yui/src/button/build.json | 10 -
.../plugins/link/yui/src/button/js/button.js | 552 -
.../link/yui/src/button/meta/button.json | 7 -
.../managefiles/classes/privacy/provider.php | 46 -
.../managefiles/lang/en/atto_managefiles.php | 34 -
lib/editor/atto/plugins/managefiles/lib.php | 72 -
.../atto/plugins/managefiles/manage.php | 114 -
.../atto/plugins/managefiles/manage_form.php | 119 -
.../atto/plugins/managefiles/styles.css | 19 -
.../atto/plugins/managefiles/version.php | 29 -
.../moodle-atto_managefiles-button-debug.js | 150 -
.../moodle-atto_managefiles-button-min.js | 1 -
.../moodle-atto_managefiles-button.js | 148 -
...moodle-atto_managefiles-usedfiles-debug.js | 206 -
.../moodle-atto_managefiles-usedfiles-min.js | 1 -
.../moodle-atto_managefiles-usedfiles.js | 205 -
.../managefiles/yui/src/button/build.json | 10 -
.../managefiles/yui/src/button/js/button.js | 145 -
.../yui/src/button/meta/button.json | 7 -
.../managefiles/yui/src/usedfiles/build.json | 10 -
.../yui/src/usedfiles/js/usedfiles.js | 201 -
.../yui/src/usedfiles/meta/usedfiles.json | 8 -
.../media/classes/privacy/provider.php | 46 -
.../atto/plugins/media/lang/en/atto_media.php | 84 -
lib/editor/atto/plugins/media/lib.php | 128 -
lib/editor/atto/plugins/media/styles.css | 4 -
.../atto/plugins/media/styles_clean.css | 28 -
.../plugins/media/tests/behat/media.feature | 206 -
lib/editor/atto/plugins/media/version.php | 29 -
.../moodle-atto_media-button-debug.js | 1066 --
.../moodle-atto_media-button-min.js | 5 -
.../moodle-atto_media-button.js | 1066 --
.../plugins/media/yui/src/button/build.json | 10 -
.../plugins/media/yui/src/button/js/button.js | 1061 --
.../media/yui/src/button/meta/button.json | 8 -
.../noautolink/classes/privacy/provider.php | 46 -
.../noautolink/lang/en/atto_noautolink.php | 26 -
.../atto/plugins/noautolink/version.php | 29 -
.../moodle-atto_noautolink-button-debug.js | 60 -
.../moodle-atto_noautolink-button-min.js | 1 -
.../moodle-atto_noautolink-button.js | 60 -
.../noautolink/yui/src/button/build.json | 10 -
.../noautolink/yui/src/button/js/button.js | 55 -
.../yui/src/button/meta/button.json | 7 -
.../orderedlist/classes/privacy/provider.php | 46 -
.../orderedlist/lang/en/atto_orderedlist.php | 26 -
.../tests/behat/orderedlist.feature | 18 -
.../atto/plugins/orderedlist/version.php | 29 -
.../moodle-atto_orderedlist-button-debug.js | 49 -
.../moodle-atto_orderedlist-button-min.js | 1 -
.../moodle-atto_orderedlist-button.js | 49 -
.../orderedlist/yui/src/button/build.json | 10 -
.../orderedlist/yui/src/button/js/button.js | 44 -
.../yui/src/button/meta/button.json | 7 -
.../recordrtc/classes/privacy/provider.php | 46 -
.../atto/plugins/recordrtc/db/access.php | 44 -
.../atto/plugins/recordrtc/db/upgrade.php | 45 -
.../recordrtc/lang/en/atto_recordrtc.php | 80 -
lib/editor/atto/plugins/recordrtc/lib.php | 145 -
.../atto/plugins/recordrtc/pix/i/audiortc.svg | 1 -
.../atto/plugins/recordrtc/pix/i/videortc.svg | 1 -
.../atto/plugins/recordrtc/pix/icon.png | Bin 644 -> 0 bytes
.../atto/plugins/recordrtc/settings.php | 86 -
lib/editor/atto/plugins/recordrtc/styles.css | 39 -
lib/editor/atto/plugins/recordrtc/version.php | 32 -
.../moodle-atto_recordrtc-button-debug.js | 394 -
.../moodle-atto_recordrtc-button-min.js | 1 -
.../moodle-atto_recordrtc-button.js | 394 -
.../moodle-atto_recordrtc-recording-debug.js | 855 --
.../moodle-atto_recordrtc-recording-min.js | 2 -
.../moodle-atto_recordrtc-recording.js | 855 --
.../recordrtc/yui/src/button/build.json | 10 -
.../recordrtc/yui/src/button/js/button.js | 389 -
.../recordrtc/yui/src/button/meta/button.json | 8 -
.../recordrtc/yui/src/recording/build.json | 14 -
.../yui/src/recording/js/abstractmodule.js | 137 -
.../yui/src/recording/js/audiomodule.js | 148 -
.../yui/src/recording/js/commonmodule.js | 351 -
.../yui/src/recording/js/compatcheckmodule.js | 58 -
.../yui/src/recording/js/videomodule.js | 156 -
.../yui/src/recording/meta/recording.json | 7 -
.../plugins/rtl/classes/privacy/provider.php | 46 -
.../atto/plugins/rtl/lang/en/atto_rtl.php | 28 -
lib/editor/atto/plugins/rtl/lib.php | 44 -
lib/editor/atto/plugins/rtl/version.php | 29 -
.../moodle-atto_rtl-button-debug.js | 103 -
.../moodle-atto_rtl-button-min.js | 1 -
.../moodle-atto_rtl-button.js | 103 -
.../plugins/rtl/yui/src/button/build.json | 10 -
.../plugins/rtl/yui/src/button/js/button.js | 98 -
.../rtl/yui/src/button/meta/button.json | 7 -
.../strike/classes/privacy/provider.php | 46 -
.../plugins/strike/lang/en/atto_strike.php | 26 -
.../plugins/strike/tests/behat/strike.feature | 19 -
lib/editor/atto/plugins/strike/version.php | 29 -
.../moodle-atto_strike-button-debug.js | 72 -
.../moodle-atto_strike-button-min.js | 1 -
.../moodle-atto_strike-button.js | 72 -
.../plugins/strike/yui/src/button/build.json | 10 -
.../strike/yui/src/button/js/button.js | 67 -
.../strike/yui/src/button/meta/button.json | 7 -
.../subscript/classes/privacy/provider.php | 46 -
.../subscript/lang/en/atto_subscript.php | 26 -
.../subscript/tests/behat/subscript.feature | 35 -
lib/editor/atto/plugins/subscript/version.php | 29 -
.../moodle-atto_subscript-button-debug.js | 90 -
.../moodle-atto_subscript-button-min.js | 1 -
.../moodle-atto_subscript-button.js | 90 -
.../subscript/yui/src/button/build.json | 10 -
.../subscript/yui/src/button/js/button.js | 85 -
.../subscript/yui/src/button/meta/button.json | 7 -
.../superscript/classes/privacy/provider.php | 46 -
.../superscript/lang/en/atto_superscript.php | 26 -
.../tests/behat/superscript.feature | 35 -
.../atto/plugins/superscript/version.php | 29 -
.../moodle-atto_superscript-button-debug.js | 90 -
.../moodle-atto_superscript-button-min.js | 1 -
.../moodle-atto_superscript-button.js | 90 -
.../superscript/yui/src/button/build.json | 10 -
.../superscript/yui/src/button/js/button.js | 85 -
.../yui/src/button/meta/button.json | 7 -
.../table/classes/privacy/provider.php | 46 -
.../atto/plugins/table/lang/en/atto_table.php | 66 -
lib/editor/atto/plugins/table/lib.php | 85 -
lib/editor/atto/plugins/table/settings.php | 58 -
lib/editor/atto/plugins/table/styles.css | 29 -
.../plugins/table/tests/behat/table.feature | 404 -
lib/editor/atto/plugins/table/version.php | 29 -
.../moodle-atto_table-button-debug.js | 1557 --
.../moodle-atto_table-button-min.js | 5 -
.../moodle-atto_table-button.js | 1557 --
.../plugins/table/yui/src/button/build.json | 10 -
.../plugins/table/yui/src/button/js/button.js | 1552 --
.../table/yui/src/button/meta/button.json | 10 -
.../title/classes/privacy/provider.php | 46 -
.../atto/plugins/title/lang/en/atto_title.php | 32 -
lib/editor/atto/plugins/title/lib.php | 36 -
.../plugins/title/tests/behat/title.feature | 19 -
lib/editor/atto/plugins/title/version.php | 29 -
.../moodle-atto_title-button-debug.js | 95 -
.../moodle-atto_title-button-min.js | 1 -
.../moodle-atto_title-button.js | 95 -
.../plugins/title/yui/src/button/build.json | 10 -
.../plugins/title/yui/src/button/js/button.js | 90 -
.../title/yui/src/button/meta/button.json | 7 -
.../underline/classes/privacy/provider.php | 46 -
.../underline/lang/en/atto_underline.php | 26 -
.../underline/tests/behat/underline.feature | 19 -
lib/editor/atto/plugins/underline/version.php | 29 -
.../moodle-atto_underline-button-debug.js | 51 -
.../moodle-atto_underline-button-min.js | 1 -
.../moodle-atto_underline-button.js | 51 -
.../underline/yui/src/button/build.json | 10 -
.../underline/yui/src/button/js/button.js | 46 -
.../underline/yui/src/button/meta/button.json | 7 -
.../plugins/undo/classes/privacy/provider.php | 46 -
.../atto/plugins/undo/lang/en/atto_undo.php | 28 -
lib/editor/atto/plugins/undo/lib.php | 44 -
lib/editor/atto/plugins/undo/version.php | 29 -
.../moodle-atto_undo-button-debug.js | 306 -
.../moodle-atto_undo-button-min.js | 1 -
.../moodle-atto_undo-button.js | 306 -
.../plugins/undo/yui/src/button/build.json | 10 -
.../plugins/undo/yui/src/button/js/button.js | 301 -
.../undo/yui/src/button/meta/button.json | 7 -
.../classes/privacy/provider.php | 46 -
.../lang/en/atto_unorderedlist.php | 26 -
.../tests/behat/unorderedlist.feature | 18 -
.../atto/plugins/unorderedlist/version.php | 29 -
.../moodle-atto_unorderedlist-button-debug.js | 49 -
.../moodle-atto_unorderedlist-button-min.js | 1 -
.../moodle-atto_unorderedlist-button.js | 49 -
.../unorderedlist/yui/src/button/build.json | 10 -
.../unorderedlist/yui/src/button/js/button.js | 44 -
.../yui/src/button/meta/button.json | 7 -
lib/editor/atto/readme_moodle.txt | 22 -
lib/editor/atto/settings.php | 67 -
lib/editor/atto/tests/behat/autosave.feature | 94 -
.../atto/tests/behat/behat_editor_atto.php | 108 -
lib/editor/atto/tests/behat/clean.feature | 169 -
.../atto/tests/behat/customtoolbar.feature | 26 -
lib/editor/atto/tests/behat/direction.feature | 49 -
.../atto/tests/behat/disablecontrol.feature | 45 -
.../tests/fixtures/custom_toolbar_example.php | 86 -
.../atto/tests/fixtures/moodle-logo.mp4 | Bin 6930 -> 0 bytes
.../atto/tests/fixtures/moodle-logo.png | Bin 4640 -> 0 bytes
.../atto/tests/fixtures/moodle-logo.webm | Bin 5742 -> 0 bytes
.../atto/tests/fixtures/pretty-good-en.vtt | 54 -
.../atto/tests/fixtures/pretty-good-sv.vtt | 54 -
.../atto/tests/privacy/provider_test.php | 655 -
lib/editor/atto/thirdpartylibs.xml | 15 -
lib/editor/atto/upgrade.txt | 35 -
lib/editor/atto/version.php | 29 -
.../moodle-editor_atto-editor-debug.js | 3195 ----
.../moodle-editor_atto-editor-min.js | 5 -
.../moodle-editor_atto-editor.js | 3170 ----
.../moodle-editor_atto-menu-debug.js | 353 -
.../moodle-editor_atto-menu-min.js | 1 -
.../moodle-editor_atto-menu.js | 352 -
.../moodle-editor_atto-plugin-debug.js | 1248 --
.../moodle-editor_atto-plugin-min.js | 2 -
.../moodle-editor_atto-plugin.js | 1244 --
.../moodle-editor_atto-rangy-debug.js | 8087 ----------
.../moodle-editor_atto-rangy-min.js | 16 -
.../moodle-editor_atto-rangy.js | 8087 ----------
lib/editor/atto/yui/src/editor/build.json | 33 -
.../atto/yui/src/editor/js/autosave-io.js | 245 -
lib/editor/atto/yui/src/editor/js/autosave.js | 287 -
lib/editor/atto/yui/src/editor/js/clean.js | 656 -
lib/editor/atto/yui/src/editor/js/commands.js | 177 -
.../src/editor/js/editor-plugin-buttons.js | 975 --
.../src/editor/js/editor-plugin-dialogue.js | 108 -
.../atto/yui/src/editor/js/editor-plugin.js | 148 -
lib/editor/atto/yui/src/editor/js/editor.js | 535 -
.../atto/yui/src/editor/js/filepicker.js | 81 -
lib/editor/atto/yui/src/editor/js/menu.js | 348 -
lib/editor/atto/yui/src/editor/js/notify.js | 140 -
.../atto/yui/src/editor/js/selection.js | 424 -
lib/editor/atto/yui/src/editor/js/styling.js | 223 -
lib/editor/atto/yui/src/editor/js/textarea.js | 120 -
.../yui/src/editor/js/toolbar-keyboardnav.js | 209 -
lib/editor/atto/yui/src/editor/js/toolbar.js | 74 -
.../atto/yui/src/editor/meta/editor.json | 43 -
lib/editor/atto/yui/src/rangy/build.json | 21 -
lib/editor/atto/yui/src/rangy/js/init.js | 18 -
lib/editor/atto/yui/src/rangy/js/license.txt | 21 -
.../yui/src/rangy/js/rangy-classapplier.js | 1092 --
.../atto/yui/src/rangy/js/rangy-core.js | 3888 -----
.../yui/src/rangy/js/rangy-highlighter.js | 611 -
.../rangy/js/rangy-selectionsaverestore.js | 244 -
.../atto/yui/src/rangy/js/rangy-serializer.js | 306 -
.../atto/yui/src/rangy/js/rangy-textrange.js | 1922 ---
lib/editor/atto/yui/src/rangy/meta/rangy.json | 5 -
.../media/classes/form/manage_files_form.php | 2 +-
lib/plugins.json | 70 +-
version.php | 2 +-
494 files changed, 65 insertions(+), 147016 deletions(-)
create mode 100644 .upgradenotes/MDL-83282-2024112007284289.yml
delete mode 100644 lib/editor/atto/adminlib.php
delete mode 100644 lib/editor/atto/amd/build/events.min.js
delete mode 100644 lib/editor/atto/amd/build/events.min.js.map
delete mode 100644 lib/editor/atto/amd/src/events.js
delete mode 100644 lib/editor/atto/autosave-ajax.php
delete mode 100644 lib/editor/atto/classes/plugininfo/atto.php
delete mode 100644 lib/editor/atto/classes/privacy/provider.php
delete mode 100644 lib/editor/atto/classes/task/autosave_cleanup_task.php
delete mode 100644 lib/editor/atto/db/install.xml
delete mode 100644 lib/editor/atto/db/subplugins.json
delete mode 100644 lib/editor/atto/db/tasks.php
delete mode 100644 lib/editor/atto/db/upgrade.php
delete mode 100644 lib/editor/atto/lang/en/editor_atto.php
delete mode 100644 lib/editor/atto/lib.php
delete mode 100644 lib/editor/atto/pix/logo.png
delete mode 100644 lib/editor/atto/pix/logo.svg
delete mode 100644 lib/editor/atto/plugins/accessibilitychecker/classes/privacy/provider.php
delete mode 100644 lib/editor/atto/plugins/accessibilitychecker/lang/en/atto_accessibilitychecker.php
delete mode 100644 lib/editor/atto/plugins/accessibilitychecker/lib.php
delete mode 100644 lib/editor/atto/plugins/accessibilitychecker/styles.css
delete mode 100644 lib/editor/atto/plugins/accessibilitychecker/tests/behat/accessibilitychecker.feature
delete mode 100644 lib/editor/atto/plugins/accessibilitychecker/version.php
delete mode 100644 lib/editor/atto/plugins/accessibilitychecker/yui/build/moodle-atto_accessibilitychecker-button/moodle-atto_accessibilitychecker-button-debug.js
delete mode 100644 lib/editor/atto/plugins/accessibilitychecker/yui/build/moodle-atto_accessibilitychecker-button/moodle-atto_accessibilitychecker-button-min.js
delete mode 100644 lib/editor/atto/plugins/accessibilitychecker/yui/build/moodle-atto_accessibilitychecker-button/moodle-atto_accessibilitychecker-button.js
delete mode 100644 lib/editor/atto/plugins/accessibilitychecker/yui/src/button/build.json
delete mode 100644 lib/editor/atto/plugins/accessibilitychecker/yui/src/button/js/button.js
delete mode 100644 lib/editor/atto/plugins/accessibilitychecker/yui/src/button/meta/button.json
delete mode 100644 lib/editor/atto/plugins/accessibilityhelper/classes/privacy/provider.php
delete mode 100644 lib/editor/atto/plugins/accessibilityhelper/lang/en/atto_accessibilityhelper.php
delete mode 100644 lib/editor/atto/plugins/accessibilityhelper/lib.php
delete mode 100644 lib/editor/atto/plugins/accessibilityhelper/tests/behat/accessibilityhelper.feature
delete mode 100644 lib/editor/atto/plugins/accessibilityhelper/version.php
delete mode 100644 lib/editor/atto/plugins/accessibilityhelper/yui/build/moodle-atto_accessibilityhelper-button/moodle-atto_accessibilityhelper-button-debug.js
delete mode 100644 lib/editor/atto/plugins/accessibilityhelper/yui/build/moodle-atto_accessibilityhelper-button/moodle-atto_accessibilityhelper-button-min.js
delete mode 100644 lib/editor/atto/plugins/accessibilityhelper/yui/build/moodle-atto_accessibilityhelper-button/moodle-atto_accessibilityhelper-button.js
delete mode 100644 lib/editor/atto/plugins/accessibilityhelper/yui/src/button/build.json
delete mode 100644 lib/editor/atto/plugins/accessibilityhelper/yui/src/button/js/button.js
delete mode 100644 lib/editor/atto/plugins/accessibilityhelper/yui/src/button/meta/button.json
delete mode 100644 lib/editor/atto/plugins/align/classes/privacy/provider.php
delete mode 100644 lib/editor/atto/plugins/align/lang/en/atto_align.php
delete mode 100644 lib/editor/atto/plugins/align/lib.php
delete mode 100644 lib/editor/atto/plugins/align/tests/behat/align.feature
delete mode 100644 lib/editor/atto/plugins/align/version.php
delete mode 100644 lib/editor/atto/plugins/align/yui/build/moodle-atto_align-button/moodle-atto_align-button-debug.js
delete mode 100644 lib/editor/atto/plugins/align/yui/build/moodle-atto_align-button/moodle-atto_align-button-min.js
delete mode 100644 lib/editor/atto/plugins/align/yui/build/moodle-atto_align-button/moodle-atto_align-button.js
delete mode 100644 lib/editor/atto/plugins/align/yui/src/button/build.json
delete mode 100644 lib/editor/atto/plugins/align/yui/src/button/js/button.js
delete mode 100644 lib/editor/atto/plugins/align/yui/src/button/meta/button.json
delete mode 100644 lib/editor/atto/plugins/backcolor/classes/privacy/provider.php
delete mode 100644 lib/editor/atto/plugins/backcolor/lang/en/atto_backcolor.php
delete mode 100644 lib/editor/atto/plugins/backcolor/lib.php
delete mode 100644 lib/editor/atto/plugins/backcolor/styles.css
delete mode 100644 lib/editor/atto/plugins/backcolor/version.php
delete mode 100644 lib/editor/atto/plugins/backcolor/yui/build/moodle-atto_backcolor-button/moodle-atto_backcolor-button-debug.js
delete mode 100644 lib/editor/atto/plugins/backcolor/yui/build/moodle-atto_backcolor-button/moodle-atto_backcolor-button-min.js
delete mode 100644 lib/editor/atto/plugins/backcolor/yui/build/moodle-atto_backcolor-button/moodle-atto_backcolor-button.js
delete mode 100644 lib/editor/atto/plugins/backcolor/yui/src/button/build.json
delete mode 100644 lib/editor/atto/plugins/backcolor/yui/src/button/js/button.js
delete mode 100644 lib/editor/atto/plugins/backcolor/yui/src/button/meta/editor.js
delete mode 100644 lib/editor/atto/plugins/bold/classes/privacy/provider.php
delete mode 100644 lib/editor/atto/plugins/bold/lang/en/atto_bold.php
delete mode 100644 lib/editor/atto/plugins/bold/tests/behat/bold.feature
delete mode 100644 lib/editor/atto/plugins/bold/version.php
delete mode 100644 lib/editor/atto/plugins/bold/yui/build/moodle-atto_bold-button/moodle-atto_bold-button-debug.js
delete mode 100644 lib/editor/atto/plugins/bold/yui/build/moodle-atto_bold-button/moodle-atto_bold-button-min.js
delete mode 100644 lib/editor/atto/plugins/bold/yui/build/moodle-atto_bold-button/moodle-atto_bold-button.js
delete mode 100644 lib/editor/atto/plugins/bold/yui/src/button/build.json
delete mode 100644 lib/editor/atto/plugins/bold/yui/src/button/js/button.js
delete mode 100644 lib/editor/atto/plugins/bold/yui/src/button/meta/button.json
delete mode 100644 lib/editor/atto/plugins/charmap/classes/privacy/provider.php
delete mode 100644 lib/editor/atto/plugins/charmap/lang/en/atto_charmap.php
delete mode 100644 lib/editor/atto/plugins/charmap/lib.php
delete mode 100644 lib/editor/atto/plugins/charmap/styles.css
delete mode 100644 lib/editor/atto/plugins/charmap/tests/behat/charmap.feature
delete mode 100644 lib/editor/atto/plugins/charmap/version.php
delete mode 100644 lib/editor/atto/plugins/charmap/yui/build/moodle-atto_charmap-button/moodle-atto_charmap-button-debug.js
delete mode 100644 lib/editor/atto/plugins/charmap/yui/build/moodle-atto_charmap-button/moodle-atto_charmap-button-min.js
delete mode 100644 lib/editor/atto/plugins/charmap/yui/build/moodle-atto_charmap-button/moodle-atto_charmap-button.js
delete mode 100644 lib/editor/atto/plugins/charmap/yui/src/button/build.json
delete mode 100644 lib/editor/atto/plugins/charmap/yui/src/button/js/button.js
delete mode 100644 lib/editor/atto/plugins/charmap/yui/src/button/meta/button.json
delete mode 100644 lib/editor/atto/plugins/clear/classes/privacy/provider.php
delete mode 100644 lib/editor/atto/plugins/clear/lang/en/atto_clear.php
delete mode 100644 lib/editor/atto/plugins/clear/tests/behat/clear.feature
delete mode 100644 lib/editor/atto/plugins/clear/version.php
delete mode 100644 lib/editor/atto/plugins/clear/yui/build/moodle-atto_clear-button/moodle-atto_clear-button-debug.js
delete mode 100644 lib/editor/atto/plugins/clear/yui/build/moodle-atto_clear-button/moodle-atto_clear-button-min.js
delete mode 100644 lib/editor/atto/plugins/clear/yui/build/moodle-atto_clear-button/moodle-atto_clear-button.js
delete mode 100644 lib/editor/atto/plugins/clear/yui/src/button/build.json
delete mode 100644 lib/editor/atto/plugins/clear/yui/src/button/js/button.js
delete mode 100644 lib/editor/atto/plugins/clear/yui/src/button/meta/button.json
delete mode 100644 lib/editor/atto/plugins/collapse/classes/privacy/provider.php
delete mode 100644 lib/editor/atto/plugins/collapse/lang/en/atto_collapse.php
delete mode 100644 lib/editor/atto/plugins/collapse/lib.php
delete mode 100644 lib/editor/atto/plugins/collapse/pix/icon.svg
delete mode 100644 lib/editor/atto/plugins/collapse/settings.php
delete mode 100644 lib/editor/atto/plugins/collapse/styles.css
delete mode 100644 lib/editor/atto/plugins/collapse/tests/behat/collapse.feature
delete mode 100644 lib/editor/atto/plugins/collapse/version.php
delete mode 100644 lib/editor/atto/plugins/collapse/yui/build/moodle-atto_collapse-button/moodle-atto_collapse-button-debug.js
delete mode 100644 lib/editor/atto/plugins/collapse/yui/build/moodle-atto_collapse-button/moodle-atto_collapse-button-min.js
delete mode 100644 lib/editor/atto/plugins/collapse/yui/build/moodle-atto_collapse-button/moodle-atto_collapse-button.js
delete mode 100644 lib/editor/atto/plugins/collapse/yui/src/button/build.json
delete mode 100644 lib/editor/atto/plugins/collapse/yui/src/button/js/button.js
delete mode 100644 lib/editor/atto/plugins/collapse/yui/src/button/meta/button.json
delete mode 100644 lib/editor/atto/plugins/emojipicker/classes/privacy/provider.php
delete mode 100644 lib/editor/atto/plugins/emojipicker/lang/en/atto_emojipicker.php
delete mode 100644 lib/editor/atto/plugins/emojipicker/lib.php
delete mode 100644 lib/editor/atto/plugins/emojipicker/styles.css
delete mode 100644 lib/editor/atto/plugins/emojipicker/version.php
delete mode 100644 lib/editor/atto/plugins/emojipicker/yui/build/moodle-atto_emojipicker-button/moodle-atto_emojipicker-button-debug.js
delete mode 100644 lib/editor/atto/plugins/emojipicker/yui/build/moodle-atto_emojipicker-button/moodle-atto_emojipicker-button-min.js
delete mode 100644 lib/editor/atto/plugins/emojipicker/yui/build/moodle-atto_emojipicker-button/moodle-atto_emojipicker-button.js
delete mode 100644 lib/editor/atto/plugins/emojipicker/yui/src/button/build.json
delete mode 100644 lib/editor/atto/plugins/emojipicker/yui/src/button/js/button.js
delete mode 100644 lib/editor/atto/plugins/emojipicker/yui/src/button/meta/button.json
delete mode 100644 lib/editor/atto/plugins/emoticon/classes/privacy/provider.php
delete mode 100644 lib/editor/atto/plugins/emoticon/lang/en/atto_emoticon.php
delete mode 100644 lib/editor/atto/plugins/emoticon/lib.php
delete mode 100644 lib/editor/atto/plugins/emoticon/styles.css
delete mode 100644 lib/editor/atto/plugins/emoticon/version.php
delete mode 100644 lib/editor/atto/plugins/emoticon/yui/build/moodle-atto_emoticon-button/moodle-atto_emoticon-button-debug.js
delete mode 100644 lib/editor/atto/plugins/emoticon/yui/build/moodle-atto_emoticon-button/moodle-atto_emoticon-button-min.js
delete mode 100644 lib/editor/atto/plugins/emoticon/yui/build/moodle-atto_emoticon-button/moodle-atto_emoticon-button.js
delete mode 100644 lib/editor/atto/plugins/emoticon/yui/src/button/build.json
delete mode 100644 lib/editor/atto/plugins/emoticon/yui/src/button/js/button.js
delete mode 100644 lib/editor/atto/plugins/emoticon/yui/src/button/meta/button.json
delete mode 100644 lib/editor/atto/plugins/equation/ajax.php
delete mode 100644 lib/editor/atto/plugins/equation/classes/privacy/provider.php
delete mode 100644 lib/editor/atto/plugins/equation/db/upgrade.php
delete mode 100644 lib/editor/atto/plugins/equation/lang/en/atto_equation.php
delete mode 100644 lib/editor/atto/plugins/equation/lib.php
delete mode 100644 lib/editor/atto/plugins/equation/settings.php
delete mode 100644 lib/editor/atto/plugins/equation/styles.css
delete mode 100644 lib/editor/atto/plugins/equation/tests/behat/equation.feature
delete mode 100644 lib/editor/atto/plugins/equation/version.php
delete mode 100644 lib/editor/atto/plugins/equation/yui/build/moodle-atto_equation-button/moodle-atto_equation-button-debug.js
delete mode 100644 lib/editor/atto/plugins/equation/yui/build/moodle-atto_equation-button/moodle-atto_equation-button-min.js
delete mode 100644 lib/editor/atto/plugins/equation/yui/build/moodle-atto_equation-button/moodle-atto_equation-button.js
delete mode 100644 lib/editor/atto/plugins/equation/yui/src/button/build.json
delete mode 100644 lib/editor/atto/plugins/equation/yui/src/button/js/button.js
delete mode 100644 lib/editor/atto/plugins/equation/yui/src/button/meta/button.json
delete mode 100644 lib/editor/atto/plugins/fontcolor/classes/privacy/provider.php
delete mode 100644 lib/editor/atto/plugins/fontcolor/lang/en/atto_fontcolor.php
delete mode 100644 lib/editor/atto/plugins/fontcolor/lib.php
delete mode 100644 lib/editor/atto/plugins/fontcolor/styles.css
delete mode 100644 lib/editor/atto/plugins/fontcolor/version.php
delete mode 100644 lib/editor/atto/plugins/fontcolor/yui/build/moodle-atto_fontcolor-button/moodle-atto_fontcolor-button-debug.js
delete mode 100644 lib/editor/atto/plugins/fontcolor/yui/build/moodle-atto_fontcolor-button/moodle-atto_fontcolor-button-min.js
delete mode 100644 lib/editor/atto/plugins/fontcolor/yui/build/moodle-atto_fontcolor-button/moodle-atto_fontcolor-button.js
delete mode 100644 lib/editor/atto/plugins/fontcolor/yui/src/button/build.json
delete mode 100644 lib/editor/atto/plugins/fontcolor/yui/src/button/js/button.js
delete mode 100644 lib/editor/atto/plugins/fontcolor/yui/src/button/meta/editor.js
delete mode 100644 lib/editor/atto/plugins/h5p/classes/privacy/provider.php
delete mode 100644 lib/editor/atto/plugins/h5p/db/access.php
delete mode 100644 lib/editor/atto/plugins/h5p/lang/en/atto_h5p.php
delete mode 100644 lib/editor/atto/plugins/h5p/lib.php
delete mode 100644 lib/editor/atto/plugins/h5p/pix/icon-white.png
delete mode 100644 lib/editor/atto/plugins/h5p/pix/icon-white.svg
delete mode 100644 lib/editor/atto/plugins/h5p/pix/icon.png
delete mode 100644 lib/editor/atto/plugins/h5p/pix/icon.svg
delete mode 100644 lib/editor/atto/plugins/h5p/styles.css
delete mode 100644 lib/editor/atto/plugins/h5p/tests/behat/h5p.feature
delete mode 100644 lib/editor/atto/plugins/h5p/version.php
delete mode 100644 lib/editor/atto/plugins/h5p/yui/build/moodle-atto_h5p-button/moodle-atto_h5p-button-debug.js
delete mode 100644 lib/editor/atto/plugins/h5p/yui/build/moodle-atto_h5p-button/moodle-atto_h5p-button-min.js
delete mode 100644 lib/editor/atto/plugins/h5p/yui/build/moodle-atto_h5p-button/moodle-atto_h5p-button.js
delete mode 100644 lib/editor/atto/plugins/h5p/yui/src/button/build.json
delete mode 100644 lib/editor/atto/plugins/h5p/yui/src/button/js/button.js
delete mode 100644 lib/editor/atto/plugins/h5p/yui/src/button/meta/button.json
delete mode 100644 lib/editor/atto/plugins/html/classes/privacy/provider.php
delete mode 100644 lib/editor/atto/plugins/html/lang/en/atto_html.php
delete mode 100644 lib/editor/atto/plugins/html/styles.css
delete mode 100644 lib/editor/atto/plugins/html/tests/behat/html.feature
delete mode 100644 lib/editor/atto/plugins/html/thirdpartylibs.xml
delete mode 100644 lib/editor/atto/plugins/html/version.php
delete mode 100644 lib/editor/atto/plugins/html/yui/build/moodle-atto_html-beautify/moodle-atto_html-beautify-debug.js
delete mode 100644 lib/editor/atto/plugins/html/yui/build/moodle-atto_html-beautify/moodle-atto_html-beautify-min.js
delete mode 100644 lib/editor/atto/plugins/html/yui/build/moodle-atto_html-beautify/moodle-atto_html-beautify.js
delete mode 100644 lib/editor/atto/plugins/html/yui/build/moodle-atto_html-button/moodle-atto_html-button-debug.js
delete mode 100644 lib/editor/atto/plugins/html/yui/build/moodle-atto_html-button/moodle-atto_html-button-min.js
delete mode 100644 lib/editor/atto/plugins/html/yui/build/moodle-atto_html-button/moodle-atto_html-button.js
delete mode 100644 lib/editor/atto/plugins/html/yui/build/moodle-atto_html-codemirror/assets/moodle-atto_html-codemirror-core.css
delete mode 100644 lib/editor/atto/plugins/html/yui/build/moodle-atto_html-codemirror/assets/skins/sam/moodle-atto_html-codemirror-skin.css
delete mode 100644 lib/editor/atto/plugins/html/yui/build/moodle-atto_html-codemirror/assets/skins/sam/moodle-atto_html-codemirror.css
delete mode 100644 lib/editor/atto/plugins/html/yui/build/moodle-atto_html-codemirror/moodle-atto_html-codemirror-debug.js
delete mode 100644 lib/editor/atto/plugins/html/yui/build/moodle-atto_html-codemirror/moodle-atto_html-codemirror-min.js
delete mode 100644 lib/editor/atto/plugins/html/yui/build/moodle-atto_html-codemirror/moodle-atto_html-codemirror.js
delete mode 100644 lib/editor/atto/plugins/html/yui/src/beautify/LICENSE
delete mode 100644 lib/editor/atto/plugins/html/yui/src/beautify/build.json
delete mode 100644 lib/editor/atto/plugins/html/yui/src/beautify/js/beautify-css.js
delete mode 100644 lib/editor/atto/plugins/html/yui/src/beautify/js/beautify-html.js
delete mode 100644 lib/editor/atto/plugins/html/yui/src/beautify/js/beautify.js
delete mode 100644 lib/editor/atto/plugins/html/yui/src/beautify/js/wrapper.js
delete mode 100644 lib/editor/atto/plugins/html/yui/src/beautify/meta/beautify.json
delete mode 100644 lib/editor/atto/plugins/html/yui/src/beautify/readme_moodle.txt
delete mode 100644 lib/editor/atto/plugins/html/yui/src/button/build.json
delete mode 100644 lib/editor/atto/plugins/html/yui/src/button/js/button.js
delete mode 100644 lib/editor/atto/plugins/html/yui/src/button/meta/button.json
delete mode 100644 lib/editor/atto/plugins/html/yui/src/codemirror/LICENSE
delete mode 100644 lib/editor/atto/plugins/html/yui/src/codemirror/assets/moodle-atto_html-codemirror-core.css
delete mode 100644 lib/editor/atto/plugins/html/yui/src/codemirror/assets/skins/sam/moodle-atto_html-codemirror-skin.css
delete mode 100644 lib/editor/atto/plugins/html/yui/src/codemirror/build.json
delete mode 100644 lib/editor/atto/plugins/html/yui/src/codemirror/js/codemirror.js
delete mode 100644 lib/editor/atto/plugins/html/yui/src/codemirror/js/css.js
delete mode 100644 lib/editor/atto/plugins/html/yui/src/codemirror/js/htmlmixed.js
delete mode 100644 lib/editor/atto/plugins/html/yui/src/codemirror/js/javascript.js
delete mode 100644 lib/editor/atto/plugins/html/yui/src/codemirror/js/wrapper-end.js
delete mode 100644 lib/editor/atto/plugins/html/yui/src/codemirror/js/wrapper-mid.js
delete mode 100644 lib/editor/atto/plugins/html/yui/src/codemirror/js/wrapper.js
delete mode 100644 lib/editor/atto/plugins/html/yui/src/codemirror/js/xml.js
delete mode 100644 lib/editor/atto/plugins/html/yui/src/codemirror/meta/codemirror.json
delete mode 100644 lib/editor/atto/plugins/html/yui/src/codemirror/readme_moodle.txt
delete mode 100644 lib/editor/atto/plugins/image/classes/privacy/provider.php
delete mode 100644 lib/editor/atto/plugins/image/lang/en/atto_image.php
delete mode 100644 lib/editor/atto/plugins/image/lib.php
delete mode 100644 lib/editor/atto/plugins/image/styles.css
delete mode 100644 lib/editor/atto/plugins/image/tests/behat/image.feature
delete mode 100644 lib/editor/atto/plugins/image/version.php
delete mode 100644 lib/editor/atto/plugins/image/yui/build/moodle-atto_image-button/moodle-atto_image-button-debug.js
delete mode 100644 lib/editor/atto/plugins/image/yui/build/moodle-atto_image-button/moodle-atto_image-button-min.js
delete mode 100644 lib/editor/atto/plugins/image/yui/build/moodle-atto_image-button/moodle-atto_image-button.js
delete mode 100644 lib/editor/atto/plugins/image/yui/src/button/build.json
delete mode 100644 lib/editor/atto/plugins/image/yui/src/button/js/button.js
delete mode 100644 lib/editor/atto/plugins/image/yui/src/button/meta/button.json
delete mode 100644 lib/editor/atto/plugins/indent/classes/privacy/provider.php
delete mode 100644 lib/editor/atto/plugins/indent/lang/en/atto_indent.php
delete mode 100644 lib/editor/atto/plugins/indent/lib.php
delete mode 100644 lib/editor/atto/plugins/indent/tests/behat/indent.feature
delete mode 100644 lib/editor/atto/plugins/indent/version.php
delete mode 100644 lib/editor/atto/plugins/indent/yui/build/moodle-atto_indent-button/moodle-atto_indent-button-debug.js
delete mode 100644 lib/editor/atto/plugins/indent/yui/build/moodle-atto_indent-button/moodle-atto_indent-button-min.js
delete mode 100644 lib/editor/atto/plugins/indent/yui/build/moodle-atto_indent-button/moodle-atto_indent-button.js
delete mode 100644 lib/editor/atto/plugins/indent/yui/src/button/build.json
delete mode 100644 lib/editor/atto/plugins/indent/yui/src/button/js/button.js
delete mode 100644 lib/editor/atto/plugins/indent/yui/src/button/meta/button.json
delete mode 100644 lib/editor/atto/plugins/italic/classes/privacy/provider.php
delete mode 100644 lib/editor/atto/plugins/italic/lang/en/atto_italic.php
delete mode 100644 lib/editor/atto/plugins/italic/tests/behat/italic.feature
delete mode 100644 lib/editor/atto/plugins/italic/version.php
delete mode 100644 lib/editor/atto/plugins/italic/yui/build/moodle-atto_italic-button/moodle-atto_italic-button-debug.js
delete mode 100644 lib/editor/atto/plugins/italic/yui/build/moodle-atto_italic-button/moodle-atto_italic-button-min.js
delete mode 100644 lib/editor/atto/plugins/italic/yui/build/moodle-atto_italic-button/moodle-atto_italic-button.js
delete mode 100644 lib/editor/atto/plugins/italic/yui/src/button/build.json
delete mode 100644 lib/editor/atto/plugins/italic/yui/src/button/js/button.js
delete mode 100644 lib/editor/atto/plugins/italic/yui/src/button/meta/button.json
delete mode 100644 lib/editor/atto/plugins/link/classes/privacy/provider.php
delete mode 100644 lib/editor/atto/plugins/link/lang/en/atto_link.php
delete mode 100644 lib/editor/atto/plugins/link/lib.php
delete mode 100644 lib/editor/atto/plugins/link/tests/behat/link.feature
delete mode 100644 lib/editor/atto/plugins/link/version.php
delete mode 100644 lib/editor/atto/plugins/link/yui/build/moodle-atto_link-button/moodle-atto_link-button-debug.js
delete mode 100644 lib/editor/atto/plugins/link/yui/build/moodle-atto_link-button/moodle-atto_link-button-min.js
delete mode 100644 lib/editor/atto/plugins/link/yui/build/moodle-atto_link-button/moodle-atto_link-button.js
delete mode 100644 lib/editor/atto/plugins/link/yui/src/button/build.json
delete mode 100644 lib/editor/atto/plugins/link/yui/src/button/js/button.js
delete mode 100644 lib/editor/atto/plugins/link/yui/src/button/meta/button.json
delete mode 100644 lib/editor/atto/plugins/managefiles/classes/privacy/provider.php
delete mode 100644 lib/editor/atto/plugins/managefiles/lang/en/atto_managefiles.php
delete mode 100644 lib/editor/atto/plugins/managefiles/lib.php
delete mode 100644 lib/editor/atto/plugins/managefiles/manage.php
delete mode 100644 lib/editor/atto/plugins/managefiles/manage_form.php
delete mode 100644 lib/editor/atto/plugins/managefiles/styles.css
delete mode 100644 lib/editor/atto/plugins/managefiles/version.php
delete mode 100644 lib/editor/atto/plugins/managefiles/yui/build/moodle-atto_managefiles-button/moodle-atto_managefiles-button-debug.js
delete mode 100644 lib/editor/atto/plugins/managefiles/yui/build/moodle-atto_managefiles-button/moodle-atto_managefiles-button-min.js
delete mode 100644 lib/editor/atto/plugins/managefiles/yui/build/moodle-atto_managefiles-button/moodle-atto_managefiles-button.js
delete mode 100644 lib/editor/atto/plugins/managefiles/yui/build/moodle-atto_managefiles-usedfiles/moodle-atto_managefiles-usedfiles-debug.js
delete mode 100644 lib/editor/atto/plugins/managefiles/yui/build/moodle-atto_managefiles-usedfiles/moodle-atto_managefiles-usedfiles-min.js
delete mode 100644 lib/editor/atto/plugins/managefiles/yui/build/moodle-atto_managefiles-usedfiles/moodle-atto_managefiles-usedfiles.js
delete mode 100644 lib/editor/atto/plugins/managefiles/yui/src/button/build.json
delete mode 100644 lib/editor/atto/plugins/managefiles/yui/src/button/js/button.js
delete mode 100644 lib/editor/atto/plugins/managefiles/yui/src/button/meta/button.json
delete mode 100644 lib/editor/atto/plugins/managefiles/yui/src/usedfiles/build.json
delete mode 100644 lib/editor/atto/plugins/managefiles/yui/src/usedfiles/js/usedfiles.js
delete mode 100644 lib/editor/atto/plugins/managefiles/yui/src/usedfiles/meta/usedfiles.json
delete mode 100644 lib/editor/atto/plugins/media/classes/privacy/provider.php
delete mode 100644 lib/editor/atto/plugins/media/lang/en/atto_media.php
delete mode 100644 lib/editor/atto/plugins/media/lib.php
delete mode 100644 lib/editor/atto/plugins/media/styles.css
delete mode 100644 lib/editor/atto/plugins/media/styles_clean.css
delete mode 100644 lib/editor/atto/plugins/media/tests/behat/media.feature
delete mode 100644 lib/editor/atto/plugins/media/version.php
delete mode 100644 lib/editor/atto/plugins/media/yui/build/moodle-atto_media-button/moodle-atto_media-button-debug.js
delete mode 100644 lib/editor/atto/plugins/media/yui/build/moodle-atto_media-button/moodle-atto_media-button-min.js
delete mode 100644 lib/editor/atto/plugins/media/yui/build/moodle-atto_media-button/moodle-atto_media-button.js
delete mode 100644 lib/editor/atto/plugins/media/yui/src/button/build.json
delete mode 100644 lib/editor/atto/plugins/media/yui/src/button/js/button.js
delete mode 100644 lib/editor/atto/plugins/media/yui/src/button/meta/button.json
delete mode 100644 lib/editor/atto/plugins/noautolink/classes/privacy/provider.php
delete mode 100644 lib/editor/atto/plugins/noautolink/lang/en/atto_noautolink.php
delete mode 100644 lib/editor/atto/plugins/noautolink/version.php
delete mode 100644 lib/editor/atto/plugins/noautolink/yui/build/moodle-atto_noautolink-button/moodle-atto_noautolink-button-debug.js
delete mode 100644 lib/editor/atto/plugins/noautolink/yui/build/moodle-atto_noautolink-button/moodle-atto_noautolink-button-min.js
delete mode 100644 lib/editor/atto/plugins/noautolink/yui/build/moodle-atto_noautolink-button/moodle-atto_noautolink-button.js
delete mode 100644 lib/editor/atto/plugins/noautolink/yui/src/button/build.json
delete mode 100644 lib/editor/atto/plugins/noautolink/yui/src/button/js/button.js
delete mode 100644 lib/editor/atto/plugins/noautolink/yui/src/button/meta/button.json
delete mode 100644 lib/editor/atto/plugins/orderedlist/classes/privacy/provider.php
delete mode 100644 lib/editor/atto/plugins/orderedlist/lang/en/atto_orderedlist.php
delete mode 100644 lib/editor/atto/plugins/orderedlist/tests/behat/orderedlist.feature
delete mode 100644 lib/editor/atto/plugins/orderedlist/version.php
delete mode 100644 lib/editor/atto/plugins/orderedlist/yui/build/moodle-atto_orderedlist-button/moodle-atto_orderedlist-button-debug.js
delete mode 100644 lib/editor/atto/plugins/orderedlist/yui/build/moodle-atto_orderedlist-button/moodle-atto_orderedlist-button-min.js
delete mode 100644 lib/editor/atto/plugins/orderedlist/yui/build/moodle-atto_orderedlist-button/moodle-atto_orderedlist-button.js
delete mode 100644 lib/editor/atto/plugins/orderedlist/yui/src/button/build.json
delete mode 100644 lib/editor/atto/plugins/orderedlist/yui/src/button/js/button.js
delete mode 100644 lib/editor/atto/plugins/orderedlist/yui/src/button/meta/button.json
delete mode 100644 lib/editor/atto/plugins/recordrtc/classes/privacy/provider.php
delete mode 100644 lib/editor/atto/plugins/recordrtc/db/access.php
delete mode 100644 lib/editor/atto/plugins/recordrtc/db/upgrade.php
delete mode 100644 lib/editor/atto/plugins/recordrtc/lang/en/atto_recordrtc.php
delete mode 100644 lib/editor/atto/plugins/recordrtc/lib.php
delete mode 100644 lib/editor/atto/plugins/recordrtc/pix/i/audiortc.svg
delete mode 100644 lib/editor/atto/plugins/recordrtc/pix/i/videortc.svg
delete mode 100644 lib/editor/atto/plugins/recordrtc/pix/icon.png
delete mode 100644 lib/editor/atto/plugins/recordrtc/settings.php
delete mode 100644 lib/editor/atto/plugins/recordrtc/styles.css
delete mode 100644 lib/editor/atto/plugins/recordrtc/version.php
delete mode 100644 lib/editor/atto/plugins/recordrtc/yui/build/moodle-atto_recordrtc-button/moodle-atto_recordrtc-button-debug.js
delete mode 100644 lib/editor/atto/plugins/recordrtc/yui/build/moodle-atto_recordrtc-button/moodle-atto_recordrtc-button-min.js
delete mode 100644 lib/editor/atto/plugins/recordrtc/yui/build/moodle-atto_recordrtc-button/moodle-atto_recordrtc-button.js
delete mode 100644 lib/editor/atto/plugins/recordrtc/yui/build/moodle-atto_recordrtc-recording/moodle-atto_recordrtc-recording-debug.js
delete mode 100644 lib/editor/atto/plugins/recordrtc/yui/build/moodle-atto_recordrtc-recording/moodle-atto_recordrtc-recording-min.js
delete mode 100644 lib/editor/atto/plugins/recordrtc/yui/build/moodle-atto_recordrtc-recording/moodle-atto_recordrtc-recording.js
delete mode 100644 lib/editor/atto/plugins/recordrtc/yui/src/button/build.json
delete mode 100644 lib/editor/atto/plugins/recordrtc/yui/src/button/js/button.js
delete mode 100644 lib/editor/atto/plugins/recordrtc/yui/src/button/meta/button.json
delete mode 100644 lib/editor/atto/plugins/recordrtc/yui/src/recording/build.json
delete mode 100644 lib/editor/atto/plugins/recordrtc/yui/src/recording/js/abstractmodule.js
delete mode 100644 lib/editor/atto/plugins/recordrtc/yui/src/recording/js/audiomodule.js
delete mode 100644 lib/editor/atto/plugins/recordrtc/yui/src/recording/js/commonmodule.js
delete mode 100644 lib/editor/atto/plugins/recordrtc/yui/src/recording/js/compatcheckmodule.js
delete mode 100644 lib/editor/atto/plugins/recordrtc/yui/src/recording/js/videomodule.js
delete mode 100644 lib/editor/atto/plugins/recordrtc/yui/src/recording/meta/recording.json
delete mode 100644 lib/editor/atto/plugins/rtl/classes/privacy/provider.php
delete mode 100644 lib/editor/atto/plugins/rtl/lang/en/atto_rtl.php
delete mode 100644 lib/editor/atto/plugins/rtl/lib.php
delete mode 100644 lib/editor/atto/plugins/rtl/version.php
delete mode 100644 lib/editor/atto/plugins/rtl/yui/build/moodle-atto_rtl-button/moodle-atto_rtl-button-debug.js
delete mode 100644 lib/editor/atto/plugins/rtl/yui/build/moodle-atto_rtl-button/moodle-atto_rtl-button-min.js
delete mode 100644 lib/editor/atto/plugins/rtl/yui/build/moodle-atto_rtl-button/moodle-atto_rtl-button.js
delete mode 100644 lib/editor/atto/plugins/rtl/yui/src/button/build.json
delete mode 100644 lib/editor/atto/plugins/rtl/yui/src/button/js/button.js
delete mode 100644 lib/editor/atto/plugins/rtl/yui/src/button/meta/button.json
delete mode 100644 lib/editor/atto/plugins/strike/classes/privacy/provider.php
delete mode 100644 lib/editor/atto/plugins/strike/lang/en/atto_strike.php
delete mode 100644 lib/editor/atto/plugins/strike/tests/behat/strike.feature
delete mode 100644 lib/editor/atto/plugins/strike/version.php
delete mode 100644 lib/editor/atto/plugins/strike/yui/build/moodle-atto_strike-button/moodle-atto_strike-button-debug.js
delete mode 100644 lib/editor/atto/plugins/strike/yui/build/moodle-atto_strike-button/moodle-atto_strike-button-min.js
delete mode 100644 lib/editor/atto/plugins/strike/yui/build/moodle-atto_strike-button/moodle-atto_strike-button.js
delete mode 100644 lib/editor/atto/plugins/strike/yui/src/button/build.json
delete mode 100644 lib/editor/atto/plugins/strike/yui/src/button/js/button.js
delete mode 100644 lib/editor/atto/plugins/strike/yui/src/button/meta/button.json
delete mode 100644 lib/editor/atto/plugins/subscript/classes/privacy/provider.php
delete mode 100644 lib/editor/atto/plugins/subscript/lang/en/atto_subscript.php
delete mode 100644 lib/editor/atto/plugins/subscript/tests/behat/subscript.feature
delete mode 100644 lib/editor/atto/plugins/subscript/version.php
delete mode 100644 lib/editor/atto/plugins/subscript/yui/build/moodle-atto_subscript-button/moodle-atto_subscript-button-debug.js
delete mode 100644 lib/editor/atto/plugins/subscript/yui/build/moodle-atto_subscript-button/moodle-atto_subscript-button-min.js
delete mode 100644 lib/editor/atto/plugins/subscript/yui/build/moodle-atto_subscript-button/moodle-atto_subscript-button.js
delete mode 100644 lib/editor/atto/plugins/subscript/yui/src/button/build.json
delete mode 100644 lib/editor/atto/plugins/subscript/yui/src/button/js/button.js
delete mode 100644 lib/editor/atto/plugins/subscript/yui/src/button/meta/button.json
delete mode 100644 lib/editor/atto/plugins/superscript/classes/privacy/provider.php
delete mode 100644 lib/editor/atto/plugins/superscript/lang/en/atto_superscript.php
delete mode 100644 lib/editor/atto/plugins/superscript/tests/behat/superscript.feature
delete mode 100644 lib/editor/atto/plugins/superscript/version.php
delete mode 100644 lib/editor/atto/plugins/superscript/yui/build/moodle-atto_superscript-button/moodle-atto_superscript-button-debug.js
delete mode 100644 lib/editor/atto/plugins/superscript/yui/build/moodle-atto_superscript-button/moodle-atto_superscript-button-min.js
delete mode 100644 lib/editor/atto/plugins/superscript/yui/build/moodle-atto_superscript-button/moodle-atto_superscript-button.js
delete mode 100644 lib/editor/atto/plugins/superscript/yui/src/button/build.json
delete mode 100644 lib/editor/atto/plugins/superscript/yui/src/button/js/button.js
delete mode 100644 lib/editor/atto/plugins/superscript/yui/src/button/meta/button.json
delete mode 100644 lib/editor/atto/plugins/table/classes/privacy/provider.php
delete mode 100644 lib/editor/atto/plugins/table/lang/en/atto_table.php
delete mode 100644 lib/editor/atto/plugins/table/lib.php
delete mode 100644 lib/editor/atto/plugins/table/settings.php
delete mode 100644 lib/editor/atto/plugins/table/styles.css
delete mode 100644 lib/editor/atto/plugins/table/tests/behat/table.feature
delete mode 100644 lib/editor/atto/plugins/table/version.php
delete mode 100644 lib/editor/atto/plugins/table/yui/build/moodle-atto_table-button/moodle-atto_table-button-debug.js
delete mode 100644 lib/editor/atto/plugins/table/yui/build/moodle-atto_table-button/moodle-atto_table-button-min.js
delete mode 100644 lib/editor/atto/plugins/table/yui/build/moodle-atto_table-button/moodle-atto_table-button.js
delete mode 100644 lib/editor/atto/plugins/table/yui/src/button/build.json
delete mode 100644 lib/editor/atto/plugins/table/yui/src/button/js/button.js
delete mode 100644 lib/editor/atto/plugins/table/yui/src/button/meta/button.json
delete mode 100644 lib/editor/atto/plugins/title/classes/privacy/provider.php
delete mode 100644 lib/editor/atto/plugins/title/lang/en/atto_title.php
delete mode 100644 lib/editor/atto/plugins/title/lib.php
delete mode 100644 lib/editor/atto/plugins/title/tests/behat/title.feature
delete mode 100644 lib/editor/atto/plugins/title/version.php
delete mode 100644 lib/editor/atto/plugins/title/yui/build/moodle-atto_title-button/moodle-atto_title-button-debug.js
delete mode 100644 lib/editor/atto/plugins/title/yui/build/moodle-atto_title-button/moodle-atto_title-button-min.js
delete mode 100644 lib/editor/atto/plugins/title/yui/build/moodle-atto_title-button/moodle-atto_title-button.js
delete mode 100644 lib/editor/atto/plugins/title/yui/src/button/build.json
delete mode 100644 lib/editor/atto/plugins/title/yui/src/button/js/button.js
delete mode 100644 lib/editor/atto/plugins/title/yui/src/button/meta/button.json
delete mode 100644 lib/editor/atto/plugins/underline/classes/privacy/provider.php
delete mode 100644 lib/editor/atto/plugins/underline/lang/en/atto_underline.php
delete mode 100644 lib/editor/atto/plugins/underline/tests/behat/underline.feature
delete mode 100644 lib/editor/atto/plugins/underline/version.php
delete mode 100644 lib/editor/atto/plugins/underline/yui/build/moodle-atto_underline-button/moodle-atto_underline-button-debug.js
delete mode 100644 lib/editor/atto/plugins/underline/yui/build/moodle-atto_underline-button/moodle-atto_underline-button-min.js
delete mode 100644 lib/editor/atto/plugins/underline/yui/build/moodle-atto_underline-button/moodle-atto_underline-button.js
delete mode 100644 lib/editor/atto/plugins/underline/yui/src/button/build.json
delete mode 100644 lib/editor/atto/plugins/underline/yui/src/button/js/button.js
delete mode 100644 lib/editor/atto/plugins/underline/yui/src/button/meta/button.json
delete mode 100644 lib/editor/atto/plugins/undo/classes/privacy/provider.php
delete mode 100644 lib/editor/atto/plugins/undo/lang/en/atto_undo.php
delete mode 100644 lib/editor/atto/plugins/undo/lib.php
delete mode 100644 lib/editor/atto/plugins/undo/version.php
delete mode 100644 lib/editor/atto/plugins/undo/yui/build/moodle-atto_undo-button/moodle-atto_undo-button-debug.js
delete mode 100644 lib/editor/atto/plugins/undo/yui/build/moodle-atto_undo-button/moodle-atto_undo-button-min.js
delete mode 100644 lib/editor/atto/plugins/undo/yui/build/moodle-atto_undo-button/moodle-atto_undo-button.js
delete mode 100644 lib/editor/atto/plugins/undo/yui/src/button/build.json
delete mode 100644 lib/editor/atto/plugins/undo/yui/src/button/js/button.js
delete mode 100644 lib/editor/atto/plugins/undo/yui/src/button/meta/button.json
delete mode 100644 lib/editor/atto/plugins/unorderedlist/classes/privacy/provider.php
delete mode 100644 lib/editor/atto/plugins/unorderedlist/lang/en/atto_unorderedlist.php
delete mode 100644 lib/editor/atto/plugins/unorderedlist/tests/behat/unorderedlist.feature
delete mode 100644 lib/editor/atto/plugins/unorderedlist/version.php
delete mode 100644 lib/editor/atto/plugins/unorderedlist/yui/build/moodle-atto_unorderedlist-button/moodle-atto_unorderedlist-button-debug.js
delete mode 100644 lib/editor/atto/plugins/unorderedlist/yui/build/moodle-atto_unorderedlist-button/moodle-atto_unorderedlist-button-min.js
delete mode 100644 lib/editor/atto/plugins/unorderedlist/yui/build/moodle-atto_unorderedlist-button/moodle-atto_unorderedlist-button.js
delete mode 100644 lib/editor/atto/plugins/unorderedlist/yui/src/button/build.json
delete mode 100644 lib/editor/atto/plugins/unorderedlist/yui/src/button/js/button.js
delete mode 100644 lib/editor/atto/plugins/unorderedlist/yui/src/button/meta/button.json
delete mode 100644 lib/editor/atto/readme_moodle.txt
delete mode 100644 lib/editor/atto/settings.php
delete mode 100644 lib/editor/atto/tests/behat/autosave.feature
delete mode 100644 lib/editor/atto/tests/behat/behat_editor_atto.php
delete mode 100644 lib/editor/atto/tests/behat/clean.feature
delete mode 100644 lib/editor/atto/tests/behat/customtoolbar.feature
delete mode 100644 lib/editor/atto/tests/behat/direction.feature
delete mode 100644 lib/editor/atto/tests/behat/disablecontrol.feature
delete mode 100644 lib/editor/atto/tests/fixtures/custom_toolbar_example.php
delete mode 100644 lib/editor/atto/tests/fixtures/moodle-logo.mp4
delete mode 100644 lib/editor/atto/tests/fixtures/moodle-logo.png
delete mode 100644 lib/editor/atto/tests/fixtures/moodle-logo.webm
delete mode 100644 lib/editor/atto/tests/fixtures/pretty-good-en.vtt
delete mode 100644 lib/editor/atto/tests/fixtures/pretty-good-sv.vtt
delete mode 100644 lib/editor/atto/tests/privacy/provider_test.php
delete mode 100644 lib/editor/atto/thirdpartylibs.xml
delete mode 100644 lib/editor/atto/upgrade.txt
delete mode 100644 lib/editor/atto/version.php
delete mode 100644 lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-debug.js
delete mode 100644 lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-min.js
delete mode 100644 lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor.js
delete mode 100644 lib/editor/atto/yui/build/moodle-editor_atto-menu/moodle-editor_atto-menu-debug.js
delete mode 100644 lib/editor/atto/yui/build/moodle-editor_atto-menu/moodle-editor_atto-menu-min.js
delete mode 100644 lib/editor/atto/yui/build/moodle-editor_atto-menu/moodle-editor_atto-menu.js
delete mode 100644 lib/editor/atto/yui/build/moodle-editor_atto-plugin/moodle-editor_atto-plugin-debug.js
delete mode 100644 lib/editor/atto/yui/build/moodle-editor_atto-plugin/moodle-editor_atto-plugin-min.js
delete mode 100644 lib/editor/atto/yui/build/moodle-editor_atto-plugin/moodle-editor_atto-plugin.js
delete mode 100644 lib/editor/atto/yui/build/moodle-editor_atto-rangy/moodle-editor_atto-rangy-debug.js
delete mode 100644 lib/editor/atto/yui/build/moodle-editor_atto-rangy/moodle-editor_atto-rangy-min.js
delete mode 100644 lib/editor/atto/yui/build/moodle-editor_atto-rangy/moodle-editor_atto-rangy.js
delete mode 100644 lib/editor/atto/yui/src/editor/build.json
delete mode 100644 lib/editor/atto/yui/src/editor/js/autosave-io.js
delete mode 100644 lib/editor/atto/yui/src/editor/js/autosave.js
delete mode 100644 lib/editor/atto/yui/src/editor/js/clean.js
delete mode 100644 lib/editor/atto/yui/src/editor/js/commands.js
delete mode 100644 lib/editor/atto/yui/src/editor/js/editor-plugin-buttons.js
delete mode 100644 lib/editor/atto/yui/src/editor/js/editor-plugin-dialogue.js
delete mode 100644 lib/editor/atto/yui/src/editor/js/editor-plugin.js
delete mode 100644 lib/editor/atto/yui/src/editor/js/editor.js
delete mode 100644 lib/editor/atto/yui/src/editor/js/filepicker.js
delete mode 100644 lib/editor/atto/yui/src/editor/js/menu.js
delete mode 100644 lib/editor/atto/yui/src/editor/js/notify.js
delete mode 100644 lib/editor/atto/yui/src/editor/js/selection.js
delete mode 100644 lib/editor/atto/yui/src/editor/js/styling.js
delete mode 100644 lib/editor/atto/yui/src/editor/js/textarea.js
delete mode 100644 lib/editor/atto/yui/src/editor/js/toolbar-keyboardnav.js
delete mode 100644 lib/editor/atto/yui/src/editor/js/toolbar.js
delete mode 100644 lib/editor/atto/yui/src/editor/meta/editor.json
delete mode 100644 lib/editor/atto/yui/src/rangy/build.json
delete mode 100644 lib/editor/atto/yui/src/rangy/js/init.js
delete mode 100644 lib/editor/atto/yui/src/rangy/js/license.txt
delete mode 100644 lib/editor/atto/yui/src/rangy/js/rangy-classapplier.js
delete mode 100644 lib/editor/atto/yui/src/rangy/js/rangy-core.js
delete mode 100644 lib/editor/atto/yui/src/rangy/js/rangy-highlighter.js
delete mode 100644 lib/editor/atto/yui/src/rangy/js/rangy-selectionsaverestore.js
delete mode 100644 lib/editor/atto/yui/src/rangy/js/rangy-serializer.js
delete mode 100644 lib/editor/atto/yui/src/rangy/js/rangy-textrange.js
delete mode 100644 lib/editor/atto/yui/src/rangy/meta/rangy.json
diff --git a/.upgradenotes/MDL-83282-2024112007284289.yml b/.upgradenotes/MDL-83282-2024112007284289.yml
new file mode 100644
index 00000000000..48da570c876
--- /dev/null
+++ b/.upgradenotes/MDL-83282-2024112007284289.yml
@@ -0,0 +1,9 @@
+issueNumber: MDL-83282
+notes:
+ core:
+ - message: |
+ The Atto HTML editor has been removed from core, along with all standard
+ subplugins.
+
+ The editor is available for continued use in the Plugins Database.
+ type: removed
diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php
index 1a0cf7a874a..c7cc390b55e 100644
--- a/lib/db/upgrade.php
+++ b/lib/db/upgrade.php
@@ -1464,5 +1464,24 @@ function xmldb_main_upgrade($oldversion) {
upgrade_main_savepoint(true, 2025022100.02);
}
+ if ($oldversion < 2025030500.00) {
+ // If atto is no longer present, remove it.
+ if (!file_exists("{$CFG->dirroot}/lib/editor/atto/version.php")) {
+ // Remove each of the subplugins first. These are no longer on disk so the standard `uninstall_plugin` approach
+ // on atto itself will not remove them.
+ $plugins = array_keys(core_plugin_manager::instance()->get_plugins_of_type('atto'));
+
+ // Now remove each.
+ foreach ($plugins as $pluginname) {
+ uninstall_plugin('atto', $pluginname);
+ }
+
+ // Finally uninstall the actual plugin.
+ uninstall_plugin('editor', 'atto');
+ }
+
+ upgrade_main_savepoint(true, 2025030500.00);
+ }
+
return true;
}
diff --git a/lib/editor/atto/adminlib.php b/lib/editor/atto/adminlib.php
deleted file mode 100644
index a1b9bd7e1d8..00000000000
--- a/lib/editor/atto/adminlib.php
+++ /dev/null
@@ -1,252 +0,0 @@
-.
-
-/**
- * Atto admin setting stuff.
- *
- * @package editor_atto
- * @copyright 2014 Jerome Mouneyrac
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-defined('MOODLE_INTERNAL') || die();
-
-/**
- * Admin setting for toolbar.
- *
- * @package editor_atto
- * @copyright 2014 Frédéric Massart
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-class editor_atto_toolbar_setting extends admin_setting_configtextarea {
-
- /**
- * Validate data.
- *
- * This ensures that:
- * - Plugins are only used once,
- * - Group names are unique,
- * - Lines match: group = plugin[, plugin[, plugin ...]],
- * - There are some groups and plugins defined,
- * - The plugins used are installed.
- *
- * @param string $data
- * @return mixed True on success, else error message.
- */
- public function validate($data) {
- $result = parent::validate($data);
- if ($result !== true) {
- return $result;
- }
-
- $lines = explode("\n", $data);
- $groups = array();
- $plugins = array();
-
- foreach ($lines as $line) {
- if (!trim($line)) {
- continue;
- }
-
- $matches = array();
- if (!preg_match('/^\s*([a-z0-9]+)\s*=\s*([a-z0-9]+(\s*,\s*[a-z0-9]+)*)+\s*$/', $line, $matches)) {
- $result = get_string('errorcannotparseline', 'editor_atto', $line);
- break;
- }
-
- $group = $matches[1];
- if (isset($groups[$group])) {
- $result = get_string('errorgroupisusedtwice', 'editor_atto', $group);
- break;
- }
- $groups[$group] = true;
-
- $lineplugins = array_map('trim', explode(',', $matches[2]));
- foreach ($lineplugins as $plugin) {
- if (isset($plugins[$plugin])) {
- $result = get_string('errorpluginisusedtwice', 'editor_atto', $plugin);
- break 2;
- } else if (!core_component::get_component_directory('atto_' . $plugin)) {
- $result = get_string('errorpluginnotfound', 'editor_atto', $plugin);
- break 2;
- }
- $plugins[$plugin] = true;
- }
- }
-
- // We did not find any groups or plugins.
- if (empty($groups) || empty($plugins)) {
- $result = get_string('errornopluginsorgroupsfound', 'editor_atto');
- }
-
- return $result;
- }
-
-}
-
-/**
- * Special class for Atto plugins administration.
- *
- * @package editor_atto
- * @copyright 2014 Jerome Mouneyrac
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-class editor_atto_subplugins_setting extends admin_setting {
-
- /**
- * Constructor.
- */
- public function __construct() {
- $this->nosave = true;
- parent::__construct('attosubplugins', get_string('subplugintype_atto_plural', 'editor_atto'), '', '');
- }
-
- /**
- * Returns current value of this setting.
- * Always returns true, does nothing.
- *
- * @return true
- */
- public function get_setting() {
- return true;
- }
-
- /**
- * Returns default setting if exists.
- * Always returns true, does nothing.
- *
- * @return true
- */
- public function get_defaultsetting() {
- return true;
- }
-
- /**
- * Store new setting.
- * Always returns '', does not write anything.
- *
- * @param string $data string or array, must not be NULL.
- * @return string Always returns ''.
- */
- public function write_setting($data) {
- // Do not write any setting.
- return '';
- }
-
- /**
- * Checks if $query is one of the available subplugins.
- *
- * @param string $query The string to search for.
- * @return bool Returns true if found, false if not.
- */
- public function is_related($query) {
- if (parent::is_related($query)) {
- return true;
- }
-
- $subplugins = core_component::get_plugin_list('atto');
- foreach ($subplugins as $name => $dir) {
- if (stripos($name, $query) !== false) {
- return true;
- }
-
- $namestr = get_string('pluginname', 'atto_' . $name);
- if (strpos(core_text::strtolower($namestr), core_text::strtolower($query)) !== false) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * Builds the XHTML to display the control.
- *
- * @param mixed $data Unused.
- * @param string $query
- * @return string highlight.
- */
- public function output_html($data, $query = '') {
- global $CFG, $OUTPUT, $PAGE;
- require_once($CFG->libdir . "/editorlib.php");
- require_once(__DIR__ . '/lib.php');
- $pluginmanager = core_plugin_manager::instance();
-
- // Display strings.
- $strtoolbarconfig = get_string('toolbarconfig', 'editor_atto');
- $strname = get_string('name');
- $strsettings = get_string('settings');
- $struninstall = get_string('uninstallplugin', 'core_admin');
- $strversion = get_string('version');
-
- $subplugins = core_component::get_plugin_list('atto');
-
- $return = $OUTPUT->heading(get_string('subplugintype_atto_plural', 'editor_atto'), 3, 'main', true);
- $return .= $OUTPUT->box_start('generalbox attosubplugins');
-
- $table = new html_table();
- $table->head = array($strname, $strversion, $strtoolbarconfig, $strsettings, $struninstall);
- $table->align = array('left', 'left', 'center', 'center', 'center', 'center');
- $table->data = array();
- $table->attributes['class'] = 'admintable generaltable';
-
- // Iterate through subplugins.
- foreach ($subplugins as $name => $dir) {
- $namestr = get_string('pluginname', 'atto_' . $name);
- $version = get_config('atto_' . $name, 'version');
- if ($version === false) {
- $version = '';
- }
- $plugininfo = $pluginmanager->get_plugin_info('atto_' . $name);
-
- $toolbarconfig = $name;
-
- $displayname = $namestr;
-
- // Check if there is an icon in the atto plugin pix/ folder.
- if ($PAGE->theme->resolve_image_location('icon', 'atto_' . $name, false)) {
- $icon = $OUTPUT->pix_icon('icon', '', 'atto_' . $name, array('class' => 'icon pluginicon'));
- } else {
- // No icon found.
- $icon = $OUTPUT->pix_icon('spacer', '', 'moodle', array('class' => 'icon pluginicon noicon'));
- }
- $displayname = $icon . $displayname;
-
- // Add settings link.
- if (!$version) {
- $settings = '';
- } else if ($url = $plugininfo->get_settings_url()) {
- $settings = html_writer::link($url, $strsettings);
- } else {
- $settings = '';
- }
-
- // Add uninstall info.
- $uninstall = '';
- if ($uninstallurl = core_plugin_manager::instance()->get_uninstall_url('atto_' . $name, 'manage')) {
- $uninstall = html_writer::link($uninstallurl, $struninstall);
- }
-
- // Add a row to the table.
- $row = new html_table_row(array($displayname, $version, $toolbarconfig, $settings, $uninstall));
- $table->data[] = $row;
- }
- $return .= html_writer::table($table);
- $return .= html_writer::tag('p', get_string('tablenosave', 'admin'));
- $return .= $OUTPUT->box_end();
- return highlight($query, $return);
- }
-}
-
diff --git a/lib/editor/atto/amd/build/events.min.js b/lib/editor/atto/amd/build/events.min.js
deleted file mode 100644
index 29aadad4b24..00000000000
--- a/lib/editor/atto/amd/build/events.min.js
+++ /dev/null
@@ -1,12 +0,0 @@
-define("editor_atto/events",["exports","core/event_dispatcher"],(function(_exports,_event_dispatcher){Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.notifyButtonHighlightToggled=_exports.eventTypes=void 0;
-/**
- * Javascript events for the `editor_atto` plugin.
- *
- * @module editor_atto/events
- * @copyright 2021 Jun Pataleta
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- * @since 3.10.5
- */
-const eventTypes={attoButtonHighlightToggled:"editor_atto/attoButtonHighlightToggled"};_exports.eventTypes=eventTypes;_exports.notifyButtonHighlightToggled=(attoButton,buttonName,highlight)=>(0,_event_dispatcher.dispatchEvent)(eventTypes.attoButtonHighlightToggled,{buttonName:buttonName,highlight:highlight},attoButton)}));
-
-//# sourceMappingURL=events.min.js.map
\ No newline at end of file
diff --git a/lib/editor/atto/amd/build/events.min.js.map b/lib/editor/atto/amd/build/events.min.js.map
deleted file mode 100644
index 3b60ecc4f52..00000000000
--- a/lib/editor/atto/amd/build/events.min.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"events.min.js","sources":["../src/events.js"],"sourcesContent":["// This file is part of Moodle - http://moodle.org/ //\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see .\n\n/**\n * Javascript events for the `editor_atto` plugin.\n *\n * @module editor_atto/events\n * @copyright 2021 Jun Pataleta \n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n * @since 3.10.5\n */\n\nimport {dispatchEvent} from 'core/event_dispatcher';\n\n/**\n * Events for the `editor_atto` plugin.\n *\n * @constant\n * @property {String} attoButtonHighlightToggled See {@link event:attoButtonHighlightToggled}\n */\nexport const eventTypes = {\n /**\n * An event triggered when a toolbar button's highlight gets toggled.\n *\n * @event attoButtonHighlightToggled\n * @type {CustomEvent}\n * @property {HTMLElement} target The button which had its highlight toggled.\n * @property {object} detail\n * @property {String} detail.buttonName The name of the Atto button that has had its highlight toggled.\n * @property {Boolean} detail.highlight True when the button was highlighted. False, otherwise.\n */\n attoButtonHighlightToggled: 'editor_atto/attoButtonHighlightToggled',\n};\n\n/**\n * Trigger an event to indicate that a button's highlight was toggled.\n *\n * @method notifyButtonHighlightToggled\n * @returns {CustomEvent}\n * @fires attoButtonHighlightToggled\n * @param {HTMLElement} attoButton The button object.\n * @param {String} buttonName The button name.\n * @param {Boolean} highlight True when the button was highlighted. False, otherwise.\n */\nexport const notifyButtonHighlightToggled = (attoButton, buttonName, highlight) => {\n return dispatchEvent(\n eventTypes.attoButtonHighlightToggled,\n {\n buttonName,\n highlight,\n },\n attoButton\n );\n};\n"],"names":["eventTypes","attoButtonHighlightToggled","attoButton","buttonName","highlight"],"mappings":";;;;;;;;;MA+BaA,WAAa,CAWtBC,2BAA4B,+GAaY,CAACC,WAAYC,WAAYC,aAC1D,mCACHJ,WAAWC,2BACX,CACIE,WAAAA,WACAC,UAAAA,WAEJF"}
\ No newline at end of file
diff --git a/lib/editor/atto/amd/src/events.js b/lib/editor/atto/amd/src/events.js
deleted file mode 100644
index 05ca6045c22..00000000000
--- a/lib/editor/atto/amd/src/events.js
+++ /dev/null
@@ -1,65 +0,0 @@
-// This file is part of Moodle - http://moodle.org/ //
-// Moodle is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Moodle is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Moodle. If not, see .
-
-/**
- * Javascript events for the `editor_atto` plugin.
- *
- * @module editor_atto/events
- * @copyright 2021 Jun Pataleta
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- * @since 3.10.5
- */
-
-import {dispatchEvent} from 'core/event_dispatcher';
-
-/**
- * Events for the `editor_atto` plugin.
- *
- * @constant
- * @property {String} attoButtonHighlightToggled See {@link event:attoButtonHighlightToggled}
- */
-export const eventTypes = {
- /**
- * An event triggered when a toolbar button's highlight gets toggled.
- *
- * @event attoButtonHighlightToggled
- * @type {CustomEvent}
- * @property {HTMLElement} target The button which had its highlight toggled.
- * @property {object} detail
- * @property {String} detail.buttonName The name of the Atto button that has had its highlight toggled.
- * @property {Boolean} detail.highlight True when the button was highlighted. False, otherwise.
- */
- attoButtonHighlightToggled: 'editor_atto/attoButtonHighlightToggled',
-};
-
-/**
- * Trigger an event to indicate that a button's highlight was toggled.
- *
- * @method notifyButtonHighlightToggled
- * @returns {CustomEvent}
- * @fires attoButtonHighlightToggled
- * @param {HTMLElement} attoButton The button object.
- * @param {String} buttonName The button name.
- * @param {Boolean} highlight True when the button was highlighted. False, otherwise.
- */
-export const notifyButtonHighlightToggled = (attoButton, buttonName, highlight) => {
- return dispatchEvent(
- eventTypes.attoButtonHighlightToggled,
- {
- buttonName,
- highlight,
- },
- attoButton
- );
-};
diff --git a/lib/editor/atto/autosave-ajax.php b/lib/editor/atto/autosave-ajax.php
deleted file mode 100644
index 28c13c35ee9..00000000000
--- a/lib/editor/atto/autosave-ajax.php
+++ /dev/null
@@ -1,221 +0,0 @@
-.
-
-/**
- * Save and load draft text while a user is still editing a form.
- *
- * @package editor_atto
- * @copyright 2014 Damyon Wiese
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-define('AJAX_SCRIPT', true);
-
-require_once(__DIR__ . '/../../../config.php');
-require_once($CFG->libdir . '/filestorage/file_storage.php');
-
-// Clean up actions.
-$actions = array_map(function($actionparams) {
- $action = isset($actionparams['action']) ? $actionparams['action'] : null;
- $params = [];
- $keys = [
- 'action' => PARAM_ALPHA,
- 'contextid' => PARAM_INT,
- 'elementid' => PARAM_ALPHANUMEXT,
- 'pagehash' => PARAM_ALPHANUMEXT,
- 'pageinstance' => PARAM_ALPHANUMEXT
- ];
-
- if ($action == 'save') {
- $keys['drafttext'] = PARAM_RAW;
- } else if ($action == 'resume') {
- $keys['draftid'] = PARAM_INT;
- }
-
- foreach ($keys as $key => $type) {
- // Replicate required_param().
- if (!isset($actionparams[$key])) {
- throw new \moodle_exception('missingparam', '', '', $key);
- }
- $params[$key] = clean_param($actionparams[$key], $type);
- }
-
- return $params;
-}, isset($_REQUEST['actions']) ? $_REQUEST['actions'] : []);
-
-$now = time();
-// This is the oldest time any autosave text will be recovered from.
-// This is so that there is a good chance the draft files will still exist (there are many variables so
-// this is impossible to guarantee).
-$before = $now - 60*60*24*4;
-
-$context = context_system::instance();
-$PAGE->set_url('/lib/editor/atto/autosave-ajax.php');
-$PAGE->set_context($context);
-
-require_login();
-if (isguestuser()) {
- throw new \moodle_exception('accessdenied', 'admin');
-}
-require_sesskey();
-
-if (!in_array('atto', explode(',', get_config('core', 'texteditors')))) {
- throw new \moodle_exception('accessdenied', 'admin');
-}
-
-$responses = array();
-foreach ($actions as $actionparams) {
-
- $action = $actionparams['action'];
- $contextid = $actionparams['contextid'];
- $elementid = $actionparams['elementid'];
- $pagehash = $actionparams['pagehash'];
- $pageinstance = $actionparams['pageinstance'];
-
- if ($action === 'save') {
- $drafttext = $actionparams['drafttext'];
- $params = array('elementid' => $elementid,
- 'userid' => $USER->id,
- 'pagehash' => $pagehash,
- 'contextid' => $contextid);
-
- $record = $DB->get_record('editor_atto_autosave', $params);
- if ($record && $record->pageinstance != $pageinstance) {
- throw new \moodle_exception('concurrent access from the same user is not supported');
- die();
- }
-
- if (!$record) {
- $record = new stdClass();
- $record->elementid = $elementid;
- $record->userid = $USER->id;
- $record->pagehash = $pagehash;
- $record->contextid = $contextid;
- $record->drafttext = $drafttext;
- $record->pageinstance = $pageinstance;
- $record->timemodified = $now;
-
- $DB->insert_record('editor_atto_autosave', $record);
-
- // No response means no error.
- $responses[] = null;
- continue;
- } else {
- $record->drafttext = $drafttext;
- $record->timemodified = time();
- $DB->update_record('editor_atto_autosave', $record);
-
- // No response means no error.
- $responses[] = null;
- continue;
- }
-
- } else if ($action == 'resume') {
- $params = array('elementid' => $elementid,
- 'userid' => $USER->id,
- 'pagehash' => $pagehash,
- 'contextid' => $contextid);
-
- $newdraftid = $actionparams['draftid'];
-
- $record = $DB->get_record('editor_atto_autosave', $params);
-
- if (!$record) {
- $record = new stdClass();
- $record->elementid = $elementid;
- $record->userid = $USER->id;
- $record->pagehash = $pagehash;
- $record->contextid = $contextid;
- $record->pageinstance = $pageinstance;
- $record->pagehash = $pagehash;
- $record->draftid = $newdraftid;
- $record->timemodified = time();
- $record->drafttext = '';
-
- $DB->insert_record('editor_atto_autosave', $record);
-
- // No response means no error.
- $responses[] = null;
- continue;
-
- } else {
- // Copy all draft files from the old draft area.
- $usercontext = context_user::instance($USER->id);
- $stale = $record->timemodified < $before;
- require_once($CFG->libdir . '/filelib.php');
-
- $fs = get_file_storage();
- $files = $fs->get_directory_files($usercontext->id, 'user', 'draft', $newdraftid, '/', true, true);
-
- $lastfilemodified = 0;
- foreach ($files as $file) {
- $lastfilemodified = max($lastfilemodified, $file->get_timemodified());
- }
- if ($record->timemodified < $lastfilemodified) {
- $stale = true;
- }
-
- if (!$stale) {
- // This function copies all the files in one draft area, to another area (in this case it's
- // another draft area). It also rewrites the text to @@PLUGINFILE@@ links.
- $newdrafttext = file_save_draft_area_files($record->draftid,
- $usercontext->id,
- 'user',
- 'draft',
- $newdraftid,
- array(),
- $record->drafttext);
-
- // Final rewrite to the new draft area (convert the @@PLUGINFILES@@ again).
- $newdrafttext = file_rewrite_pluginfile_urls($newdrafttext,
- 'draftfile.php',
- $usercontext->id,
- 'user',
- 'draft',
- $newdraftid);
- $record->drafttext = $newdrafttext;
-
- $record->pageinstance = $pageinstance;
- $record->draftid = $newdraftid;
- $record->timemodified = time();
- $DB->update_record('editor_atto_autosave', $record);
-
- // A response means the draft has been restored and here is the auto-saved text.
- $response = ['result' => $record->drafttext];
- $responses[] = $response;
-
- } else {
- $DB->delete_records('editor_atto_autosave', array('id' => $record->id));
-
- // No response means no error.
- $responses[] = null;
- }
- continue;
- }
-
- } else if ($action == 'reset') {
- $params = array('elementid' => $elementid,
- 'userid' => $USER->id,
- 'pagehash' => $pagehash,
- 'contextid' => $contextid);
-
- $DB->delete_records('editor_atto_autosave', $params);
- $responses[] = null;
- continue;
- }
-}
-
-echo json_encode($responses);
diff --git a/lib/editor/atto/classes/plugininfo/atto.php b/lib/editor/atto/classes/plugininfo/atto.php
deleted file mode 100644
index 11099e479ca..00000000000
--- a/lib/editor/atto/classes/plugininfo/atto.php
+++ /dev/null
@@ -1,87 +0,0 @@
-.
-
-/**
- * Subplugin info class.
- *
- * @package editor_atto
- * @copyright 2013 Petr Skoda {@link http://skodak.org}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-namespace editor_atto\plugininfo;
-
-use core\plugininfo\base;
-
-defined('MOODLE_INTERNAL') || die();
-
-
-class atto extends base {
-
- /**
- * Yes you can uninstall these plugins if you want.
- * @return \moodle_url
- */
- public function is_uninstall_allowed() {
- return true;
- }
-
- /**
- * Return URL used for management of plugins of this type.
- * @return \moodle_url
- */
- public static function get_manage_url() {
- return new \moodle_url('/admin/settings.php', array('section'=>'editorsettingsatto'));
- }
-
- /**
- * Include the settings.php file from sub plugins if they provide it.
- * This is a copy of very similar implementations from various other subplugin areas.
- *
- * @return \moodle_url
- */
- public function load_settings(\part_of_admin_tree $adminroot, $parentnodename, $hassiteconfig) {
- global $CFG, $USER, $DB, $OUTPUT, $PAGE; // In case settings.php wants to refer to them.
- /** @var \admin_root $ADMIN */
- $ADMIN = $adminroot; // May be used in settings.php.
- $plugininfo = $this; // Also can be used inside settings.php.
-
- if (!$this->is_installed_and_upgraded()) {
- return;
- }
-
- if (!$hassiteconfig or !file_exists($this->full_path('settings.php'))) {
- return;
- }
-
- $section = $this->get_settings_section_name();
- $settings = new \admin_settingpage($section, $this->displayname, 'moodle/site:config', $this->is_enabled() === false);
- include($this->full_path('settings.php')); // This may also set $settings to null.
-
- if ($settings) {
- $ADMIN->add($parentnodename, $settings);
- }
- }
-
- /**
- * Get the settings section name.
- * It's used to get the setting links in the Atto sub-plugins table.
- *
- * @return null|string the settings section name.
- */
- public function get_settings_section_name() {
- return 'atto_' . $this->name . '_settings';
- }
-}
diff --git a/lib/editor/atto/classes/privacy/provider.php b/lib/editor/atto/classes/privacy/provider.php
deleted file mode 100644
index f00f72aeedf..00000000000
--- a/lib/editor/atto/classes/privacy/provider.php
+++ /dev/null
@@ -1,244 +0,0 @@
-.
-
-/**
- * Privacy Subsystem implementation for editor_atto.
- *
- * @package editor_atto
- * @copyright 2018 Andrew Nicols
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-namespace editor_atto\privacy;
-
-defined('MOODLE_INTERNAL') || die();
-
-use \core_privacy\local\request\approved_contextlist;
-use \core_privacy\local\request\writer;
-use \core_privacy\local\request\helper;
-use \core_privacy\local\request\deletion_criteria;
-use \core_privacy\local\metadata\collection;
-use \core_privacy\local\request\userlist;
-use \core_privacy\local\request\approved_userlist;
-
-/**
- * Privacy Subsystem implementation for editor_atto.
- *
- * @copyright 2018 Andrew Nicols
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-class provider implements
- // The Atto editor stores user provided data.
- \core_privacy\local\metadata\provider,
- // The Atto editor provides data directly to core.
- \core_privacy\local\request\plugin\provider,
- // The Atto editor is capable of determining which users have data within it.
- \core_privacy\local\request\core_userlist_provider {
-
- /**
- * Returns information about how editor_atto stores its data.
- *
- * @param collection $collection The initialised collection to add items to.
- * @return collection A listing of user data stored through this system.
- */
- public static function get_metadata(collection $collection): collection {
- // There isn't much point giving details about the pageid, etc.
- $collection->add_database_table('editor_atto_autosave', [
- 'userid' => 'privacy:metadata:database:atto_autosave:userid',
- 'drafttext' => 'privacy:metadata:database:atto_autosave:drafttext',
- 'timemodified' => 'privacy:metadata:database:atto_autosave:timemodified',
- ], 'privacy:metadata:database:atto_autosave');
-
- return $collection;
- }
-
- /**
- * Get the list of contexts that contain user information for the specified user.
- *
- * @param int $userid The user to search.
- * @return contextlist $contextlist The contextlist containing the list of contexts used in this plugin.
- */
- public static function get_contexts_for_userid(int $userid): \core_privacy\local\request\contextlist {
- // This block doesn't know who information is stored against unless it
- // is at the user context.
- $contextlist = new \core_privacy\local\request\contextlist();
-
- $sql = "SELECT
- c.id
- FROM {editor_atto_autosave} eas
- JOIN {context} c ON c.id = eas.contextid
- WHERE contextlevel = :contextuser AND c.instanceid = :userid";
- $contextlist->add_from_sql($sql, ['contextuser' => CONTEXT_USER, 'userid' => $userid]);
-
- $sql = "SELECT contextid FROM {editor_atto_autosave} WHERE userid = :userid";
- $contextlist->add_from_sql($sql, ['userid' => $userid]);
-
- return $contextlist;
- }
-
- /**
- * Get the list of users within a specific context.
- *
- * @param userlist $userlist The userlist containing the list of users who have data in this context/plugin combination.
- */
- public static function get_users_in_context(userlist $userlist) {
- $context = $userlist->get_context();
-
- $params = [
- 'contextid' => $context->id
- ];
-
- $sql = "SELECT userid
- FROM {editor_atto_autosave}
- WHERE contextid = :contextid";
-
- $userlist->add_from_sql('userid', $sql, $params);
- }
-
- /**
- * Export all user data for the specified user, in the specified contexts.
- *
- * @param approved_contextlist $contextlist The approved contexts to export information for.
- */
- public static function export_user_data(approved_contextlist $contextlist) {
- global $DB;
-
- $user = $contextlist->get_user();
-
- // Firstly export all autosave records from all contexts in the list owned by the given user.
-
- list($contextsql, $contextparams) = $DB->get_in_or_equal($contextlist->get_contextids(), SQL_PARAMS_NAMED);
- $contextparams['userid'] = $user->id;
-
- $sql = "SELECT *
- FROM {editor_atto_autosave}
- WHERE userid = :userid AND contextid {$contextsql}";
-
- $autosaves = $DB->get_recordset_sql($sql, $contextparams);
- self::export_autosaves($user, $autosaves);
-
- // Additionally export all eventual records in the given user's context regardless the actual owner.
- // We still consider them to be the user's personal data even when edited by someone else.
-
- list($contextsql, $contextparams) = $DB->get_in_or_equal($contextlist->get_contextids(), SQL_PARAMS_NAMED);
- $contextparams['userid'] = $user->id;
- $contextparams['contextuser'] = CONTEXT_USER;
-
- $sql = "SELECT eas.*
- FROM {editor_atto_autosave} eas
- JOIN {context} c ON c.id = eas.contextid
- WHERE c.id {$contextsql} AND c.contextlevel = :contextuser AND c.instanceid = :userid";
-
- $autosaves = $DB->get_recordset_sql($sql, $contextparams);
- self::export_autosaves($user, $autosaves);
- }
-
- /**
- * Export all autosave records in the recordset, and close the recordset when finished.
- *
- * @param \stdClass $user The user whose data is to be exported
- * @param \moodle_recordset $autosaves The recordset containing the data to export
- */
- protected static function export_autosaves(\stdClass $user, \moodle_recordset $autosaves) {
- foreach ($autosaves as $autosave) {
- $context = \context::instance_by_id($autosave->contextid);
- $subcontext = [
- get_string('autosaves', 'editor_atto'),
- $autosave->id,
- ];
-
- $html = writer::with_context($context)
- ->rewrite_pluginfile_urls($subcontext, 'user', 'draft', $autosave->draftid, $autosave->drafttext);
-
- $data = (object) [
- 'drafttext' => format_text($html, FORMAT_HTML, static::get_filter_options()),
- 'timemodified' => \core_privacy\local\request\transform::datetime($autosave->timemodified),
- ];
-
- if ($autosave->userid != $user->id) {
- $data->author = \core_privacy\local\request\transform::user($autosave->userid);
- }
-
- writer::with_context($context)
- ->export_data($subcontext, $data)
- ->export_area_files($subcontext, 'user', 'draft', $autosave->draftid);
- }
- $autosaves->close();
- }
-
- /**
- * Delete all data for all users in the specified context.
- *
- * @param \context $context The specific context to delete data for.
- */
- public static function delete_data_for_all_users_in_context(\context $context) {
- global $DB;
-
- $DB->delete_records('editor_atto_autosave', [
- 'contextid' => $context->id,
- ]);
- }
-
- /**
- * Delete multiple users within a single context.
- *
- * @param approved_userlist $userlist The approved context and user information to delete information for.
- */
- public static function delete_data_for_users(approved_userlist $userlist) {
- global $DB;
-
- $context = $userlist->get_context();
- $userids = $userlist->get_userids();
-
- list($useridsql, $useridsqlparams) = $DB->get_in_or_equal($userids, SQL_PARAMS_NAMED);
- $params = ['contextid' => $context->id] + $useridsqlparams;
-
- $DB->delete_records_select('editor_atto_autosave', "contextid = :contextid AND userid {$useridsql}",
- $params);
- }
-
- /**
- * Delete all user data for the specified user, in the specified contexts.
- *
- * @param approved_contextlist $contextlist The approved contexts and user information to delete information for.
- */
- public static function delete_data_for_user(approved_contextlist $contextlist) {
- global $DB;
-
- $user = $contextlist->get_user();
-
- list($contextsql, $contextparams) = $DB->get_in_or_equal($contextlist->get_contextids(), SQL_PARAMS_NAMED);
- $contextparams['userid'] = $user->id;
-
- $sql = "SELECT * FROM {editor_atto_autosave} WHERE contextid {$contextsql}";
- $autosaves = $DB->delete_records_select('editor_atto_autosave', "userid = :userid AND contextid {$contextsql}",
- $contextparams);
- }
-
- /**
- * Get the filter options.
- *
- * This is shared to allow unit testing too.
- *
- * @return \stdClass
- */
- public static function get_filter_options() {
- return (object) [
- 'overflowdiv' => true,
- 'noclean' => true,
- ];
- }
-}
diff --git a/lib/editor/atto/classes/task/autosave_cleanup_task.php b/lib/editor/atto/classes/task/autosave_cleanup_task.php
deleted file mode 100644
index f7ab9181901..00000000000
--- a/lib/editor/atto/classes/task/autosave_cleanup_task.php
+++ /dev/null
@@ -1,58 +0,0 @@
-.
-
-/**
- * A scheduled task.
- *
- * @package editor_atto
- * @copyright 2015 Damyon Wiese
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-namespace editor_atto\task;
-
-use \core\task\scheduled_task;
-
-/**
- * Simple task to run the autosave cleanup task.
- */
-class autosave_cleanup_task extends scheduled_task {
-
- /**
- * Get a descriptive name for this task (shown to admins).
- *
- * @return string
- */
- public function get_name() {
- return get_string('taskautosavecleanup', 'editor_atto');
- }
-
- /**
- * Do the job.
- * Throw exceptions on errors (the job will be retried).
- */
- public function execute() {
- global $DB;
-
- $now = time();
- // This is the oldest time any autosave text will be recovered from.
- // This is so that there is a good chance the draft files will still exist (there are many variables so
- // this is impossible to guarantee).
- $before = $now - 60*60*24*4;
-
- $DB->delete_records_select('editor_atto_autosave', 'timemodified < :before', array('before' => $before));
- }
-
-}
diff --git a/lib/editor/atto/db/install.xml b/lib/editor/atto/db/install.xml
deleted file mode 100644
index f13c52c16be..00000000000
--- a/lib/editor/atto/db/install.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/lib/editor/atto/db/subplugins.json b/lib/editor/atto/db/subplugins.json
deleted file mode 100644
index 2f64fc77f3e..00000000000
--- a/lib/editor/atto/db/subplugins.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "subplugintypes": {
- "atto": "plugins"
- },
- "plugintypes": {
- "atto": "lib/editor/atto/plugins"
- }
-}
diff --git a/lib/editor/atto/db/tasks.php b/lib/editor/atto/db/tasks.php
deleted file mode 100644
index 9aba0ee6801..00000000000
--- a/lib/editor/atto/db/tasks.php
+++ /dev/null
@@ -1,44 +0,0 @@
-.
-
-/**
- * Definition of core scheduled tasks.
- *
- * The handlers defined on this file are processed and registered into
- * the Moodle DB after any install or upgrade operation. All plugins
- * support this.
- *
- * @package core
- * @category task
- * @copyright 2013 Damyon Wiese
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-defined('MOODLE_INTERNAL') || die();
-
-/* List of handlers */
-
-$tasks = array(
- array(
- 'classname' => 'editor_atto\task\autosave_cleanup_task',
- 'blocking' => 0,
- 'minute' => 'R',
- 'hour' => 'R',
- 'day' => '*',
- 'dayofweek' => 'R',
- 'month' => '*'
- )
-);
diff --git a/lib/editor/atto/db/upgrade.php b/lib/editor/atto/db/upgrade.php
deleted file mode 100644
index fdbccd4060c..00000000000
--- a/lib/editor/atto/db/upgrade.php
+++ /dev/null
@@ -1,44 +0,0 @@
-.
-
-/**
- * Atto upgrade script.
- *
- * @package editor_atto
- * @copyright 2014 Damyon Wiese
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-/**
- * Run all Atto upgrade steps between the current DB version and the current version on disk.
- * @param int $oldversion The old version of atto in the DB.
- * @return bool
- */
-function xmldb_editor_atto_upgrade($oldversion) {
- // Automatically generated Moodle v4.2.0 release upgrade line.
- // Put any upgrade step following this.
-
- // Automatically generated Moodle v4.3.0 release upgrade line.
- // Put any upgrade step following this.
-
- // Automatically generated Moodle v4.4.0 release upgrade line.
- // Put any upgrade step following this.
-
- // Automatically generated Moodle v4.5.0 release upgrade line.
- // Put any upgrade step following this.
-
- return true;
-}
diff --git a/lib/editor/atto/lang/en/editor_atto.php b/lib/editor/atto/lang/en/editor_atto.php
deleted file mode 100644
index 48faa79a18d..00000000000
--- a/lib/editor/atto/lang/en/editor_atto.php
+++ /dev/null
@@ -1,54 +0,0 @@
-.
-
-/**
- * Strings for component 'editor_atto', language 'en'.
- *
- * @package editor_atto
- * @copyright 2013 Damyon Wiese
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-$string['autosavefailed'] = 'Could not connect to the server. If you submit this page now, your changes may be lost.';
-$string['autosavefrequency'] = 'Autosave frequency';
-$string['autosavefrequency_desc'] = 'This is the number of seconds between auto save attempts. Atto will automatically save the text in the editor according to this setting, so that text can be automatically restored when the same user returns to the same form.';
-$string['autosavesucceeded'] = 'Draft saved.';
-$string['errorcannotparseline'] = 'The line \'{$a}\' is not in the correct format.';
-$string['errorgroupisusedtwice'] = 'The group \'{$a}\' is defined twice; group names must be unique.';
-$string['errornopluginsorgroupsfound'] = 'No plugins or groups found; please add some groups and plugins.';
-$string['errorpluginnotfound'] = 'The plugin \'{$a}\' cannot be used; it does not appear to be installed.';
-$string['errorpluginisusedtwice'] = 'The plugin \'{$a}\' is used twice; plugins can only be defined once.';
-$string['errortextrecovery'] = 'Unfortunately the draft version could not be restored.';
-$string['pluginname'] = 'Atto HTML editor';
-$string['richtexteditor'] = 'Rich text editor';
-$string['subplugintype_atto'] = 'Atto plugin';
-$string['subplugintype_atto_plural'] = 'Atto plugins';
-$string['settings'] = 'Atto toolbar settings';
-$string['taskautosavecleanup'] = 'Delete expired autosave drafts';
-$string['textrecovered'] = 'A draft version of this text was automatically restored.';
-$string['toolbarconfig'] = 'Toolbar config';
-$string['toolbarconfig_desc'] = 'The list of plugins and the order they are displayed can be configured here. The configuration consists of groups (one per line) followed by the ordered list of plugins for that group. The group is separated from the plugins with an equals sign and the plugins are separated with commas. The group names must be unique and should indicate what the buttons have in common. Button and group names should not be repeated and may only contain alphanumeric characters.';
-$string['editor_command_keycode'] = 'Cmd + {$a}';
-$string['editor_control_keycode'] = 'Ctrl + {$a}';
-$string['plugin_title_shortcut'] = '{$a->title} [{$a->shortcut}]';
-$string['recover'] = 'Recover';
-$string['infostatus'] = 'Information';
-$string['warningstatus'] = 'Warning';
-$string['autosaves'] = 'Editor autosave information';
-$string['privacy:metadata:database:atto_autosave'] = 'Automatically saved text editor drafts.';
-$string['privacy:metadata:database:atto_autosave:userid'] = 'The ID of the user whose data was saved.';
-$string['privacy:metadata:database:atto_autosave:drafttext'] = 'The text which was saved.';
-$string['privacy:metadata:database:atto_autosave:timemodified'] = 'The time that content was modified.';
diff --git a/lib/editor/atto/lib.php b/lib/editor/atto/lib.php
deleted file mode 100644
index 182cf37dab2..00000000000
--- a/lib/editor/atto/lib.php
+++ /dev/null
@@ -1,207 +0,0 @@
-.
-
-/**
- * YUI text editor integration.
- *
- * @package editor_atto
- * @copyright 2013 Damyon Wiese
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-defined('MOODLE_INTERNAL') || die();
-
-/**
- * This is the texteditor implementation.
- * @copyright 2013 Damyon Wiese
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-class atto_texteditor extends texteditor {
-
- /**
- * Is the current browser supported by this editor?
- *
- * Of course!
- * @return bool
- */
- public function supported_by_browser() {
- return true;
- }
-
- /**
- * Returns array of supported text formats.
- * @return array
- */
- public function get_supported_formats() {
- // FORMAT_MOODLE is not supported here, sorry.
- return array(FORMAT_HTML => FORMAT_HTML);
- }
-
- /**
- * Returns text format preferred by this editor.
- * @return int
- */
- public function get_preferred_format() {
- return FORMAT_HTML;
- }
-
- /**
- * Does this editor support picking from repositories?
- * @return bool
- */
- public function supports_repositories() {
- return true;
- }
-
- /**
- * Use this editor for given element.
- *
- * Available Atto-specific options:
- * atto:toolbar - set to a string to override the system config editor_atto/toolbar
- *
- * Available general options:
- * context - set to the current context object
- * enable_filemanagement - set false to get rid of the managefiles plugin
- * autosave - true/false to control autosave
- *
- * Options are also passed through to the plugins.
- *
- * @param string $elementid
- * @param array $options
- * @param null $fpoptions
- */
- public function use_editor($elementid, ?array $options=null, $fpoptions=null) {
- global $PAGE;
-
- if (array_key_exists('atto:toolbar', $options)) {
- $configstr = $options['atto:toolbar'];
- } else {
- $configstr = get_config('editor_atto', 'toolbar');
- }
-
- $grouplines = explode("\n", $configstr);
-
- $groups = array();
-
- foreach ($grouplines as $groupline) {
- $line = explode('=', $groupline);
- if (count($line) > 1) {
- $group = trim(array_shift($line));
- $plugins = array_map('trim', explode(',', array_shift($line)));
- $groups[$group] = $plugins;
- }
- }
-
- $modules = array('moodle-editor_atto-editor');
- $options['context'] = empty($options['context']) ? context_system::instance() : $options['context'];
-
- $jsplugins = array();
- foreach ($groups as $group => $plugins) {
- $groupplugins = array();
- foreach ($plugins as $plugin) {
- // Do not die on missing plugin.
- if (!core_component::get_component_directory('atto_' . $plugin)) {
- continue;
- }
-
- // Remove manage files if requested.
- if ($plugin == 'managefiles' && isset($options['enable_filemanagement']) && !$options['enable_filemanagement']) {
- continue;
- }
-
- $jsplugin = array();
- $jsplugin['name'] = $plugin;
- $jsplugin['params'] = array();
- $modules[] = 'moodle-atto_' . $plugin . '-button';
-
- component_callback('atto_' . $plugin, 'strings_for_js');
- $extra = component_callback('atto_' . $plugin, 'params_for_js', array($elementid, $options, $fpoptions));
-
- if ($extra) {
- $jsplugin = array_merge($jsplugin, $extra);
- }
- // We always need the plugin name.
- $PAGE->requires->string_for_js('pluginname', 'atto_' . $plugin);
- $groupplugins[] = $jsplugin;
- }
- $jsplugins[] = array('group'=>$group, 'plugins'=>$groupplugins);
- }
-
- $PAGE->requires->strings_for_js([
- 'editor_command_keycode',
- 'editor_control_keycode',
- 'plugin_title_shortcut',
- 'textrecovered',
- 'autosavefailed',
- 'autosavesucceeded',
- 'errortextrecovery',
- 'richtexteditor',
- ], 'editor_atto');
- $PAGE->requires->strings_for_js(array(
- 'warning',
- 'info'
- ), 'moodle');
- $PAGE->requires->yui_module($modules,
- 'Y.M.editor_atto.Editor.init',
- array($this->get_init_params($elementid, $options, $fpoptions, $jsplugins)));
-
- }
-
- /**
- * Create a params array to init the editor.
- *
- * @param string $elementid
- * @param array $options
- * @param array $fpoptions
- */
- protected function get_init_params($elementid, ?array $options = null, ?array $fpoptions = null, $plugins = null) {
- global $PAGE;
-
- $directionality = get_string('thisdirection', 'langconfig');
- $strtime = get_string('strftimetime');
- $strdate = get_string('strftimedaydate');
- $lang = current_language();
- $autosave = true;
- $autosavefrequency = get_config('editor_atto', 'autosavefrequency');
- if (isset($options['autosave'])) {
- $autosave = $options['autosave'];
- }
- $contentcss = $PAGE->theme->editor_css_url()->out(false);
-
- // Autosave disabled for guests and not logged in users.
- if (isguestuser() OR !isloggedin()) {
- $autosave = false;
- }
- // Note <> is a safe separator, because it will not appear in the output of s().
- $pagehash = sha1($PAGE->url . '<>' . s($this->get_text()));
- $params = array(
- 'elementid' => $elementid,
- 'content_css' => $contentcss,
- 'contextid' => $options['context']->id,
- 'autosaveEnabled' => $autosave,
- 'autosaveFrequency' => $autosavefrequency,
- 'language' => $lang,
- 'directionality' => $directionality,
- 'filepickeroptions' => array(),
- 'plugins' => $plugins,
- 'pageHash' => $pagehash,
- );
- if ($fpoptions) {
- $params['filepickeroptions'] = $fpoptions;
- }
- return $params;
- }
-}
diff --git a/lib/editor/atto/pix/logo.png b/lib/editor/atto/pix/logo.png
deleted file mode 100644
index c7438a9075a9f84a2f41f0de41f1746343e25622..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 2795
zcmb7Gc{tQtA3rmO#$+t7Tb2-Glw|i-GWJY^gcvfm#*%#*>)2u{F&A-B$cU096GdfB
zb|Kp>TM=2VNcP4u67TQc_xNpV)?G;CqpabUu6|e%Y5sa
zUb~SwyuSXU@k5A2$5=AXJyg7(-E>`KD@RSIpWV~*Q7!W>9SM&XnO+8nWjwO!tUl-y
zfK!tBX+g0dM;b9HCI#k@Fm=M;b@5&HHB2j*0vRwmhcXAPQHxz87Y8$zrulCYk&_xU
zAI#2dTA5(#Q|=}#h=F+kT}+8Fdh;}+AaZ~H!(p;5lv{oZu}#PGksvr6VCD#b}j$?XF^wC
zJ?`OH^5!Y?G_2AG-XHnjH(Gfn{UhzvuFq;V+u&UFPStgKAwTbkhoqKmz#)`yi_W
zC7DHU@F=4X2~3*N`=~OGIm_z3xRfd~f0S
zNucfj!u2o6h55zAl2VT9Os`J0GP_G1UyFYI`n9vK@6GqQ{(z|#&c*RpLK71c8s|qj
zcqBNeThfDmW`q<88BG2Q_kN8YT==?c9d$)w<2)YE+5YAYbE0bOGvDO$8!8pW!&5Li
zYHJ10GCB6Pt1A_UQ&UUdTpA;cRr?pKx%Zg|1*r)L42_If8XD61$q$NBr3n_Uu2}K2
zfw2wOejKAdmWEaNjmynlG&Nn`WG{YvQBqR!E1mxQ`SV!7p`zeWcV~2LtmL>DH)V5?
zguyVGOw5nhcg8JjZAGDVhlVz?;|qaeq|qSxVP)l^Je?Tp-Cm#5t*xyAmRtw~0LI3~
z8lky9GVdhC2~ERHr7K0l!`2wg
za~t`8`g~Bf8aurxNm&>yStq|G!QgQC{P-)X7H?-=T5hiCvGlGbIC!8HxycfpdmXt&
zMDOt^HGLf@o{bq5f$i?@K7Rh(;$4`puP@Qw-lVp+mS|}?P!?d8qdsK~!y4re4ide*
zy`?ev3kzNm+pALJ_2KCdnt!MV1qOEZ_xrD+%AH!d@Ez*Xy64Zwu%h*G2eXifL77%BWF|vC%4yT0>zG-EK-p{7PXd<+-5sN4WZB$8{TZKN;R9Z?gp
z!L+X`EW}sLZQaqx^P|(Dr#qCFB6c>-y42>KOSVRcoFHs^W@dJYU|_%^T_KS~1O%?S
zx(Z*RL5`=5YixvvMMS(EC^Rq_dFl{k>4ny^$@P{6vNei)8De!P3^C@$0|Z)3bR
zD4tGVUtbRv(%lNDZLNHs>1CW5PkWIrb|FLllD+Edz}bXW)%N!Gu#JVg^$pJLsN$-!
zTgf8YAWQYCab7r1TS-pty$a??of&6GTN`Ven%I6LHa0eTq?+6eZ;voFO=bp~
zw};-^*RkP@#+f3lQK0mzg#J98Zo-p-0_@^w<-v1tvW%E_`S_Z!H4N6M1vA1yW5gn?$
z0NT3!MBeL~C-M#*h~-7FF&jMfY?Qm8
zIe7{(uc;%!&ku|&wu%Omae=sb%`^RKae@!Z%gr4nPI(clf4wt-39$qz
z-p!EbxURKzhO?H2hOJfY7
zGjGri&T5!AK>+&lbd;0`c>GySl$bh2*U`_*t7YiP<&eZ)%KSBgxqp{)g?b2qf3cck
zb@_7lY+_=fXG<)%)|ZRM#ulH@!HXYMil`j5IL~DrX%vvndntpFQ&1>`!aG~p3C`Z$
zHV+F^zmKDurWO|z#6k#+Pk8DBE{Jw4i%nB)7Zw&gzVzJlTPeSOj3(6q#1|)CA9+Px
zd9(7l@kdW4gOONXt{k(1So*?K32apC4g#7_G-=A!FpcBQZoJZetvXUC`hHW-kw;X;vb^XYu
z@e19f&nwW_<>E|)PZ;-D?tVr{d!0S{rJX2xGN$~t4QHRztupi@(h6JEHc!EFZE^B1
zdDH~LGWsM-nkU@SS<6R@ZZ@E;&^ftbkYYg`oqRf!s($&9f^UP(qfHbvC_
n7>!KEEF-7?mrDCP0k_BZAwUpir97hp2~%K%H#K;wPrmUlg%}Fu
diff --git a/lib/editor/atto/pix/logo.svg b/lib/editor/atto/pix/logo.svg
deleted file mode 100644
index 2f2e945332d..00000000000
--- a/lib/editor/atto/pix/logo.svg
+++ /dev/null
@@ -1,91 +0,0 @@
-
-
-
-
diff --git a/lib/editor/atto/plugins/accessibilitychecker/classes/privacy/provider.php b/lib/editor/atto/plugins/accessibilitychecker/classes/privacy/provider.php
deleted file mode 100644
index 08363c35533..00000000000
--- a/lib/editor/atto/plugins/accessibilitychecker/classes/privacy/provider.php
+++ /dev/null
@@ -1,46 +0,0 @@
-.
-
-/**
- * Privacy Subsystem implementation for block_activity_modules.
- *
- * @package atto_accessibilitychecker
- * @copyright 2018 Andrew Nicols
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-namespace atto_accessibilitychecker\privacy;
-
-defined('MOODLE_INTERNAL') || die();
-
-/**
- * Privacy Subsystem for atto_accessibilitychecker implementing null_provider.
- *
- * @copyright 2018 Andrew Nicols
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-class provider implements \core_privacy\local\metadata\null_provider {
-
- /**
- * Get the language string identifier with the component's language
- * file to explain why this plugin stores no data.
- *
- * @return string
- */
- public static function get_reason(): string {
- return 'privacy:metadata';
- }
-}
diff --git a/lib/editor/atto/plugins/accessibilitychecker/lang/en/atto_accessibilitychecker.php b/lib/editor/atto/plugins/accessibilitychecker/lang/en/atto_accessibilitychecker.php
deleted file mode 100644
index ecfbc88af98..00000000000
--- a/lib/editor/atto/plugins/accessibilitychecker/lang/en/atto_accessibilitychecker.php
+++ /dev/null
@@ -1,36 +0,0 @@
-.
-
-/**
- * Strings for component 'atto_accessibilitychecker', language 'en'.
- *
- * @package atto_accessibilitychecker
- * @copyright 2014 Damyon Wiese
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-$string['emptytext'] = 'Empty text';
-$string['entiredocument'] = 'Entire document';
-$string['imagesmissingalt'] = 'Images require alternative text. To fix this warning, add an alt attribute to your img tags. An empty alt attribute may be used, but only when the image is purely decorative and carries no information.';
-$string['needsmorecontrast'] = 'The colours of the foreground and background text do not have enough contrast. To fix this warning, change either foreground or background colour of the text so that it is easier to read.';
-$string['needsmoreheadings'] = 'There is a lot of text with no headings. Headings will allow screen reader users to navigate through the page easily and will make the page more usable for everyone.';
-$string['nowarnings'] = 'Congratulations, no accessibility problems found!';
-$string['pluginname'] = 'Accessibility checker';
-$string['report'] = 'Accessibility report:';
-$string['tablesmissingcaption'] = 'Tables should have captions. While it is not necessary for each table to have a caption, a caption is generally very helpful.';
-$string['tablesmissingheaders'] = 'Tables should use row and/or column headers.';
-$string['tableswithmergedcells'] = 'Tables should not contain merged cells. Despite being standard markup for tables for many years, some screen readers still do not fully support complex tables. When possible, try to "flatten" the table and avoid merged cells.';
-$string['privacy:metadata'] = 'The atto_accessibilitychecker plugin does not store any personal data.';
diff --git a/lib/editor/atto/plugins/accessibilitychecker/lib.php b/lib/editor/atto/plugins/accessibilitychecker/lib.php
deleted file mode 100644
index bd14a7f3cfb..00000000000
--- a/lib/editor/atto/plugins/accessibilitychecker/lib.php
+++ /dev/null
@@ -1,46 +0,0 @@
-.
-
-/**
- * Atto text editor integration version file.
- *
- * @package atto_accessibilitychecker
- * @copyright 2014 Damyon Wiese
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-defined('MOODLE_INTERNAL') || die();
-
-/**
- * Initialise this plugin
- * @param string $elementid
- */
-function atto_accessibilitychecker_strings_for_js() {
- global $PAGE;
-
- $PAGE->requires->strings_for_js(array('nowarnings',
- 'report',
- 'imagesmissingalt',
- 'needsmorecontrast',
- 'needsmoreheadings',
- 'tableswithmergedcells',
- 'tablesmissingcaption',
- 'emptytext',
- 'entiredocument',
- 'tablesmissingheaders'),
- 'atto_accessibilitychecker');
-}
-
diff --git a/lib/editor/atto/plugins/accessibilitychecker/styles.css b/lib/editor/atto/plugins/accessibilitychecker/styles.css
deleted file mode 100644
index a8330154580..00000000000
--- a/lib/editor/atto/plugins/accessibilitychecker/styles.css
+++ /dev/null
@@ -1,4 +0,0 @@
-.accessibilitywarnings img {
- max-width: 32px;
- max-height: 32px;
-}
diff --git a/lib/editor/atto/plugins/accessibilitychecker/tests/behat/accessibilitychecker.feature b/lib/editor/atto/plugins/accessibilitychecker/tests/behat/accessibilitychecker.feature
deleted file mode 100644
index 6748b4e5dc5..00000000000
--- a/lib/editor/atto/plugins/accessibilitychecker/tests/behat/accessibilitychecker.feature
+++ /dev/null
@@ -1,76 +0,0 @@
-@editor @editor_atto @atto @atto_accessibilitychecker
-Feature: Atto accessibility checker
- To write accessible text in Atto, I need to check for accessibility warnings.
-
- @javascript
- Scenario: Images with no alt
- Given I log in as "admin"
- And I open my profile in edit mode
- And I set the field "Description" to "
Some plain text
Some more text
"
- When I click on "Show more buttons" "button"
- And I click on "Accessibility checker" "button"
- Then I should see "Images require alternative text."
- And I follow "/broken-image"
- And I wait "2" seconds
- And I click on "Insert or edit image" "button"
- And the field "Enter URL" matches value "/broken-image"
- And I set the field "Describe this image for someone who cannot see it" to "No more warning!"
- And I press "Save image"
- And I press "Accessibility checker"
- And I should see "Congratulations, no accessibility problems found!"
- And I click on ".moodle-dialogue-focused .closebutton" "css_element"
- And I select the text in the "Description" Atto editor
- And I click on "Insert or edit image" "button"
- And I set the field "Enter URL" to "/decorative-image.png"
- And I set the field "Describe this image for someone who cannot see it" to ""
- And I set the field "Width" to "1"
- And I set the field "Height" to "1"
- And I click on "This image is decorative only" "checkbox"
- And I press "Save image"
- And I press "Accessibility checker"
- And I should see "Congratulations, no accessibility problems found!"
-
- @javascript
- Scenario: Low contrast
- Given I log in as "admin"
- And I open my profile in edit mode
- And I set the field "Description" to "
Hard to read
"
- When I click on "Show more buttons" "button"
- And I click on "Accessibility checker" "button"
- Then I should see "The colours of the foreground and background text do not have enough contrast."
-
- @javascript
- Scenario: No headings
- Given I log in as "admin"
- And I open my profile in edit mode
- And I set the field "Description" to "
Sweet roll oat cake jelly-o macaroon donut oat cake. Caramels macaroon cookie sweet roll croissant cheesecake candy jelly-o. Gummies sugar plum sugar plum gingerbread dessert. Tiramisu bonbon jujubes danish marshmallow cookie chocolate cake cupcake tiramisu. Bear claw oat cake chocolate bar croissant. Lollipop cookie topping liquorice croissant. Brownie cookie cupcake lollipop cupcake cupcake. Fruitcake dessert sweet biscuit dragée caramels marzipan brownie. Chupa chups gingerbread apple pie cookie liquorice caramels carrot cake cookie gingerbread. Croissant candy jelly beans. Tiramisu apple pie dessert apple pie macaroon soufflé. Brownie powder carrot cake chocolate. Tart applicake croissant dragée macaroon chocolate donut.
"
- When I click on "Show more buttons" "button"
- And I click on "Accessibility checker" "button"
- Then I should see "There is a lot of text with no headings."
-
- @javascript
- Scenario: Merged cells
- Given I log in as "admin"
- And I open my profile in edit mode
- And I set the field "Description" to "
Dogs that look good in pants
Breed
Coolness
Poodle
NOT COOL
Doberman
"
- When I click on "Show more buttons" "button"
- And I click on "Accessibility checker" "button"
- Then I should see "Tables should not contain merged cells."
-
- @javascript
- Scenario: Table missing row/column headers
- Given I log in as "admin"
- And I open my profile in edit mode
- And I set the field "Description" to "
Dogs that look good in pants
Breed
Coolness
Poodle
NOT COOL
Doberman
COOL
"
- When I click on "Show more buttons" "button"
- And I click on "Accessibility checker" "button"
- Then I should see "Tables should use row and/or column headers."
-
- @javascript
- Scenario: Table missing caption
- Given I log in as "admin"
- And I open my profile in edit mode
- And I set the field "Description" to "
Breed
Coolness
Poodle
NOT COOL
Doberman
COOL
"
- When I click on "Show more buttons" "button"
- And I click on "Accessibility checker" "button"
- Then I should see "Tables should have captions."
diff --git a/lib/editor/atto/plugins/accessibilitychecker/version.php b/lib/editor/atto/plugins/accessibilitychecker/version.php
deleted file mode 100644
index 4a84c463204..00000000000
--- a/lib/editor/atto/plugins/accessibilitychecker/version.php
+++ /dev/null
@@ -1,29 +0,0 @@
-.
-
-/**
- * Atto text editor integration version file.
- *
- * @package atto_accessibilitychecker
- * @copyright 2014 Damyon Wiese
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-defined('MOODLE_INTERNAL') || die();
-
-$plugin->version = 2024121800; // The current plugin version (Date: YYYYMMDDXX).
-$plugin->requires = 2024100100; // Requires this Moodle version.
-$plugin->component = 'atto_accessibilitychecker'; // Full name of the plugin (used for diagnostics).
diff --git a/lib/editor/atto/plugins/accessibilitychecker/yui/build/moodle-atto_accessibilitychecker-button/moodle-atto_accessibilitychecker-button-debug.js b/lib/editor/atto/plugins/accessibilitychecker/yui/build/moodle-atto_accessibilitychecker-button/moodle-atto_accessibilitychecker-button-debug.js
deleted file mode 100644
index dc0202fd036..00000000000
--- a/lib/editor/atto/plugins/accessibilitychecker/yui/build/moodle-atto_accessibilitychecker-button/moodle-atto_accessibilitychecker-button-debug.js
+++ /dev/null
@@ -1,357 +0,0 @@
-YUI.add('moodle-atto_accessibilitychecker-button', function (Y, NAME) {
-
-// This file is part of Moodle - http://moodle.org/
-//
-// Moodle is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Moodle is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Moodle. If not, see .
-
-/*
- * @package atto_accessibilitychecker
- * @copyright 2014 Damyon Wiese
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-/**
- * @module moodle-atto_accessibilitychecker-button
- */
-
-/**
- * Accessibility Checking tool for the Atto editor.
- *
- * @namespace M.atto_accessibilitychecker
- * @class Button
- * @extends M.editor_atto.EditorPlugin
- */
-
-var COMPONENT = 'atto_accessibilitychecker';
-
-Y.namespace('M.atto_accessibilitychecker').Button = Y.Base.create('button', Y.M.editor_atto.EditorPlugin, [], {
-
- initializer: function() {
- this.addButton({
- icon: 'e/accessibility_checker',
- callback: this._displayDialogue
- });
- },
-
- /**
- * Display the Accessibility Checker tool.
- *
- * @method _displayDialogue
- * @private
- */
- _displayDialogue: function() {
- var dialogue = this.getDialogue({
- headerContent: M.util.get_string('pluginname', COMPONENT),
- width: '500px',
- focusAfterHide: true
- });
-
- // Set the dialogue content, and then show the dialogue.
- dialogue.set('bodyContent', this._getDialogueContent())
- .show();
- },
-
- /**
- * Return the dialogue content for the tool.
- *
- * @method _getDialogueContent
- * @private
- * @return {Node} The content to place in the dialogue.
- */
- _getDialogueContent: function() {
- var content = Y.Node.create('');
- content.append(this._getWarnings());
-
- // Add ability to select problem areas in the editor.
- content.delegate('click', function(e) {
- e.preventDefault();
-
- var host = this.get('host'),
- node = e.currentTarget.getData('sourceNode'),
- dialogue = this.getDialogue();
-
- if (node) {
- // Focus on the editor as we hide the dialogue.
- dialogue.set('focusAfterHide', this.editor).hide();
-
- // Then set the selection.
- host.setSelection(host.getSelectionFromNode(node));
- } else {
- // Hide the dialogue.
- dialogue.hide();
- }
- }, 'a', this);
-
- return content;
- },
-
- /**
- * Find all problems with the content editable region.
- *
- * @method _getWarnings
- * @return {Node} A complete list of all warnings and problems.
- * @private
- */
- _getWarnings: function() {
- var problemNodes,
- list = Y.Node.create('');
-
- // Images with no alt text or dodgy alt text.
- problemNodes = [];
- this.editor.all('img').each(function(img) {
- var alt = img.getAttribute('alt');
- if (typeof alt === 'undefined' || alt === '') {
- if (img.getAttribute('role') !== 'presentation') {
- problemNodes.push(img);
- }
- }
- }, this);
- this._addWarnings(list, M.util.get_string('imagesmissingalt', COMPONENT), problemNodes, true);
-
- problemNodes = [];
- this.editor.all('*').each(function(node) {
- var foreground,
- background,
- ratio,
- lum1,
- lum2;
-
- // Check for non-empty text.
- if (node.hasChildNodes() && Y.Lang.trim(node._node.childNodes[0].nodeValue) !== '') {
- foreground = Y.Color.fromArray(
- this._getComputedBackgroundColor(node, node.getComputedStyle('color')),
- Y.Color.TYPES.RGBA
- );
- background = Y.Color.fromArray(this._getComputedBackgroundColor(node), Y.Color.TYPES.RGBA);
-
- lum1 = this._getLuminanceFromCssColor(foreground);
- lum2 = this._getLuminanceFromCssColor(background);
-
- // Algorithm from "http://www.w3.org/TR/WCAG20-GENERAL/G18.html".
- if (lum1 > lum2) {
- ratio = (lum1 + 0.05) / (lum2 + 0.05);
- } else {
- ratio = (lum2 + 0.05) / (lum1 + 0.05);
- }
- if (ratio <= 4.5) {
- Y.log('Contrast ratio is too low: ' + ratio +
- ' Colour 1: ' + foreground +
- ' Colour 2: ' + background +
- ' Luminance 1: ' + lum1 +
- ' Luminance 2: ' + lum2);
-
- // We only want the highest node with dodgy contrast reported.
- var i = 0;
- var found = false;
- for (i = 0; i < problemNodes.length; i++) {
- if (node.ancestors('*').indexOf(problemNodes[i]) !== -1) {
- // Do not add node - it already has a parent in the list.
- found = true;
- break;
- } else if (problemNodes[i].ancestors('*').indexOf(node) !== -1) {
- // Replace the existing node with this one because it is higher up the DOM.
- problemNodes[i] = node;
- found = true;
- break;
- }
- }
- if (!found) {
- problemNodes.push(node);
- }
- }
- }
- }, this);
- this._addWarnings(list, M.util.get_string('needsmorecontrast', COMPONENT), problemNodes, false);
-
- // Check for lots of text with no headings.
- if (this.editor.get('text').length > 1000 && !this.editor.one('h3, h4, h5')) {
- this._addWarnings(list, M.util.get_string('needsmoreheadings', COMPONENT), [this.editor], false);
- }
-
- // Check for tables with no captions.
- problemNodes = [];
- this.editor.all('table').each(function(table) {
- var caption = table.one('caption');
- if (caption === null || caption.get('text').trim() === '') {
- problemNodes.push(table);
- }
- }, this);
- this._addWarnings(list, M.util.get_string('tablesmissingcaption', COMPONENT), problemNodes, false);
-
- // Check for tables with merged cells.
- problemNodes = [];
- this.editor.all('table').each(function(table) {
- var caption = table.one('[colspan],[rowspan]');
- if (caption !== null) {
- problemNodes.push(table);
- }
- }, this);
- this._addWarnings(list, M.util.get_string('tableswithmergedcells', COMPONENT), problemNodes, false);
-
- // Check for tables with no row/col headers
- problemNodes = [];
- this.editor.all('table').each(function(table) {
- if (table.one('tr').one('td')) {
- // First row has a non-header cell, so all rows must have at least one header.
- table.all('tr').some(function(row) {
- var header = row.one('th');
- if (!header || (header.get('text').trim() === '')) {
- problemNodes.push(table);
- return true;
- }
- return false;
- }, this);
- } else {
- // First row must have at least one header then.
- var hasHeader = false;
- table.one('tr').all('th').some(function(header) {
- hasHeader = true;
- if (header.get('text').trim() === '') {
- problemNodes.push(table);
- return true;
- }
- return false;
- });
- if (!hasHeader) {
- problemNodes.push(table);
- }
- }
- }, this);
- this._addWarnings(list, M.util.get_string('tablesmissingheaders', COMPONENT), problemNodes, false);
-
- if (!list.hasChildNodes()) {
- list.append('
');
- }
-
- // Return the list of current warnings.
- return list;
- },
-
- /**
- * Generate the HTML that lists the found warnings.
- *
- * @method _addWarnings
- * @param {Node} list Node to append the html to.
- * @param {String} description Description of this failure.
- * @param {array} nodes An array of failing nodes.
- * @param {boolean} imagewarnings true if the warnings are related to images, false if text.
- */
- _addWarnings: function(list, description, nodes, imagewarnings) {
- var warning, fails, i, src, textfield, li, link, text;
-
- if (nodes.length > 0) {
- warning = Y.Node.create('
' + description + '
');
- fails = Y.Node.create('');
- i = 0;
- for (i = 0; i < nodes.length; i++) {
- li = Y.Node.create('');
- if (imagewarnings) {
- src = nodes[i].getAttribute('src');
- link = Y.Node.create(' ' + src + '');
- } else {
- textfield = ('innerText' in nodes[i]) ? 'innerText' : 'textContent';
- text = nodes[i].get(textfield).trim();
- if (text === '') {
- text = M.util.get_string('emptytext', COMPONENT);
- }
- if (nodes[i] === this.editor) {
- text = M.util.get_string('entiredocument', COMPONENT);
- }
- link = Y.Node.create('' + text + '');
- }
- link.setData('sourceNode', nodes[i]);
- li.append(link);
- fails.append(li);
- }
-
- warning.append(fails);
- list.append(warning);
- }
- },
-
- /**
- * Convert a CSS color to a luminance value.
- *
- * @method _getLuminanceFromCssColor
- * @param {String} colortext The Hex value for the colour
- * @return {Number} The luminance value.
- * @private
- */
- _getLuminanceFromCssColor: function(colortext) {
- var color;
-
- if (colortext === 'transparent') {
- colortext = '#ffffff';
- }
- color = Y.Color.toArray(Y.Color.toRGB(colortext));
-
- // Algorithm from "http://www.w3.org/TR/WCAG20-GENERAL/G18.html".
- var part1 = function(a) {
- a = parseInt(a, 10) / 255.0;
- if (a <= 0.03928) {
- a = a / 12.92;
- } else {
- a = Math.pow(((a + 0.055) / 1.055), 2.4);
- }
- return a;
- };
-
- var r1 = part1(color[0]),
- g1 = part1(color[1]),
- b1 = part1(color[2]);
-
- return 0.2126 * r1 + 0.7152 * g1 + 0.0722 * b1;
- },
-
- /**
- * Get the computed RGB converted to full alpha value, considering the node hierarchy.
- *
- * @method _getComputedBackgroundColor
- * @param {Node} node
- * @param {String} color The initial colour. If not specified, fetches the backgroundColor from the node.
- * @return {Array} Colour in Array form (RGBA)
- * @private
- */
- _getComputedBackgroundColor: function(node, color) {
- color = color || node.getComputedStyle('backgroundColor');
-
- if (color.toLowerCase() === 'transparent') {
- // Y.Color doesn't handle 'transparent' properly.
- color = 'rgba(1, 1, 1, 0)';
- }
-
- // Convert the colour to its constituent parts in RGBA format, then fetch the alpha.
- var colorParts = Y.Color.toArray(color);
- var alpha = colorParts[3];
-
- if (alpha === 1) {
- // If the alpha of the background is already 1, then the parent background colour does not change anything.
- return colorParts;
- }
-
- // Fetch the computed background colour of the parent and use it to calculate the RGB of this item.
- var parentColor = this._getComputedBackgroundColor(node.get('parentNode'));
- return [
- // RGB = (alpha * R|G|B) + (1 - alpha * solid parent colour).
- (1 - alpha) * parentColor[0] + alpha * colorParts[0],
- (1 - alpha) * parentColor[1] + alpha * colorParts[1],
- (1 - alpha) * parentColor[2] + alpha * colorParts[2],
- // We always return a colour with full alpha.
- 1
- ];
- }
-});
-
-
-}, '@VERSION@', {"requires": ["color-base", "moodle-editor_atto-plugin"]});
diff --git a/lib/editor/atto/plugins/accessibilitychecker/yui/build/moodle-atto_accessibilitychecker-button/moodle-atto_accessibilitychecker-button-min.js b/lib/editor/atto/plugins/accessibilitychecker/yui/build/moodle-atto_accessibilitychecker-button/moodle-atto_accessibilitychecker-button-min.js
deleted file mode 100644
index 32092df4f6a..00000000000
--- a/lib/editor/atto/plugins/accessibilitychecker/yui/build/moodle-atto_accessibilitychecker-button/moodle-atto_accessibilitychecker-button-min.js
+++ /dev/null
@@ -1 +0,0 @@
-YUI.add("moodle-atto_accessibilitychecker-button",function(d,t){var g="atto_accessibilitychecker";d.namespace("M.atto_accessibilitychecker").Button=d.Base.create("button",d.M.editor_atto.EditorPlugin,[],{initializer:function(){this.addButton({icon:"e/accessibility_checker",callback:this._displayDialogue})},_displayDialogue:function(){this.getDialogue({headerContent:M.util.get_string("pluginname",g),width:"500px",focusAfterHide:!0}).set("bodyContent",this._getDialogueContent()).show()},_getDialogueContent:function(){var t=d.Node.create('');return t.append(this._getWarnings()),t.delegate("click",function(t){t.preventDefault();var e=this.get("host"),t=t.currentTarget.getData("sourceNode"),i=this.getDialogue();t?(i.set("focusAfterHide",this.editor).hide(),e.setSelection(e.getSelectionFromNode(t))):i.hide()},"a",this),t},_getWarnings:function(){var t=d.Node.create(""),n=[];return this.editor.all("img").each(function(t){var e=t.getAttribute("alt");void 0!==e&&""!==e||"presentation"!==t.getAttribute("role")&&n.push(t)},this),this._addWarnings(t,M.util.get_string("imagesmissingalt",g),n,!0),n=[],this.editor.all("*").each(function(t){var e,i,o,r;if(t.hasChildNodes()&&""!==d.Lang.trim(t._node.childNodes[0].nodeValue)&&(e=d.Color.fromArray(this._getComputedBackgroundColor(t,t.getComputedStyle("color")),d.Color.TYPES.RGBA),i=d.Color.fromArray(this._getComputedBackgroundColor(t),d.Color.TYPES.RGBA),e=this._getLuminanceFromCssColor(e),((i=this._getLuminanceFromCssColor(i))"+M.util.get_string("nowarnings",g)+"
"),t},_addWarnings:function(t,e,i,o){var r,n,a,s,l;if(0"+e+""),r=d.Node.create(''),n=n=0;n"),(l=o?(a=i[n].getAttribute("src"),d.Node.create(' '+a+"")):(a="innerText"in i[n]?"innerText":"textContent",""===(l=i[n].get(a).trim())&&(l=M.util.get_string("emptytext",g)),i[n]===this.editor&&(l=M.util.get_string("entiredocument",g)),d.Node.create(''+l+""))).setData("sourceNode",i[n]),s.append(l),r.append(s);e.append(r),t.append(e)}},_getLuminanceFromCssColor:function(t){var e;return.2126*(e=function(t){return(t=parseInt(t,10)/255)<=.03928?t/=12.92:t=Math.pow((t+.055)/1.055,2.4),t})((t=d.Color.toArray(d.Color.toRGB(t="transparent"===t?"#ffffff":t)))[0])+.7152*e(t[1])+.0722*e(t[2])},_getComputedBackgroundColor:function(t,e){var i;return"transparent"===(e=e||t.getComputedStyle("backgroundColor")).toLowerCase()&&(e="rgba(1, 1, 1, 0)"),1===(i=(e=d.Color.toArray(e))[3])?e:[(1-i)*(t=this._getComputedBackgroundColor(t.get("parentNode")))[0]+i*e[0],(1-i)*t[1]+i*e[1],(1-i)*t[2]+i*e[2],1]}})},"@VERSION@",{requires:["color-base","moodle-editor_atto-plugin"]});
\ No newline at end of file
diff --git a/lib/editor/atto/plugins/accessibilitychecker/yui/build/moodle-atto_accessibilitychecker-button/moodle-atto_accessibilitychecker-button.js b/lib/editor/atto/plugins/accessibilitychecker/yui/build/moodle-atto_accessibilitychecker-button/moodle-atto_accessibilitychecker-button.js
deleted file mode 100644
index cdfd16e63a2..00000000000
--- a/lib/editor/atto/plugins/accessibilitychecker/yui/build/moodle-atto_accessibilitychecker-button/moodle-atto_accessibilitychecker-button.js
+++ /dev/null
@@ -1,352 +0,0 @@
-YUI.add('moodle-atto_accessibilitychecker-button', function (Y, NAME) {
-
-// This file is part of Moodle - http://moodle.org/
-//
-// Moodle is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Moodle is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Moodle. If not, see .
-
-/*
- * @package atto_accessibilitychecker
- * @copyright 2014 Damyon Wiese
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-/**
- * @module moodle-atto_accessibilitychecker-button
- */
-
-/**
- * Accessibility Checking tool for the Atto editor.
- *
- * @namespace M.atto_accessibilitychecker
- * @class Button
- * @extends M.editor_atto.EditorPlugin
- */
-
-var COMPONENT = 'atto_accessibilitychecker';
-
-Y.namespace('M.atto_accessibilitychecker').Button = Y.Base.create('button', Y.M.editor_atto.EditorPlugin, [], {
-
- initializer: function() {
- this.addButton({
- icon: 'e/accessibility_checker',
- callback: this._displayDialogue
- });
- },
-
- /**
- * Display the Accessibility Checker tool.
- *
- * @method _displayDialogue
- * @private
- */
- _displayDialogue: function() {
- var dialogue = this.getDialogue({
- headerContent: M.util.get_string('pluginname', COMPONENT),
- width: '500px',
- focusAfterHide: true
- });
-
- // Set the dialogue content, and then show the dialogue.
- dialogue.set('bodyContent', this._getDialogueContent())
- .show();
- },
-
- /**
- * Return the dialogue content for the tool.
- *
- * @method _getDialogueContent
- * @private
- * @return {Node} The content to place in the dialogue.
- */
- _getDialogueContent: function() {
- var content = Y.Node.create('');
- content.append(this._getWarnings());
-
- // Add ability to select problem areas in the editor.
- content.delegate('click', function(e) {
- e.preventDefault();
-
- var host = this.get('host'),
- node = e.currentTarget.getData('sourceNode'),
- dialogue = this.getDialogue();
-
- if (node) {
- // Focus on the editor as we hide the dialogue.
- dialogue.set('focusAfterHide', this.editor).hide();
-
- // Then set the selection.
- host.setSelection(host.getSelectionFromNode(node));
- } else {
- // Hide the dialogue.
- dialogue.hide();
- }
- }, 'a', this);
-
- return content;
- },
-
- /**
- * Find all problems with the content editable region.
- *
- * @method _getWarnings
- * @return {Node} A complete list of all warnings and problems.
- * @private
- */
- _getWarnings: function() {
- var problemNodes,
- list = Y.Node.create('');
-
- // Images with no alt text or dodgy alt text.
- problemNodes = [];
- this.editor.all('img').each(function(img) {
- var alt = img.getAttribute('alt');
- if (typeof alt === 'undefined' || alt === '') {
- if (img.getAttribute('role') !== 'presentation') {
- problemNodes.push(img);
- }
- }
- }, this);
- this._addWarnings(list, M.util.get_string('imagesmissingalt', COMPONENT), problemNodes, true);
-
- problemNodes = [];
- this.editor.all('*').each(function(node) {
- var foreground,
- background,
- ratio,
- lum1,
- lum2;
-
- // Check for non-empty text.
- if (node.hasChildNodes() && Y.Lang.trim(node._node.childNodes[0].nodeValue) !== '') {
- foreground = Y.Color.fromArray(
- this._getComputedBackgroundColor(node, node.getComputedStyle('color')),
- Y.Color.TYPES.RGBA
- );
- background = Y.Color.fromArray(this._getComputedBackgroundColor(node), Y.Color.TYPES.RGBA);
-
- lum1 = this._getLuminanceFromCssColor(foreground);
- lum2 = this._getLuminanceFromCssColor(background);
-
- // Algorithm from "http://www.w3.org/TR/WCAG20-GENERAL/G18.html".
- if (lum1 > lum2) {
- ratio = (lum1 + 0.05) / (lum2 + 0.05);
- } else {
- ratio = (lum2 + 0.05) / (lum1 + 0.05);
- }
- if (ratio <= 4.5) {
-
- // We only want the highest node with dodgy contrast reported.
- var i = 0;
- var found = false;
- for (i = 0; i < problemNodes.length; i++) {
- if (node.ancestors('*').indexOf(problemNodes[i]) !== -1) {
- // Do not add node - it already has a parent in the list.
- found = true;
- break;
- } else if (problemNodes[i].ancestors('*').indexOf(node) !== -1) {
- // Replace the existing node with this one because it is higher up the DOM.
- problemNodes[i] = node;
- found = true;
- break;
- }
- }
- if (!found) {
- problemNodes.push(node);
- }
- }
- }
- }, this);
- this._addWarnings(list, M.util.get_string('needsmorecontrast', COMPONENT), problemNodes, false);
-
- // Check for lots of text with no headings.
- if (this.editor.get('text').length > 1000 && !this.editor.one('h3, h4, h5')) {
- this._addWarnings(list, M.util.get_string('needsmoreheadings', COMPONENT), [this.editor], false);
- }
-
- // Check for tables with no captions.
- problemNodes = [];
- this.editor.all('table').each(function(table) {
- var caption = table.one('caption');
- if (caption === null || caption.get('text').trim() === '') {
- problemNodes.push(table);
- }
- }, this);
- this._addWarnings(list, M.util.get_string('tablesmissingcaption', COMPONENT), problemNodes, false);
-
- // Check for tables with merged cells.
- problemNodes = [];
- this.editor.all('table').each(function(table) {
- var caption = table.one('[colspan],[rowspan]');
- if (caption !== null) {
- problemNodes.push(table);
- }
- }, this);
- this._addWarnings(list, M.util.get_string('tableswithmergedcells', COMPONENT), problemNodes, false);
-
- // Check for tables with no row/col headers
- problemNodes = [];
- this.editor.all('table').each(function(table) {
- if (table.one('tr').one('td')) {
- // First row has a non-header cell, so all rows must have at least one header.
- table.all('tr').some(function(row) {
- var header = row.one('th');
- if (!header || (header.get('text').trim() === '')) {
- problemNodes.push(table);
- return true;
- }
- return false;
- }, this);
- } else {
- // First row must have at least one header then.
- var hasHeader = false;
- table.one('tr').all('th').some(function(header) {
- hasHeader = true;
- if (header.get('text').trim() === '') {
- problemNodes.push(table);
- return true;
- }
- return false;
- });
- if (!hasHeader) {
- problemNodes.push(table);
- }
- }
- }, this);
- this._addWarnings(list, M.util.get_string('tablesmissingheaders', COMPONENT), problemNodes, false);
-
- if (!list.hasChildNodes()) {
- list.append('
');
- }
-
- // Return the list of current warnings.
- return list;
- },
-
- /**
- * Generate the HTML that lists the found warnings.
- *
- * @method _addWarnings
- * @param {Node} list Node to append the html to.
- * @param {String} description Description of this failure.
- * @param {array} nodes An array of failing nodes.
- * @param {boolean} imagewarnings true if the warnings are related to images, false if text.
- */
- _addWarnings: function(list, description, nodes, imagewarnings) {
- var warning, fails, i, src, textfield, li, link, text;
-
- if (nodes.length > 0) {
- warning = Y.Node.create('
' + description + '
');
- fails = Y.Node.create('');
- i = 0;
- for (i = 0; i < nodes.length; i++) {
- li = Y.Node.create('');
- if (imagewarnings) {
- src = nodes[i].getAttribute('src');
- link = Y.Node.create(' ' + src + '');
- } else {
- textfield = ('innerText' in nodes[i]) ? 'innerText' : 'textContent';
- text = nodes[i].get(textfield).trim();
- if (text === '') {
- text = M.util.get_string('emptytext', COMPONENT);
- }
- if (nodes[i] === this.editor) {
- text = M.util.get_string('entiredocument', COMPONENT);
- }
- link = Y.Node.create('' + text + '');
- }
- link.setData('sourceNode', nodes[i]);
- li.append(link);
- fails.append(li);
- }
-
- warning.append(fails);
- list.append(warning);
- }
- },
-
- /**
- * Convert a CSS color to a luminance value.
- *
- * @method _getLuminanceFromCssColor
- * @param {String} colortext The Hex value for the colour
- * @return {Number} The luminance value.
- * @private
- */
- _getLuminanceFromCssColor: function(colortext) {
- var color;
-
- if (colortext === 'transparent') {
- colortext = '#ffffff';
- }
- color = Y.Color.toArray(Y.Color.toRGB(colortext));
-
- // Algorithm from "http://www.w3.org/TR/WCAG20-GENERAL/G18.html".
- var part1 = function(a) {
- a = parseInt(a, 10) / 255.0;
- if (a <= 0.03928) {
- a = a / 12.92;
- } else {
- a = Math.pow(((a + 0.055) / 1.055), 2.4);
- }
- return a;
- };
-
- var r1 = part1(color[0]),
- g1 = part1(color[1]),
- b1 = part1(color[2]);
-
- return 0.2126 * r1 + 0.7152 * g1 + 0.0722 * b1;
- },
-
- /**
- * Get the computed RGB converted to full alpha value, considering the node hierarchy.
- *
- * @method _getComputedBackgroundColor
- * @param {Node} node
- * @param {String} color The initial colour. If not specified, fetches the backgroundColor from the node.
- * @return {Array} Colour in Array form (RGBA)
- * @private
- */
- _getComputedBackgroundColor: function(node, color) {
- color = color || node.getComputedStyle('backgroundColor');
-
- if (color.toLowerCase() === 'transparent') {
- // Y.Color doesn't handle 'transparent' properly.
- color = 'rgba(1, 1, 1, 0)';
- }
-
- // Convert the colour to its constituent parts in RGBA format, then fetch the alpha.
- var colorParts = Y.Color.toArray(color);
- var alpha = colorParts[3];
-
- if (alpha === 1) {
- // If the alpha of the background is already 1, then the parent background colour does not change anything.
- return colorParts;
- }
-
- // Fetch the computed background colour of the parent and use it to calculate the RGB of this item.
- var parentColor = this._getComputedBackgroundColor(node.get('parentNode'));
- return [
- // RGB = (alpha * R|G|B) + (1 - alpha * solid parent colour).
- (1 - alpha) * parentColor[0] + alpha * colorParts[0],
- (1 - alpha) * parentColor[1] + alpha * colorParts[1],
- (1 - alpha) * parentColor[2] + alpha * colorParts[2],
- // We always return a colour with full alpha.
- 1
- ];
- }
-});
-
-
-}, '@VERSION@', {"requires": ["color-base", "moodle-editor_atto-plugin"]});
diff --git a/lib/editor/atto/plugins/accessibilitychecker/yui/src/button/build.json b/lib/editor/atto/plugins/accessibilitychecker/yui/src/button/build.json
deleted file mode 100644
index 0278528268a..00000000000
--- a/lib/editor/atto/plugins/accessibilitychecker/yui/src/button/build.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "name": "moodle-atto_accessibilitychecker-button",
- "builds": {
- "moodle-atto_accessibilitychecker-button": {
- "jsfiles": [
- "button.js"
- ]
- }
- }
-}
diff --git a/lib/editor/atto/plugins/accessibilitychecker/yui/src/button/js/button.js b/lib/editor/atto/plugins/accessibilitychecker/yui/src/button/js/button.js
deleted file mode 100644
index 043cfa17373..00000000000
--- a/lib/editor/atto/plugins/accessibilitychecker/yui/src/button/js/button.js
+++ /dev/null
@@ -1,352 +0,0 @@
-// This file is part of Moodle - http://moodle.org/
-//
-// Moodle is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Moodle is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Moodle. If not, see .
-
-/*
- * @package atto_accessibilitychecker
- * @copyright 2014 Damyon Wiese
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-/**
- * @module moodle-atto_accessibilitychecker-button
- */
-
-/**
- * Accessibility Checking tool for the Atto editor.
- *
- * @namespace M.atto_accessibilitychecker
- * @class Button
- * @extends M.editor_atto.EditorPlugin
- */
-
-var COMPONENT = 'atto_accessibilitychecker';
-
-Y.namespace('M.atto_accessibilitychecker').Button = Y.Base.create('button', Y.M.editor_atto.EditorPlugin, [], {
-
- initializer: function() {
- this.addButton({
- icon: 'e/accessibility_checker',
- callback: this._displayDialogue
- });
- },
-
- /**
- * Display the Accessibility Checker tool.
- *
- * @method _displayDialogue
- * @private
- */
- _displayDialogue: function() {
- var dialogue = this.getDialogue({
- headerContent: M.util.get_string('pluginname', COMPONENT),
- width: '500px',
- focusAfterHide: true
- });
-
- // Set the dialogue content, and then show the dialogue.
- dialogue.set('bodyContent', this._getDialogueContent())
- .show();
- },
-
- /**
- * Return the dialogue content for the tool.
- *
- * @method _getDialogueContent
- * @private
- * @return {Node} The content to place in the dialogue.
- */
- _getDialogueContent: function() {
- var content = Y.Node.create('');
- content.append(this._getWarnings());
-
- // Add ability to select problem areas in the editor.
- content.delegate('click', function(e) {
- e.preventDefault();
-
- var host = this.get('host'),
- node = e.currentTarget.getData('sourceNode'),
- dialogue = this.getDialogue();
-
- if (node) {
- // Focus on the editor as we hide the dialogue.
- dialogue.set('focusAfterHide', this.editor).hide();
-
- // Then set the selection.
- host.setSelection(host.getSelectionFromNode(node));
- } else {
- // Hide the dialogue.
- dialogue.hide();
- }
- }, 'a', this);
-
- return content;
- },
-
- /**
- * Find all problems with the content editable region.
- *
- * @method _getWarnings
- * @return {Node} A complete list of all warnings and problems.
- * @private
- */
- _getWarnings: function() {
- var problemNodes,
- list = Y.Node.create('');
-
- // Images with no alt text or dodgy alt text.
- problemNodes = [];
- this.editor.all('img').each(function(img) {
- var alt = img.getAttribute('alt');
- if (typeof alt === 'undefined' || alt === '') {
- if (img.getAttribute('role') !== 'presentation') {
- problemNodes.push(img);
- }
- }
- }, this);
- this._addWarnings(list, M.util.get_string('imagesmissingalt', COMPONENT), problemNodes, true);
-
- problemNodes = [];
- this.editor.all('*').each(function(node) {
- var foreground,
- background,
- ratio,
- lum1,
- lum2;
-
- // Check for non-empty text.
- if (node.hasChildNodes() && Y.Lang.trim(node._node.childNodes[0].nodeValue) !== '') {
- foreground = Y.Color.fromArray(
- this._getComputedBackgroundColor(node, node.getComputedStyle('color')),
- Y.Color.TYPES.RGBA
- );
- background = Y.Color.fromArray(this._getComputedBackgroundColor(node), Y.Color.TYPES.RGBA);
-
- lum1 = this._getLuminanceFromCssColor(foreground);
- lum2 = this._getLuminanceFromCssColor(background);
-
- // Algorithm from "http://www.w3.org/TR/WCAG20-GENERAL/G18.html".
- if (lum1 > lum2) {
- ratio = (lum1 + 0.05) / (lum2 + 0.05);
- } else {
- ratio = (lum2 + 0.05) / (lum1 + 0.05);
- }
- if (ratio <= 4.5) {
- Y.log('Contrast ratio is too low: ' + ratio +
- ' Colour 1: ' + foreground +
- ' Colour 2: ' + background +
- ' Luminance 1: ' + lum1 +
- ' Luminance 2: ' + lum2);
-
- // We only want the highest node with dodgy contrast reported.
- var i = 0;
- var found = false;
- for (i = 0; i < problemNodes.length; i++) {
- if (node.ancestors('*').indexOf(problemNodes[i]) !== -1) {
- // Do not add node - it already has a parent in the list.
- found = true;
- break;
- } else if (problemNodes[i].ancestors('*').indexOf(node) !== -1) {
- // Replace the existing node with this one because it is higher up the DOM.
- problemNodes[i] = node;
- found = true;
- break;
- }
- }
- if (!found) {
- problemNodes.push(node);
- }
- }
- }
- }, this);
- this._addWarnings(list, M.util.get_string('needsmorecontrast', COMPONENT), problemNodes, false);
-
- // Check for lots of text with no headings.
- if (this.editor.get('text').length > 1000 && !this.editor.one('h3, h4, h5')) {
- this._addWarnings(list, M.util.get_string('needsmoreheadings', COMPONENT), [this.editor], false);
- }
-
- // Check for tables with no captions.
- problemNodes = [];
- this.editor.all('table').each(function(table) {
- var caption = table.one('caption');
- if (caption === null || caption.get('text').trim() === '') {
- problemNodes.push(table);
- }
- }, this);
- this._addWarnings(list, M.util.get_string('tablesmissingcaption', COMPONENT), problemNodes, false);
-
- // Check for tables with merged cells.
- problemNodes = [];
- this.editor.all('table').each(function(table) {
- var caption = table.one('[colspan],[rowspan]');
- if (caption !== null) {
- problemNodes.push(table);
- }
- }, this);
- this._addWarnings(list, M.util.get_string('tableswithmergedcells', COMPONENT), problemNodes, false);
-
- // Check for tables with no row/col headers
- problemNodes = [];
- this.editor.all('table').each(function(table) {
- if (table.one('tr').one('td')) {
- // First row has a non-header cell, so all rows must have at least one header.
- table.all('tr').some(function(row) {
- var header = row.one('th');
- if (!header || (header.get('text').trim() === '')) {
- problemNodes.push(table);
- return true;
- }
- return false;
- }, this);
- } else {
- // First row must have at least one header then.
- var hasHeader = false;
- table.one('tr').all('th').some(function(header) {
- hasHeader = true;
- if (header.get('text').trim() === '') {
- problemNodes.push(table);
- return true;
- }
- return false;
- });
- if (!hasHeader) {
- problemNodes.push(table);
- }
- }
- }, this);
- this._addWarnings(list, M.util.get_string('tablesmissingheaders', COMPONENT), problemNodes, false);
-
- if (!list.hasChildNodes()) {
- list.append('
');
- }
-
- // Return the list of current warnings.
- return list;
- },
-
- /**
- * Generate the HTML that lists the found warnings.
- *
- * @method _addWarnings
- * @param {Node} list Node to append the html to.
- * @param {String} description Description of this failure.
- * @param {array} nodes An array of failing nodes.
- * @param {boolean} imagewarnings true if the warnings are related to images, false if text.
- */
- _addWarnings: function(list, description, nodes, imagewarnings) {
- var warning, fails, i, src, textfield, li, link, text;
-
- if (nodes.length > 0) {
- warning = Y.Node.create('
' + description + '
');
- fails = Y.Node.create('');
- i = 0;
- for (i = 0; i < nodes.length; i++) {
- li = Y.Node.create('');
- if (imagewarnings) {
- src = nodes[i].getAttribute('src');
- link = Y.Node.create(' ' + src + '');
- } else {
- textfield = ('innerText' in nodes[i]) ? 'innerText' : 'textContent';
- text = nodes[i].get(textfield).trim();
- if (text === '') {
- text = M.util.get_string('emptytext', COMPONENT);
- }
- if (nodes[i] === this.editor) {
- text = M.util.get_string('entiredocument', COMPONENT);
- }
- link = Y.Node.create('' + text + '');
- }
- link.setData('sourceNode', nodes[i]);
- li.append(link);
- fails.append(li);
- }
-
- warning.append(fails);
- list.append(warning);
- }
- },
-
- /**
- * Convert a CSS color to a luminance value.
- *
- * @method _getLuminanceFromCssColor
- * @param {String} colortext The Hex value for the colour
- * @return {Number} The luminance value.
- * @private
- */
- _getLuminanceFromCssColor: function(colortext) {
- var color;
-
- if (colortext === 'transparent') {
- colortext = '#ffffff';
- }
- color = Y.Color.toArray(Y.Color.toRGB(colortext));
-
- // Algorithm from "http://www.w3.org/TR/WCAG20-GENERAL/G18.html".
- var part1 = function(a) {
- a = parseInt(a, 10) / 255.0;
- if (a <= 0.03928) {
- a = a / 12.92;
- } else {
- a = Math.pow(((a + 0.055) / 1.055), 2.4);
- }
- return a;
- };
-
- var r1 = part1(color[0]),
- g1 = part1(color[1]),
- b1 = part1(color[2]);
-
- return 0.2126 * r1 + 0.7152 * g1 + 0.0722 * b1;
- },
-
- /**
- * Get the computed RGB converted to full alpha value, considering the node hierarchy.
- *
- * @method _getComputedBackgroundColor
- * @param {Node} node
- * @param {String} color The initial colour. If not specified, fetches the backgroundColor from the node.
- * @return {Array} Colour in Array form (RGBA)
- * @private
- */
- _getComputedBackgroundColor: function(node, color) {
- color = color || node.getComputedStyle('backgroundColor');
-
- if (color.toLowerCase() === 'transparent') {
- // Y.Color doesn't handle 'transparent' properly.
- color = 'rgba(1, 1, 1, 0)';
- }
-
- // Convert the colour to its constituent parts in RGBA format, then fetch the alpha.
- var colorParts = Y.Color.toArray(color);
- var alpha = colorParts[3];
-
- if (alpha === 1) {
- // If the alpha of the background is already 1, then the parent background colour does not change anything.
- return colorParts;
- }
-
- // Fetch the computed background colour of the parent and use it to calculate the RGB of this item.
- var parentColor = this._getComputedBackgroundColor(node.get('parentNode'));
- return [
- // RGB = (alpha * R|G|B) + (1 - alpha * solid parent colour).
- (1 - alpha) * parentColor[0] + alpha * colorParts[0],
- (1 - alpha) * parentColor[1] + alpha * colorParts[1],
- (1 - alpha) * parentColor[2] + alpha * colorParts[2],
- // We always return a colour with full alpha.
- 1
- ];
- }
-});
diff --git a/lib/editor/atto/plugins/accessibilitychecker/yui/src/button/meta/button.json b/lib/editor/atto/plugins/accessibilitychecker/yui/src/button/meta/button.json
deleted file mode 100644
index af6ecb764a3..00000000000
--- a/lib/editor/atto/plugins/accessibilitychecker/yui/src/button/meta/button.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "moodle-atto_accessibilitychecker-button": {
- "requires": [
- "color-base",
- "moodle-editor_atto-plugin"
- ]
- }
-}
diff --git a/lib/editor/atto/plugins/accessibilityhelper/classes/privacy/provider.php b/lib/editor/atto/plugins/accessibilityhelper/classes/privacy/provider.php
deleted file mode 100644
index d04a2cf2dab..00000000000
--- a/lib/editor/atto/plugins/accessibilityhelper/classes/privacy/provider.php
+++ /dev/null
@@ -1,46 +0,0 @@
-.
-
-/**
- * Privacy Subsystem implementation for block_activity_modules.
- *
- * @package atto_accessibilityhelper
- * @copyright 2018 Andrew Nicols
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-namespace atto_accessibilityhelper\privacy;
-
-defined('MOODLE_INTERNAL') || die();
-
-/**
- * Privacy Subsystem for atto_accessibilityhelper implementing null_provider.
- *
- * @copyright 2018 Andrew Nicols
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-class provider implements \core_privacy\local\metadata\null_provider {
-
- /**
- * Get the language string identifier with the component's language
- * file to explain why this plugin stores no data.
- *
- * @return string
- */
- public static function get_reason(): string {
- return 'privacy:metadata';
- }
-}
diff --git a/lib/editor/atto/plugins/accessibilityhelper/lang/en/atto_accessibilityhelper.php b/lib/editor/atto/plugins/accessibilityhelper/lang/en/atto_accessibilityhelper.php
deleted file mode 100644
index 8053356a9ea..00000000000
--- a/lib/editor/atto/plugins/accessibilityhelper/lang/en/atto_accessibilityhelper.php
+++ /dev/null
@@ -1,34 +0,0 @@
-.
-
-/**
- * Strings for component 'atto_accessibilityhelper', language 'en'.
- *
- * @package atto_accessibilityhelper
- * @copyright 2014 Damyon Wiese
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-$string['pluginname'] = 'Screenreader helper';
-$string['liststyles'] = 'Styles for current selection:';
-$string['nostyles'] = 'No styles';
-$string['listlinks'] = 'Links in text editor:';
-$string['nolinks'] = 'No links';
-$string['selectlink'] = 'Select link';
-$string['listimages'] = 'Images in text editor:';
-$string['noimages'] = 'No images';
-$string['selectimage'] = 'Select image';
-$string['privacy:metadata'] = 'The atto_accessibilityhelper plugin does not store any personal data.';
diff --git a/lib/editor/atto/plugins/accessibilityhelper/lib.php b/lib/editor/atto/plugins/accessibilityhelper/lib.php
deleted file mode 100644
index 4f39206739a..00000000000
--- a/lib/editor/atto/plugins/accessibilityhelper/lib.php
+++ /dev/null
@@ -1,44 +0,0 @@
-.
-
-/**
- * Atto text editor integration version file.
- *
- * @package atto_accessibilityhelper
- * @copyright 2014 Damyon Wiese
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-defined('MOODLE_INTERNAL') || die();
-
-/**
- * Initialise this plugin
- * @param string $elementid
- */
-function atto_accessibilityhelper_strings_for_js() {
- global $PAGE;
-
- $PAGE->requires->strings_for_js(array('liststyles',
- 'nostyles',
- 'listlinks',
- 'nolinks',
- 'selectlink',
- 'listimages',
- 'noimages',
- 'selectimage'),
- 'atto_accessibilityhelper');
-}
-
diff --git a/lib/editor/atto/plugins/accessibilityhelper/tests/behat/accessibilityhelper.feature b/lib/editor/atto/plugins/accessibilityhelper/tests/behat/accessibilityhelper.feature
deleted file mode 100644
index 3d05e6c7521..00000000000
--- a/lib/editor/atto/plugins/accessibilityhelper/tests/behat/accessibilityhelper.feature
+++ /dev/null
@@ -1,32 +0,0 @@
-@editor @editor_atto @atto @atto_accessibilityhelper
-Feature: Atto accessibility helper
- To use a screen reader effectively in Atto, I may need additional information about the text
-
- @javascript
- Scenario: Images and links
- Given I log in as "admin"
- And I open my profile in edit mode
- And I set the field "Description" to "
"
- And I select the text in the "Description" Atto editor
- When I click on "Show more buttons" "button"
- And I click on "Screenreader helper" "button"
- Then I should see "Links in text editor"
- And I should see "Some link text"
- And I should see "Images in text editor"
- And I should see "Image 1"
- And I should not see "No images"
- And I should not see "No links"
-
- @javascript
- Scenario: Styles
- Given I log in as "admin"
- And I open my profile in edit mode
- And I set the field "Description" to "
Some plain text
"
- When I click on "Show more buttons" "button"
- And I select the text in the "Description" Atto editor
- And I click on "Unordered list" "button"
- And I click on "Screenreader helper" "button"
- And I select the text in the "Description" Atto editor
- # This shows the current HTML tags applied to the selected text.
- # This is required because they are not always read by a screen reader.
- Then I should see "UL, LI"
diff --git a/lib/editor/atto/plugins/accessibilityhelper/version.php b/lib/editor/atto/plugins/accessibilityhelper/version.php
deleted file mode 100644
index 499e6d4549d..00000000000
--- a/lib/editor/atto/plugins/accessibilityhelper/version.php
+++ /dev/null
@@ -1,29 +0,0 @@
-.
-
-/**
- * Atto text editor integration version file.
- *
- * @package atto_accessibilityhelper
- * @copyright 2014 Damyon Wiese
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-defined('MOODLE_INTERNAL') || die();
-
-$plugin->version = 2024121800; // The current plugin version (Date: YYYYMMDDXX).
-$plugin->requires = 2024100100; // Requires this Moodle version.
-$plugin->component = 'atto_accessibilityhelper'; // Full name of the plugin (used for diagnostics).
diff --git a/lib/editor/atto/plugins/accessibilityhelper/yui/build/moodle-atto_accessibilityhelper-button/moodle-atto_accessibilityhelper-button-debug.js b/lib/editor/atto/plugins/accessibilityhelper/yui/build/moodle-atto_accessibilityhelper-button/moodle-atto_accessibilityhelper-button-debug.js
deleted file mode 100644
index 0dd0891dd78..00000000000
--- a/lib/editor/atto/plugins/accessibilityhelper/yui/build/moodle-atto_accessibilityhelper-button/moodle-atto_accessibilityhelper-button-debug.js
+++ /dev/null
@@ -1,280 +0,0 @@
-YUI.add('moodle-atto_accessibilityhelper-button', function (Y, NAME) {
-
-// This file is part of Moodle - http://moodle.org/
-//
-// Moodle is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Moodle is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Moodle. If not, see .
-
-/*
- * @package atto_accessibilityhelper
- * @copyright 2014 Damyon Wiese
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-/**
- * @module moodle-atto_accessibilityhelper-button
- */
-
-/**
- * Atto text editor accessibilityhelper plugin.
- *
- * This plugin adds some functions to do things that screen readers do not do well.
- * Specifically, listing the active styles for the selected text,
- * listing the images in the page, listing the links in the page.
- *
- *
- * @namespace M.atto_accessibilityhelper
- * @class Button
- * @extends M.editor_atto.EditorPlugin
- */
-
-var COMPONENT = 'atto_accessibilityhelper',
- TEMPLATE = '' +
- // The list of styles.
- '
"),s},_imageSelected:function(e){e.preventDefault(),this.getDialogue({focusAfterNode:null}).hide();var t=this.get("host"),e=e.target.getData("sourceimage");this.editor.focus(),t.setSelection(t.getSelectionFromNode(e))},_linkSelected:function(e){e.preventDefault(),this.getDialogue({focusAfterNode:null}).hide();var t=this.get("host"),e=e.target.getData("sourcelink");this.editor.focus(),t.setSelection(t.getSelectionFromNode(e))}})},"@VERSION@",{requires:["moodle-editor_atto-plugin"]});
\ No newline at end of file
diff --git a/lib/editor/atto/plugins/accessibilityhelper/yui/build/moodle-atto_accessibilityhelper-button/moodle-atto_accessibilityhelper-button.js b/lib/editor/atto/plugins/accessibilityhelper/yui/build/moodle-atto_accessibilityhelper-button/moodle-atto_accessibilityhelper-button.js
deleted file mode 100644
index 0dd0891dd78..00000000000
--- a/lib/editor/atto/plugins/accessibilityhelper/yui/build/moodle-atto_accessibilityhelper-button/moodle-atto_accessibilityhelper-button.js
+++ /dev/null
@@ -1,280 +0,0 @@
-YUI.add('moodle-atto_accessibilityhelper-button', function (Y, NAME) {
-
-// This file is part of Moodle - http://moodle.org/
-//
-// Moodle is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Moodle is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Moodle. If not, see .
-
-/*
- * @package atto_accessibilityhelper
- * @copyright 2014 Damyon Wiese
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-/**
- * @module moodle-atto_accessibilityhelper-button
- */
-
-/**
- * Atto text editor accessibilityhelper plugin.
- *
- * This plugin adds some functions to do things that screen readers do not do well.
- * Specifically, listing the active styles for the selected text,
- * listing the images in the page, listing the links in the page.
- *
- *
- * @namespace M.atto_accessibilityhelper
- * @class Button
- * @extends M.editor_atto.EditorPlugin
- */
-
-var COMPONENT = 'atto_accessibilityhelper',
- TEMPLATE = '' +
- // The list of styles.
- '
' +
- '',
-
- CSS = {
- STYLESLABEL: COMPONENT + '_styleslabel',
- LINKSLABEL: COMPONENT + '_linkslabel',
- IMAGESLABEL: COMPONENT + '_imageslabel'
- };
-
-Y.namespace('M.atto_accessibilityhelper').Button = Y.Base.create('button', Y.M.editor_atto.EditorPlugin, [], {
-
- initializer: function() {
- this.addButton({
- icon: 'e/screenreader_helper',
- callback: this._displayDialogue
- });
- },
-
- /**
- * Display the Accessibility Helper tool.
- *
- * @method _displayDialogue
- * @private
- */
- _displayDialogue: function() {
- var dialogue = this.getDialogue({
- headerContent: M.util.get_string('pluginname', COMPONENT),
- width: '800px',
- focusAfterHide: true
- });
-
- // Set the dialogue content, and then show the dialogue.
- dialogue.set('bodyContent', this._getDialogueContent())
- .show();
- },
-
- /**
- * Return the dialogue content for the tool, attaching any required
- * events.
- *
- * @method _getDialogueContent
- * @private
- * @return {Node} The content to place in the dialogue.
- */
- _getDialogueContent: function() {
- var template = Y.Handlebars.compile(TEMPLATE),
- content = Y.Node.create(template({
- CSS: CSS,
- component: COMPONENT
- }));
-
- // Add the data.
- content.one('.listStyles')
- .empty()
- .appendChild(this._listStyles());
- content.one('.listLinks')
- .empty()
- .appendChild(this._listLinks());
- content.one('.listImages')
- .empty()
- .appendChild(this._listImages());
-
- return content;
- },
-
- /**
- * List the styles present for the selection.
- *
- * @method _listStyles
- * @return {String} The list of styles in use.
- * @private
- */
- _listStyles: function() {
- // Clear the status node.
- var list = [],
- host = this.get('host'),
- current = host.getSelectionParentNode(),
- tagname;
-
- if (current) {
- current = Y.one(current);
- }
-
- while (current && (current !== this.editor)) {
- tagname = current.get('tagName');
- if (typeof tagname !== 'undefined') {
- list.push(Y.Escape.html(tagname));
- }
- current = current.ancestor();
- }
- if (list.length === 0) {
- list.push(M.util.get_string('nostyles', COMPONENT));
- }
-
- list.reverse();
-
- // Append the list of current styles.
- return list.join(', ');
- },
-
- /**
- * List the links for the current editor
- *
- * @method _listLinks
- * @return {string}
- * @private
- */
- _listLinks: function() {
- var list = Y.Node.create(''),
- listitem,
- selectlink;
-
- this.editor.all('a').each(function(link) {
- selectlink = Y.Node.create('' +
- Y.Escape.html(link.get('text')) +
- '');
-
- selectlink.setData('sourcelink', link);
- selectlink.on('click', this._linkSelected, this);
-
- listitem = Y.Node.create('');
- listitem.appendChild(selectlink);
-
- list.appendChild(listitem);
- }, this);
-
- if (!list.hasChildNodes()) {
- list.append('
' + M.util.get_string('nolinks', COMPONENT) + '
');
- }
-
- // Append the list of current styles.
- return list;
- },
-
- /**
- * List the images used in the editor.
- *
- * @method _listImages
- * @return {Node} A Node containing all of the images present in the editor.
- * @private
- */
- _listImages: function() {
- var list = Y.Node.create(''),
- listitem,
- selectimage;
-
- this.editor.all('img').each(function(image) {
- // Get the alt or title or img url of the image.
- var imgalt = image.getAttribute('alt');
- if (imgalt === '') {
- imgalt = image.getAttribute('title');
- if (imgalt === '') {
- imgalt = image.getAttribute('src');
- }
- }
-
- selectimage = Y.Node.create('' +
- Y.Escape.html(imgalt) +
- '');
-
- selectimage.setData('sourceimage', image);
- selectimage.on('click', this._imageSelected, this);
-
- listitem = Y.Node.create('');
- listitem.append(selectimage);
- list.append(listitem);
- }, this);
- if (!list.hasChildNodes()) {
- list.append('
' + M.util.get_string('noimages', COMPONENT) + '
');
- }
-
- // Append the list of current styles.
- return list;
- },
-
- /**
- * Event handler for selecting an image.
- *
- * @method _imageSelected
- * @param {EventFacade} e
- * @private
- */
- _imageSelected: function(e) {
- e.preventDefault();
-
- this.getDialogue({
- focusAfterNode: null
- }).hide();
-
- var host = this.get('host'),
- target = e.target.getData('sourceimage');
-
- this.editor.focus();
- host.setSelection(host.getSelectionFromNode(target));
- },
-
- /**
- * Event handler for selecting a link.
- *
- * @method _linkSelected
- * @param {EventFacade} e
- * @private
- */
- _linkSelected: function(e) {
- e.preventDefault();
-
- this.getDialogue({
- focusAfterNode: null
- }).hide();
-
- var host = this.get('host'),
- target = e.target.getData('sourcelink');
-
- this.editor.focus();
- host.setSelection(host.getSelectionFromNode(target));
- }
-});
-
-
-}, '@VERSION@', {"requires": ["moodle-editor_atto-plugin"]});
diff --git a/lib/editor/atto/plugins/accessibilityhelper/yui/src/button/build.json b/lib/editor/atto/plugins/accessibilityhelper/yui/src/button/build.json
deleted file mode 100644
index e0fd3462631..00000000000
--- a/lib/editor/atto/plugins/accessibilityhelper/yui/src/button/build.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "name": "moodle-atto_accessibilityhelper-button",
- "builds": {
- "moodle-atto_accessibilityhelper-button": {
- "jsfiles": [
- "button.js"
- ]
- }
- }
-}
diff --git a/lib/editor/atto/plugins/accessibilityhelper/yui/src/button/js/button.js b/lib/editor/atto/plugins/accessibilityhelper/yui/src/button/js/button.js
deleted file mode 100644
index d01d387f0e4..00000000000
--- a/lib/editor/atto/plugins/accessibilityhelper/yui/src/button/js/button.js
+++ /dev/null
@@ -1,275 +0,0 @@
-// This file is part of Moodle - http://moodle.org/
-//
-// Moodle is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Moodle is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Moodle. If not, see .
-
-/*
- * @package atto_accessibilityhelper
- * @copyright 2014 Damyon Wiese
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-/**
- * @module moodle-atto_accessibilityhelper-button
- */
-
-/**
- * Atto text editor accessibilityhelper plugin.
- *
- * This plugin adds some functions to do things that screen readers do not do well.
- * Specifically, listing the active styles for the selected text,
- * listing the images in the page, listing the links in the page.
- *
- *
- * @namespace M.atto_accessibilityhelper
- * @class Button
- * @extends M.editor_atto.EditorPlugin
- */
-
-var COMPONENT = 'atto_accessibilityhelper',
- TEMPLATE = '' +
- // The list of styles.
- '
' +
- '',
-
- CSS = {
- STYLESLABEL: COMPONENT + '_styleslabel',
- LINKSLABEL: COMPONENT + '_linkslabel',
- IMAGESLABEL: COMPONENT + '_imageslabel'
- };
-
-Y.namespace('M.atto_accessibilityhelper').Button = Y.Base.create('button', Y.M.editor_atto.EditorPlugin, [], {
-
- initializer: function() {
- this.addButton({
- icon: 'e/screenreader_helper',
- callback: this._displayDialogue
- });
- },
-
- /**
- * Display the Accessibility Helper tool.
- *
- * @method _displayDialogue
- * @private
- */
- _displayDialogue: function() {
- var dialogue = this.getDialogue({
- headerContent: M.util.get_string('pluginname', COMPONENT),
- width: '800px',
- focusAfterHide: true
- });
-
- // Set the dialogue content, and then show the dialogue.
- dialogue.set('bodyContent', this._getDialogueContent())
- .show();
- },
-
- /**
- * Return the dialogue content for the tool, attaching any required
- * events.
- *
- * @method _getDialogueContent
- * @private
- * @return {Node} The content to place in the dialogue.
- */
- _getDialogueContent: function() {
- var template = Y.Handlebars.compile(TEMPLATE),
- content = Y.Node.create(template({
- CSS: CSS,
- component: COMPONENT
- }));
-
- // Add the data.
- content.one('.listStyles')
- .empty()
- .appendChild(this._listStyles());
- content.one('.listLinks')
- .empty()
- .appendChild(this._listLinks());
- content.one('.listImages')
- .empty()
- .appendChild(this._listImages());
-
- return content;
- },
-
- /**
- * List the styles present for the selection.
- *
- * @method _listStyles
- * @return {String} The list of styles in use.
- * @private
- */
- _listStyles: function() {
- // Clear the status node.
- var list = [],
- host = this.get('host'),
- current = host.getSelectionParentNode(),
- tagname;
-
- if (current) {
- current = Y.one(current);
- }
-
- while (current && (current !== this.editor)) {
- tagname = current.get('tagName');
- if (typeof tagname !== 'undefined') {
- list.push(Y.Escape.html(tagname));
- }
- current = current.ancestor();
- }
- if (list.length === 0) {
- list.push(M.util.get_string('nostyles', COMPONENT));
- }
-
- list.reverse();
-
- // Append the list of current styles.
- return list.join(', ');
- },
-
- /**
- * List the links for the current editor
- *
- * @method _listLinks
- * @return {string}
- * @private
- */
- _listLinks: function() {
- var list = Y.Node.create(''),
- listitem,
- selectlink;
-
- this.editor.all('a').each(function(link) {
- selectlink = Y.Node.create('' +
- Y.Escape.html(link.get('text')) +
- '');
-
- selectlink.setData('sourcelink', link);
- selectlink.on('click', this._linkSelected, this);
-
- listitem = Y.Node.create('');
- listitem.appendChild(selectlink);
-
- list.appendChild(listitem);
- }, this);
-
- if (!list.hasChildNodes()) {
- list.append('
' + M.util.get_string('nolinks', COMPONENT) + '
');
- }
-
- // Append the list of current styles.
- return list;
- },
-
- /**
- * List the images used in the editor.
- *
- * @method _listImages
- * @return {Node} A Node containing all of the images present in the editor.
- * @private
- */
- _listImages: function() {
- var list = Y.Node.create(''),
- listitem,
- selectimage;
-
- this.editor.all('img').each(function(image) {
- // Get the alt or title or img url of the image.
- var imgalt = image.getAttribute('alt');
- if (imgalt === '') {
- imgalt = image.getAttribute('title');
- if (imgalt === '') {
- imgalt = image.getAttribute('src');
- }
- }
-
- selectimage = Y.Node.create('' +
- Y.Escape.html(imgalt) +
- '');
-
- selectimage.setData('sourceimage', image);
- selectimage.on('click', this._imageSelected, this);
-
- listitem = Y.Node.create('');
- listitem.append(selectimage);
- list.append(listitem);
- }, this);
- if (!list.hasChildNodes()) {
- list.append('
' + M.util.get_string('noimages', COMPONENT) + '
');
- }
-
- // Append the list of current styles.
- return list;
- },
-
- /**
- * Event handler for selecting an image.
- *
- * @method _imageSelected
- * @param {EventFacade} e
- * @private
- */
- _imageSelected: function(e) {
- e.preventDefault();
-
- this.getDialogue({
- focusAfterNode: null
- }).hide();
-
- var host = this.get('host'),
- target = e.target.getData('sourceimage');
-
- this.editor.focus();
- host.setSelection(host.getSelectionFromNode(target));
- },
-
- /**
- * Event handler for selecting a link.
- *
- * @method _linkSelected
- * @param {EventFacade} e
- * @private
- */
- _linkSelected: function(e) {
- e.preventDefault();
-
- this.getDialogue({
- focusAfterNode: null
- }).hide();
-
- var host = this.get('host'),
- target = e.target.getData('sourcelink');
-
- this.editor.focus();
- host.setSelection(host.getSelectionFromNode(target));
- }
-});
diff --git a/lib/editor/atto/plugins/accessibilityhelper/yui/src/button/meta/button.json b/lib/editor/atto/plugins/accessibilityhelper/yui/src/button/meta/button.json
deleted file mode 100644
index 81dd844fe1e..00000000000
--- a/lib/editor/atto/plugins/accessibilityhelper/yui/src/button/meta/button.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "moodle-atto_accessibilityhelper-button": {
- "requires": [
- "moodle-editor_atto-plugin"
- ]
- }
-}
diff --git a/lib/editor/atto/plugins/align/classes/privacy/provider.php b/lib/editor/atto/plugins/align/classes/privacy/provider.php
deleted file mode 100644
index c528965c356..00000000000
--- a/lib/editor/atto/plugins/align/classes/privacy/provider.php
+++ /dev/null
@@ -1,46 +0,0 @@
-.
-
-/**
- * Privacy Subsystem implementation for block_activity_modules.
- *
- * @package atto_align
- * @copyright 2018 Andrew Nicols
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-namespace atto_align\privacy;
-
-defined('MOODLE_INTERNAL') || die();
-
-/**
- * Privacy Subsystem for atto_align implementing null_provider.
- *
- * @copyright 2018 Andrew Nicols
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-class provider implements \core_privacy\local\metadata\null_provider {
-
- /**
- * Get the language string identifier with the component's language
- * file to explain why this plugin stores no data.
- *
- * @return string
- */
- public static function get_reason(): string {
- return 'privacy:metadata';
- }
-}
diff --git a/lib/editor/atto/plugins/align/lang/en/atto_align.php b/lib/editor/atto/plugins/align/lang/en/atto_align.php
deleted file mode 100644
index f8dbcdefa43..00000000000
--- a/lib/editor/atto/plugins/align/lang/en/atto_align.php
+++ /dev/null
@@ -1,29 +0,0 @@
-.
-
-/**
- * Strings for component 'atto_align', language 'en'.
- *
- * @package atto_align
- * @copyright 2014 Frédéric Massart
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-$string['center'] = 'Center';
-$string['leftalign'] = 'Left align';
-$string['pluginname'] = 'Text align';
-$string['rightalign'] = 'Right align';
-$string['privacy:metadata'] = 'The atto_align plugin does not store any personal data.';
diff --git a/lib/editor/atto/plugins/align/lib.php b/lib/editor/atto/plugins/align/lib.php
deleted file mode 100644
index 1363af8c463..00000000000
--- a/lib/editor/atto/plugins/align/lib.php
+++ /dev/null
@@ -1,35 +0,0 @@
-.
-
-/**
- * Atto text editor align plugin lib.
- *
- * @package atto_align
- * @copyright 2014 Frédéric Massart
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-defined('MOODLE_INTERNAL') || die();
-
-/**
- * Initialise the strings required for JS.
- *
- * @return void
- */
-function atto_align_strings_for_js() {
- global $PAGE;
- $PAGE->requires->strings_for_js(array('center', 'leftalign', 'rightalign'), 'atto_align');
-}
diff --git a/lib/editor/atto/plugins/align/tests/behat/align.feature b/lib/editor/atto/plugins/align/tests/behat/align.feature
deleted file mode 100644
index 9e3a9009c85..00000000000
--- a/lib/editor/atto/plugins/align/tests/behat/align.feature
+++ /dev/null
@@ -1,52 +0,0 @@
-@editor @editor_atto @atto @atto_align
-Feature: Atto align text
- To format text in Atto, I need to use the align buttons.
-
- @javascript
- Scenario: Right align some text
- Given I log in as "admin"
- And I open my profile in edit mode
- And I set the field "Description" to "
Fascism
"
- And I click on "Show more buttons" "button"
- And I select the text in the "Description" Atto editor
- When I click on "Right align" "button"
- And I press "Update profile"
- And I follow "Preferences" in the user menu
- And I follow "Editor preferences"
- And I set the field "Text editor" to "Plain text area"
- And I press "Save changes"
- And I click on "Edit profile" "link" in the "region-main" "region"
- Then I should see "style=\"text-align:right;\""
-
- @javascript
- Scenario: Left align some text
- Given I log in as "admin"
- And I open my profile in edit mode
- And I set the field "Description" to "
Communism
"
- And I click on "Show more buttons" "button"
- And I select the text in the "Description" Atto editor
- When I click on "Right align" "button"
- And I click on "Left align" "button"
- And I press "Update profile"
- And I follow "Preferences" in the user menu
- And I follow "Editor preferences"
- And I set the field "Text editor" to "Plain text area"
- And I press "Save changes"
- And I click on "Edit profile" "link" in the "region-main" "region"
- Then I should see "style=\"text-align:left;\""
-
- @javascript
- Scenario: Center align some text
- Given I log in as "admin"
- And I open my profile in edit mode
- And I set the field "Description" to "
United Future
"
- And I click on "Show more buttons" "button"
- And I select the text in the "Description" Atto editor
- When I click on "Center" "button"
- And I press "Update profile"
- And I follow "Preferences" in the user menu
- And I follow "Editor preferences"
- And I set the field "Text editor" to "Plain text area"
- And I press "Save changes"
- And I click on "Edit profile" "link" in the "region-main" "region"
- Then I should see "style=\"text-align:center;\""
diff --git a/lib/editor/atto/plugins/align/version.php b/lib/editor/atto/plugins/align/version.php
deleted file mode 100644
index 1cb50f3ad50..00000000000
--- a/lib/editor/atto/plugins/align/version.php
+++ /dev/null
@@ -1,29 +0,0 @@
-.
-
-/**
- * Atto text editor align plugin version file.
- *
- * @package atto_align
- * @copyright 2014 Frédéric Massart
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-defined('MOODLE_INTERNAL') || die();
-
-$plugin->version = 2024121800; // The current plugin version (Date: YYYYMMDDXX).
-$plugin->requires = 2024100100; // Requires this Moodle version.
-$plugin->component = 'atto_align'; // Full name of the plugin (used for diagnostics).
diff --git a/lib/editor/atto/plugins/align/yui/build/moodle-atto_align-button/moodle-atto_align-button-debug.js b/lib/editor/atto/plugins/align/yui/build/moodle-atto_align-button/moodle-atto_align-button-debug.js
deleted file mode 100644
index 38645d7d2e3..00000000000
--- a/lib/editor/atto/plugins/align/yui/build/moodle-atto_align-button/moodle-atto_align-button-debug.js
+++ /dev/null
@@ -1,106 +0,0 @@
-YUI.add('moodle-atto_align-button', function (Y, NAME) {
-
-// This file is part of Moodle - http://moodle.org/
-//
-// Moodle is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Moodle is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Moodle. If not, see .
-
-/*
- * @package atto_align
- * @copyright 2014 Frédéric Massart
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-/**
- * @module moodle-atto_align-button
- */
-
-/**
- * Atto text editor align plugin.
- *
- * @namespace M.atto_align
- * @class button
- * @extends M.editor_atto.EditorPlugin
- */
-
-Y.namespace('M.atto_align').Button = Y.Base.create('button', Y.M.editor_atto.EditorPlugin, [], {
- initializer: function() {
- var alignment;
-
- alignment = 'justifyLeft';
- this.addButton({
- icon: 'e/align_left',
- title: 'leftalign',
- buttonName: alignment,
- callback: this._changeStyle,
- callbackArgs: alignment
- });
-
- alignment = 'justifyCenter';
- this.addButton({
- icon: 'e/align_center',
- title: 'center',
- buttonName: alignment,
- callback: this._changeStyle,
- callbackArgs: alignment
- });
-
- alignment = 'justifyRight';
- this.addButton({
- icon: 'e/align_right',
- title: 'rightalign',
- buttonName: alignment,
- callback: this._changeStyle,
- callbackArgs: alignment
- });
- },
-
-
- /**
- * Change the alignment to the specified justification.
- *
- * @method _changeStyle
- * @param {EventFacade} e
- * @param {string} justification The execCommand for the new justification.
- * @private
- */
- _changeStyle: function(e, justification) {
- var host = this.get('host');
-
- // We temporarily re-enable CSS styling to try to have the most consistency.
- // Though, IE, as always, is stubborn and will do its own thing...
- host.enableCssStyling();
-
- document.execCommand(justification, false, null);
-
- // To clean up IE's mess.
- this.editor.all('*[align]').each(function(node) {
- var align = node.get('align');
- if (align) {
- node.setStyle('text-align', align);
- node.removeAttribute('align');
- }
- }, this);
-
- // Re-disable the CSS styling after making the change.
- host.disableCssStyling();
-
- // Mark the text as having been updated.
- this.markUpdated();
-
- this.editor.focus();
- }
-});
-
-
-}, '@VERSION@', {"requires": ["moodle-editor_atto-plugin"]});
diff --git a/lib/editor/atto/plugins/align/yui/build/moodle-atto_align-button/moodle-atto_align-button-min.js b/lib/editor/atto/plugins/align/yui/build/moodle-atto_align-button/moodle-atto_align-button-min.js
deleted file mode 100644
index 5d0151c3da6..00000000000
--- a/lib/editor/atto/plugins/align/yui/build/moodle-atto_align-button/moodle-atto_align-button-min.js
+++ /dev/null
@@ -1 +0,0 @@
-YUI.add("moodle-atto_align-button",function(t,e){t.namespace("M.atto_align").Button=t.Base.create("button",t.M.editor_atto.EditorPlugin,[],{initializer:function(){var t="justifyLeft";this.addButton({icon:"e/align_left",title:"leftalign",buttonName:t,callback:this._changeStyle,callbackArgs:t}),this.addButton({icon:"e/align_center",title:"center",buttonName:t="justifyCenter",callback:this._changeStyle,callbackArgs:t}),this.addButton({icon:"e/align_right",title:"rightalign",buttonName:t="justifyRight",callback:this._changeStyle,callbackArgs:t})},_changeStyle:function(t,e){var i=this.get("host");i.enableCssStyling(),document.execCommand(e,!1,null),this.editor.all("*[align]").each(function(t){var e=t.get("align");e&&(t.setStyle("text-align",e),t.removeAttribute("align"))},this),i.disableCssStyling(),this.markUpdated(),this.editor.focus()}})},"@VERSION@",{requires:["moodle-editor_atto-plugin"]});
\ No newline at end of file
diff --git a/lib/editor/atto/plugins/align/yui/build/moodle-atto_align-button/moodle-atto_align-button.js b/lib/editor/atto/plugins/align/yui/build/moodle-atto_align-button/moodle-atto_align-button.js
deleted file mode 100644
index 38645d7d2e3..00000000000
--- a/lib/editor/atto/plugins/align/yui/build/moodle-atto_align-button/moodle-atto_align-button.js
+++ /dev/null
@@ -1,106 +0,0 @@
-YUI.add('moodle-atto_align-button', function (Y, NAME) {
-
-// This file is part of Moodle - http://moodle.org/
-//
-// Moodle is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Moodle is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Moodle. If not, see .
-
-/*
- * @package atto_align
- * @copyright 2014 Frédéric Massart
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-/**
- * @module moodle-atto_align-button
- */
-
-/**
- * Atto text editor align plugin.
- *
- * @namespace M.atto_align
- * @class button
- * @extends M.editor_atto.EditorPlugin
- */
-
-Y.namespace('M.atto_align').Button = Y.Base.create('button', Y.M.editor_atto.EditorPlugin, [], {
- initializer: function() {
- var alignment;
-
- alignment = 'justifyLeft';
- this.addButton({
- icon: 'e/align_left',
- title: 'leftalign',
- buttonName: alignment,
- callback: this._changeStyle,
- callbackArgs: alignment
- });
-
- alignment = 'justifyCenter';
- this.addButton({
- icon: 'e/align_center',
- title: 'center',
- buttonName: alignment,
- callback: this._changeStyle,
- callbackArgs: alignment
- });
-
- alignment = 'justifyRight';
- this.addButton({
- icon: 'e/align_right',
- title: 'rightalign',
- buttonName: alignment,
- callback: this._changeStyle,
- callbackArgs: alignment
- });
- },
-
-
- /**
- * Change the alignment to the specified justification.
- *
- * @method _changeStyle
- * @param {EventFacade} e
- * @param {string} justification The execCommand for the new justification.
- * @private
- */
- _changeStyle: function(e, justification) {
- var host = this.get('host');
-
- // We temporarily re-enable CSS styling to try to have the most consistency.
- // Though, IE, as always, is stubborn and will do its own thing...
- host.enableCssStyling();
-
- document.execCommand(justification, false, null);
-
- // To clean up IE's mess.
- this.editor.all('*[align]').each(function(node) {
- var align = node.get('align');
- if (align) {
- node.setStyle('text-align', align);
- node.removeAttribute('align');
- }
- }, this);
-
- // Re-disable the CSS styling after making the change.
- host.disableCssStyling();
-
- // Mark the text as having been updated.
- this.markUpdated();
-
- this.editor.focus();
- }
-});
-
-
-}, '@VERSION@', {"requires": ["moodle-editor_atto-plugin"]});
diff --git a/lib/editor/atto/plugins/align/yui/src/button/build.json b/lib/editor/atto/plugins/align/yui/src/button/build.json
deleted file mode 100644
index 4fc220c461c..00000000000
--- a/lib/editor/atto/plugins/align/yui/src/button/build.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "name": "moodle-atto_align-button",
- "builds": {
- "moodle-atto_align-button": {
- "jsfiles": [
- "button.js"
- ]
- }
- }
-}
diff --git a/lib/editor/atto/plugins/align/yui/src/button/js/button.js b/lib/editor/atto/plugins/align/yui/src/button/js/button.js
deleted file mode 100644
index 019699a598a..00000000000
--- a/lib/editor/atto/plugins/align/yui/src/button/js/button.js
+++ /dev/null
@@ -1,101 +0,0 @@
-// This file is part of Moodle - http://moodle.org/
-//
-// Moodle is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Moodle is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Moodle. If not, see .
-
-/*
- * @package atto_align
- * @copyright 2014 Frédéric Massart
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-/**
- * @module moodle-atto_align-button
- */
-
-/**
- * Atto text editor align plugin.
- *
- * @namespace M.atto_align
- * @class button
- * @extends M.editor_atto.EditorPlugin
- */
-
-Y.namespace('M.atto_align').Button = Y.Base.create('button', Y.M.editor_atto.EditorPlugin, [], {
- initializer: function() {
- var alignment;
-
- alignment = 'justifyLeft';
- this.addButton({
- icon: 'e/align_left',
- title: 'leftalign',
- buttonName: alignment,
- callback: this._changeStyle,
- callbackArgs: alignment
- });
-
- alignment = 'justifyCenter';
- this.addButton({
- icon: 'e/align_center',
- title: 'center',
- buttonName: alignment,
- callback: this._changeStyle,
- callbackArgs: alignment
- });
-
- alignment = 'justifyRight';
- this.addButton({
- icon: 'e/align_right',
- title: 'rightalign',
- buttonName: alignment,
- callback: this._changeStyle,
- callbackArgs: alignment
- });
- },
-
-
- /**
- * Change the alignment to the specified justification.
- *
- * @method _changeStyle
- * @param {EventFacade} e
- * @param {string} justification The execCommand for the new justification.
- * @private
- */
- _changeStyle: function(e, justification) {
- var host = this.get('host');
-
- // We temporarily re-enable CSS styling to try to have the most consistency.
- // Though, IE, as always, is stubborn and will do its own thing...
- host.enableCssStyling();
-
- document.execCommand(justification, false, null);
-
- // To clean up IE's mess.
- this.editor.all('*[align]').each(function(node) {
- var align = node.get('align');
- if (align) {
- node.setStyle('text-align', align);
- node.removeAttribute('align');
- }
- }, this);
-
- // Re-disable the CSS styling after making the change.
- host.disableCssStyling();
-
- // Mark the text as having been updated.
- this.markUpdated();
-
- this.editor.focus();
- }
-});
diff --git a/lib/editor/atto/plugins/align/yui/src/button/meta/button.json b/lib/editor/atto/plugins/align/yui/src/button/meta/button.json
deleted file mode 100644
index cd4d458c329..00000000000
--- a/lib/editor/atto/plugins/align/yui/src/button/meta/button.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "moodle-atto_align-button": {
- "requires": [
- "moodle-editor_atto-plugin"
- ]
- }
-}
diff --git a/lib/editor/atto/plugins/backcolor/classes/privacy/provider.php b/lib/editor/atto/plugins/backcolor/classes/privacy/provider.php
deleted file mode 100644
index fb2bc0b927a..00000000000
--- a/lib/editor/atto/plugins/backcolor/classes/privacy/provider.php
+++ /dev/null
@@ -1,46 +0,0 @@
-.
-
-/**
- * Privacy Subsystem implementation for block_activity_modules.
- *
- * @package atto_backcolor
- * @copyright 2018 Andrew Nicols
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-namespace atto_backcolor\privacy;
-
-defined('MOODLE_INTERNAL') || die();
-
-/**
- * Privacy Subsystem for atto_backcolor implementing null_provider.
- *
- * @copyright 2018 Andrew Nicols
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-class provider implements \core_privacy\local\metadata\null_provider {
-
- /**
- * Get the language string identifier with the component's language
- * file to explain why this plugin stores no data.
- *
- * @return string
- */
- public static function get_reason(): string {
- return 'privacy:metadata';
- }
-}
diff --git a/lib/editor/atto/plugins/backcolor/lang/en/atto_backcolor.php b/lib/editor/atto/plugins/backcolor/lang/en/atto_backcolor.php
deleted file mode 100644
index 2afcfdd7bc8..00000000000
--- a/lib/editor/atto/plugins/backcolor/lang/en/atto_backcolor.php
+++ /dev/null
@@ -1,32 +0,0 @@
-.
-
-/**
- * Strings for component 'atto_backcolor', language 'en'.
- *
- * @package atto_backcolor
- * @copyright 2014 Rossiani Wijaya
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-$string['color_white'] = 'White';
-$string['color_red'] = 'Red';
-$string['color_yellow'] = 'Yellow';
-$string['color_green'] = 'Green';
-$string['color_blue'] = 'Blue';
-$string['color_black'] = 'Black';
-$string['pluginname'] = 'Background colour';
-$string['privacy:metadata'] = 'The atto_backcolor plugin does not store any personal data.';
diff --git a/lib/editor/atto/plugins/backcolor/lib.php b/lib/editor/atto/plugins/backcolor/lib.php
deleted file mode 100644
index f21a4689bf6..00000000000
--- a/lib/editor/atto/plugins/backcolor/lib.php
+++ /dev/null
@@ -1,41 +0,0 @@
-.
-
-/**
- * Atto text editor integration version file.
- *
- * @package atto_backcolor
- * @copyright 2021 Huong Nguyen
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-defined('MOODLE_INTERNAL') || die();
-
-/**
- * Initialise the js strings required for this module.
- */
-function atto_backcolor_strings_for_js() {
- global $PAGE;
-
- $PAGE->requires->strings_for_js([
- 'color_white',
- 'color_red',
- 'color_yellow',
- 'color_green',
- 'color_blue',
- 'color_black'
- ], 'atto_backcolor');
-}
diff --git a/lib/editor/atto/plugins/backcolor/styles.css b/lib/editor/atto/plugins/backcolor/styles.css
deleted file mode 100644
index 75f81c75a93..00000000000
--- a/lib/editor/atto/plugins/backcolor/styles.css
+++ /dev/null
@@ -1,26 +0,0 @@
-.atto_backcolor_button .dropdown-menu {
- min-width: inherit;
-}
-
-.atto_backcolor_button .dropdown-menu .atto_menuentry {
- padding-top: 5px;
- padding-bottom: 5px;
-}
-
-.atto_backcolor_button .dropdown-menu .atto_menuentry a[role=menuitem] {
- display: flex;
-}
-
-.atto_backcolor_button .dropdown-menu .atto_menuentry a[role=menuitem]:hover,
-.atto_backcolor_button .dropdown-menu .atto_menuentry a[role=menuitem]:focus {
- box-shadow: #0f6fc5 0 0 3px 1px;
-}
-
-.atto_backcolor_button .dropdown-menu .coloroption {
- display: flex;
- align-items: center;
- float: left;
- height: 20px;
- width: 20px;
- border: 1px solid #ccc;
-}
diff --git a/lib/editor/atto/plugins/backcolor/version.php b/lib/editor/atto/plugins/backcolor/version.php
deleted file mode 100644
index 19011ad360f..00000000000
--- a/lib/editor/atto/plugins/backcolor/version.php
+++ /dev/null
@@ -1,29 +0,0 @@
-.
-
-/**
- * Atto text editor integration version file.
- *
- * @package atto_backcolor
- * @copyright 2014 Rossiani Wijaya
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-defined('MOODLE_INTERNAL') || die();
-
-$plugin->version = 2024121800; // The current plugin version (Date: YYYYMMDDXX).
-$plugin->requires = 2024100100; // Requires this Moodle version.
-$plugin->component = 'atto_backcolor'; // Full name of the plugin (used for diagnostics).
diff --git a/lib/editor/atto/plugins/backcolor/yui/build/moodle-atto_backcolor-button/moodle-atto_backcolor-button-debug.js b/lib/editor/atto/plugins/backcolor/yui/build/moodle-atto_backcolor-button/moodle-atto_backcolor-button-debug.js
deleted file mode 100644
index 902830a4c32..00000000000
--- a/lib/editor/atto/plugins/backcolor/yui/build/moodle-atto_backcolor-button/moodle-atto_backcolor-button-debug.js
+++ /dev/null
@@ -1,97 +0,0 @@
-YUI.add('moodle-atto_backcolor-button', function (Y, NAME) {
-
-// This file is part of Moodle - http://moodle.org/
-//
-// Moodle is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Moodle is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Moodle. If not, see .
-
-/*
- * @package atto_backcolor
- * @copyright 2014 Rossiani Wijaya
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-/**
- * @module moodle-atto_backcolor-button
- */
-
-/**
- * Atto text editor backcolor plugin.
- *
- * @namespace M.atto_backcolor
- * @class button
- * @extends M.editor_atto.EditorPlugin
- */
-
-var colors = [
- {
- name: 'white',
- color: '#FFFFFF'
- }, {
- name: 'red',
- color: '#EF4540'
- }, {
- name: 'yellow',
- color: '#FFCF35'
- }, {
- name: 'green',
- color: '#98CA3E'
- }, {
- name: 'blue',
- color: '#7D9FD3'
- }, {
- name: 'black',
- color: '#333333'
- }
- ];
-
-Y.namespace('M.atto_backcolor').Button = Y.Base.create('button', Y.M.editor_atto.EditorPlugin, [], {
- initializer: function() {
- var items = [];
- Y.Array.each(colors, function(color) {
- var colorLabel = M.util.get_string('color_' + color.name, 'atto_backcolor');
- items.push({
- text: '',
- callbackArgs: color.color
- });
- });
-
- this.addToolbarMenu({
- icon: 'e/text_highlight',
- overlayWidth: '4',
- globalItemConfig: {
- inlineFormat: true,
- callback: this._changeStyle
- },
- items: items
- });
- },
-
- /**
- * Change the background color to the specified color.
- *
- * @method _changeStyle
- * @param {EventFacade} e
- * @param {string} color The new background color
- * @private
- */
- _changeStyle: function(e, color) {
- this.get('host').formatSelectionInlineStyle({
- backgroundColor: color
- });
- }
-});
-
-
-}, '@VERSION@');
diff --git a/lib/editor/atto/plugins/backcolor/yui/build/moodle-atto_backcolor-button/moodle-atto_backcolor-button-min.js b/lib/editor/atto/plugins/backcolor/yui/build/moodle-atto_backcolor-button/moodle-atto_backcolor-button-min.js
deleted file mode 100644
index 847612cddc0..00000000000
--- a/lib/editor/atto/plugins/backcolor/yui/build/moodle-atto_backcolor-button/moodle-atto_backcolor-button-min.js
+++ /dev/null
@@ -1 +0,0 @@
-YUI.add("moodle-atto_backcolor-button",function(o,t){var e=[{name:"white",color:"#FFFFFF"},{name:"red",color:"#EF4540"},{name:"yellow",color:"#FFCF35"},{name:"green",color:"#98CA3E"},{name:"blue",color:"#7D9FD3"},{name:"black",color:"#333333"}];o.namespace("M.atto_backcolor").Button=o.Base.create("button",o.M.editor_atto.EditorPlugin,[],{initializer:function(){var a=[];o.Array.each(e,function(o){var t=M.util.get_string("color_"+o.name,"atto_backcolor");a.push({text:'',callbackArgs:o.color})}),this.addToolbarMenu({icon:"e/text_highlight",overlayWidth:"4",globalItemConfig:{inlineFormat:!0,callback:this._changeStyle},items:a})},_changeStyle:function(o,t){this.get("host").formatSelectionInlineStyle({backgroundColor:t})}})},"@VERSION@");
\ No newline at end of file
diff --git a/lib/editor/atto/plugins/backcolor/yui/build/moodle-atto_backcolor-button/moodle-atto_backcolor-button.js b/lib/editor/atto/plugins/backcolor/yui/build/moodle-atto_backcolor-button/moodle-atto_backcolor-button.js
deleted file mode 100644
index 902830a4c32..00000000000
--- a/lib/editor/atto/plugins/backcolor/yui/build/moodle-atto_backcolor-button/moodle-atto_backcolor-button.js
+++ /dev/null
@@ -1,97 +0,0 @@
-YUI.add('moodle-atto_backcolor-button', function (Y, NAME) {
-
-// This file is part of Moodle - http://moodle.org/
-//
-// Moodle is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Moodle is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Moodle. If not, see .
-
-/*
- * @package atto_backcolor
- * @copyright 2014 Rossiani Wijaya
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-/**
- * @module moodle-atto_backcolor-button
- */
-
-/**
- * Atto text editor backcolor plugin.
- *
- * @namespace M.atto_backcolor
- * @class button
- * @extends M.editor_atto.EditorPlugin
- */
-
-var colors = [
- {
- name: 'white',
- color: '#FFFFFF'
- }, {
- name: 'red',
- color: '#EF4540'
- }, {
- name: 'yellow',
- color: '#FFCF35'
- }, {
- name: 'green',
- color: '#98CA3E'
- }, {
- name: 'blue',
- color: '#7D9FD3'
- }, {
- name: 'black',
- color: '#333333'
- }
- ];
-
-Y.namespace('M.atto_backcolor').Button = Y.Base.create('button', Y.M.editor_atto.EditorPlugin, [], {
- initializer: function() {
- var items = [];
- Y.Array.each(colors, function(color) {
- var colorLabel = M.util.get_string('color_' + color.name, 'atto_backcolor');
- items.push({
- text: '',
- callbackArgs: color.color
- });
- });
-
- this.addToolbarMenu({
- icon: 'e/text_highlight',
- overlayWidth: '4',
- globalItemConfig: {
- inlineFormat: true,
- callback: this._changeStyle
- },
- items: items
- });
- },
-
- /**
- * Change the background color to the specified color.
- *
- * @method _changeStyle
- * @param {EventFacade} e
- * @param {string} color The new background color
- * @private
- */
- _changeStyle: function(e, color) {
- this.get('host').formatSelectionInlineStyle({
- backgroundColor: color
- });
- }
-});
-
-
-}, '@VERSION@');
diff --git a/lib/editor/atto/plugins/backcolor/yui/src/button/build.json b/lib/editor/atto/plugins/backcolor/yui/src/button/build.json
deleted file mode 100644
index ab856c03ba1..00000000000
--- a/lib/editor/atto/plugins/backcolor/yui/src/button/build.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "name": "moodle-atto_backcolor-button",
- "builds": {
- "moodle-atto_backcolor-button": {
- "jsfiles": [
- "button.js"
- ]
- }
- }
-}
diff --git a/lib/editor/atto/plugins/backcolor/yui/src/button/js/button.js b/lib/editor/atto/plugins/backcolor/yui/src/button/js/button.js
deleted file mode 100644
index 441a12bd7c0..00000000000
--- a/lib/editor/atto/plugins/backcolor/yui/src/button/js/button.js
+++ /dev/null
@@ -1,92 +0,0 @@
-// This file is part of Moodle - http://moodle.org/
-//
-// Moodle is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Moodle is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Moodle. If not, see .
-
-/*
- * @package atto_backcolor
- * @copyright 2014 Rossiani Wijaya
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-/**
- * @module moodle-atto_backcolor-button
- */
-
-/**
- * Atto text editor backcolor plugin.
- *
- * @namespace M.atto_backcolor
- * @class button
- * @extends M.editor_atto.EditorPlugin
- */
-
-var colors = [
- {
- name: 'white',
- color: '#FFFFFF'
- }, {
- name: 'red',
- color: '#EF4540'
- }, {
- name: 'yellow',
- color: '#FFCF35'
- }, {
- name: 'green',
- color: '#98CA3E'
- }, {
- name: 'blue',
- color: '#7D9FD3'
- }, {
- name: 'black',
- color: '#333333'
- }
- ];
-
-Y.namespace('M.atto_backcolor').Button = Y.Base.create('button', Y.M.editor_atto.EditorPlugin, [], {
- initializer: function() {
- var items = [];
- Y.Array.each(colors, function(color) {
- var colorLabel = M.util.get_string('color_' + color.name, 'atto_backcolor');
- items.push({
- text: '',
- callbackArgs: color.color
- });
- });
-
- this.addToolbarMenu({
- icon: 'e/text_highlight',
- overlayWidth: '4',
- globalItemConfig: {
- inlineFormat: true,
- callback: this._changeStyle
- },
- items: items
- });
- },
-
- /**
- * Change the background color to the specified color.
- *
- * @method _changeStyle
- * @param {EventFacade} e
- * @param {string} color The new background color
- * @private
- */
- _changeStyle: function(e, color) {
- this.get('host').formatSelectionInlineStyle({
- backgroundColor: color
- });
- }
-});
diff --git a/lib/editor/atto/plugins/backcolor/yui/src/button/meta/editor.js b/lib/editor/atto/plugins/backcolor/yui/src/button/meta/editor.js
deleted file mode 100644
index d6cb6235e1a..00000000000
--- a/lib/editor/atto/plugins/backcolor/yui/src/button/meta/editor.js
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "moodle-atto_backcolor-button": {
- "requires": ["node"]
- }
-}
diff --git a/lib/editor/atto/plugins/bold/classes/privacy/provider.php b/lib/editor/atto/plugins/bold/classes/privacy/provider.php
deleted file mode 100644
index f2504984ab9..00000000000
--- a/lib/editor/atto/plugins/bold/classes/privacy/provider.php
+++ /dev/null
@@ -1,46 +0,0 @@
-.
-
-/**
- * Privacy Subsystem implementation for block_activity_modules.
- *
- * @package atto_bold
- * @copyright 2018 Andrew Nicols
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-namespace atto_bold\privacy;
-
-defined('MOODLE_INTERNAL') || die();
-
-/**
- * Privacy Subsystem for atto_bold implementing null_provider.
- *
- * @copyright 2018 Andrew Nicols
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-class provider implements \core_privacy\local\metadata\null_provider {
-
- /**
- * Get the language string identifier with the component's language
- * file to explain why this plugin stores no data.
- *
- * @return string
- */
- public static function get_reason(): string {
- return 'privacy:metadata';
- }
-}
diff --git a/lib/editor/atto/plugins/bold/lang/en/atto_bold.php b/lib/editor/atto/plugins/bold/lang/en/atto_bold.php
deleted file mode 100644
index 8dacbc8f671..00000000000
--- a/lib/editor/atto/plugins/bold/lang/en/atto_bold.php
+++ /dev/null
@@ -1,26 +0,0 @@
-.
-
-/**
- * Strings for component 'atto_bold', language 'en'.
- *
- * @package atto_bold
- * @copyright 2013 Damyon Wiese
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-$string['pluginname'] = 'Bold';
-$string['privacy:metadata'] = 'The atto_bold plugin does not store any personal data.';
diff --git a/lib/editor/atto/plugins/bold/tests/behat/bold.feature b/lib/editor/atto/plugins/bold/tests/behat/bold.feature
deleted file mode 100644
index fe5b8619906..00000000000
--- a/lib/editor/atto/plugins/bold/tests/behat/bold.feature
+++ /dev/null
@@ -1,35 +0,0 @@
-@editor @editor_atto @atto @atto_bold @_bug_phantomjs
-Feature: Atto bold button
- To format text in Atto, I need to use the bold button.
-
- @javascript
- Scenario: Bold some text
- Given I log in as "admin"
- And I open my profile in edit mode
- And I set the field "Description" to "Badger"
- And I select the text in the "Description" Atto editor
- When I click on "Bold" "button"
- And I press "Update profile"
- And I follow "Preferences" in the user menu
- And I follow "Editor preferences"
- And I set the field "Text editor" to "Plain text area"
- And I press "Save changes"
- And I click on "Edit profile" "link" in the "region-main" "region"
- Then I should see "Badger"
-
- @javascript
- Scenario: Unbold some text
- Given I log in as "admin"
- And I open my profile in edit mode
- And I set the field "Description" to "Mouse"
- And I select the text in the "Description" Atto editor
- When I click on "Bold" "button"
- And I click on "Bold" "button"
- And I press "Update profile"
- And I follow "Preferences" in the user menu
- And I follow "Editor preferences"
- And I set the field "Text editor" to "Plain text area"
- And I press "Save changes"
- And I click on "Edit profile" "link" in the "region-main" "region"
- Then I should not see "Mouse"
- And I should see "Mouse"
diff --git a/lib/editor/atto/plugins/bold/version.php b/lib/editor/atto/plugins/bold/version.php
deleted file mode 100644
index c6d22f453a0..00000000000
--- a/lib/editor/atto/plugins/bold/version.php
+++ /dev/null
@@ -1,29 +0,0 @@
-.
-
-/**
- * Atto text editor integration version file.
- *
- * @package atto_bold
- * @copyright 2013 Damyon Wiese
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-defined('MOODLE_INTERNAL') || die();
-
-$plugin->version = 2024121800; // The current plugin version (Date: YYYYMMDDXX).
-$plugin->requires = 2024100100; // Requires this Moodle version.
-$plugin->component = 'atto_bold'; // Full name of the plugin (used for diagnostics).
diff --git a/lib/editor/atto/plugins/bold/yui/build/moodle-atto_bold-button/moodle-atto_bold-button-debug.js b/lib/editor/atto/plugins/bold/yui/build/moodle-atto_bold-button/moodle-atto_bold-button-debug.js
deleted file mode 100644
index c1ae54dd3cf..00000000000
--- a/lib/editor/atto/plugins/bold/yui/build/moodle-atto_bold-button/moodle-atto_bold-button-debug.js
+++ /dev/null
@@ -1,72 +0,0 @@
-YUI.add('moodle-atto_bold-button', function (Y, NAME) {
-
-// This file is part of Moodle - http://moodle.org/
-//
-// Moodle is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Moodle is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Moodle. If not, see .
-
-/*
- * @package atto_bold
- * @copyright 2013 Damyon Wiese
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-/**
- * @module moodle-atto_bold-button
- */
-
-/**
- * Atto text editor bold plugin.
- *
- * @namespace M.atto_bold
- * @class button
- * @extends M.editor_atto.EditorPlugin
- */
-
-Y.namespace('M.atto_bold').Button = Y.Base.create('button', Y.M.editor_atto.EditorPlugin, [], {
- initializer: function() {
- var bold;
-
- this.addButton({
- callback: this._toggleBold,
- icon: 'e/bold',
- buttonName: bold,
- inlineFormat: true,
-
- // Key code for the keyboard shortcut which triggers this button:
- keys: '66',
-
- // Watch the following tags and add/remove highlighting as appropriate:
- tags: 'strong, b'
- });
- },
- /**
- * Toggle the bold setting.
- *
- * @method _toggleBold
- * @param {EventFacade} e
- */
- _toggleBold: function() {
- var host = this.get('host');
-
- // Use the "bold" command for simplicity. This will toggle tags off as well.
- document.execCommand('bold', false, null);
-
- // Then change all tags to tags. This will change any existing tags as well.
- host.changeToCSS('b', 'bf-editor-bold-strong');
- host.changeToTags('bf-editor-bold-strong', 'strong');
- }
-});
-
-
-}, '@VERSION@', {"requires": ["moodle-editor_atto-plugin"]});
diff --git a/lib/editor/atto/plugins/bold/yui/build/moodle-atto_bold-button/moodle-atto_bold-button-min.js b/lib/editor/atto/plugins/bold/yui/build/moodle-atto_bold-button/moodle-atto_bold-button-min.js
deleted file mode 100644
index 6751687f60b..00000000000
--- a/lib/editor/atto/plugins/bold/yui/build/moodle-atto_bold-button/moodle-atto_bold-button-min.js
+++ /dev/null
@@ -1 +0,0 @@
-YUI.add("moodle-atto_bold-button",function(o,t){o.namespace("M.atto_bold").Button=o.Base.create("button",o.M.editor_atto.EditorPlugin,[],{initializer:function(){this.addButton({callback:this._toggleBold,icon:"e/bold",buttonName:void 0,inlineFormat:!0,keys:"66",tags:"strong, b"})},_toggleBold:function(){var o=this.get("host");document.execCommand("bold",!1,null),o.changeToCSS("b","bf-editor-bold-strong"),o.changeToTags("bf-editor-bold-strong","strong")}})},"@VERSION@",{requires:["moodle-editor_atto-plugin"]});
\ No newline at end of file
diff --git a/lib/editor/atto/plugins/bold/yui/build/moodle-atto_bold-button/moodle-atto_bold-button.js b/lib/editor/atto/plugins/bold/yui/build/moodle-atto_bold-button/moodle-atto_bold-button.js
deleted file mode 100644
index c1ae54dd3cf..00000000000
--- a/lib/editor/atto/plugins/bold/yui/build/moodle-atto_bold-button/moodle-atto_bold-button.js
+++ /dev/null
@@ -1,72 +0,0 @@
-YUI.add('moodle-atto_bold-button', function (Y, NAME) {
-
-// This file is part of Moodle - http://moodle.org/
-//
-// Moodle is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Moodle is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Moodle. If not, see .
-
-/*
- * @package atto_bold
- * @copyright 2013 Damyon Wiese
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-/**
- * @module moodle-atto_bold-button
- */
-
-/**
- * Atto text editor bold plugin.
- *
- * @namespace M.atto_bold
- * @class button
- * @extends M.editor_atto.EditorPlugin
- */
-
-Y.namespace('M.atto_bold').Button = Y.Base.create('button', Y.M.editor_atto.EditorPlugin, [], {
- initializer: function() {
- var bold;
-
- this.addButton({
- callback: this._toggleBold,
- icon: 'e/bold',
- buttonName: bold,
- inlineFormat: true,
-
- // Key code for the keyboard shortcut which triggers this button:
- keys: '66',
-
- // Watch the following tags and add/remove highlighting as appropriate:
- tags: 'strong, b'
- });
- },
- /**
- * Toggle the bold setting.
- *
- * @method _toggleBold
- * @param {EventFacade} e
- */
- _toggleBold: function() {
- var host = this.get('host');
-
- // Use the "bold" command for simplicity. This will toggle tags off as well.
- document.execCommand('bold', false, null);
-
- // Then change all tags to tags. This will change any existing tags as well.
- host.changeToCSS('b', 'bf-editor-bold-strong');
- host.changeToTags('bf-editor-bold-strong', 'strong');
- }
-});
-
-
-}, '@VERSION@', {"requires": ["moodle-editor_atto-plugin"]});
diff --git a/lib/editor/atto/plugins/bold/yui/src/button/build.json b/lib/editor/atto/plugins/bold/yui/src/button/build.json
deleted file mode 100644
index 112075088a9..00000000000
--- a/lib/editor/atto/plugins/bold/yui/src/button/build.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "name": "moodle-atto_bold-button",
- "builds": {
- "moodle-atto_bold-button": {
- "jsfiles": [
- "button.js"
- ]
- }
- }
-}
diff --git a/lib/editor/atto/plugins/bold/yui/src/button/js/button.js b/lib/editor/atto/plugins/bold/yui/src/button/js/button.js
deleted file mode 100644
index 3215bfe63de..00000000000
--- a/lib/editor/atto/plugins/bold/yui/src/button/js/button.js
+++ /dev/null
@@ -1,67 +0,0 @@
-// This file is part of Moodle - http://moodle.org/
-//
-// Moodle is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Moodle is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Moodle. If not, see .
-
-/*
- * @package atto_bold
- * @copyright 2013 Damyon Wiese
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-/**
- * @module moodle-atto_bold-button
- */
-
-/**
- * Atto text editor bold plugin.
- *
- * @namespace M.atto_bold
- * @class button
- * @extends M.editor_atto.EditorPlugin
- */
-
-Y.namespace('M.atto_bold').Button = Y.Base.create('button', Y.M.editor_atto.EditorPlugin, [], {
- initializer: function() {
- var bold;
-
- this.addButton({
- callback: this._toggleBold,
- icon: 'e/bold',
- buttonName: bold,
- inlineFormat: true,
-
- // Key code for the keyboard shortcut which triggers this button:
- keys: '66',
-
- // Watch the following tags and add/remove highlighting as appropriate:
- tags: 'strong, b'
- });
- },
- /**
- * Toggle the bold setting.
- *
- * @method _toggleBold
- * @param {EventFacade} e
- */
- _toggleBold: function() {
- var host = this.get('host');
-
- // Use the "bold" command for simplicity. This will toggle tags off as well.
- document.execCommand('bold', false, null);
-
- // Then change all tags to tags. This will change any existing tags as well.
- host.changeToCSS('b', 'bf-editor-bold-strong');
- host.changeToTags('bf-editor-bold-strong', 'strong');
- }
-});
diff --git a/lib/editor/atto/plugins/bold/yui/src/button/meta/button.json b/lib/editor/atto/plugins/bold/yui/src/button/meta/button.json
deleted file mode 100644
index c90cc588638..00000000000
--- a/lib/editor/atto/plugins/bold/yui/src/button/meta/button.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "moodle-atto_bold-button": {
- "requires": [
- "moodle-editor_atto-plugin"
- ]
- }
-}
diff --git a/lib/editor/atto/plugins/charmap/classes/privacy/provider.php b/lib/editor/atto/plugins/charmap/classes/privacy/provider.php
deleted file mode 100644
index 8667870103b..00000000000
--- a/lib/editor/atto/plugins/charmap/classes/privacy/provider.php
+++ /dev/null
@@ -1,46 +0,0 @@
-.
-
-/**
- * Privacy Subsystem implementation for block_activity_modules.
- *
- * @package atto_charmap
- * @copyright 2018 Andrew Nicols
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-namespace atto_charmap\privacy;
-
-defined('MOODLE_INTERNAL') || die();
-
-/**
- * Privacy Subsystem for atto_charmap implementing null_provider.
- *
- * @copyright 2018 Andrew Nicols
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-class provider implements \core_privacy\local\metadata\null_provider {
-
- /**
- * Get the language string identifier with the component's language
- * file to explain why this plugin stores no data.
- *
- * @return string
- */
- public static function get_reason(): string {
- return 'privacy:metadata';
- }
-}
diff --git a/lib/editor/atto/plugins/charmap/lang/en/atto_charmap.php b/lib/editor/atto/plugins/charmap/lang/en/atto_charmap.php
deleted file mode 100644
index dae50dee54d..00000000000
--- a/lib/editor/atto/plugins/charmap/lang/en/atto_charmap.php
+++ /dev/null
@@ -1,293 +0,0 @@
-.
-
-/**
- * Strings for component 'atto_charmap', language 'en'.
- *
- * @package atto_charmap
- * @copyright 2014 Frédéric Massart
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-$string['insertcharacter'] = 'Insert character';
-$string['pluginname'] = 'Insert character';
-
-// The following are not ordered on purpose, they are kept
-// in the order in which they appear in the user interface.
-$string['interrobang'] = 'interrobang';
-$string['nobreakspace'] = 'no-break space';
-$string['ampersand'] = 'ampersand';
-$string['quotationmark'] = 'quotation mark';
-$string['centsign'] = 'cent sign';
-$string['eurosign'] = 'euro sign';
-$string['poundsign'] = 'pound sign';
-$string['yensign'] = 'yen sign';
-$string['copyrightsign'] = 'copyright sign';
-$string['registeredsign'] = 'registered sign';
-$string['trademarksign'] = 'trade mark sign';
-$string['permillesign'] = 'per mille sign';
-$string['microsign'] = 'micro sign';
-$string['middledot'] = 'middle dot';
-$string['bullet'] = 'bullet';
-$string['threedotleader'] = 'three dot leader';
-$string['minutesfeet'] = 'minutes / feet';
-$string['secondsinches'] = 'seconds / inches';
-$string['sectionsign'] = 'section sign';
-$string['paragraphsign'] = 'paragraph sign';
-$string['sharpsesszed'] = 'sharp s / ess-zed';
-$string['singleleftpointinganglequotationmark'] = 'single left-pointing angle quotation mark';
-$string['singlerightpointinganglequotationmark'] = 'single right-pointing angle quotation mark';
-$string['leftpointingguillemet'] = 'left pointing guillemet';
-$string['rightpointingguillemet'] = 'right pointing guillemet';
-$string['leftsinglequotationmark'] = 'left single quotation mark';
-$string['rightsinglequotationmark'] = 'right single quotation mark';
-$string['leftdoublequotationmark'] = 'left double quotation mark';
-$string['rightdoublequotationmark'] = 'right double quotation mark';
-$string['singlelow9quotationmark'] = 'single low-9 quotation mark';
-$string['doublelow9quotationmark'] = 'double low-9 quotation mark';
-$string['lessthansign'] = 'less-than sign';
-$string['greaterthansign'] = 'greater-than sign';
-$string['lessthanorequalto'] = 'less-than or equal to';
-$string['greaterthanorequalto'] = 'greater-than or equal to';
-$string['endash'] = 'en dash';
-$string['emdash'] = 'em dash';
-$string['macron'] = 'macron';
-$string['overline'] = 'overline';
-$string['currencysign'] = 'currency sign';
-$string['brokenbar'] = 'broken bar';
-$string['diaeresis'] = 'diaeresis';
-$string['invertedexclamationmark'] = 'inverted exclamation mark';
-$string['turnedquestionmark'] = 'turned question mark';
-$string['circumflexaccent'] = 'circumflex accent';
-$string['smalltilde'] = 'small tilde';
-$string['degreesign'] = 'degree sign';
-$string['minussign'] = 'minus sign';
-$string['plusminussign'] = 'plus-minus sign';
-$string['divisionsign'] = 'division sign';
-$string['fractionslash'] = 'fraction slash';
-$string['multiplicationsign'] = 'multiplication sign';
-$string['superscriptone'] = 'superscript one';
-$string['superscripttwo'] = 'superscript two';
-$string['superscriptthree'] = 'superscript three';
-$string['fractiononequarter'] = 'fraction one quarter';
-$string['fractiononehalf'] = 'fraction one half';
-$string['fractionthreequarters'] = 'fraction three quarters';
-$string['functionflorin'] = 'function / florin';
-$string['integral'] = 'integral';
-$string['narysumation'] = 'n-ary sumation';
-$string['infinity'] = 'infinity';
-$string['squareroot'] = 'square root';
-$string['similarto'] = 'similar to';
-$string['approximatelyequalto'] = 'approximately equal to';
-$string['almostequalto'] = 'almost equal to';
-$string['notequalto'] = 'not equal to';
-$string['identicalto'] = 'identical to';
-$string['elementof'] = 'element of';
-$string['notanelementof'] = 'not an element of';
-$string['containsasmember'] = 'contains as member';
-$string['naryproduct'] = 'n-ary product';
-$string['logicaland'] = 'logical and';
-$string['logicalor'] = 'logical or';
-$string['notsign'] = 'not sign';
-$string['intersection'] = 'intersection';
-$string['union'] = 'union';
-$string['partialdifferential'] = 'partial differential';
-$string['forall'] = 'for all';
-$string['thereexists'] = 'there exists';
-$string['diameter'] = 'diameter';
-$string['backwarddifference'] = 'backward difference';
-$string['asteriskoperator'] = 'asterisk operator';
-$string['proportionalto'] = 'proportional to';
-$string['angle'] = 'angle';
-$string['acuteaccent'] = 'acute accent';
-$string['cedilla'] = 'cedilla';
-$string['feminineordinalindicator'] = 'feminine ordinal indicator';
-$string['masculineordinalindicator'] = 'masculine ordinal indicator';
-$string['dagger'] = 'dagger';
-$string['doubledagger'] = 'double dagger';
-$string['agrave_caps'] = 'A - grave';
-$string['aacute_caps'] = 'A - acute';
-$string['acircumflex_caps'] = 'A - circumflex';
-$string['atilde_caps'] = 'A - tilde';
-$string['adiaeresis_caps'] = 'A - diaeresis';
-$string['aringabove_caps'] = 'A - ring above';
-$string['amacron_caps'] = 'A - macron';
-$string['ligatureae_caps'] = 'ligature AE';
-$string['ccedilla_caps'] = 'C - cedilla';
-$string['egrave_caps'] = 'E - grave';
-$string['eacute_caps'] = 'E - acute';
-$string['ecircumflex_caps'] = 'E - circumflex';
-$string['ediaeresis_caps'] = 'E - diaeresis';
-$string['emacron_caps'] = 'E - macron';
-$string['igrave_caps'] = 'I - grave';
-$string['iacute_caps'] = 'I - acute';
-$string['icircumflex_caps'] = 'I - circumflex';
-$string['idiaeresis_caps'] = 'I - diaeresis';
-$string['imacron_caps'] = 'I - macron';
-$string['eth_caps'] = 'ETH';
-$string['ntilde_caps'] = 'N - tilde';
-$string['ograve_caps'] = 'O - grave';
-$string['oacute_caps'] = 'O - acute';
-$string['ocircumflex_caps'] = 'O - circumflex';
-$string['otilde_caps'] = 'O - tilde';
-$string['odiaeresis_caps'] = 'O - diaeresis';
-$string['oslash_caps'] = 'O - slash';
-$string['omacron_caps'] = 'O - macron';
-$string['ligatureoe_caps'] = 'ligature OE';
-$string['scaron_caps'] = 'S - caron';
-$string['ugrave_caps'] = 'U - grave';
-$string['uacute_caps'] = 'U - acute';
-$string['ucircumflex_caps'] = 'U - circumflex';
-$string['udiaeresis_caps'] = 'U - diaeresis';
-$string['umacron_caps'] = 'U - macron';
-$string['yacute_caps'] = 'Y - acute';
-$string['ydiaeresis_caps'] = 'Y - diaeresis';
-$string['thorn_caps'] = 'THORN';
-$string['agrave'] = 'a - grave';
-$string['aacute'] = 'a - acute';
-$string['acircumflex'] = 'a - circumflex';
-$string['atilde'] = 'a - tilde';
-$string['adiaeresis'] = 'a - diaeresis';
-$string['aringabove'] = 'a - ring above';
-$string['amacron'] = 'a - macron';
-$string['ligatureae'] = 'ligature ae';
-$string['ccedilla'] = 'c - cedilla';
-$string['egrave'] = 'e - grave';
-$string['eacute'] = 'e - acute';
-$string['ecircumflex'] = 'e - circumflex';
-$string['ediaeresis'] = 'e - diaeresis';
-$string['emacron'] = 'e - macron';
-$string['igrave'] = 'i - grave';
-$string['iacute'] = 'i - acute';
-$string['icircumflex'] = 'i - circumflex';
-$string['idiaeresis'] = 'i - diaeresis';
-$string['imacron'] = 'i - macron';
-$string['eth'] = 'eth';
-$string['ntilde'] = 'n - tilde';
-$string['ograve'] = 'o - grave';
-$string['oacute'] = 'o - acute';
-$string['ocircumflex'] = 'o - circumflex';
-$string['otilde'] = 'o - tilde';
-$string['odiaeresis'] = 'o - diaeresis';
-$string['oslash'] = 'o slash';
-$string['omacron'] = 'o - macron';
-$string['ligatureoe'] = 'ligature oe';
-$string['scaron'] = 's - caron';
-$string['ugrave'] = 'u - grave';
-$string['uacute'] = 'u - acute';
-$string['ucircumflex'] = 'u - circumflex';
-$string['udiaeresis'] = 'u - diaeresis';
-$string['umacron'] = 'u - macron';
-$string['yacute'] = 'y - acute';
-$string['thorn'] = 'thorn';
-$string['ydiaeresis'] = 'y - diaeresis';
-$string['alpha_caps'] = 'Alpha';
-$string['beta_caps'] = 'Beta';
-$string['gamma_caps'] = 'Gamma';
-$string['delta_caps'] = 'Delta';
-$string['epsilon_caps'] = 'Epsilon';
-$string['zeta_caps'] = 'Zeta';
-$string['eta_caps'] = 'Eta';
-$string['theta_caps'] = 'Theta';
-$string['iota_caps'] = 'Iota';
-$string['kappa_caps'] = 'Kappa';
-$string['lambda_caps'] = 'Lambda';
-$string['mu_caps'] = 'Mu';
-$string['nu_caps'] = 'Nu';
-$string['xi_caps'] = 'Xi';
-$string['omicron_caps'] = 'Omicron';
-$string['pi_caps'] = 'Pi';
-$string['rho_caps'] = 'Rho';
-$string['sigma_caps'] = 'Sigma';
-$string['tau_caps'] = 'Tau';
-$string['upsilon_caps'] = 'Upsilon';
-$string['phi_caps'] = 'Phi';
-$string['chi_caps'] = 'Chi';
-$string['psi_caps'] = 'Psi';
-$string['omega_caps'] = 'Omega';
-$string['alpha'] = 'alpha';
-$string['beta'] = 'beta';
-$string['gamma'] = 'gamma';
-$string['delta'] = 'delta';
-$string['epsilon'] = 'epsilon';
-$string['zeta'] = 'zeta';
-$string['eta'] = 'eta';
-$string['theta'] = 'theta';
-$string['iota'] = 'iota';
-$string['kappa'] = 'kappa';
-$string['lambda'] = 'lambda';
-$string['mu'] = 'mu';
-$string['nu'] = 'nu';
-$string['xi'] = 'xi';
-$string['omicron'] = 'omicron';
-$string['pi'] = 'pi';
-$string['rho'] = 'rho';
-$string['finalsigma'] = 'final sigma';
-$string['sigma'] = 'sigma';
-$string['tau'] = 'tau';
-$string['upsilon'] = 'upsilon';
-$string['phi'] = 'phi';
-$string['chi'] = 'chi';
-$string['psi'] = 'psi';
-$string['omega'] = 'omega';
-$string['alefsymbol'] = 'alef symbol';
-$string['pisymbol'] = 'pi symbol';
-$string['realpartsymbol'] = 'real part symbol';
-$string['thetasymbol'] = 'theta symbol';
-$string['upsilonhooksymbol'] = 'upsilon - hook symbol';
-$string['weierstrassp'] = 'Weierstrass p';
-$string['imaginarypart'] = 'imaginary part';
-$string['leftwardsarrow'] = 'leftwards arrow';
-$string['upwardsarrow'] = 'upwards arrow';
-$string['rightwardsarrow'] = 'rightwards arrow';
-$string['downwardsarrow'] = 'downwards arrow';
-$string['leftrightarrow'] = 'left right arrow';
-$string['carriagereturn'] = 'carriage return';
-$string['leftwardsdoublearrow'] = 'leftwards double arrow';
-$string['upwardsdoublearrow'] = 'upwards double arrow';
-$string['rightwardsdoublearrow'] = 'rightwards double arrow';
-$string['downwardsdoublearrow'] = 'downwards double arrow';
-$string['leftrightdoublearrow'] = 'left right double arrow';
-$string['therefore'] = 'therefore';
-$string['subsetof'] = 'subset of';
-$string['supersetof'] = 'superset of';
-$string['notasubsetof'] = 'not a subset of';
-$string['subsetoforequalto'] = 'subset of or equal to';
-$string['supersetoforequalto'] = 'superset of or equal to';
-$string['circledplus'] = 'circled plus';
-$string['circledtimes'] = 'circled times';
-$string['perpendicular'] = 'perpendicular';
-$string['dotoperator'] = 'dot operator';
-$string['leftceiling'] = 'left ceiling';
-$string['rightceiling'] = 'right ceiling';
-$string['leftfloor'] = 'left floor';
-$string['rightfloor'] = 'right floor';
-$string['leftpointinganglebracket'] = 'left-pointing angle bracket';
-$string['rightpointinganglebracket'] = 'right-pointing angle bracket';
-$string['lozenge'] = 'lozenge';
-$string['blackspadesuit'] = 'black spade suit';
-$string['blackclubsuit'] = 'black club suit';
-$string['blackheartsuit'] = 'black heart suit';
-$string['blackdiamondsuit'] = 'black diamond suit';
-$string['enspace'] = 'en space';
-$string['emspace'] = 'em space';
-$string['thinspace'] = 'thin space';
-$string['zerowidthnonjoiner'] = 'zero width non-joiner';
-$string['zerowidthjoiner'] = 'zero width joiner';
-$string['lefttorightmark'] = 'left-to-right mark';
-$string['righttoleftmark'] = 'right-to-left mark';
-$string['softhyphen'] = 'soft hyphen';
-$string['privacy:metadata'] = 'The atto_charmap plugin does not store any personal data.';
diff --git a/lib/editor/atto/plugins/charmap/lib.php b/lib/editor/atto/plugins/charmap/lib.php
deleted file mode 100644
index b6c81a65854..00000000000
--- a/lib/editor/atto/plugins/charmap/lib.php
+++ /dev/null
@@ -1,306 +0,0 @@
-.
-
-/**
- * Atto text editor charmap plugin lib.
- *
- * @package atto_charmap
- * @copyright 2014 Frédéric Massart
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-defined('MOODLE_INTERNAL') || die();
-
-/**
- * Initialise the strings required for JS.
- *
- * @return void
- */
-function atto_charmap_strings_for_js() {
- global $PAGE;
-
- // In order to prevent extra strings to be imported, comment/uncomment the characters
- // which are enabled in the JavaScript part of this plugin.
- $PAGE->requires->strings_for_js(
- array(
- 'amacron',
- 'emacron',
- 'imacron',
- 'omacron',
- 'umacron',
- 'amacron_caps',
- 'emacron_caps',
- 'imacron_caps',
- 'omacron_caps',
- 'umacron_caps',
- 'interrobang',
- 'insertcharacter',
- 'nobreakspace',
- 'ampersand',
- 'quotationmark',
- 'centsign',
- 'eurosign',
- 'poundsign',
- 'yensign',
- 'copyrightsign',
- 'registeredsign',
- 'trademarksign',
- 'permillesign',
- 'microsign',
- 'middledot',
- 'bullet',
- 'threedotleader',
- 'minutesfeet',
- 'secondsinches',
- 'sectionsign',
- 'paragraphsign',
- 'sharpsesszed',
- 'singleleftpointinganglequotationmark',
- 'singlerightpointinganglequotationmark',
- 'leftpointingguillemet',
- 'rightpointingguillemet',
- 'leftsinglequotationmark',
- 'rightsinglequotationmark',
- 'leftdoublequotationmark',
- 'rightdoublequotationmark',
- 'singlelow9quotationmark',
- 'doublelow9quotationmark',
- 'lessthansign',
- 'greaterthansign',
- 'lessthanorequalto',
- 'greaterthanorequalto',
- 'endash',
- 'emdash',
- 'macron',
- 'overline',
- 'currencysign',
- 'brokenbar',
- 'diaeresis',
- 'invertedexclamationmark',
- 'turnedquestionmark',
- 'circumflexaccent',
- 'smalltilde',
- 'degreesign',
- 'minussign',
- 'plusminussign',
- 'divisionsign',
- 'fractionslash',
- 'multiplicationsign',
- 'superscriptone',
- 'superscripttwo',
- 'superscriptthree',
- 'fractiononequarter',
- 'fractiononehalf',
- 'fractionthreequarters',
- 'functionflorin',
- 'integral',
- 'narysumation',
- 'infinity',
- 'squareroot',
- // 'similarto',
- // 'approximatelyequalto',
- 'almostequalto',
- 'notequalto',
- 'identicalto',
- // 'elementof',
- // 'notanelementof',
- // 'containsasmember',
- 'naryproduct',
- // 'logicaland',
- // 'logicalor',
- 'notsign',
- 'intersection',
- // 'union',
- 'partialdifferential',
- // 'forall',
- // 'thereexists',
- // 'diameter',
- // 'backwarddifference',
- // 'asteriskoperator',
- // 'proportionalto',
- // 'angle',
- 'acuteaccent',
- 'cedilla',
- 'feminineordinalindicator',
- 'masculineordinalindicator',
- 'dagger',
- 'doubledagger',
- 'agrave_caps',
- 'aacute_caps',
- 'acircumflex_caps',
- 'atilde_caps',
- 'adiaeresis_caps',
- 'aringabove_caps',
- 'ligatureae_caps',
- 'ccedilla_caps',
- 'egrave_caps',
- 'eacute_caps',
- 'ecircumflex_caps',
- 'ediaeresis_caps',
- 'igrave_caps',
- 'iacute_caps',
- 'icircumflex_caps',
- 'idiaeresis_caps',
- 'eth_caps',
- 'ntilde_caps',
- 'ograve_caps',
- 'oacute_caps',
- 'ocircumflex_caps',
- 'otilde_caps',
- 'odiaeresis_caps',
- 'oslash_caps',
- 'ligatureoe_caps',
- 'scaron_caps',
- 'ugrave_caps',
- 'uacute_caps',
- 'ucircumflex_caps',
- 'udiaeresis_caps',
- 'yacute_caps',
- 'ydiaeresis_caps',
- 'thorn_caps',
- 'agrave',
- 'aacute',
- 'acircumflex',
- 'atilde',
- 'adiaeresis',
- 'aringabove',
- 'ligatureae',
- 'ccedilla',
- 'egrave',
- 'eacute',
- 'ecircumflex',
- 'ediaeresis',
- 'igrave',
- 'iacute',
- 'icircumflex',
- 'idiaeresis',
- 'eth',
- 'ntilde',
- 'ograve',
- 'oacute',
- 'ocircumflex',
- 'otilde',
- 'odiaeresis',
- 'oslash',
- 'ligatureoe',
- 'scaron',
- 'ugrave',
- 'uacute',
- 'ucircumflex',
- 'udiaeresis',
- 'yacute',
- 'thorn',
- 'ydiaeresis',
- 'alpha_caps',
- 'beta_caps',
- 'gamma_caps',
- 'delta_caps',
- 'epsilon_caps',
- 'zeta_caps',
- 'eta_caps',
- 'theta_caps',
- 'iota_caps',
- 'kappa_caps',
- 'lambda_caps',
- 'mu_caps',
- 'nu_caps',
- 'xi_caps',
- 'omicron_caps',
- 'pi_caps',
- 'rho_caps',
- 'sigma_caps',
- 'tau_caps',
- 'upsilon_caps',
- 'phi_caps',
- 'chi_caps',
- 'psi_caps',
- 'omega_caps',
- 'alpha',
- 'beta',
- 'gamma',
- 'delta',
- 'epsilon',
- 'zeta',
- 'eta',
- 'theta',
- 'iota',
- 'kappa',
- 'lambda',
- 'mu',
- 'nu',
- 'xi',
- 'omicron',
- 'pi',
- 'rho',
- 'finalsigma',
- 'sigma',
- 'tau',
- 'upsilon',
- 'phi',
- 'chi',
- 'psi',
- 'omega',
- // 'alefsymbol',
- // 'pisymbol',
- // 'realpartsymbol',
- // 'thetasymbol',
- // 'upsilonhooksymbol',
- // 'weierstrassp',
- // 'imaginarypart',
- 'leftwardsarrow',
- 'upwardsarrow',
- 'rightwardsarrow',
- 'downwardsarrow',
- 'leftrightarrow',
- // 'carriagereturn',
- // 'leftwardsdoublearrow',
- // 'upwardsdoublearrow',
- // 'rightwardsdoublearrow',
- // 'downwardsdoublearrow',
- // 'leftrightdoublearrow',
- // 'therefore',
- // 'subsetof',
- // 'supersetof',
- // 'notasubsetof',
- // 'subsetoforequalto',
- // 'supersetoforequalto',
- // 'circledplus',
- // 'circledtimes',
- // 'perpendicular',
- // 'dotoperator',
- // 'leftceiling',
- // 'rightceiling',
- // 'leftfloor',
- // 'rightfloor',
- // 'leftpointinganglebracket',
- // 'rightpointinganglebracket',
- 'lozenge',
- 'blackspadesuit',
- 'blackclubsuit',
- 'blackheartsuit',
- 'blackdiamondsuit',
- // 'enspace',
- // 'emspace',
- // 'thinspace',
- // 'zerowidthnonjoiner',
- // 'zerowidthjoiner',
- // 'lefttorightmark',
- // 'righttoleftmark',
- // 'softhyphen',
- ),
- 'atto_charmap'
- );
-}
diff --git a/lib/editor/atto/plugins/charmap/styles.css b/lib/editor/atto/plugins/charmap/styles.css
deleted file mode 100644
index 465646202bf..00000000000
--- a/lib/editor/atto/plugins/charmap/styles.css
+++ /dev/null
@@ -1,4 +0,0 @@
-.atto_charmap_selector button {
- width: 2.18rem;
- margin: 0.1rem;
-}
diff --git a/lib/editor/atto/plugins/charmap/tests/behat/charmap.feature b/lib/editor/atto/plugins/charmap/tests/behat/charmap.feature
deleted file mode 100644
index 2ef4895fee1..00000000000
--- a/lib/editor/atto/plugins/charmap/tests/behat/charmap.feature
+++ /dev/null
@@ -1,20 +0,0 @@
-@editor @editor_atto @atto @atto_charmap
-Feature: Atto charmap button
- To format text in Atto, I need to add symbols
-
- @javascript
- Scenario: Insert symbols
- Given I log in as "admin"
- And I open my profile in edit mode
- And I set the field "Description" to "
'
- );
-
- var content = Y.Node.create(template({
- component: COMPONENTNAME,
- CSS: CSS,
- CHARMAP: CHARMAP
- }));
-
- content.delegate('click', this._insertChar, '.' + CSS.BUTTON, this);
- return content;
- },
-
- /**
- * Insert the picked character into the editor.
- *
- * @method _insertChar
- * @param {EventFacade} e
- * @private
- */
- _insertChar: function(e) {
- var character = e.target.getData('character');
-
- // Hide the dialogue.
- this.getDialogue({
- focusAfterHide: null
- }).hide();
-
- var host = this.get('host');
-
- // Focus on the last point.
- host.setSelection(this._currentSelection);
-
- // And add the character.
- host.insertContentAtFocusPoint(character);
-
- // And mark the text area as updated.
- this.markUpdated();
- }
-});
diff --git a/lib/editor/atto/plugins/charmap/yui/src/button/meta/button.json b/lib/editor/atto/plugins/charmap/yui/src/button/meta/button.json
deleted file mode 100644
index 46d3d5e9b78..00000000000
--- a/lib/editor/atto/plugins/charmap/yui/src/button/meta/button.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "moodle-atto_charmap-button": {
- "requires": [
- "moodle-editor_atto-plugin"
- ]
- }
-}
diff --git a/lib/editor/atto/plugins/clear/classes/privacy/provider.php b/lib/editor/atto/plugins/clear/classes/privacy/provider.php
deleted file mode 100644
index f1a58c471f7..00000000000
--- a/lib/editor/atto/plugins/clear/classes/privacy/provider.php
+++ /dev/null
@@ -1,46 +0,0 @@
-.
-
-/**
- * Privacy Subsystem implementation for block_activity_modules.
- *
- * @package atto_clear
- * @copyright 2018 Andrew Nicols
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-namespace atto_clear\privacy;
-
-defined('MOODLE_INTERNAL') || die();
-
-/**
- * Privacy Subsystem for atto_clear implementing null_provider.
- *
- * @copyright 2018 Andrew Nicols
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-class provider implements \core_privacy\local\metadata\null_provider {
-
- /**
- * Get the language string identifier with the component's language
- * file to explain why this plugin stores no data.
- *
- * @return string
- */
- public static function get_reason(): string {
- return 'privacy:metadata';
- }
-}
diff --git a/lib/editor/atto/plugins/clear/lang/en/atto_clear.php b/lib/editor/atto/plugins/clear/lang/en/atto_clear.php
deleted file mode 100644
index 7ee632d2664..00000000000
--- a/lib/editor/atto/plugins/clear/lang/en/atto_clear.php
+++ /dev/null
@@ -1,26 +0,0 @@
-.
-
-/**
- * Strings for component 'atto_clear', language 'en'.
- *
- * @package atto_clear
- * @copyright 2013 Damyon Wiese
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-$string['pluginname'] = 'Clear formatting';
-$string['privacy:metadata'] = 'The atto_clear plugin does not store any personal data.';
diff --git a/lib/editor/atto/plugins/clear/tests/behat/clear.feature b/lib/editor/atto/plugins/clear/tests/behat/clear.feature
deleted file mode 100644
index 883aaf51c3f..00000000000
--- a/lib/editor/atto/plugins/clear/tests/behat/clear.feature
+++ /dev/null
@@ -1,21 +0,0 @@
-@editor @editor_atto @atto @atto_clear @_bug_phantomjs
-Feature: Atto clear button
- To format text in Atto, I need to remove formatting
-
- @javascript
- Scenario: Clear formatting
- Given I log in as "admin"
- And I open my profile in edit mode
- And I set the field "Description" to "Pisa"
- And I select the text in the "Description" Atto editor
- And I click on "Italic" "button"
- And I click on "Show more buttons" "button"
- And I select the text in the "Description" Atto editor
- When I click on "Clear formatting" "button"
- And I press "Update profile"
- And I follow "Preferences" in the user menu
- And I follow "Editor preferences"
- And I set the field "Text editor" to "Plain text area"
- And I press "Save changes"
- And I click on "Edit profile" "link" in the "region-main" "region"
- Then I should not see "Pisa"
diff --git a/lib/editor/atto/plugins/clear/version.php b/lib/editor/atto/plugins/clear/version.php
deleted file mode 100644
index 40a1fe8bf34..00000000000
--- a/lib/editor/atto/plugins/clear/version.php
+++ /dev/null
@@ -1,29 +0,0 @@
-.
-
-/**
- * Atto text editor integration version file.
- *
- * @package atto_clear
- * @copyright 2013 Damyon Wiese
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-defined('MOODLE_INTERNAL') || die();
-
-$plugin->version = 2024121800; // The current plugin version (Date: YYYYMMDDXX).
-$plugin->requires = 2024100100; // Requires this Moodle version.
-$plugin->component = 'atto_clear'; // Full name of the plugin (used for diagnostics).
diff --git a/lib/editor/atto/plugins/clear/yui/build/moodle-atto_clear-button/moodle-atto_clear-button-debug.js b/lib/editor/atto/plugins/clear/yui/build/moodle-atto_clear-button/moodle-atto_clear-button-debug.js
deleted file mode 100644
index abd59108660..00000000000
--- a/lib/editor/atto/plugins/clear/yui/build/moodle-atto_clear-button/moodle-atto_clear-button-debug.js
+++ /dev/null
@@ -1,46 +0,0 @@
-YUI.add('moodle-atto_clear-button', function (Y, NAME) {
-
-// This file is part of Moodle - http://moodle.org/
-//
-// Moodle is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Moodle is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Moodle. If not, see .
-
-/*
- * @package atto_clear
- * @copyright 2013 Damyon Wiese
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-/**
- * @module moodle-atto_clear-button
- */
-
-/**
- * Atto text editor clear plugin.
- *
- * @namespace M.atto_clear
- * @class button
- * @extends M.editor_atto.EditorPlugin
- */
-
-Y.namespace('M.atto_clear').Button = Y.Base.create('button', Y.M.editor_atto.EditorPlugin, [], {
- initializer: function() {
- this.addBasicButton({
- exec: 'removeFormat',
- icon: 'e/clear_formatting'
- });
- }
-});
-
-
-}, '@VERSION@', {"requires": ["moodle-editor_atto-plugin"]});
diff --git a/lib/editor/atto/plugins/clear/yui/build/moodle-atto_clear-button/moodle-atto_clear-button-min.js b/lib/editor/atto/plugins/clear/yui/build/moodle-atto_clear-button/moodle-atto_clear-button-min.js
deleted file mode 100644
index 8fc2f891941..00000000000
--- a/lib/editor/atto/plugins/clear/yui/build/moodle-atto_clear-button/moodle-atto_clear-button-min.js
+++ /dev/null
@@ -1 +0,0 @@
-YUI.add("moodle-atto_clear-button",function(t,o){t.namespace("M.atto_clear").Button=t.Base.create("button",t.M.editor_atto.EditorPlugin,[],{initializer:function(){this.addBasicButton({exec:"removeFormat",icon:"e/clear_formatting"})}})},"@VERSION@",{requires:["moodle-editor_atto-plugin"]});
\ No newline at end of file
diff --git a/lib/editor/atto/plugins/clear/yui/build/moodle-atto_clear-button/moodle-atto_clear-button.js b/lib/editor/atto/plugins/clear/yui/build/moodle-atto_clear-button/moodle-atto_clear-button.js
deleted file mode 100644
index abd59108660..00000000000
--- a/lib/editor/atto/plugins/clear/yui/build/moodle-atto_clear-button/moodle-atto_clear-button.js
+++ /dev/null
@@ -1,46 +0,0 @@
-YUI.add('moodle-atto_clear-button', function (Y, NAME) {
-
-// This file is part of Moodle - http://moodle.org/
-//
-// Moodle is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Moodle is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Moodle. If not, see .
-
-/*
- * @package atto_clear
- * @copyright 2013 Damyon Wiese
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-/**
- * @module moodle-atto_clear-button
- */
-
-/**
- * Atto text editor clear plugin.
- *
- * @namespace M.atto_clear
- * @class button
- * @extends M.editor_atto.EditorPlugin
- */
-
-Y.namespace('M.atto_clear').Button = Y.Base.create('button', Y.M.editor_atto.EditorPlugin, [], {
- initializer: function() {
- this.addBasicButton({
- exec: 'removeFormat',
- icon: 'e/clear_formatting'
- });
- }
-});
-
-
-}, '@VERSION@', {"requires": ["moodle-editor_atto-plugin"]});
diff --git a/lib/editor/atto/plugins/clear/yui/src/button/build.json b/lib/editor/atto/plugins/clear/yui/src/button/build.json
deleted file mode 100644
index aeee2de6040..00000000000
--- a/lib/editor/atto/plugins/clear/yui/src/button/build.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "name": "moodle-atto_clear-button",
- "builds": {
- "moodle-atto_clear-button": {
- "jsfiles": [
- "button.js"
- ]
- }
- }
-}
diff --git a/lib/editor/atto/plugins/clear/yui/src/button/js/button.js b/lib/editor/atto/plugins/clear/yui/src/button/js/button.js
deleted file mode 100644
index 6d4fc5583fc..00000000000
--- a/lib/editor/atto/plugins/clear/yui/src/button/js/button.js
+++ /dev/null
@@ -1,41 +0,0 @@
-// This file is part of Moodle - http://moodle.org/
-//
-// Moodle is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Moodle is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Moodle. If not, see .
-
-/*
- * @package atto_clear
- * @copyright 2013 Damyon Wiese
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-/**
- * @module moodle-atto_clear-button
- */
-
-/**
- * Atto text editor clear plugin.
- *
- * @namespace M.atto_clear
- * @class button
- * @extends M.editor_atto.EditorPlugin
- */
-
-Y.namespace('M.atto_clear').Button = Y.Base.create('button', Y.M.editor_atto.EditorPlugin, [], {
- initializer: function() {
- this.addBasicButton({
- exec: 'removeFormat',
- icon: 'e/clear_formatting'
- });
- }
-});
diff --git a/lib/editor/atto/plugins/clear/yui/src/button/meta/button.json b/lib/editor/atto/plugins/clear/yui/src/button/meta/button.json
deleted file mode 100644
index 10697073e4d..00000000000
--- a/lib/editor/atto/plugins/clear/yui/src/button/meta/button.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "moodle-atto_clear-button": {
- "requires": [
- "moodle-editor_atto-plugin"
- ]
- }
-}
diff --git a/lib/editor/atto/plugins/collapse/classes/privacy/provider.php b/lib/editor/atto/plugins/collapse/classes/privacy/provider.php
deleted file mode 100644
index 74b37ac80e3..00000000000
--- a/lib/editor/atto/plugins/collapse/classes/privacy/provider.php
+++ /dev/null
@@ -1,46 +0,0 @@
-.
-
-/**
- * Privacy Subsystem implementation for block_activity_modules.
- *
- * @package atto_collapse
- * @copyright 2018 Andrew Nicols
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-namespace atto_collapse\privacy;
-
-defined('MOODLE_INTERNAL') || die();
-
-/**
- * Privacy Subsystem for atto_collapse implementing null_provider.
- *
- * @copyright 2018 Andrew Nicols
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-class provider implements \core_privacy\local\metadata\null_provider {
-
- /**
- * Get the language string identifier with the component's language
- * file to explain why this plugin stores no data.
- *
- * @return string
- */
- public static function get_reason(): string {
- return 'privacy:metadata';
- }
-}
diff --git a/lib/editor/atto/plugins/collapse/lang/en/atto_collapse.php b/lib/editor/atto/plugins/collapse/lang/en/atto_collapse.php
deleted file mode 100644
index 0cda4b16eac..00000000000
--- a/lib/editor/atto/plugins/collapse/lang/en/atto_collapse.php
+++ /dev/null
@@ -1,32 +0,0 @@
-.
-
-/**
- * Strings for component 'atto_collapse', language 'en'.
- *
- * @package atto_collapse
- * @copyright 2013 Damyon Wiese
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-$string['pluginname'] = 'Show/hide advanced buttons';
-$string['privacy:metadata'] = 'The atto_collapse plugin does not store any personal data.';
-$string['settings'] = 'Collapse toolbar settings';
-$string['showfewer'] = 'Show fewer buttons';
-$string['showgroups'] = 'Show first (n) groups when collapsed.';
-$string['showgroups_desc'] = 'When the toolbar is collapsed (it is by default) only this many groups will be displayed at once.';
-$string['showmore'] = 'Show more buttons';
-$string['youareonsecondrow'] = 'You are now on another row of the editor\'s toolbar, where there are more buttons.';
diff --git a/lib/editor/atto/plugins/collapse/lib.php b/lib/editor/atto/plugins/collapse/lib.php
deleted file mode 100644
index 5f243ce7e56..00000000000
--- a/lib/editor/atto/plugins/collapse/lib.php
+++ /dev/null
@@ -1,53 +0,0 @@
-.
-
-/**
- * Atto text editor integration version file.
- *
- * @package atto_collapse
- * @copyright 2013 Damyon Wiese
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-defined('MOODLE_INTERNAL') || die();
-
-/**
- * Initialise the js strings required for this module.
- */
-function atto_collapse_strings_for_js() {
- global $PAGE;
-
- $PAGE->requires->strings_for_js(array('showmore', 'showfewer', 'youareonsecondrow'), 'atto_collapse');
-}
-
-/**
- * Set params for this plugin
- * @param string $elementid
- */
-function atto_collapse_params_for_js($elementid, $options, $fpoptions) {
- // Pass the number of visible groups as a param.
- $params = array('showgroups' => get_config('atto_collapse', 'showgroups'));
- return $params;
-}
-
-/**
- * Map icons for font-awesome themes.
- */
-function atto_collapse_get_fontawesome_icon_map() {
- return [
- 'atto_collapse:icon' => 'fa-chevron-down',
- ];
-}
diff --git a/lib/editor/atto/plugins/collapse/pix/icon.svg b/lib/editor/atto/plugins/collapse/pix/icon.svg
deleted file mode 100644
index 1ff953818ed..00000000000
--- a/lib/editor/atto/plugins/collapse/pix/icon.svg
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/lib/editor/atto/plugins/collapse/settings.php b/lib/editor/atto/plugins/collapse/settings.php
deleted file mode 100644
index 5fd521b90e9..00000000000
--- a/lib/editor/atto/plugins/collapse/settings.php
+++ /dev/null
@@ -1,43 +0,0 @@
-.
-
-/**
- * Settings that allow configuration of the list of tex examples in the equation editor.
- *
- * @package atto_collapse
- * @copyright 2013 Damyon Wiese
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-defined('MOODLE_INTERNAL') || die();
-
-$ADMIN->add('editoratto', new admin_category('atto_collapse', new lang_string('pluginname', 'atto_collapse')));
-
-$settings = new admin_settingpage('atto_collapse_settings', new lang_string('settings', 'atto_collapse'));
-if ($ADMIN->fulltree) {
- // Number of groups to show when collapsed.
- $name = new lang_string('showgroups', 'atto_collapse');
- $desc = new lang_string('showgroups_desc', 'atto_collapse');
- $default = 6;
- $options = array_combine(range(1, 20), range(1, 20));
-
- $setting = new admin_setting_configselect('atto_collapse/showgroups',
- $name,
- $desc,
- $default,
- $options);
- $settings->add($setting);
-}
diff --git a/lib/editor/atto/plugins/collapse/styles.css b/lib/editor/atto/plugins/collapse/styles.css
deleted file mode 100644
index dea44eccf2d..00000000000
--- a/lib/editor/atto/plugins/collapse/styles.css
+++ /dev/null
@@ -1,5 +0,0 @@
-@media (max-width: 768px) {
- .toolbarbreak {
- display: none;
- }
-}
\ No newline at end of file
diff --git a/lib/editor/atto/plugins/collapse/tests/behat/collapse.feature b/lib/editor/atto/plugins/collapse/tests/behat/collapse.feature
deleted file mode 100644
index ef2823be114..00000000000
--- a/lib/editor/atto/plugins/collapse/tests/behat/collapse.feature
+++ /dev/null
@@ -1,12 +0,0 @@
-@editor @editor_atto @atto @atto_collapse
-Feature: Atto collapse button
- To access all the tools in Atto, I need to toggle the toolbar
-
- @javascript
- Scenario: Toggle toolbar
- Given I log in as "admin"
- And I open my profile in edit mode
- When I click on "Show more buttons" "button"
- Then "Equation editor" "button" should be visible
- And I click on "Show fewer buttons" "button"
- Then "Equation editor" "button" should not be visible
diff --git a/lib/editor/atto/plugins/collapse/version.php b/lib/editor/atto/plugins/collapse/version.php
deleted file mode 100644
index f872c14d2bb..00000000000
--- a/lib/editor/atto/plugins/collapse/version.php
+++ /dev/null
@@ -1,29 +0,0 @@
-.
-
-/**
- * Atto text editor integration version file.
- *
- * @package atto_collapse
- * @copyright 2013 Damyon Wiese
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-defined('MOODLE_INTERNAL') || die();
-
-$plugin->version = 2024121800; // The current plugin version (Date: YYYYMMDDXX).
-$plugin->requires = 2024100100; // Requires this Moodle version.
-$plugin->component = 'atto_collapse'; // Full name of the plugin (used for diagnostics).
diff --git a/lib/editor/atto/plugins/collapse/yui/build/moodle-atto_collapse-button/moodle-atto_collapse-button-debug.js b/lib/editor/atto/plugins/collapse/yui/build/moodle-atto_collapse-button/moodle-atto_collapse-button-debug.js
deleted file mode 100644
index 115d08413fb..00000000000
--- a/lib/editor/atto/plugins/collapse/yui/build/moodle-atto_collapse-button/moodle-atto_collapse-button-debug.js
+++ /dev/null
@@ -1,153 +0,0 @@
-YUI.add('moodle-atto_collapse-button', function (Y, NAME) {
-
-// This file is part of Moodle - http://moodle.org/
-//
-// Moodle is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Moodle is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Moodle. If not, see .
-
-/*
- * @package atto_collapse
- * @copyright 2013 Damyon Wiese
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-/**
- * @module moodle-atto_collapse-button
- */
-
-/**
- * Atto text editor collapse plugin.
- *
- * @namespace M.atto_collapse
- * @class button
- * @extends M.editor_atto.EditorPlugin
- */
-
-var PLUGINNAME = 'atto_collapse',
- ATTRSHOWGROUPS = 'showgroups',
- COLLAPSE = 'collapse',
- COLLAPSED = 'collapsed',
- GROUPS = '.atto_group',
- ROWS = '.atto_toolbar_row';
-
-Y.namespace('M.atto_collapse').Button = Y.Base.create('button', Y.M.editor_atto.EditorPlugin, [], {
- initializer: function() {
- var toolbarGroupCount = Y.Object.size(this.get('host').get('plugins'));
- if (toolbarGroupCount <= 1 + parseInt(this.get(ATTRSHOWGROUPS), 10)) {
- Y.log("There are not enough groups to require toggling - not adding the button",
- 'debug', 'moodle-atto_collapse');
- return;
- }
-
- if (this.toolbar.all(GROUPS).size() > this.get(ATTRSHOWGROUPS)) {
- Y.log("The collapse plugin is shown after it's cut-off - not adding the button",
- 'debug', 'moodle-atto_collapse');
- return;
- }
-
- var button = this.addButton({
- icon: 'icon',
- iconComponent: PLUGINNAME,
- callback: this._toggle
- });
-
- // Perform a toggle after all plugins have been loaded for the first time.
- this.get('host').on('pluginsloaded', function(e, button) {
- // Add 2 rows in the toolbar.
- var toolbarRows = [
- Y.Node.create(''),
- Y.Node.create(''),
- ];
- this.toolbar.appendChild(toolbarRows[0]).insert(toolbarRows[1], 'after');
-
- // Split toolbar buttons between the 2 rows created above.
- var buttonGroups = this.toolbar.all(GROUPS);
- buttonGroups.slice(0, this.get(ATTRSHOWGROUPS)).each(function(buttonGroup) {
- toolbarRows[0].appendChild(buttonGroup);
- });
- buttonGroups.slice(this.get(ATTRSHOWGROUPS)).each(function(buttonGroup) {
- toolbarRows[1].appendChild(buttonGroup);
- });
-
- this._setVisibility(button);
- button.setAttribute('aria-expanded', 'false');
- }, this, button);
- },
-
- /**
- * Toggle the visibility of the extra groups in the toolbar.
- *
- * @method _toggle
- * @param {EventFacade} e
- * @private
- */
- _toggle: function(e) {
- e.preventDefault();
- var button = this.buttons[COLLAPSE];
-
- if (button.getData(COLLAPSED)) {
- this.highlightButtons(COLLAPSE);
- this._setVisibility(button, true);
- this.toolbar.all(ROWS).item(1).focus();
- } else {
- this.unHighlightButtons(COLLAPSE);
- this._setVisibility(button);
- this.buttons[this.name].focus();
- }
- },
-
- /**
- * Set the visibility of the toolbar groups.
- *
- * @method _setVisibility
- * @param {Node} button The collapse button
- * @param {Booelan} visibility Whether the groups should be made visible
- * @private
- */
- _setVisibility: function(button, visibility) {
- var secondaryRow = this.toolbar.all(ROWS).item(1);
-
- if (visibility) {
- button.set('title', M.util.get_string('showfewer', PLUGINNAME));
- secondaryRow.show();
- button.setData(COLLAPSED, false);
- button.setAttribute('aria-expanded', 'true');
- } else {
- button.set('title', M.util.get_string('showmore', PLUGINNAME));
- secondaryRow.hide();
- button.setData(COLLAPSED, true);
- button.setAttribute('aria-expanded', 'false');
- }
-
- // We don't want to have both aria-pressed and aria-expanded set. So we remove aria-pressed here.
- button.removeAttribute('aria-pressed');
- }
-}, {
- ATTRS: {
- /**
- * How many groups to show when collapsed.
- *
- * @attribute showgroups
- * @type Number
- * @default 3
- */
- showgroups: {
- value: 3
- }
- }
-});
-
-
-}, '@VERSION@', {"requires": ["moodle-editor_atto-plugin"]});
diff --git a/lib/editor/atto/plugins/collapse/yui/build/moodle-atto_collapse-button/moodle-atto_collapse-button-min.js b/lib/editor/atto/plugins/collapse/yui/build/moodle-atto_collapse-button/moodle-atto_collapse-button-min.js
deleted file mode 100644
index b1d105fc3ec..00000000000
--- a/lib/editor/atto/plugins/collapse/yui/build/moodle-atto_collapse-button/moodle-atto_collapse-button-min.js
+++ /dev/null
@@ -1 +0,0 @@
-YUI.add("moodle-atto_collapse-button",function(s,t){var a="atto_collapse",l="showgroups",e="collapse",o="collapsed",r=".atto_group",n=".atto_toolbar_row";s.namespace("M.atto_collapse").Button=s.Base.create("button",s.M.editor_atto.EditorPlugin,[],{initializer:function(){var t=s.Object.size(this.get("host").get("plugins"));t<=1+parseInt(this.get(l),10)||this.toolbar.all(r).size()>this.get(l)||(t=this.addButton({icon:"icon",iconComponent:a,callback:this._toggle}),this.get("host").on("pluginsloaded",function(t,e){var i,o=[s.Node.create(''),s.Node.create('')];this.toolbar.appendChild(o[0]).insert(o[1],"after"),(i=this.toolbar.all(r)).slice(0,this.get(l)).each(function(t){o[0].appendChild(t)}),i.slice(this.get(l)).each(function(t){o[1].appendChild(t)}),this._setVisibility(e),e.setAttribute("aria-expanded","false")},this,t))},_toggle:function(t){t.preventDefault();t=this.buttons[e];t.getData(o)?(this.highlightButtons(e),this._setVisibility(t,!0),this.toolbar.all(n).item(1).focus()):(this.unHighlightButtons(e),this._setVisibility(t),this.buttons[this.name].focus())},_setVisibility:function(t,e){var i=this.toolbar.all(n).item(1);e?(t.set("title",M.util.get_string("showfewer",a)),i.show(),t.setData(o,!1),t.setAttribute("aria-expanded","true")):(t.set("title",M.util.get_string("showmore",a)),i.hide(),t.setData(o,!0),t.setAttribute("aria-expanded","false")),t.removeAttribute("aria-pressed")}},{ATTRS:{showgroups:{value:3}}})},"@VERSION@",{requires:["moodle-editor_atto-plugin"]});
\ No newline at end of file
diff --git a/lib/editor/atto/plugins/collapse/yui/build/moodle-atto_collapse-button/moodle-atto_collapse-button.js b/lib/editor/atto/plugins/collapse/yui/build/moodle-atto_collapse-button/moodle-atto_collapse-button.js
deleted file mode 100644
index cf3f15e41a5..00000000000
--- a/lib/editor/atto/plugins/collapse/yui/build/moodle-atto_collapse-button/moodle-atto_collapse-button.js
+++ /dev/null
@@ -1,149 +0,0 @@
-YUI.add('moodle-atto_collapse-button', function (Y, NAME) {
-
-// This file is part of Moodle - http://moodle.org/
-//
-// Moodle is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Moodle is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Moodle. If not, see .
-
-/*
- * @package atto_collapse
- * @copyright 2013 Damyon Wiese
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-/**
- * @module moodle-atto_collapse-button
- */
-
-/**
- * Atto text editor collapse plugin.
- *
- * @namespace M.atto_collapse
- * @class button
- * @extends M.editor_atto.EditorPlugin
- */
-
-var PLUGINNAME = 'atto_collapse',
- ATTRSHOWGROUPS = 'showgroups',
- COLLAPSE = 'collapse',
- COLLAPSED = 'collapsed',
- GROUPS = '.atto_group',
- ROWS = '.atto_toolbar_row';
-
-Y.namespace('M.atto_collapse').Button = Y.Base.create('button', Y.M.editor_atto.EditorPlugin, [], {
- initializer: function() {
- var toolbarGroupCount = Y.Object.size(this.get('host').get('plugins'));
- if (toolbarGroupCount <= 1 + parseInt(this.get(ATTRSHOWGROUPS), 10)) {
- return;
- }
-
- if (this.toolbar.all(GROUPS).size() > this.get(ATTRSHOWGROUPS)) {
- return;
- }
-
- var button = this.addButton({
- icon: 'icon',
- iconComponent: PLUGINNAME,
- callback: this._toggle
- });
-
- // Perform a toggle after all plugins have been loaded for the first time.
- this.get('host').on('pluginsloaded', function(e, button) {
- // Add 2 rows in the toolbar.
- var toolbarRows = [
- Y.Node.create(''),
- Y.Node.create(''),
- ];
- this.toolbar.appendChild(toolbarRows[0]).insert(toolbarRows[1], 'after');
-
- // Split toolbar buttons between the 2 rows created above.
- var buttonGroups = this.toolbar.all(GROUPS);
- buttonGroups.slice(0, this.get(ATTRSHOWGROUPS)).each(function(buttonGroup) {
- toolbarRows[0].appendChild(buttonGroup);
- });
- buttonGroups.slice(this.get(ATTRSHOWGROUPS)).each(function(buttonGroup) {
- toolbarRows[1].appendChild(buttonGroup);
- });
-
- this._setVisibility(button);
- button.setAttribute('aria-expanded', 'false');
- }, this, button);
- },
-
- /**
- * Toggle the visibility of the extra groups in the toolbar.
- *
- * @method _toggle
- * @param {EventFacade} e
- * @private
- */
- _toggle: function(e) {
- e.preventDefault();
- var button = this.buttons[COLLAPSE];
-
- if (button.getData(COLLAPSED)) {
- this.highlightButtons(COLLAPSE);
- this._setVisibility(button, true);
- this.toolbar.all(ROWS).item(1).focus();
- } else {
- this.unHighlightButtons(COLLAPSE);
- this._setVisibility(button);
- this.buttons[this.name].focus();
- }
- },
-
- /**
- * Set the visibility of the toolbar groups.
- *
- * @method _setVisibility
- * @param {Node} button The collapse button
- * @param {Booelan} visibility Whether the groups should be made visible
- * @private
- */
- _setVisibility: function(button, visibility) {
- var secondaryRow = this.toolbar.all(ROWS).item(1);
-
- if (visibility) {
- button.set('title', M.util.get_string('showfewer', PLUGINNAME));
- secondaryRow.show();
- button.setData(COLLAPSED, false);
- button.setAttribute('aria-expanded', 'true');
- } else {
- button.set('title', M.util.get_string('showmore', PLUGINNAME));
- secondaryRow.hide();
- button.setData(COLLAPSED, true);
- button.setAttribute('aria-expanded', 'false');
- }
-
- // We don't want to have both aria-pressed and aria-expanded set. So we remove aria-pressed here.
- button.removeAttribute('aria-pressed');
- }
-}, {
- ATTRS: {
- /**
- * How many groups to show when collapsed.
- *
- * @attribute showgroups
- * @type Number
- * @default 3
- */
- showgroups: {
- value: 3
- }
- }
-});
-
-
-}, '@VERSION@', {"requires": ["moodle-editor_atto-plugin"]});
diff --git a/lib/editor/atto/plugins/collapse/yui/src/button/build.json b/lib/editor/atto/plugins/collapse/yui/src/button/build.json
deleted file mode 100644
index c0f7f198ed0..00000000000
--- a/lib/editor/atto/plugins/collapse/yui/src/button/build.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "name": "moodle-atto_collapse-button",
- "builds": {
- "moodle-atto_collapse-button": {
- "jsfiles": [
- "button.js"
- ]
- }
- }
-}
diff --git a/lib/editor/atto/plugins/collapse/yui/src/button/js/button.js b/lib/editor/atto/plugins/collapse/yui/src/button/js/button.js
deleted file mode 100644
index 88dfd3b6c94..00000000000
--- a/lib/editor/atto/plugins/collapse/yui/src/button/js/button.js
+++ /dev/null
@@ -1,148 +0,0 @@
-// This file is part of Moodle - http://moodle.org/
-//
-// Moodle is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Moodle is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Moodle. If not, see .
-
-/*
- * @package atto_collapse
- * @copyright 2013 Damyon Wiese
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-/**
- * @module moodle-atto_collapse-button
- */
-
-/**
- * Atto text editor collapse plugin.
- *
- * @namespace M.atto_collapse
- * @class button
- * @extends M.editor_atto.EditorPlugin
- */
-
-var PLUGINNAME = 'atto_collapse',
- ATTRSHOWGROUPS = 'showgroups',
- COLLAPSE = 'collapse',
- COLLAPSED = 'collapsed',
- GROUPS = '.atto_group',
- ROWS = '.atto_toolbar_row';
-
-Y.namespace('M.atto_collapse').Button = Y.Base.create('button', Y.M.editor_atto.EditorPlugin, [], {
- initializer: function() {
- var toolbarGroupCount = Y.Object.size(this.get('host').get('plugins'));
- if (toolbarGroupCount <= 1 + parseInt(this.get(ATTRSHOWGROUPS), 10)) {
- Y.log("There are not enough groups to require toggling - not adding the button",
- 'debug', 'moodle-atto_collapse');
- return;
- }
-
- if (this.toolbar.all(GROUPS).size() > this.get(ATTRSHOWGROUPS)) {
- Y.log("The collapse plugin is shown after it's cut-off - not adding the button",
- 'debug', 'moodle-atto_collapse');
- return;
- }
-
- var button = this.addButton({
- icon: 'icon',
- iconComponent: PLUGINNAME,
- callback: this._toggle
- });
-
- // Perform a toggle after all plugins have been loaded for the first time.
- this.get('host').on('pluginsloaded', function(e, button) {
- // Add 2 rows in the toolbar.
- var toolbarRows = [
- Y.Node.create(''),
- Y.Node.create(''),
- ];
- this.toolbar.appendChild(toolbarRows[0]).insert(toolbarRows[1], 'after');
-
- // Split toolbar buttons between the 2 rows created above.
- var buttonGroups = this.toolbar.all(GROUPS);
- buttonGroups.slice(0, this.get(ATTRSHOWGROUPS)).each(function(buttonGroup) {
- toolbarRows[0].appendChild(buttonGroup);
- });
- buttonGroups.slice(this.get(ATTRSHOWGROUPS)).each(function(buttonGroup) {
- toolbarRows[1].appendChild(buttonGroup);
- });
-
- this._setVisibility(button);
- button.setAttribute('aria-expanded', 'false');
- }, this, button);
- },
-
- /**
- * Toggle the visibility of the extra groups in the toolbar.
- *
- * @method _toggle
- * @param {EventFacade} e
- * @private
- */
- _toggle: function(e) {
- e.preventDefault();
- var button = this.buttons[COLLAPSE];
-
- if (button.getData(COLLAPSED)) {
- this.highlightButtons(COLLAPSE);
- this._setVisibility(button, true);
- this.toolbar.all(ROWS).item(1).focus();
- } else {
- this.unHighlightButtons(COLLAPSE);
- this._setVisibility(button);
- this.buttons[this.name].focus();
- }
- },
-
- /**
- * Set the visibility of the toolbar groups.
- *
- * @method _setVisibility
- * @param {Node} button The collapse button
- * @param {Booelan} visibility Whether the groups should be made visible
- * @private
- */
- _setVisibility: function(button, visibility) {
- var secondaryRow = this.toolbar.all(ROWS).item(1);
-
- if (visibility) {
- button.set('title', M.util.get_string('showfewer', PLUGINNAME));
- secondaryRow.show();
- button.setData(COLLAPSED, false);
- button.setAttribute('aria-expanded', 'true');
- } else {
- button.set('title', M.util.get_string('showmore', PLUGINNAME));
- secondaryRow.hide();
- button.setData(COLLAPSED, true);
- button.setAttribute('aria-expanded', 'false');
- }
-
- // We don't want to have both aria-pressed and aria-expanded set. So we remove aria-pressed here.
- button.removeAttribute('aria-pressed');
- }
-}, {
- ATTRS: {
- /**
- * How many groups to show when collapsed.
- *
- * @attribute showgroups
- * @type Number
- * @default 3
- */
- showgroups: {
- value: 3
- }
- }
-});
diff --git a/lib/editor/atto/plugins/collapse/yui/src/button/meta/button.json b/lib/editor/atto/plugins/collapse/yui/src/button/meta/button.json
deleted file mode 100644
index f4b22c61f51..00000000000
--- a/lib/editor/atto/plugins/collapse/yui/src/button/meta/button.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "moodle-atto_collapse-button": {
- "requires": [
- "moodle-editor_atto-plugin"
- ]
- }
-}
diff --git a/lib/editor/atto/plugins/emojipicker/classes/privacy/provider.php b/lib/editor/atto/plugins/emojipicker/classes/privacy/provider.php
deleted file mode 100644
index a88d6213b28..00000000000
--- a/lib/editor/atto/plugins/emojipicker/classes/privacy/provider.php
+++ /dev/null
@@ -1,46 +0,0 @@
-.
-
-/**
- * Privacy Subsystem implementation for atto_emojipicker.
- *
- * @package atto_emojipicker
- * @copyright 2019 Ryan Wyllie
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-namespace atto_emojipicker\privacy;
-
-defined('MOODLE_INTERNAL') || die();
-
-/**
- * Privacy Subsystem for atto_emojipicker implementing null_provider.
- *
- * @copyright 2019 Ryan Wyllie
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-class provider implements \core_privacy\local\metadata\null_provider {
-
- /**
- * Get the language string identifier with the component's language
- * file to explain why this plugin stores no data.
- *
- * @return string
- */
- public static function get_reason(): string {
- return 'privacy:metadata';
- }
-}
diff --git a/lib/editor/atto/plugins/emojipicker/lang/en/atto_emojipicker.php b/lib/editor/atto/plugins/emojipicker/lang/en/atto_emojipicker.php
deleted file mode 100644
index 50bee0f4e60..00000000000
--- a/lib/editor/atto/plugins/emojipicker/lang/en/atto_emojipicker.php
+++ /dev/null
@@ -1,27 +0,0 @@
-.
-
-/**
- * Strings for component 'atto_emojipicker', language 'en'.
- *
- * @package atto_emojipicker
- * @copyright 2019 Ryan Wyllie
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-$string['emojipicker'] = 'Emoji picker';
-$string['pluginname'] = 'Emoji picker';
-$string['privacy:metadata'] = 'The atto_emojipicker plugin does not store any personal data.';
diff --git a/lib/editor/atto/plugins/emojipicker/lib.php b/lib/editor/atto/plugins/emojipicker/lib.php
deleted file mode 100644
index 2c50535b780..00000000000
--- a/lib/editor/atto/plugins/emojipicker/lib.php
+++ /dev/null
@@ -1,48 +0,0 @@
-.
-
-/**
- * Atto text editor emoji picker plugin lib.
- *
- * @package atto_emojipicker
- * @copyright 2019 Ryan Wyllie
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-defined('MOODLE_INTERNAL') || die();
-
-/**
- * Initialise the strings required for JS.
- *
- * @return void
- */
-function atto_emojipicker_strings_for_js() {
- global $PAGE;
- $PAGE->requires->strings_for_js(['emojipicker'], 'atto_emojipicker');
-}
-
-/**
- * Sends the parameters to JS module.
- *
- * @return array
- */
-function atto_emojipicker_params_for_js() {
- global $CFG;
-
- return [
- 'disabled' => empty($CFG->allowemojipicker) ? true : false
- ];
-}
diff --git a/lib/editor/atto/plugins/emojipicker/styles.css b/lib/editor/atto/plugins/emojipicker/styles.css
deleted file mode 100644
index 34278fe0d64..00000000000
--- a/lib/editor/atto/plugins/emojipicker/styles.css
+++ /dev/null
@@ -1,8 +0,0 @@
-.emoji-picker-dialogue.moodle-dialogue-base .moodle-dialogue .moodle-dialogue-bd {
- padding: 0;
-}
-
-.emoji-picker-dialogue .emoji-picker {
- box-shadow: none !important; /* stylelint-disable-line declaration-no-important */
- border: 0;
-}
\ No newline at end of file
diff --git a/lib/editor/atto/plugins/emojipicker/version.php b/lib/editor/atto/plugins/emojipicker/version.php
deleted file mode 100644
index ee5d12a8c60..00000000000
--- a/lib/editor/atto/plugins/emojipicker/version.php
+++ /dev/null
@@ -1,29 +0,0 @@
-.
-
-/**
- * Atto text editor emoji picker plugin version file.
- *
- * @package atto_emojipicker
- * @copyright 2019 Ryan Wyllie
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-defined('MOODLE_INTERNAL') || die();
-
-$plugin->version = 2024121800; // The current plugin version (Date: YYYYMMDDXX).
-$plugin->requires = 2024100100; // Requires this Moodle version.
-$plugin->component = 'atto_emojipicker'; // Full name of the plugin (used for diagnostics).
diff --git a/lib/editor/atto/plugins/emojipicker/yui/build/moodle-atto_emojipicker-button/moodle-atto_emojipicker-button-debug.js b/lib/editor/atto/plugins/emojipicker/yui/build/moodle-atto_emojipicker-button/moodle-atto_emojipicker-button-debug.js
deleted file mode 100644
index ba10edad2a6..00000000000
--- a/lib/editor/atto/plugins/emojipicker/yui/build/moodle-atto_emojipicker-button/moodle-atto_emojipicker-button-debug.js
+++ /dev/null
@@ -1,143 +0,0 @@
-YUI.add('moodle-atto_emojipicker-button', function (Y, NAME) {
-
-// This file is part of Moodle - http://moodle.org/
-//
-// Moodle is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Moodle is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Moodle. If not, see .
-
-/*
- * @package atto_emojipicker
- * @copyright 2019 Ryan Wyllie
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-/**
- * @module moodle-atto_emojipicker-button
- */
-
-var COMPONENTNAME = 'atto_emojipicker',
- EMOJI_PICKER_SEARCH_INPUT = '[data-region="search-input"]';
-
-/**
- * Atto text editor emoji picker plugin.
- *
- * @namespace M.atto_emojipicker
- * @class button
- * @extends M.editor_atto.EditorPlugin
- */
-
-Y.namespace('M.atto_emojipicker').Button = Y.Base.create('button', Y.M.editor_atto.EditorPlugin, [], {
-
- /**
- * A reference to the current selection at the time that the dialogue
- * was opened.
- *
- * @property _currentSelection
- * @type Range
- * @private
- */
- _currentSelection: null,
-
- initializer: function() {
- if (this.get('disabled')) {
- return;
- }
-
- this.addButton({
- icon: 'e/emoticons',
- callback: this._displayDialogue
- });
- },
-
- /**
- * Display the emoji picker.
- *
- * @method _displayDialogue
- * @private
- */
- _displayDialogue: function() {
- // Store the current selection.
- this._currentSelection = this.get('host').getSelection();
- if (this._currentSelection === false) {
- return;
- }
-
- var dialogue = this.getDialogue({
- headerContent: M.util.get_string('emojipicker', COMPONENTNAME),
- width: 'auto',
- focusAfterHide: true,
- additionalBaseClass: 'emoji-picker-dialogue'
- }, true);
-
- // Set the dialogue content, and then show the dialogue.
- dialogue.set('bodyContent', this._getDialogueContent())
- .show();
- },
-
- /**
- * Insert the emoticon.
- *
- * @method _insertEmote
- * @param {String} emoji
- * @private
- */
- _insertEmoji: function(emoji) {
- var host = this.get('host');
-
- // Hide the dialogue.
- this.getDialogue({
- focusAfterHide: null
- }).hide();
-
- // Focus on the previous selection.
- host.setSelection(this._currentSelection);
-
- // And add the character.
- host.insertContentAtFocusPoint(emoji);
-
- this.markUpdated();
- },
-
- /**
- * Generates the content of the dialogue, attaching event listeners to
- * the content.
- *
- * @method _getDialogueContent
- * @return {Node} Node containing the dialogue content
- * @private
- */
- _getDialogueContent: function() {
- var wrapper = Y.Node.create('');
-
- require(['core/templates', 'core/emoji/picker'], function(Templates, initialiseEmojiPicker) {
- Templates.render('core/emoji/picker', {}).then(function(html) {
- var domNode = wrapper.getDOMNode();
- domNode.innerHTML = html;
- initialiseEmojiPicker(domNode, this._insertEmoji.bind(this));
- this.getDialogue().centerDialogue();
- domNode.querySelector(EMOJI_PICKER_SEARCH_INPUT).focus();
- }.bind(this));
- }.bind(this));
-
- return wrapper;
- }
-}, {
- ATTRS: {
- disabled: {
- value: true
- }
- }
-});
-
-
-}, '@VERSION@', {"requires": ["moodle-editor_atto-plugin"]});
diff --git a/lib/editor/atto/plugins/emojipicker/yui/build/moodle-atto_emojipicker-button/moodle-atto_emojipicker-button-min.js b/lib/editor/atto/plugins/emojipicker/yui/build/moodle-atto_emojipicker-button/moodle-atto_emojipicker-button-min.js
deleted file mode 100644
index 30de959d312..00000000000
--- a/lib/editor/atto/plugins/emojipicker/yui/build/moodle-atto_emojipicker-button/moodle-atto_emojipicker-button-min.js
+++ /dev/null
@@ -1 +0,0 @@
-YUI.add("moodle-atto_emojipicker-button",function(e,t){e.namespace("M.atto_emojipicker").Button=e.Base.create("button",e.M.editor_atto.EditorPlugin,[],{_currentSelection:null,initializer:function(){this.get("disabled")||this.addButton({icon:"e/emoticons",callback:this._displayDialogue})},_displayDialogue:function(){this._currentSelection=this.get("host").getSelection(),!1!==this._currentSelection&&this.getDialogue({headerContent:M.util.get_string("emojipicker","atto_emojipicker"),width:"auto",focusAfterHide:!0,additionalBaseClass:"emoji-picker-dialogue"},!0).set("bodyContent",this._getDialogueContent()).show()},_insertEmoji:function(e){var t=this.get("host");this.getDialogue({focusAfterHide:null}).hide(),t.setSelection(this._currentSelection),t.insertContentAtFocusPoint(e),this.markUpdated()},_getDialogueContent:function(){var o=e.Node.create("");return require(["core/templates","core/emoji/picker"],function(e,i){e.render("core/emoji/picker",{}).then(function(e){var t=o.getDOMNode();t.innerHTML=e,i(t,this._insertEmoji.bind(this)),this.getDialogue().centerDialogue(),t.querySelector('[data-region="search-input"]').focus()}.bind(this))}.bind(this)),o}},{ATTRS:{disabled:{value:!0}}})},"@VERSION@",{requires:["moodle-editor_atto-plugin"]});
\ No newline at end of file
diff --git a/lib/editor/atto/plugins/emojipicker/yui/build/moodle-atto_emojipicker-button/moodle-atto_emojipicker-button.js b/lib/editor/atto/plugins/emojipicker/yui/build/moodle-atto_emojipicker-button/moodle-atto_emojipicker-button.js
deleted file mode 100644
index ba10edad2a6..00000000000
--- a/lib/editor/atto/plugins/emojipicker/yui/build/moodle-atto_emojipicker-button/moodle-atto_emojipicker-button.js
+++ /dev/null
@@ -1,143 +0,0 @@
-YUI.add('moodle-atto_emojipicker-button', function (Y, NAME) {
-
-// This file is part of Moodle - http://moodle.org/
-//
-// Moodle is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Moodle is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Moodle. If not, see .
-
-/*
- * @package atto_emojipicker
- * @copyright 2019 Ryan Wyllie
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-/**
- * @module moodle-atto_emojipicker-button
- */
-
-var COMPONENTNAME = 'atto_emojipicker',
- EMOJI_PICKER_SEARCH_INPUT = '[data-region="search-input"]';
-
-/**
- * Atto text editor emoji picker plugin.
- *
- * @namespace M.atto_emojipicker
- * @class button
- * @extends M.editor_atto.EditorPlugin
- */
-
-Y.namespace('M.atto_emojipicker').Button = Y.Base.create('button', Y.M.editor_atto.EditorPlugin, [], {
-
- /**
- * A reference to the current selection at the time that the dialogue
- * was opened.
- *
- * @property _currentSelection
- * @type Range
- * @private
- */
- _currentSelection: null,
-
- initializer: function() {
- if (this.get('disabled')) {
- return;
- }
-
- this.addButton({
- icon: 'e/emoticons',
- callback: this._displayDialogue
- });
- },
-
- /**
- * Display the emoji picker.
- *
- * @method _displayDialogue
- * @private
- */
- _displayDialogue: function() {
- // Store the current selection.
- this._currentSelection = this.get('host').getSelection();
- if (this._currentSelection === false) {
- return;
- }
-
- var dialogue = this.getDialogue({
- headerContent: M.util.get_string('emojipicker', COMPONENTNAME),
- width: 'auto',
- focusAfterHide: true,
- additionalBaseClass: 'emoji-picker-dialogue'
- }, true);
-
- // Set the dialogue content, and then show the dialogue.
- dialogue.set('bodyContent', this._getDialogueContent())
- .show();
- },
-
- /**
- * Insert the emoticon.
- *
- * @method _insertEmote
- * @param {String} emoji
- * @private
- */
- _insertEmoji: function(emoji) {
- var host = this.get('host');
-
- // Hide the dialogue.
- this.getDialogue({
- focusAfterHide: null
- }).hide();
-
- // Focus on the previous selection.
- host.setSelection(this._currentSelection);
-
- // And add the character.
- host.insertContentAtFocusPoint(emoji);
-
- this.markUpdated();
- },
-
- /**
- * Generates the content of the dialogue, attaching event listeners to
- * the content.
- *
- * @method _getDialogueContent
- * @return {Node} Node containing the dialogue content
- * @private
- */
- _getDialogueContent: function() {
- var wrapper = Y.Node.create('');
-
- require(['core/templates', 'core/emoji/picker'], function(Templates, initialiseEmojiPicker) {
- Templates.render('core/emoji/picker', {}).then(function(html) {
- var domNode = wrapper.getDOMNode();
- domNode.innerHTML = html;
- initialiseEmojiPicker(domNode, this._insertEmoji.bind(this));
- this.getDialogue().centerDialogue();
- domNode.querySelector(EMOJI_PICKER_SEARCH_INPUT).focus();
- }.bind(this));
- }.bind(this));
-
- return wrapper;
- }
-}, {
- ATTRS: {
- disabled: {
- value: true
- }
- }
-});
-
-
-}, '@VERSION@', {"requires": ["moodle-editor_atto-plugin"]});
diff --git a/lib/editor/atto/plugins/emojipicker/yui/src/button/build.json b/lib/editor/atto/plugins/emojipicker/yui/src/button/build.json
deleted file mode 100644
index 0a50ee9297d..00000000000
--- a/lib/editor/atto/plugins/emojipicker/yui/src/button/build.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "name": "moodle-atto_emojipicker-button",
- "builds": {
- "moodle-atto_emojipicker-button": {
- "jsfiles": [
- "button.js"
- ]
- }
- }
-}
diff --git a/lib/editor/atto/plugins/emojipicker/yui/src/button/js/button.js b/lib/editor/atto/plugins/emojipicker/yui/src/button/js/button.js
deleted file mode 100644
index 88d7efdb7c4..00000000000
--- a/lib/editor/atto/plugins/emojipicker/yui/src/button/js/button.js
+++ /dev/null
@@ -1,138 +0,0 @@
-// This file is part of Moodle - http://moodle.org/
-//
-// Moodle is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Moodle is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Moodle. If not, see .
-
-/*
- * @package atto_emojipicker
- * @copyright 2019 Ryan Wyllie
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-/**
- * @module moodle-atto_emojipicker-button
- */
-
-var COMPONENTNAME = 'atto_emojipicker',
- EMOJI_PICKER_SEARCH_INPUT = '[data-region="search-input"]';
-
-/**
- * Atto text editor emoji picker plugin.
- *
- * @namespace M.atto_emojipicker
- * @class button
- * @extends M.editor_atto.EditorPlugin
- */
-
-Y.namespace('M.atto_emojipicker').Button = Y.Base.create('button', Y.M.editor_atto.EditorPlugin, [], {
-
- /**
- * A reference to the current selection at the time that the dialogue
- * was opened.
- *
- * @property _currentSelection
- * @type Range
- * @private
- */
- _currentSelection: null,
-
- initializer: function() {
- if (this.get('disabled')) {
- return;
- }
-
- this.addButton({
- icon: 'e/emoticons',
- callback: this._displayDialogue
- });
- },
-
- /**
- * Display the emoji picker.
- *
- * @method _displayDialogue
- * @private
- */
- _displayDialogue: function() {
- // Store the current selection.
- this._currentSelection = this.get('host').getSelection();
- if (this._currentSelection === false) {
- return;
- }
-
- var dialogue = this.getDialogue({
- headerContent: M.util.get_string('emojipicker', COMPONENTNAME),
- width: 'auto',
- focusAfterHide: true,
- additionalBaseClass: 'emoji-picker-dialogue'
- }, true);
-
- // Set the dialogue content, and then show the dialogue.
- dialogue.set('bodyContent', this._getDialogueContent())
- .show();
- },
-
- /**
- * Insert the emoticon.
- *
- * @method _insertEmote
- * @param {String} emoji
- * @private
- */
- _insertEmoji: function(emoji) {
- var host = this.get('host');
-
- // Hide the dialogue.
- this.getDialogue({
- focusAfterHide: null
- }).hide();
-
- // Focus on the previous selection.
- host.setSelection(this._currentSelection);
-
- // And add the character.
- host.insertContentAtFocusPoint(emoji);
-
- this.markUpdated();
- },
-
- /**
- * Generates the content of the dialogue, attaching event listeners to
- * the content.
- *
- * @method _getDialogueContent
- * @return {Node} Node containing the dialogue content
- * @private
- */
- _getDialogueContent: function() {
- var wrapper = Y.Node.create('');
-
- require(['core/templates', 'core/emoji/picker'], function(Templates, initialiseEmojiPicker) {
- Templates.render('core/emoji/picker', {}).then(function(html) {
- var domNode = wrapper.getDOMNode();
- domNode.innerHTML = html;
- initialiseEmojiPicker(domNode, this._insertEmoji.bind(this));
- this.getDialogue().centerDialogue();
- domNode.querySelector(EMOJI_PICKER_SEARCH_INPUT).focus();
- }.bind(this));
- }.bind(this));
-
- return wrapper;
- }
-}, {
- ATTRS: {
- disabled: {
- value: true
- }
- }
-});
diff --git a/lib/editor/atto/plugins/emojipicker/yui/src/button/meta/button.json b/lib/editor/atto/plugins/emojipicker/yui/src/button/meta/button.json
deleted file mode 100644
index 9ea3e8152ac..00000000000
--- a/lib/editor/atto/plugins/emojipicker/yui/src/button/meta/button.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "moodle-atto_emojipicker-button": {
- "requires": [
- "moodle-editor_atto-plugin"
- ]
- }
-}
diff --git a/lib/editor/atto/plugins/emoticon/classes/privacy/provider.php b/lib/editor/atto/plugins/emoticon/classes/privacy/provider.php
deleted file mode 100644
index 8260c4d3fe2..00000000000
--- a/lib/editor/atto/plugins/emoticon/classes/privacy/provider.php
+++ /dev/null
@@ -1,46 +0,0 @@
-.
-
-/**
- * Privacy Subsystem implementation for block_activity_modules.
- *
- * @package atto_emoticon
- * @copyright 2018 Andrew Nicols
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-namespace atto_emoticon\privacy;
-
-defined('MOODLE_INTERNAL') || die();
-
-/**
- * Privacy Subsystem for atto_emoticon implementing null_provider.
- *
- * @copyright 2018 Andrew Nicols
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-class provider implements \core_privacy\local\metadata\null_provider {
-
- /**
- * Get the language string identifier with the component's language
- * file to explain why this plugin stores no data.
- *
- * @return string
- */
- public static function get_reason(): string {
- return 'privacy:metadata';
- }
-}
diff --git a/lib/editor/atto/plugins/emoticon/lang/en/atto_emoticon.php b/lib/editor/atto/plugins/emoticon/lang/en/atto_emoticon.php
deleted file mode 100644
index 5786ba72b67..00000000000
--- a/lib/editor/atto/plugins/emoticon/lang/en/atto_emoticon.php
+++ /dev/null
@@ -1,27 +0,0 @@
-.
-
-/**
- * Strings for component 'atto_emoticon', language 'en'.
- *
- * @package atto_emoticon
- * @copyright 2014 Frédéric Massart
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-$string['insertemoticon'] = 'Insert emoticon';
-$string['pluginname'] = 'Emoticon';
-$string['privacy:metadata'] = 'The atto_emoticon plugin does not store any personal data.';
diff --git a/lib/editor/atto/plugins/emoticon/lib.php b/lib/editor/atto/plugins/emoticon/lib.php
deleted file mode 100644
index 50d0860e8c4..00000000000
--- a/lib/editor/atto/plugins/emoticon/lib.php
+++ /dev/null
@@ -1,54 +0,0 @@
-.
-
-/**
- * Atto text editor emoticon plugin lib.
- *
- * @package atto_emoticon
- * @copyright 2014 Frédéric Massart
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-defined('MOODLE_INTERNAL') || die();
-
-/**
- * Initialise the strings required for JS.
- *
- * @return void
- */
-function atto_emoticon_strings_for_js() {
- global $PAGE;
-
- $PAGE->requires->strings_for_js(array('insertemoticon'), 'atto_emoticon');
-
- // Load the strings required by the emotes.
- $manager = get_emoticon_manager();
- foreach ($manager->get_emoticons(true) as $emote) {
- $PAGE->requires->string_for_js($emote->altidentifier, $emote->altcomponent);
- }
-}
-
-/**
- * Sends the parameters to JS module.
- *
- * @return array
- */
-function atto_emoticon_params_for_js($elementid, $options, $fpoptions) {
- $manager = get_emoticon_manager();
- return array(
- 'emoticons' => $manager->get_emoticons(true)
- );
-}
diff --git a/lib/editor/atto/plugins/emoticon/styles.css b/lib/editor/atto/plugins/emoticon/styles.css
deleted file mode 100644
index 90fddab1ff7..00000000000
--- a/lib/editor/atto/plugins/emoticon/styles.css
+++ /dev/null
@@ -1,20 +0,0 @@
-.atto_emoticon_map ul {
- padding: 0;
- margin: 0;
- display: table;
- width: 100%;
-}
-
-.atto_emoticon_map li {
- display: table-row;
- white-space: nowrap;
-}
-
-.atto_emoticon_map li div {
- display: table-cell;
- padding: 0 1em;
-}
-
-.atto_emoticon_emote img {
- width: 16px;
-}
diff --git a/lib/editor/atto/plugins/emoticon/version.php b/lib/editor/atto/plugins/emoticon/version.php
deleted file mode 100644
index 2998c32c038..00000000000
--- a/lib/editor/atto/plugins/emoticon/version.php
+++ /dev/null
@@ -1,29 +0,0 @@
-.
-
-/**
- * Atto text editor emoticon plugin version file.
- *
- * @package atto_emoticon
- * @copyright 2014 Frédéric Massart
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-defined('MOODLE_INTERNAL') || die();
-
-$plugin->version = 2024121800; // The current plugin version (Date: YYYYMMDDXX).
-$plugin->requires = 2024100100; // Requires this Moodle version.
-$plugin->component = 'atto_emoticon'; // Full name of the plugin (used for diagnostics).
diff --git a/lib/editor/atto/plugins/emoticon/yui/build/moodle-atto_emoticon-button/moodle-atto_emoticon-button-debug.js b/lib/editor/atto/plugins/emoticon/yui/build/moodle-atto_emoticon-button/moodle-atto_emoticon-button-debug.js
deleted file mode 100644
index b4c308538ea..00000000000
--- a/lib/editor/atto/plugins/emoticon/yui/build/moodle-atto_emoticon-button/moodle-atto_emoticon-button-debug.js
+++ /dev/null
@@ -1,170 +0,0 @@
-YUI.add('moodle-atto_emoticon-button', function (Y, NAME) {
-
-// This file is part of Moodle - http://moodle.org/
-//
-// Moodle is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Moodle is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Moodle. If not, see .
-
-/*
- * @package atto_emoticon
- * @copyright 2014 Frédéric Massart
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-/**
- * @module moodle-atto_emoticon-button
- */
-
-var COMPONENTNAME = 'atto_emoticon',
- CSS = {
- EMOTE: 'atto_emoticon_emote',
- MAP: 'atto_emoticon_map'
- },
- SELECTORS = {
- EMOTE: '.atto_emoticon_emote'
- },
- TEMPLATE = '' +
- '
';
-
-/**
- * Atto text editor emoticon plugin.
- *
- * @namespace M.atto_emoticon
- * @class button
- * @extends M.editor_atto.EditorPlugin
- */
-
-Y.namespace('M.atto_emoticon').Button = Y.Base.create('button', Y.M.editor_atto.EditorPlugin, [], {
-
- /**
- * A reference to the current selection at the time that the dialogue
- * was opened.
- *
- * @property _currentSelection
- * @type Range
- * @private
- */
- _currentSelection: null,
-
- initializer: function() {
- this.addButton({
- icon: 'e/emoticons',
- callback: this._displayDialogue
- });
- },
-
- /**
- * Display the Emoticon chooser.
- *
- * @method _displayDialogue
- * @private
- */
- _displayDialogue: function() {
- // Store the current selection.
- this._currentSelection = this.get('host').getSelection();
- if (this._currentSelection === false) {
- return;
- }
-
- var dialogue = this.getDialogue({
- headerContent: M.util.get_string('insertemoticon', COMPONENTNAME),
- focusAfterHide: true
- }, true);
-
- // Set the dialogue content, and then show the dialogue.
- dialogue.set('bodyContent', this._getDialogueContent())
- .show();
- },
-
- /**
- * Insert the emoticon.
- *
- * @method _insertEmote
- * @param {EventFacade} e
- * @private
- */
- _insertEmote: function(e) {
- var target = e.target.ancestor(SELECTORS.EMOTE, true),
- host = this.get('host');
-
- e.preventDefault();
-
- // Hide the dialogue.
- this.getDialogue({
- focusAfterHide: null
- }).hide();
-
- // Build the Emoticon text.
- var html = ' ' + target.getData('text') + ' ';
-
- // Focus on the previous selection.
- host.setSelection(this._currentSelection);
-
- // And add the character.
- host.insertContentAtFocusPoint(html);
-
- this.markUpdated();
- },
-
- /**
- * Generates the content of the dialogue, attaching event listeners to
- * the content.
- *
- * @method _getDialogueContent
- * @return {Node} Node containing the dialogue content
- * @private
- */
- _getDialogueContent: function() {
- var template = Y.Handlebars.compile(TEMPLATE),
- content = Y.Node.create(template({
- emoticons: this.get('emoticons'),
- CSS: CSS
- }));
- content.delegate('click', this._insertEmote, SELECTORS.EMOTE, this);
- content.delegate('key', this._insertEmote, '32', SELECTORS.EMOTE, this);
-
- return content;
- }
-}, {
- ATTRS: {
- /**
- * The list of emoticons to display.
- *
- * @attribute emoticons
- * @type array
- * @default {}
- */
- emoticons: {
- value: {}
- }
- }
-});
-
-
-}, '@VERSION@', {"requires": ["moodle-editor_atto-plugin"]});
diff --git a/lib/editor/atto/plugins/emoticon/yui/build/moodle-atto_emoticon-button/moodle-atto_emoticon-button-min.js b/lib/editor/atto/plugins/emoticon/yui/build/moodle-atto_emoticon-button/moodle-atto_emoticon-button-min.js
deleted file mode 100644
index af413e5203b..00000000000
--- a/lib/editor/atto/plugins/emoticon/yui/build/moodle-atto_emoticon-button/moodle-atto_emoticon-button-min.js
+++ /dev/null
@@ -1 +0,0 @@
-YUI.add("moodle-atto_emoticon-button",function(e,t){var i={EMOTE:"atto_emoticon_emote",MAP:"atto_emoticon_map"},o=".atto_emoticon_emote";e.namespace("M.atto_emoticon").Button=e.Base.create("button",e.M.editor_atto.EditorPlugin,[],{_currentSelection:null,initializer:function(){this.addButton({icon:"e/emoticons",callback:this._displayDialogue})},_displayDialogue:function(){this._currentSelection=this.get("host").getSelection(),!1!==this._currentSelection&&this.getDialogue({headerContent:M.util.get_string("insertemoticon","atto_emoticon"),focusAfterHide:!0},!0).set("bodyContent",this._getDialogueContent()).show()},_insertEmote:function(t){var e=t.target.ancestor(o,!0),i=this.get("host");t.preventDefault(),this.getDialogue({focusAfterHide:null}).hide(),t=" "+e.getData("text")+" ",i.setSelection(this._currentSelection),i.insertContentAtFocusPoint(t),this.markUpdated()},_getDialogueContent:function(){var t=e.Handlebars.compile('
{{#each emoticons}}
{{text}}
{{get_string altidentifier altcomponent}}
{{/each}}
'),t=e.Node.create(t({emoticons:this.get("emoticons"),CSS:i}));return t.delegate("click",this._insertEmote,o,this),t.delegate("key",this._insertEmote,"32",o,this),t}},{ATTRS:{emoticons:{value:{}}}})},"@VERSION@",{requires:["moodle-editor_atto-plugin"]});
\ No newline at end of file
diff --git a/lib/editor/atto/plugins/emoticon/yui/build/moodle-atto_emoticon-button/moodle-atto_emoticon-button.js b/lib/editor/atto/plugins/emoticon/yui/build/moodle-atto_emoticon-button/moodle-atto_emoticon-button.js
deleted file mode 100644
index b4c308538ea..00000000000
--- a/lib/editor/atto/plugins/emoticon/yui/build/moodle-atto_emoticon-button/moodle-atto_emoticon-button.js
+++ /dev/null
@@ -1,170 +0,0 @@
-YUI.add('moodle-atto_emoticon-button', function (Y, NAME) {
-
-// This file is part of Moodle - http://moodle.org/
-//
-// Moodle is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Moodle is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Moodle. If not, see .
-
-/*
- * @package atto_emoticon
- * @copyright 2014 Frédéric Massart
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-/**
- * @module moodle-atto_emoticon-button
- */
-
-var COMPONENTNAME = 'atto_emoticon',
- CSS = {
- EMOTE: 'atto_emoticon_emote',
- MAP: 'atto_emoticon_map'
- },
- SELECTORS = {
- EMOTE: '.atto_emoticon_emote'
- },
- TEMPLATE = '' +
- '
';
-
-/**
- * Atto text editor emoticon plugin.
- *
- * @namespace M.atto_emoticon
- * @class button
- * @extends M.editor_atto.EditorPlugin
- */
-
-Y.namespace('M.atto_emoticon').Button = Y.Base.create('button', Y.M.editor_atto.EditorPlugin, [], {
-
- /**
- * A reference to the current selection at the time that the dialogue
- * was opened.
- *
- * @property _currentSelection
- * @type Range
- * @private
- */
- _currentSelection: null,
-
- initializer: function() {
- this.addButton({
- icon: 'e/emoticons',
- callback: this._displayDialogue
- });
- },
-
- /**
- * Display the Emoticon chooser.
- *
- * @method _displayDialogue
- * @private
- */
- _displayDialogue: function() {
- // Store the current selection.
- this._currentSelection = this.get('host').getSelection();
- if (this._currentSelection === false) {
- return;
- }
-
- var dialogue = this.getDialogue({
- headerContent: M.util.get_string('insertemoticon', COMPONENTNAME),
- focusAfterHide: true
- }, true);
-
- // Set the dialogue content, and then show the dialogue.
- dialogue.set('bodyContent', this._getDialogueContent())
- .show();
- },
-
- /**
- * Insert the emoticon.
- *
- * @method _insertEmote
- * @param {EventFacade} e
- * @private
- */
- _insertEmote: function(e) {
- var target = e.target.ancestor(SELECTORS.EMOTE, true),
- host = this.get('host');
-
- e.preventDefault();
-
- // Hide the dialogue.
- this.getDialogue({
- focusAfterHide: null
- }).hide();
-
- // Build the Emoticon text.
- var html = ' ' + target.getData('text') + ' ';
-
- // Focus on the previous selection.
- host.setSelection(this._currentSelection);
-
- // And add the character.
- host.insertContentAtFocusPoint(html);
-
- this.markUpdated();
- },
-
- /**
- * Generates the content of the dialogue, attaching event listeners to
- * the content.
- *
- * @method _getDialogueContent
- * @return {Node} Node containing the dialogue content
- * @private
- */
- _getDialogueContent: function() {
- var template = Y.Handlebars.compile(TEMPLATE),
- content = Y.Node.create(template({
- emoticons: this.get('emoticons'),
- CSS: CSS
- }));
- content.delegate('click', this._insertEmote, SELECTORS.EMOTE, this);
- content.delegate('key', this._insertEmote, '32', SELECTORS.EMOTE, this);
-
- return content;
- }
-}, {
- ATTRS: {
- /**
- * The list of emoticons to display.
- *
- * @attribute emoticons
- * @type array
- * @default {}
- */
- emoticons: {
- value: {}
- }
- }
-});
diff --git a/lib/editor/atto/plugins/emoticon/yui/src/button/meta/button.json b/lib/editor/atto/plugins/emoticon/yui/src/button/meta/button.json
deleted file mode 100644
index a17ef6d963d..00000000000
--- a/lib/editor/atto/plugins/emoticon/yui/src/button/meta/button.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "moodle-atto_emoticon-button": {
- "requires": [
- "moodle-editor_atto-plugin"
- ]
- }
-}
diff --git a/lib/editor/atto/plugins/equation/ajax.php b/lib/editor/atto/plugins/equation/ajax.php
deleted file mode 100644
index 527a9df91be..00000000000
--- a/lib/editor/atto/plugins/equation/ajax.php
+++ /dev/null
@@ -1,51 +0,0 @@
-.
-
-/**
- * Renders text with the active filters and returns it. Used to create previews of equations
- * using whatever tex filters are enabled.
- *
- * @package atto_equation
- * @copyright 2014 Damyon Wiese
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-define('AJAX_SCRIPT', true);
-
-require_once(__DIR__ . '/../../../../../config.php');
-
-$contextid = required_param('contextid', PARAM_INT);
-
-list($context, $course, $cm) = get_context_info_array($contextid);
-$PAGE->set_url('/lib/editor/atto/plugins/equation/ajax.php');
-$PAGE->set_context($context);
-
-require_login($course, false, $cm);
-require_sesskey();
-
-$action = required_param('action', PARAM_ALPHA);
-
-if ($action === 'filtertext') {
- $text = required_param('text', PARAM_RAW);
-
- $result = filter_manager::instance()->filter_text($text, $context);
- echo $OUTPUT->header();
- echo $result;
-
- die();
-}
-
-throw new \moodle_exception('invalidarguments');
diff --git a/lib/editor/atto/plugins/equation/classes/privacy/provider.php b/lib/editor/atto/plugins/equation/classes/privacy/provider.php
deleted file mode 100644
index d561a457811..00000000000
--- a/lib/editor/atto/plugins/equation/classes/privacy/provider.php
+++ /dev/null
@@ -1,46 +0,0 @@
-.
-
-/**
- * Privacy Subsystem implementation for block_activity_modules.
- *
- * @package atto_equation
- * @copyright 2018 Andrew Nicols
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-namespace atto_equation\privacy;
-
-defined('MOODLE_INTERNAL') || die();
-
-/**
- * Privacy Subsystem for atto_equation implementing null_provider.
- *
- * @copyright 2018 Andrew Nicols
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-class provider implements \core_privacy\local\metadata\null_provider {
-
- /**
- * Get the language string identifier with the component's language
- * file to explain why this plugin stores no data.
- *
- * @return string
- */
- public static function get_reason(): string {
- return 'privacy:metadata';
- }
-}
diff --git a/lib/editor/atto/plugins/equation/db/upgrade.php b/lib/editor/atto/plugins/equation/db/upgrade.php
deleted file mode 100644
index 1a6367f30fa..00000000000
--- a/lib/editor/atto/plugins/equation/db/upgrade.php
+++ /dev/null
@@ -1,44 +0,0 @@
-.
-
-/**
- * Atto equation plugin upgrade script.
- *
- * @package atto_equation
- * @copyright 2015 Sam Chaffee
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-/**
- * Run all Atto equation upgrade steps between the current DB version and the current version on disk.
- * @param int $oldversion The old version of atto equation in the DB.
- * @return bool
- */
-function xmldb_atto_equation_upgrade($oldversion) {
- // Automatically generated Moodle v4.2.0 release upgrade line.
- // Put any upgrade step following this.
-
- // Automatically generated Moodle v4.3.0 release upgrade line.
- // Put any upgrade step following this.
-
- // Automatically generated Moodle v4.4.0 release upgrade line.
- // Put any upgrade step following this.
-
- // Automatically generated Moodle v4.5.0 release upgrade line.
- // Put any upgrade step following this.
-
- return true;
-}
diff --git a/lib/editor/atto/plugins/equation/lang/en/atto_equation.php b/lib/editor/atto/plugins/equation/lang/en/atto_equation.php
deleted file mode 100644
index c30c00d4e6c..00000000000
--- a/lib/editor/atto/plugins/equation/lang/en/atto_equation.php
+++ /dev/null
@@ -1,40 +0,0 @@
-.
-
-/**
- * Strings for component 'atto_equation', language 'en'.
- *
- * @package atto_equation
- * @copyright 2013 Damyon Wiese
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-$string['editequation'] = 'Edit equation using TeX';
-$string['librarygroup1'] = 'Operators';
-$string['librarygroup1_desc'] = 'TeX commands listed on the operators tab.';
-$string['librarygroup2'] = 'Arrows';
-$string['librarygroup2_desc'] = 'TeX commands listed on the arrows tab.';
-$string['librarygroup3'] = 'Greek symbols';
-$string['librarygroup3_desc'] = 'TeX commands listed on the Greek symbols tab.';
-$string['librarygroup4'] = 'Advanced';
-$string['librarygroup4_desc'] = 'TeX commands listed on the advanced tab.';
-$string['pluginname'] = 'Equation editor';
-$string['preview'] = 'Equation preview';
-$string['cursorinfo'] = 'An arrow indicates the position that new elements from the element library will be inserted.';
-$string['saveequation'] = 'Save equation';
-$string['settings'] = 'Equation editor settings';
-$string['update'] = 'Update';
-$string['privacy:metadata'] = 'The atto_equation plugin does not store any personal data.';
diff --git a/lib/editor/atto/plugins/equation/lib.php b/lib/editor/atto/plugins/equation/lib.php
deleted file mode 100644
index 8dcb1859eae..00000000000
--- a/lib/editor/atto/plugins/equation/lib.php
+++ /dev/null
@@ -1,93 +0,0 @@
-.
-
-/**
- * Atto text editor integration version file.
- *
- * @package atto_equation
- * @copyright 2013 Damyon Wiese
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-defined('MOODLE_INTERNAL') || die();
-
-/**
- * Get the list of strings for this plugin.
- * @param string $elementid
- */
-function atto_equation_strings_for_js() {
- global $PAGE;
-
- $PAGE->requires->strings_for_js(array('saveequation',
- 'editequation',
- 'preview',
- 'cursorinfo',
- 'update',
- 'librarygroup1',
- 'librarygroup2',
- 'librarygroup3',
- 'librarygroup4'),
- 'atto_equation');
-}
-
-/**
- * Set params for this plugin.
- *
- * @param string $elementid
- * @param stdClass $options - the options for the editor, including the context.
- * @param stdClass $fpoptions - unused.
- */
-function atto_equation_params_for_js($elementid, $options, $fpoptions) {
- $texexample = '$$\pi$$';
-
- // Format a string with the active filter set.
- // If it is modified - we assume that some sort of text filter is working in this context.
- $formatoptions = [
- 'context' => $options['context'],
- 'noclean' => $options['noclean'] ?? false,
- 'trusted' => $options['trusted'] ?? false,
- ];
-
- $result = format_text($texexample, true, $formatoptions);
-
- $texfilteractive = ($texexample !== $result);
- $context = $options['context'];
-
- // Tex example librarys.
- $library = array(
- 'group1' => array(
- 'groupname' => 'librarygroup1',
- 'elements' => get_config('atto_equation', 'librarygroup1'),
- 'active' => true,
- ),
- 'group2' => array(
- 'groupname' => 'librarygroup2',
- 'elements' => get_config('atto_equation', 'librarygroup2'),
- ),
- 'group3' => array(
- 'groupname' => 'librarygroup3',
- 'elements' => get_config('atto_equation', 'librarygroup3'),
- ),
- 'group4' => array(
- 'groupname' => 'librarygroup4',
- 'elements' => get_config('atto_equation', 'librarygroup4'),
- ));
-
- return array('texfilteractive' => $texfilteractive,
- 'contextid' => $context->id,
- 'library' => $library,
- 'texdocsurl' => get_docs_url('Using_TeX_Notation'));
-}
diff --git a/lib/editor/atto/plugins/equation/settings.php b/lib/editor/atto/plugins/equation/settings.php
deleted file mode 100644
index 118611edb6c..00000000000
--- a/lib/editor/atto/plugins/equation/settings.php
+++ /dev/null
@@ -1,175 +0,0 @@
-.
-
-/**
- * Settings that allow configuration of the list of tex examples in the equation editor.
- *
- * @package atto_equation
- * @copyright 2013 Damyon Wiese
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-defined('MOODLE_INTERNAL') || die();
-
-$ADMIN->add('editoratto', new admin_category('atto_equation', new lang_string('pluginname', 'atto_equation')));
-
-$settings = new admin_settingpage('atto_equation_settings', new lang_string('settings', 'atto_equation'));
-if ($ADMIN->fulltree) {
- // Group 1
- $name = new lang_string('librarygroup1', 'atto_equation');
- $desc = new lang_string('librarygroup1_desc', 'atto_equation');
- $default = '
-\cdot
-\times
-\ast
-\div
-\diamond
-\pm
-\mp
-\oplus
-\ominus
-\otimes
-\oslash
-\odot
-\circ
-\bullet
-\asymp
-\equiv
-\subseteq
-\supseteq
-\leq
-\geq
-\preceq
-\succeq
-\sim
-\simeq
-\approx
-\subset
-\supset
-\ll
-\gg
-\prec
-\succ
-\infty
-\in
-\ni
-\forall
-\exists
-\neq
-';
- $setting = new admin_setting_configtextarea('atto_equation/librarygroup1',
- $name,
- $desc,
- $default);
- $settings->add($setting);
-
- // Group 2
- $name = new lang_string('librarygroup2', 'atto_equation');
- $desc = new lang_string('librarygroup2_desc', 'atto_equation');
- $default = '
-\leftarrow
-\rightarrow
-\uparrow
-\downarrow
-\leftrightarrow
-\nearrow
-\searrow
-\swarrow
-\nwarrow
-\Leftarrow
-\Rightarrow
-\Uparrow
-\Downarrow
-\Leftrightarrow
-';
- $setting = new admin_setting_configtextarea('atto_equation/librarygroup2',
- $name,
- $desc,
- $default);
- $settings->add($setting);
-
- // Group 3
- $name = new lang_string('librarygroup3', 'atto_equation');
- $desc = new lang_string('librarygroup3_desc', 'atto_equation');
- $default = '
-\alpha
-\beta
-\gamma
-\delta
-\epsilon
-\zeta
-\eta
-\theta
-\iota
-\kappa
-\lambda
-\mu
-\nu
-\xi
-\pi
-\rho
-\sigma
-\tau
-\upsilon
-\phi
-\chi
-\psi
-\omega
-\Gamma
-\Delta
-\Theta
-\Lambda
-\Xi
-\Pi
-\Sigma
-\Upsilon
-\Phi
-\Psi
-\Omega
-';
- $setting = new admin_setting_configtextarea('atto_equation/librarygroup3',
- $name,
- $desc,
- $default);
- $settings->add($setting);
-
- // Group 4
- $name = new lang_string('librarygroup4', 'atto_equation');
- $desc = new lang_string('librarygroup4_desc', 'atto_equation');
- $default = '
-\sum{a,b}
-\sqrt[a]{b+c}
-\int_{a}^{b}{c}
-\iint_{a}^{b}{c}
-\iiint_{a}^{b}{c}
-\oint{a}
-(a)
-[a]
-\lbrace{a}\rbrace
-\left| \begin{matrix} a_1 & a_2 \\\\ a_3 & a_4 \end{matrix} \right|
-\frac{a}{b+c}
-\vec{a}
-\binom {a} {b}
-{a \brack b}
-{a \brace b}
-';
- $setting = new admin_setting_configtextarea('atto_equation/librarygroup4',
- $name,
- $desc,
- $default);
- $settings->add($setting);
-
-}
diff --git a/lib/editor/atto/plugins/equation/styles.css b/lib/editor/atto/plugins/equation/styles.css
deleted file mode 100644
index 3cac262f071..00000000000
--- a/lib/editor/atto/plugins/equation/styles.css
+++ /dev/null
@@ -1,11 +0,0 @@
-.atto_equation_library button {
- margin: 0.25%;
- min-width: 12%;
-}
-
-#page-admin-setting-atto_equation_settings .form-defaultinfo {
- max-height: 10em;
- overflow: auto;
- padding: 5px;
- min-width: 206px;
-}
diff --git a/lib/editor/atto/plugins/equation/tests/behat/equation.feature b/lib/editor/atto/plugins/equation/tests/behat/equation.feature
deleted file mode 100644
index fff9e8f9a97..00000000000
--- a/lib/editor/atto/plugins/equation/tests/behat/equation.feature
+++ /dev/null
@@ -1,38 +0,0 @@
-@editor @editor_atto @atto @atto_equation @_bug_phantomjs
-Feature: Atto equation editor
- To teach maths to students, I need to write equations
-
- @javascript
- Scenario: Create an equation
- Given I log in as "admin"
- When I open my profile in edit mode
- And I set the field "Description" to "
Equation test
"
- # Set field on the bottom of page, so equation editor dialogue is visible.
- And I expand all fieldsets
- And I set the field "Picture description" to "Test"
- And I select the text in the "Description" Atto editor
- And I click on "Show more buttons" "button"
- And I click on "Equation editor" "button"
- And the "class" attribute of "Edit equation using" "field" should contain "text-ltr"
- And I set the field "Edit equation using" to " = 1 \div 0"
- And I click on "\infty" "button"
- And I click on "Save equation" "button"
- And I click on "Update profile" "button"
- And I follow "Profile" in the user menu
- Then "\infty" "text" should exist
-
- @javascript
- Scenario: Edit an equation
- Given I log in as "admin"
- When I open my profile in edit mode
- And I set the field "Description" to "
\( \pi \)
"
- # Set field on the bottom of page, so equation editor dialogue is visible.
- And I expand all fieldsets
- And I set the field "Picture description" to "Test"
- And I select the text in the "Description" Atto editor
- And I click on "Show more buttons" "button"
- And I click on "Equation editor" "button"
- And the "class" attribute of "Edit equation using" "field" should contain "text-ltr"
- Then the field "Edit equation using" matches value " \pi "
- And I click on "Save equation" "button"
- And the field "Description" matches value "
\( \pi \)
"
diff --git a/lib/editor/atto/plugins/equation/version.php b/lib/editor/atto/plugins/equation/version.php
deleted file mode 100644
index 411158479bb..00000000000
--- a/lib/editor/atto/plugins/equation/version.php
+++ /dev/null
@@ -1,29 +0,0 @@
-.
-
-/**
- * Atto text editor integration version file.
- *
- * @package atto_equation
- * @copyright 2013 Damyon Wiese
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-defined('MOODLE_INTERNAL') || die();
-
-$plugin->version = 2024121800; // The current plugin version (Date: YYYYMMDDXX).
-$plugin->requires = 2024100100; // Requires this Moodle version.
-$plugin->component = 'atto_equation'; // Full name of the plugin (used for diagnostics).
diff --git a/lib/editor/atto/plugins/equation/yui/build/moodle-atto_equation-button/moodle-atto_equation-button-debug.js b/lib/editor/atto/plugins/equation/yui/build/moodle-atto_equation-button/moodle-atto_equation-button-debug.js
deleted file mode 100644
index 126b96aef22..00000000000
--- a/lib/editor/atto/plugins/equation/yui/build/moodle-atto_equation-button/moodle-atto_equation-button-debug.js
+++ /dev/null
@@ -1,791 +0,0 @@
-YUI.add('moodle-atto_equation-button', function (Y, NAME) {
-
-// This file is part of Moodle - http://moodle.org/
-//
-// Moodle is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Moodle is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Moodle. If not, see .
-
-/**
- * @package atto_equation
- * @copyright 2013 Damyon Wiese
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-/**
- * Atto text editor equation plugin.
- */
-
-/**
- * Atto equation editor.
- *
- * @namespace M.atto_equation
- * @class Button
- * @extends M.editor_atto.EditorPlugin
- */
-var COMPONENTNAME = 'atto_equation',
- LOGNAME = 'atto_equation',
- CSS = {
- EQUATION_TEXT: 'atto_equation_equation',
- EQUATION_PREVIEW: 'atto_equation_preview',
- SUBMIT: 'atto_equation_submit',
- LIBRARY: 'atto_equation_library',
- LIBRARY_GROUPS: 'atto_equation_groups',
- LIBRARY_GROUP_PREFIX: 'atto_equation_group'
- },
- SELECTORS = {
- LIBRARY: '.' + CSS.LIBRARY,
- LIBRARY_GROUP: '.' + CSS.LIBRARY_GROUPS + ' > div > div',
- EQUATION_TEXT: '.' + CSS.EQUATION_TEXT,
- EQUATION_PREVIEW: '.' + CSS.EQUATION_PREVIEW,
- SUBMIT: '.' + CSS.SUBMIT,
- LIBRARY_BUTTON: '.' + CSS.LIBRARY + ' button'
- },
- DELIMITERS = {
- START: '\\(',
- END: '\\)'
- },
- TEMPLATES = {
- FORM: '' +
- '',
- LIBRARY: '' +
- '
'
- };
-
-Y.namespace('M.atto_equation').Button = Y.Base.create('button', Y.M.editor_atto.EditorPlugin, [], {
-
- /**
- * The selection object returned by the browser.
- *
- * @property _currentSelection
- * @type Range
- * @default null
- * @private
- */
- _currentSelection: null,
-
- /**
- * The cursor position in the equation textarea.
- *
- * @property _lastCursorPos
- * @type Number
- * @default 0
- * @private
- */
- _lastCursorPos: 0,
-
- /**
- * A reference to the dialogue content.
- *
- * @property _content
- * @type Node
- * @private
- */
- _content: null,
-
- /**
- * The source equation we are editing in the text.
- *
- * @property _sourceEquation
- * @type Object
- * @private
- */
- _sourceEquation: null,
-
- /**
- * A reference to the tab focus set on each group.
- *
- * The keys are the IDs of the group, the value is the Node on which the focus is set.
- *
- * @property _groupFocus
- * @type Object
- * @private
- */
- _groupFocus: null,
-
- /**
- * Regular Expression patterns used to pick out the equations in a String.
- *
- * @property _equationPatterns
- * @type Array
- * @private
- */
- _equationPatterns: [
- // We use space or not space because . does not match new lines.
- // $$ blah $$.
- /\$\$([\S\s]+?)\$\$/,
- // E.g. "\( blah \)".
- /\\\(([\S\s]+?)\\\)/,
- // E.g. "\[ blah \]".
- /\\\[([\S\s]+?)\\\]/,
- // E.g. "[tex] blah [/tex]".
- /\[tex\]([\S\s]+?)\[\/tex\]/
- ],
-
- initializer: function() {
- this._groupFocus = {};
-
- // If there is a tex filter active - enable this button.
- if (this.get('texfilteractive')) {
- // Add the button to the toolbar.
- this.addButton({
- icon: 'e/math',
- callback: this._displayDialogue
- });
-
- // We need custom highlight logic for this button.
- this.get('host').on('atto:selectionchanged', function() {
- if (this._resolveEquation()) {
- this.highlightButtons();
- } else {
- this.unHighlightButtons();
- }
- }, this);
-
- // We need to convert these to a non dom node based format.
- this.editor.all('tex').each(function(texNode) {
- var replacement = Y.Node.create('' +
- DELIMITERS.START + ' ' + texNode.get('text') + ' ' + DELIMITERS.END +
- '');
- texNode.replace(replacement);
- });
- }
-
- },
-
- /**
- * Display the equation editor.
- *
- * @method _displayDialogue
- * @private
- */
- _displayDialogue: function() {
- this._currentSelection = this.get('host').getSelection();
-
- if (this._currentSelection === false) {
- return;
- }
-
- // This needs to be done before the dialogue is opened because the focus will shift to the dialogue.
- var equation = this._resolveEquation();
-
- var dialogue = this.getDialogue({
- headerContent: M.util.get_string('pluginname', COMPONENTNAME),
- focusAfterHide: true,
- width: 600,
- focusOnShowSelector: SELECTORS.LIBRARY_BUTTON
- });
-
- var content = this._getDialogueContent();
- dialogue.set('bodyContent', content);
-
- dialogue.show();
- // Notify the filters about the modified nodes.
- require(['core/event'], function(event) {
- event.notifyFilterContentUpdated(dialogue.get('boundingBox').getDOMNode());
- });
-
- if (equation) {
- content.one(SELECTORS.EQUATION_TEXT).set('text', equation);
- }
- this._updatePreview(false);
- },
-
- /**
- * If there is selected text and it is part of an equation,
- * extract the equation (and set it in the form).
- *
- * @method _resolveEquation
- * @private
- * @return {String|Boolean} The equation or false.
- */
- _resolveEquation: function() {
-
- // Find the equation in the surrounding text.
- var selectedNode = this.get('host').getSelectionParentNode(),
- selection = this.get('host').getSelection(),
- text,
- returnValue = false;
-
- // Prevent resolving equations when we don't have focus.
- if (!this.get('host').isActive()) {
- return false;
- }
-
- // Note this is a document fragment and YUI doesn't like them.
- if (!selectedNode) {
- return false;
- }
-
- // We don't yet have a cursor selection somehow so we can't possible be resolving an equation that has selection.
- if (!selection || selection.length === 0) {
- return false;
- }
-
- this.sourceEquation = null;
-
- selection = selection[0];
-
- text = Y.one(selectedNode).get('text');
-
- // For each of these patterns we have a RegExp which captures the inner component of the equation but also
- // includes the delimiters.
- // We first run the RegExp adding the global flag ("g"). This ignores the capture, instead matching the entire
- // equation including delimiters and returning one entry per match of the whole equation.
- // We have to deal with multiple occurences of the same equation in a String so must be able to loop on the
- // match results.
- Y.Array.find(this._equationPatterns, function(pattern) {
- // For each pattern in turn, find all whole matches (including the delimiters).
- var patternMatches = text.match(new RegExp(pattern.source, "g"));
-
- if (patternMatches && patternMatches.length) {
- // This pattern matches at least once. See if this pattern matches our current position.
- // Note: We return here to break the Y.Array.find loop - any truthy return will stop any subsequent
- // searches which is the required behaviour of this function.
- return Y.Array.find(patternMatches, function(match) {
- // Check each occurrence of this match.
- var startIndex = 0;
- while (text.indexOf(match, startIndex) !== -1) {
- // Determine whether the cursor is in the current occurrence of this string.
- // Note: We do not support a selection exceeding the bounds of an equation.
- var startOuter = text.indexOf(match, startIndex),
- endOuter = startOuter + match.length,
- startMatch = (selection.startOffset >= startOuter && selection.startOffset < endOuter),
- endMatch = (selection.endOffset <= endOuter && selection.endOffset > startOuter);
-
- if (startMatch && endMatch) {
- // This match is in our current position - fetch the innerMatch data.
- var innerMatch = match.match(pattern);
- if (innerMatch && innerMatch.length) {
- // We need the start and end of the inner match for later.
- var startInner = text.indexOf(innerMatch[1], startOuter),
- endInner = startInner + innerMatch[1].length;
-
- // We'll be returning the inner match for use in the editor itself.
- returnValue = innerMatch[1];
-
- // Save all data for later.
- this.sourceEquation = {
- // Outer match data.
- startOuterPosition: startOuter,
- endOuterPosition: endOuter,
- outerMatch: match,
-
- // Inner match data.
- startInnerPosition: startInner,
- endInnerPosition: endInner,
- innerMatch: innerMatch
- };
-
- // This breaks out of both Y.Array.find functions.
- return true;
- }
- }
-
- // Update the startIndex to match the end of the current match so that we can continue hunting
- // for further matches.
- startIndex = endOuter;
- }
- }, this);
- }
- }, this);
-
- // We trim the equation when we load it and then add spaces when we save it.
- if (returnValue !== false) {
- returnValue = returnValue.trim();
- }
- return returnValue;
- },
-
- /**
- * Handle insertion of a new equation, or update of an existing one.
- *
- * @method _setEquation
- * @param {EventFacade} e
- * @private
- */
- _setEquation: function(e) {
- var input,
- selectedNode,
- text,
- value,
- host,
- newText;
-
- host = this.get('host');
-
- e.preventDefault();
- this.getDialogue({
- focusAfterHide: null
- }).hide();
-
- input = e.currentTarget.ancestor('.atto_form').one('textarea');
-
- value = input.get('value');
- if (value !== '') {
- host.setSelection(this._currentSelection);
-
- if (this.sourceEquation) {
- // Replace the equation.
- selectedNode = Y.one(host.getSelectionParentNode());
- text = selectedNode.get('text');
- value = ' ' + value + ' ';
- newText = text.slice(0, this.sourceEquation.startInnerPosition) +
- value +
- text.slice(this.sourceEquation.endInnerPosition);
-
- selectedNode.set('text', newText);
- } else {
- // Insert the new equation.
- value = DELIMITERS.START + ' ' + value + ' ' + DELIMITERS.END;
- host.insertContentAtFocusPoint(value);
- }
-
- // Clean the YUI ids from the HTML.
- this.markUpdated();
- }
- },
-
- /**
- * Smart throttle, only call a function every delay milli seconds,
- * and always run the last call. Y.throttle does not work here,
- * because it calls the function immediately, the first time, and then
- * ignores repeated calls within X seconds. This does not guarantee
- * that the last call will be executed (which is required here).
- *
- * @param {function} fn
- * @param {Number} delay Delay in milliseconds
- * @method _throttle
- * @private
- */
- _throttle: function(fn, delay) {
- var timer = null;
- return function() {
- var context = this, args = arguments;
- clearTimeout(timer);
- timer = setTimeout(function() {
- fn.apply(context, args);
- }, delay);
- };
- },
-
- /**
- * Update the preview div to match the current equation.
- *
- * @param {EventFacade} e
- * @method _updatePreview
- * @private
- */
- _updatePreview: function(e) {
- var textarea = this._content.one(SELECTORS.EQUATION_TEXT),
- equation = textarea.get('value'),
- url,
- currentPos = textarea.get('selectionStart'),
- prefix = '',
- cursorLatex = '\\Downarrow ',
- isChar,
- params;
-
- if (e) {
- e.preventDefault();
- }
-
- // Move the cursor so it does not break expressions.
- // Start at the very beginning.
- if (!currentPos) {
- currentPos = 0;
- }
-
- // First move back to the beginning of the line.
- while (equation.charAt(currentPos) === '\\' && currentPos >= 0) {
- currentPos -= 1;
- }
- isChar = /[a-zA-Z\{]/;
- if (currentPos !== 0) {
- if (equation.charAt(currentPos - 1) != '{') {
- // Now match to the end of the line.
- while (isChar.test(equation.charAt(currentPos)) &&
- currentPos < equation.length &&
- isChar.test(equation.charAt(currentPos - 1))) {
- currentPos += 1;
- }
- }
- }
- // Save the cursor position - for insertion from the library.
- this._lastCursorPos = currentPos;
- equation = prefix + equation.substring(0, currentPos) + cursorLatex + equation.substring(currentPos);
-
- equation = DELIMITERS.START + ' ' + equation + ' ' + DELIMITERS.END;
- // Make an ajax request to the filter.
- url = M.cfg.wwwroot + '/lib/editor/atto/plugins/equation/ajax.php';
- params = {
- sesskey: M.cfg.sesskey,
- contextid: this.get('contextid'),
- action: 'filtertext',
- text: equation
- };
-
- Y.io(url, {
- context: this,
- data: params,
- timeout: 500,
- on: {
- complete: this._loadPreview
- }
- });
- },
-
- /**
- * Load returned preview text into preview
- *
- * @param {String} id
- * @param {EventFacade} e
- * @method _loadPreview
- * @private
- */
- _loadPreview: function(id, preview) {
- var previewNode = this._content.one(SELECTORS.EQUATION_PREVIEW);
-
- if (preview.status === 200) {
- previewNode.setHTML(preview.responseText);
-
- // Notify the filters about the modified nodes.
- require(['core/event'], function(event) {
- event.notifyFilterContentUpdated(previewNode.getDOMNode());
- });
- }
- },
-
- /**
- * Return the dialogue content for the tool, attaching any required
- * events.
- *
- * @method _getDialogueContent
- * @return {Node}
- * @private
- */
- _getDialogueContent: function() {
- var library = this._getLibraryContent(),
- throttledUpdate = this._throttle(this._updatePreview, 500),
- template = Y.Handlebars.compile(TEMPLATES.FORM);
-
- this._content = Y.Node.create(template({
- elementid: this.get('host').get('elementid'),
- component: COMPONENTNAME,
- library: library,
- texdocsurl: this.get('texdocsurl'),
- CSS: CSS
- }));
-
- // Sets the default focus.
- this._content.all(SELECTORS.LIBRARY_GROUP).each(function(group) {
- // The first button gets the focus.
- this._setGroupTabFocus(group, group.one('button'));
- // Sometimes the filter adds an anchor in the button, no tabindex on that.
- group.all('button a').setAttribute('tabindex', '-1');
- }, this);
-
- // Keyboard navigation in groups.
- this._content.delegate('key', this._groupNavigation, 'down:37,39', SELECTORS.LIBRARY_BUTTON, this);
-
- this._content.one(SELECTORS.SUBMIT).on('click', this._setEquation, this);
- this._content.one(SELECTORS.EQUATION_TEXT).on('valuechange', throttledUpdate, this);
- this._content.one(SELECTORS.EQUATION_TEXT).on('mouseup', throttledUpdate, this);
- this._content.one(SELECTORS.EQUATION_TEXT).on('keyup', throttledUpdate, this);
- this._content.delegate('click', this._selectLibraryItem, SELECTORS.LIBRARY_BUTTON, this);
-
- return this._content;
- },
-
- /**
- * Callback handling the keyboard navigation in the groups of the library.
- *
- * @param {EventFacade} e The event.
- * @method _groupNavigation
- * @private
- */
- _groupNavigation: function(e) {
- e.preventDefault();
-
- var current = e.currentTarget,
- parent = current.get('parentNode'), // This must be the
containing all the buttons of the group.
- buttons = parent.all('button'),
- direction = e.keyCode !== 37 ? 1 : -1,
- index = buttons.indexOf(current),
- nextButton;
-
- if (index < 0) {
- Y.log('Unable to find the current button in the list of buttons', 'debug', LOGNAME);
- index = 0;
- }
-
- index += direction;
- if (index < 0) {
- index = buttons.size() - 1;
- } else if (index >= buttons.size()) {
- index = 0;
- }
- nextButton = buttons.item(index);
-
- this._setGroupTabFocus(parent, nextButton);
- nextButton.focus();
- },
-
- /**
- * Sets tab focus for the group.
- *
- * @method _setGroupTabFocus
- * @param {Node} button The node that focus should now be set to.
- * @private
- */
- _setGroupTabFocus: function(parent, button) {
- var parentId = parent.generateID();
-
- // Unset the previous entry.
- if (typeof this._groupFocus[parentId] !== 'undefined') {
- this._groupFocus[parentId].setAttribute('tabindex', '-1');
- }
-
- // Set on the new entry.
- this._groupFocus[parentId] = button;
- button.setAttribute('tabindex', 0);
- parent.setAttribute('aria-activedescendant', button.generateID());
- },
-
- /**
- * Reponse to button presses in the TeX library panels.
- *
- * @method _selectLibraryItem
- * @param {EventFacade} e
- * @return {string}
- * @private
- */
- _selectLibraryItem: function(e) {
- var tex = e.currentTarget.getAttribute('data-tex'),
- oldValue,
- newValue,
- input,
- focusPoint = 0;
-
- e.preventDefault();
-
- // Set the group focus on the button.
- this._setGroupTabFocus(e.currentTarget.get('parentNode'), e.currentTarget);
-
- input = e.currentTarget.ancestor('.atto_form').one('textarea');
-
- oldValue = input.get('value');
-
- newValue = oldValue.substring(0, this._lastCursorPos);
- if (newValue.charAt(newValue.length - 1) !== ' ') {
- newValue += ' ';
- }
- newValue += tex;
- focusPoint = newValue.length;
-
- if (oldValue.charAt(this._lastCursorPos) !== ' ') {
- newValue += ' ';
- }
- newValue += oldValue.substring(this._lastCursorPos, oldValue.length);
-
- input.set('value', newValue);
- input.focus();
-
- var realInput = input.getDOMNode();
- if (typeof realInput.selectionStart === "number") {
- // Modern browsers have selectionStart and selectionEnd to control the cursor position.
- realInput.selectionStart = realInput.selectionEnd = focusPoint;
- } else if (typeof realInput.createTextRange !== "undefined") {
- // Legacy browsers (IE<=9) use createTextRange().
- var range = realInput.createTextRange();
- range.moveToPoint(focusPoint);
- range.select();
- }
- // Focus must be set before updating the preview for the cursor box to be in the correct location.
- this._updatePreview(false);
- },
-
- /**
- * Return the HTML for rendering the library of predefined buttons.
- *
- * @method _getLibraryContent
- * @return {string}
- * @private
- */
- _getLibraryContent: function() {
- var template = Y.Handlebars.compile(TEMPLATES.LIBRARY),
- library = this.get('library'),
- content = '';
-
- // Helper to iterate over a newline separated string.
- Y.Handlebars.registerHelper('split', function(delimiter, str, options) {
- var parts,
- current,
- out;
- if (typeof delimiter === "undefined" || typeof str === "undefined") {
- Y.log('Handlebars split helper: String and delimiter are required.', 'debug', 'moodle-atto_equation-button');
- return '';
- }
-
- out = '';
- parts = str.trim().split(delimiter);
- while (parts.length > 0) {
- current = parts.shift().trim();
- out += options.fn(current);
- }
-
- return out;
- });
- content = template({
- elementid: this.get('host').get('elementid'),
- elementidescaped: this._escapeQuerySelector(this.get('host').get('elementid')),
- component: COMPONENTNAME,
- library: library,
- CSS: CSS,
- DELIMITERS: DELIMITERS
- });
-
- var url = M.cfg.wwwroot + '/lib/editor/atto/plugins/equation/ajax.php';
- var params = {
- sesskey: M.cfg.sesskey,
- contextid: this.get('contextid'),
- action: 'filtertext',
- text: content
- };
-
- var preview = Y.io(url, {
- sync: true,
- data: params,
- method: 'POST'
- });
-
- if (preview.status === 200) {
- content = preview.responseText;
- }
- return content;
- },
-
- /**
- * Escape special characters in string used as a JS query selector
- *
- * @method _excapeQuerySelector
- * @param {string} selector
- * @returns {string}
- */
- _escapeQuerySelector: function(selector) {
-
- // Bootstrap requires that query selectors have special chars excaped.
- // See: https://getbootstrap.com/docs/4.2/getting-started/javascript/#selectors
-
- return selector.replace(/(:|\.|\[|\]|,|=|@)/g, '\\$1');
- }
-
-}, {
- ATTRS: {
- /**
- * Whether the TeX filter is currently active.
- *
- * @attribute texfilteractive
- * @type Boolean
- */
- texfilteractive: {
- value: false
- },
-
- /**
- * The contextid to use when generating this preview.
- *
- * @attribute contextid
- * @type String
- */
- contextid: {
- value: null
- },
-
- /**
- * The content of the example library.
- *
- * @attribute library
- * @type object
- */
- library: {
- value: {}
- },
-
- /**
- * The link to the Moodle Docs page about TeX.
- *
- * @attribute texdocsurl
- * @type string
- */
- texdocsurl: {
- value: null
- }
-
- }
-});
-
-
-}, '@VERSION@', {
- "requires": [
- "moodle-editor_atto-plugin",
- "moodle-core-event",
- "io",
- "event-valuechange",
- "tabview",
- "array-extras"
- ]
-});
diff --git a/lib/editor/atto/plugins/equation/yui/build/moodle-atto_equation-button/moodle-atto_equation-button-min.js b/lib/editor/atto/plugins/equation/yui/build/moodle-atto_equation-button/moodle-atto_equation-button-min.js
deleted file mode 100644
index b1fd862ce26..00000000000
--- a/lib/editor/atto/plugins/equation/yui/build/moodle-atto_equation-button/moodle-atto_equation-button-min.js
+++ /dev/null
@@ -1,2 +0,0 @@
-YUI.add("moodle-atto_equation-button",function(a,t){var n="atto_equation",o={EQUATION_TEXT:"atto_equation_equation",EQUATION_PREVIEW:"atto_equation_preview",SUBMIT:"atto_equation_submit",LIBRARY:"atto_equation_library",LIBRARY_GROUPS:"atto_equation_groups",LIBRARY_GROUP_PREFIX:"atto_equation_group"},s={LIBRARY:"."+o.LIBRARY,LIBRARY_GROUP:"."+o.LIBRARY_GROUPS+" > div > div",EQUATION_TEXT:"."+o.EQUATION_TEXT,EQUATION_PREVIEW:"."+o.EQUATION_PREVIEW,SUBMIT:"."+o.SUBMIT,LIBRARY_BUTTON:"."+o.LIBRARY+" button"},r={START:"\\(",END:"\\)"},u='',l='
'
- };
-
-Y.namespace('M.atto_equation').Button = Y.Base.create('button', Y.M.editor_atto.EditorPlugin, [], {
-
- /**
- * The selection object returned by the browser.
- *
- * @property _currentSelection
- * @type Range
- * @default null
- * @private
- */
- _currentSelection: null,
-
- /**
- * The cursor position in the equation textarea.
- *
- * @property _lastCursorPos
- * @type Number
- * @default 0
- * @private
- */
- _lastCursorPos: 0,
-
- /**
- * A reference to the dialogue content.
- *
- * @property _content
- * @type Node
- * @private
- */
- _content: null,
-
- /**
- * The source equation we are editing in the text.
- *
- * @property _sourceEquation
- * @type Object
- * @private
- */
- _sourceEquation: null,
-
- /**
- * A reference to the tab focus set on each group.
- *
- * The keys are the IDs of the group, the value is the Node on which the focus is set.
- *
- * @property _groupFocus
- * @type Object
- * @private
- */
- _groupFocus: null,
-
- /**
- * Regular Expression patterns used to pick out the equations in a String.
- *
- * @property _equationPatterns
- * @type Array
- * @private
- */
- _equationPatterns: [
- // We use space or not space because . does not match new lines.
- // $$ blah $$.
- /\$\$([\S\s]+?)\$\$/,
- // E.g. "\( blah \)".
- /\\\(([\S\s]+?)\\\)/,
- // E.g. "\[ blah \]".
- /\\\[([\S\s]+?)\\\]/,
- // E.g. "[tex] blah [/tex]".
- /\[tex\]([\S\s]+?)\[\/tex\]/
- ],
-
- initializer: function() {
- this._groupFocus = {};
-
- // If there is a tex filter active - enable this button.
- if (this.get('texfilteractive')) {
- // Add the button to the toolbar.
- this.addButton({
- icon: 'e/math',
- callback: this._displayDialogue
- });
-
- // We need custom highlight logic for this button.
- this.get('host').on('atto:selectionchanged', function() {
- if (this._resolveEquation()) {
- this.highlightButtons();
- } else {
- this.unHighlightButtons();
- }
- }, this);
-
- // We need to convert these to a non dom node based format.
- this.editor.all('tex').each(function(texNode) {
- var replacement = Y.Node.create('' +
- DELIMITERS.START + ' ' + texNode.get('text') + ' ' + DELIMITERS.END +
- '');
- texNode.replace(replacement);
- });
- }
-
- },
-
- /**
- * Display the equation editor.
- *
- * @method _displayDialogue
- * @private
- */
- _displayDialogue: function() {
- this._currentSelection = this.get('host').getSelection();
-
- if (this._currentSelection === false) {
- return;
- }
-
- // This needs to be done before the dialogue is opened because the focus will shift to the dialogue.
- var equation = this._resolveEquation();
-
- var dialogue = this.getDialogue({
- headerContent: M.util.get_string('pluginname', COMPONENTNAME),
- focusAfterHide: true,
- width: 600,
- focusOnShowSelector: SELECTORS.LIBRARY_BUTTON
- });
-
- var content = this._getDialogueContent();
- dialogue.set('bodyContent', content);
-
- dialogue.show();
- // Notify the filters about the modified nodes.
- require(['core/event'], function(event) {
- event.notifyFilterContentUpdated(dialogue.get('boundingBox').getDOMNode());
- });
-
- if (equation) {
- content.one(SELECTORS.EQUATION_TEXT).set('text', equation);
- }
- this._updatePreview(false);
- },
-
- /**
- * If there is selected text and it is part of an equation,
- * extract the equation (and set it in the form).
- *
- * @method _resolveEquation
- * @private
- * @return {String|Boolean} The equation or false.
- */
- _resolveEquation: function() {
-
- // Find the equation in the surrounding text.
- var selectedNode = this.get('host').getSelectionParentNode(),
- selection = this.get('host').getSelection(),
- text,
- returnValue = false;
-
- // Prevent resolving equations when we don't have focus.
- if (!this.get('host').isActive()) {
- return false;
- }
-
- // Note this is a document fragment and YUI doesn't like them.
- if (!selectedNode) {
- return false;
- }
-
- // We don't yet have a cursor selection somehow so we can't possible be resolving an equation that has selection.
- if (!selection || selection.length === 0) {
- return false;
- }
-
- this.sourceEquation = null;
-
- selection = selection[0];
-
- text = Y.one(selectedNode).get('text');
-
- // For each of these patterns we have a RegExp which captures the inner component of the equation but also
- // includes the delimiters.
- // We first run the RegExp adding the global flag ("g"). This ignores the capture, instead matching the entire
- // equation including delimiters and returning one entry per match of the whole equation.
- // We have to deal with multiple occurences of the same equation in a String so must be able to loop on the
- // match results.
- Y.Array.find(this._equationPatterns, function(pattern) {
- // For each pattern in turn, find all whole matches (including the delimiters).
- var patternMatches = text.match(new RegExp(pattern.source, "g"));
-
- if (patternMatches && patternMatches.length) {
- // This pattern matches at least once. See if this pattern matches our current position.
- // Note: We return here to break the Y.Array.find loop - any truthy return will stop any subsequent
- // searches which is the required behaviour of this function.
- return Y.Array.find(patternMatches, function(match) {
- // Check each occurrence of this match.
- var startIndex = 0;
- while (text.indexOf(match, startIndex) !== -1) {
- // Determine whether the cursor is in the current occurrence of this string.
- // Note: We do not support a selection exceeding the bounds of an equation.
- var startOuter = text.indexOf(match, startIndex),
- endOuter = startOuter + match.length,
- startMatch = (selection.startOffset >= startOuter && selection.startOffset < endOuter),
- endMatch = (selection.endOffset <= endOuter && selection.endOffset > startOuter);
-
- if (startMatch && endMatch) {
- // This match is in our current position - fetch the innerMatch data.
- var innerMatch = match.match(pattern);
- if (innerMatch && innerMatch.length) {
- // We need the start and end of the inner match for later.
- var startInner = text.indexOf(innerMatch[1], startOuter),
- endInner = startInner + innerMatch[1].length;
-
- // We'll be returning the inner match for use in the editor itself.
- returnValue = innerMatch[1];
-
- // Save all data for later.
- this.sourceEquation = {
- // Outer match data.
- startOuterPosition: startOuter,
- endOuterPosition: endOuter,
- outerMatch: match,
-
- // Inner match data.
- startInnerPosition: startInner,
- endInnerPosition: endInner,
- innerMatch: innerMatch
- };
-
- // This breaks out of both Y.Array.find functions.
- return true;
- }
- }
-
- // Update the startIndex to match the end of the current match so that we can continue hunting
- // for further matches.
- startIndex = endOuter;
- }
- }, this);
- }
- }, this);
-
- // We trim the equation when we load it and then add spaces when we save it.
- if (returnValue !== false) {
- returnValue = returnValue.trim();
- }
- return returnValue;
- },
-
- /**
- * Handle insertion of a new equation, or update of an existing one.
- *
- * @method _setEquation
- * @param {EventFacade} e
- * @private
- */
- _setEquation: function(e) {
- var input,
- selectedNode,
- text,
- value,
- host,
- newText;
-
- host = this.get('host');
-
- e.preventDefault();
- this.getDialogue({
- focusAfterHide: null
- }).hide();
-
- input = e.currentTarget.ancestor('.atto_form').one('textarea');
-
- value = input.get('value');
- if (value !== '') {
- host.setSelection(this._currentSelection);
-
- if (this.sourceEquation) {
- // Replace the equation.
- selectedNode = Y.one(host.getSelectionParentNode());
- text = selectedNode.get('text');
- value = ' ' + value + ' ';
- newText = text.slice(0, this.sourceEquation.startInnerPosition) +
- value +
- text.slice(this.sourceEquation.endInnerPosition);
-
- selectedNode.set('text', newText);
- } else {
- // Insert the new equation.
- value = DELIMITERS.START + ' ' + value + ' ' + DELIMITERS.END;
- host.insertContentAtFocusPoint(value);
- }
-
- // Clean the YUI ids from the HTML.
- this.markUpdated();
- }
- },
-
- /**
- * Smart throttle, only call a function every delay milli seconds,
- * and always run the last call. Y.throttle does not work here,
- * because it calls the function immediately, the first time, and then
- * ignores repeated calls within X seconds. This does not guarantee
- * that the last call will be executed (which is required here).
- *
- * @param {function} fn
- * @param {Number} delay Delay in milliseconds
- * @method _throttle
- * @private
- */
- _throttle: function(fn, delay) {
- var timer = null;
- return function() {
- var context = this, args = arguments;
- clearTimeout(timer);
- timer = setTimeout(function() {
- fn.apply(context, args);
- }, delay);
- };
- },
-
- /**
- * Update the preview div to match the current equation.
- *
- * @param {EventFacade} e
- * @method _updatePreview
- * @private
- */
- _updatePreview: function(e) {
- var textarea = this._content.one(SELECTORS.EQUATION_TEXT),
- equation = textarea.get('value'),
- url,
- currentPos = textarea.get('selectionStart'),
- prefix = '',
- cursorLatex = '\\Downarrow ',
- isChar,
- params;
-
- if (e) {
- e.preventDefault();
- }
-
- // Move the cursor so it does not break expressions.
- // Start at the very beginning.
- if (!currentPos) {
- currentPos = 0;
- }
-
- // First move back to the beginning of the line.
- while (equation.charAt(currentPos) === '\\' && currentPos >= 0) {
- currentPos -= 1;
- }
- isChar = /[a-zA-Z\{]/;
- if (currentPos !== 0) {
- if (equation.charAt(currentPos - 1) != '{') {
- // Now match to the end of the line.
- while (isChar.test(equation.charAt(currentPos)) &&
- currentPos < equation.length &&
- isChar.test(equation.charAt(currentPos - 1))) {
- currentPos += 1;
- }
- }
- }
- // Save the cursor position - for insertion from the library.
- this._lastCursorPos = currentPos;
- equation = prefix + equation.substring(0, currentPos) + cursorLatex + equation.substring(currentPos);
-
- equation = DELIMITERS.START + ' ' + equation + ' ' + DELIMITERS.END;
- // Make an ajax request to the filter.
- url = M.cfg.wwwroot + '/lib/editor/atto/plugins/equation/ajax.php';
- params = {
- sesskey: M.cfg.sesskey,
- contextid: this.get('contextid'),
- action: 'filtertext',
- text: equation
- };
-
- Y.io(url, {
- context: this,
- data: params,
- timeout: 500,
- on: {
- complete: this._loadPreview
- }
- });
- },
-
- /**
- * Load returned preview text into preview
- *
- * @param {String} id
- * @param {EventFacade} e
- * @method _loadPreview
- * @private
- */
- _loadPreview: function(id, preview) {
- var previewNode = this._content.one(SELECTORS.EQUATION_PREVIEW);
-
- if (preview.status === 200) {
- previewNode.setHTML(preview.responseText);
-
- // Notify the filters about the modified nodes.
- require(['core/event'], function(event) {
- event.notifyFilterContentUpdated(previewNode.getDOMNode());
- });
- }
- },
-
- /**
- * Return the dialogue content for the tool, attaching any required
- * events.
- *
- * @method _getDialogueContent
- * @return {Node}
- * @private
- */
- _getDialogueContent: function() {
- var library = this._getLibraryContent(),
- throttledUpdate = this._throttle(this._updatePreview, 500),
- template = Y.Handlebars.compile(TEMPLATES.FORM);
-
- this._content = Y.Node.create(template({
- elementid: this.get('host').get('elementid'),
- component: COMPONENTNAME,
- library: library,
- texdocsurl: this.get('texdocsurl'),
- CSS: CSS
- }));
-
- // Sets the default focus.
- this._content.all(SELECTORS.LIBRARY_GROUP).each(function(group) {
- // The first button gets the focus.
- this._setGroupTabFocus(group, group.one('button'));
- // Sometimes the filter adds an anchor in the button, no tabindex on that.
- group.all('button a').setAttribute('tabindex', '-1');
- }, this);
-
- // Keyboard navigation in groups.
- this._content.delegate('key', this._groupNavigation, 'down:37,39', SELECTORS.LIBRARY_BUTTON, this);
-
- this._content.one(SELECTORS.SUBMIT).on('click', this._setEquation, this);
- this._content.one(SELECTORS.EQUATION_TEXT).on('valuechange', throttledUpdate, this);
- this._content.one(SELECTORS.EQUATION_TEXT).on('mouseup', throttledUpdate, this);
- this._content.one(SELECTORS.EQUATION_TEXT).on('keyup', throttledUpdate, this);
- this._content.delegate('click', this._selectLibraryItem, SELECTORS.LIBRARY_BUTTON, this);
-
- return this._content;
- },
-
- /**
- * Callback handling the keyboard navigation in the groups of the library.
- *
- * @param {EventFacade} e The event.
- * @method _groupNavigation
- * @private
- */
- _groupNavigation: function(e) {
- e.preventDefault();
-
- var current = e.currentTarget,
- parent = current.get('parentNode'), // This must be the
containing all the buttons of the group.
- buttons = parent.all('button'),
- direction = e.keyCode !== 37 ? 1 : -1,
- index = buttons.indexOf(current),
- nextButton;
-
- if (index < 0) {
- index = 0;
- }
-
- index += direction;
- if (index < 0) {
- index = buttons.size() - 1;
- } else if (index >= buttons.size()) {
- index = 0;
- }
- nextButton = buttons.item(index);
-
- this._setGroupTabFocus(parent, nextButton);
- nextButton.focus();
- },
-
- /**
- * Sets tab focus for the group.
- *
- * @method _setGroupTabFocus
- * @param {Node} button The node that focus should now be set to.
- * @private
- */
- _setGroupTabFocus: function(parent, button) {
- var parentId = parent.generateID();
-
- // Unset the previous entry.
- if (typeof this._groupFocus[parentId] !== 'undefined') {
- this._groupFocus[parentId].setAttribute('tabindex', '-1');
- }
-
- // Set on the new entry.
- this._groupFocus[parentId] = button;
- button.setAttribute('tabindex', 0);
- parent.setAttribute('aria-activedescendant', button.generateID());
- },
-
- /**
- * Reponse to button presses in the TeX library panels.
- *
- * @method _selectLibraryItem
- * @param {EventFacade} e
- * @return {string}
- * @private
- */
- _selectLibraryItem: function(e) {
- var tex = e.currentTarget.getAttribute('data-tex'),
- oldValue,
- newValue,
- input,
- focusPoint = 0;
-
- e.preventDefault();
-
- // Set the group focus on the button.
- this._setGroupTabFocus(e.currentTarget.get('parentNode'), e.currentTarget);
-
- input = e.currentTarget.ancestor('.atto_form').one('textarea');
-
- oldValue = input.get('value');
-
- newValue = oldValue.substring(0, this._lastCursorPos);
- if (newValue.charAt(newValue.length - 1) !== ' ') {
- newValue += ' ';
- }
- newValue += tex;
- focusPoint = newValue.length;
-
- if (oldValue.charAt(this._lastCursorPos) !== ' ') {
- newValue += ' ';
- }
- newValue += oldValue.substring(this._lastCursorPos, oldValue.length);
-
- input.set('value', newValue);
- input.focus();
-
- var realInput = input.getDOMNode();
- if (typeof realInput.selectionStart === "number") {
- // Modern browsers have selectionStart and selectionEnd to control the cursor position.
- realInput.selectionStart = realInput.selectionEnd = focusPoint;
- } else if (typeof realInput.createTextRange !== "undefined") {
- // Legacy browsers (IE<=9) use createTextRange().
- var range = realInput.createTextRange();
- range.moveToPoint(focusPoint);
- range.select();
- }
- // Focus must be set before updating the preview for the cursor box to be in the correct location.
- this._updatePreview(false);
- },
-
- /**
- * Return the HTML for rendering the library of predefined buttons.
- *
- * @method _getLibraryContent
- * @return {string}
- * @private
- */
- _getLibraryContent: function() {
- var template = Y.Handlebars.compile(TEMPLATES.LIBRARY),
- library = this.get('library'),
- content = '';
-
- // Helper to iterate over a newline separated string.
- Y.Handlebars.registerHelper('split', function(delimiter, str, options) {
- var parts,
- current,
- out;
- if (typeof delimiter === "undefined" || typeof str === "undefined") {
- return '';
- }
-
- out = '';
- parts = str.trim().split(delimiter);
- while (parts.length > 0) {
- current = parts.shift().trim();
- out += options.fn(current);
- }
-
- return out;
- });
- content = template({
- elementid: this.get('host').get('elementid'),
- elementidescaped: this._escapeQuerySelector(this.get('host').get('elementid')),
- component: COMPONENTNAME,
- library: library,
- CSS: CSS,
- DELIMITERS: DELIMITERS
- });
-
- var url = M.cfg.wwwroot + '/lib/editor/atto/plugins/equation/ajax.php';
- var params = {
- sesskey: M.cfg.sesskey,
- contextid: this.get('contextid'),
- action: 'filtertext',
- text: content
- };
-
- var preview = Y.io(url, {
- sync: true,
- data: params,
- method: 'POST'
- });
-
- if (preview.status === 200) {
- content = preview.responseText;
- }
- return content;
- },
-
- /**
- * Escape special characters in string used as a JS query selector
- *
- * @method _excapeQuerySelector
- * @param {string} selector
- * @returns {string}
- */
- _escapeQuerySelector: function(selector) {
-
- // Bootstrap requires that query selectors have special chars excaped.
- // See: https://getbootstrap.com/docs/4.2/getting-started/javascript/#selectors
-
- return selector.replace(/(:|\.|\[|\]|,|=|@)/g, '\\$1');
- }
-
-}, {
- ATTRS: {
- /**
- * Whether the TeX filter is currently active.
- *
- * @attribute texfilteractive
- * @type Boolean
- */
- texfilteractive: {
- value: false
- },
-
- /**
- * The contextid to use when generating this preview.
- *
- * @attribute contextid
- * @type String
- */
- contextid: {
- value: null
- },
-
- /**
- * The content of the example library.
- *
- * @attribute library
- * @type object
- */
- library: {
- value: {}
- },
-
- /**
- * The link to the Moodle Docs page about TeX.
- *
- * @attribute texdocsurl
- * @type string
- */
- texdocsurl: {
- value: null
- }
-
- }
-});
-
-
-}, '@VERSION@', {
- "requires": [
- "moodle-editor_atto-plugin",
- "moodle-core-event",
- "io",
- "event-valuechange",
- "tabview",
- "array-extras"
- ]
-});
diff --git a/lib/editor/atto/plugins/equation/yui/src/button/build.json b/lib/editor/atto/plugins/equation/yui/src/button/build.json
deleted file mode 100644
index a396fd1903a..00000000000
--- a/lib/editor/atto/plugins/equation/yui/src/button/build.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "name": "moodle-atto_equation-button",
- "builds": {
- "moodle-atto_equation-button": {
- "jsfiles": [
- "button.js"
- ]
- }
- }
-}
diff --git a/lib/editor/atto/plugins/equation/yui/src/button/js/button.js b/lib/editor/atto/plugins/equation/yui/src/button/js/button.js
deleted file mode 100644
index 35c8d455a2f..00000000000
--- a/lib/editor/atto/plugins/equation/yui/src/button/js/button.js
+++ /dev/null
@@ -1,777 +0,0 @@
-// This file is part of Moodle - http://moodle.org/
-//
-// Moodle is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Moodle is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Moodle. If not, see .
-
-/**
- * @package atto_equation
- * @copyright 2013 Damyon Wiese
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-/**
- * Atto text editor equation plugin.
- */
-
-/**
- * Atto equation editor.
- *
- * @namespace M.atto_equation
- * @class Button
- * @extends M.editor_atto.EditorPlugin
- */
-var COMPONENTNAME = 'atto_equation',
- LOGNAME = 'atto_equation',
- CSS = {
- EQUATION_TEXT: 'atto_equation_equation',
- EQUATION_PREVIEW: 'atto_equation_preview',
- SUBMIT: 'atto_equation_submit',
- LIBRARY: 'atto_equation_library',
- LIBRARY_GROUPS: 'atto_equation_groups',
- LIBRARY_GROUP_PREFIX: 'atto_equation_group'
- },
- SELECTORS = {
- LIBRARY: '.' + CSS.LIBRARY,
- LIBRARY_GROUP: '.' + CSS.LIBRARY_GROUPS + ' > div > div',
- EQUATION_TEXT: '.' + CSS.EQUATION_TEXT,
- EQUATION_PREVIEW: '.' + CSS.EQUATION_PREVIEW,
- SUBMIT: '.' + CSS.SUBMIT,
- LIBRARY_BUTTON: '.' + CSS.LIBRARY + ' button'
- },
- DELIMITERS = {
- START: '\\(',
- END: '\\)'
- },
- TEMPLATES = {
- FORM: '' +
- '',
- LIBRARY: '' +
- '
'
- };
-
-Y.namespace('M.atto_equation').Button = Y.Base.create('button', Y.M.editor_atto.EditorPlugin, [], {
-
- /**
- * The selection object returned by the browser.
- *
- * @property _currentSelection
- * @type Range
- * @default null
- * @private
- */
- _currentSelection: null,
-
- /**
- * The cursor position in the equation textarea.
- *
- * @property _lastCursorPos
- * @type Number
- * @default 0
- * @private
- */
- _lastCursorPos: 0,
-
- /**
- * A reference to the dialogue content.
- *
- * @property _content
- * @type Node
- * @private
- */
- _content: null,
-
- /**
- * The source equation we are editing in the text.
- *
- * @property _sourceEquation
- * @type Object
- * @private
- */
- _sourceEquation: null,
-
- /**
- * A reference to the tab focus set on each group.
- *
- * The keys are the IDs of the group, the value is the Node on which the focus is set.
- *
- * @property _groupFocus
- * @type Object
- * @private
- */
- _groupFocus: null,
-
- /**
- * Regular Expression patterns used to pick out the equations in a String.
- *
- * @property _equationPatterns
- * @type Array
- * @private
- */
- _equationPatterns: [
- // We use space or not space because . does not match new lines.
- // $$ blah $$.
- /\$\$([\S\s]+?)\$\$/,
- // E.g. "\( blah \)".
- /\\\(([\S\s]+?)\\\)/,
- // E.g. "\[ blah \]".
- /\\\[([\S\s]+?)\\\]/,
- // E.g. "[tex] blah [/tex]".
- /\[tex\]([\S\s]+?)\[\/tex\]/
- ],
-
- initializer: function() {
- this._groupFocus = {};
-
- // If there is a tex filter active - enable this button.
- if (this.get('texfilteractive')) {
- // Add the button to the toolbar.
- this.addButton({
- icon: 'e/math',
- callback: this._displayDialogue
- });
-
- // We need custom highlight logic for this button.
- this.get('host').on('atto:selectionchanged', function() {
- if (this._resolveEquation()) {
- this.highlightButtons();
- } else {
- this.unHighlightButtons();
- }
- }, this);
-
- // We need to convert these to a non dom node based format.
- this.editor.all('tex').each(function(texNode) {
- var replacement = Y.Node.create('' +
- DELIMITERS.START + ' ' + texNode.get('text') + ' ' + DELIMITERS.END +
- '');
- texNode.replace(replacement);
- });
- }
-
- },
-
- /**
- * Display the equation editor.
- *
- * @method _displayDialogue
- * @private
- */
- _displayDialogue: function() {
- this._currentSelection = this.get('host').getSelection();
-
- if (this._currentSelection === false) {
- return;
- }
-
- // This needs to be done before the dialogue is opened because the focus will shift to the dialogue.
- var equation = this._resolveEquation();
-
- var dialogue = this.getDialogue({
- headerContent: M.util.get_string('pluginname', COMPONENTNAME),
- focusAfterHide: true,
- width: 600,
- focusOnShowSelector: SELECTORS.LIBRARY_BUTTON
- });
-
- var content = this._getDialogueContent();
- dialogue.set('bodyContent', content);
-
- dialogue.show();
- // Notify the filters about the modified nodes.
- require(['core/event'], function(event) {
- event.notifyFilterContentUpdated(dialogue.get('boundingBox').getDOMNode());
- });
-
- if (equation) {
- content.one(SELECTORS.EQUATION_TEXT).set('text', equation);
- }
- this._updatePreview(false);
- },
-
- /**
- * If there is selected text and it is part of an equation,
- * extract the equation (and set it in the form).
- *
- * @method _resolveEquation
- * @private
- * @return {String|Boolean} The equation or false.
- */
- _resolveEquation: function() {
-
- // Find the equation in the surrounding text.
- var selectedNode = this.get('host').getSelectionParentNode(),
- selection = this.get('host').getSelection(),
- text,
- returnValue = false;
-
- // Prevent resolving equations when we don't have focus.
- if (!this.get('host').isActive()) {
- return false;
- }
-
- // Note this is a document fragment and YUI doesn't like them.
- if (!selectedNode) {
- return false;
- }
-
- // We don't yet have a cursor selection somehow so we can't possible be resolving an equation that has selection.
- if (!selection || selection.length === 0) {
- return false;
- }
-
- this.sourceEquation = null;
-
- selection = selection[0];
-
- text = Y.one(selectedNode).get('text');
-
- // For each of these patterns we have a RegExp which captures the inner component of the equation but also
- // includes the delimiters.
- // We first run the RegExp adding the global flag ("g"). This ignores the capture, instead matching the entire
- // equation including delimiters and returning one entry per match of the whole equation.
- // We have to deal with multiple occurences of the same equation in a String so must be able to loop on the
- // match results.
- Y.Array.find(this._equationPatterns, function(pattern) {
- // For each pattern in turn, find all whole matches (including the delimiters).
- var patternMatches = text.match(new RegExp(pattern.source, "g"));
-
- if (patternMatches && patternMatches.length) {
- // This pattern matches at least once. See if this pattern matches our current position.
- // Note: We return here to break the Y.Array.find loop - any truthy return will stop any subsequent
- // searches which is the required behaviour of this function.
- return Y.Array.find(patternMatches, function(match) {
- // Check each occurrence of this match.
- var startIndex = 0;
- while (text.indexOf(match, startIndex) !== -1) {
- // Determine whether the cursor is in the current occurrence of this string.
- // Note: We do not support a selection exceeding the bounds of an equation.
- var startOuter = text.indexOf(match, startIndex),
- endOuter = startOuter + match.length,
- startMatch = (selection.startOffset >= startOuter && selection.startOffset < endOuter),
- endMatch = (selection.endOffset <= endOuter && selection.endOffset > startOuter);
-
- if (startMatch && endMatch) {
- // This match is in our current position - fetch the innerMatch data.
- var innerMatch = match.match(pattern);
- if (innerMatch && innerMatch.length) {
- // We need the start and end of the inner match for later.
- var startInner = text.indexOf(innerMatch[1], startOuter),
- endInner = startInner + innerMatch[1].length;
-
- // We'll be returning the inner match for use in the editor itself.
- returnValue = innerMatch[1];
-
- // Save all data for later.
- this.sourceEquation = {
- // Outer match data.
- startOuterPosition: startOuter,
- endOuterPosition: endOuter,
- outerMatch: match,
-
- // Inner match data.
- startInnerPosition: startInner,
- endInnerPosition: endInner,
- innerMatch: innerMatch
- };
-
- // This breaks out of both Y.Array.find functions.
- return true;
- }
- }
-
- // Update the startIndex to match the end of the current match so that we can continue hunting
- // for further matches.
- startIndex = endOuter;
- }
- }, this);
- }
- }, this);
-
- // We trim the equation when we load it and then add spaces when we save it.
- if (returnValue !== false) {
- returnValue = returnValue.trim();
- }
- return returnValue;
- },
-
- /**
- * Handle insertion of a new equation, or update of an existing one.
- *
- * @method _setEquation
- * @param {EventFacade} e
- * @private
- */
- _setEquation: function(e) {
- var input,
- selectedNode,
- text,
- value,
- host,
- newText;
-
- host = this.get('host');
-
- e.preventDefault();
- this.getDialogue({
- focusAfterHide: null
- }).hide();
-
- input = e.currentTarget.ancestor('.atto_form').one('textarea');
-
- value = input.get('value');
- if (value !== '') {
- host.setSelection(this._currentSelection);
-
- if (this.sourceEquation) {
- // Replace the equation.
- selectedNode = Y.one(host.getSelectionParentNode());
- text = selectedNode.get('text');
- value = ' ' + value + ' ';
- newText = text.slice(0, this.sourceEquation.startInnerPosition) +
- value +
- text.slice(this.sourceEquation.endInnerPosition);
-
- selectedNode.set('text', newText);
- } else {
- // Insert the new equation.
- value = DELIMITERS.START + ' ' + value + ' ' + DELIMITERS.END;
- host.insertContentAtFocusPoint(value);
- }
-
- // Clean the YUI ids from the HTML.
- this.markUpdated();
- }
- },
-
- /**
- * Smart throttle, only call a function every delay milli seconds,
- * and always run the last call. Y.throttle does not work here,
- * because it calls the function immediately, the first time, and then
- * ignores repeated calls within X seconds. This does not guarantee
- * that the last call will be executed (which is required here).
- *
- * @param {function} fn
- * @param {Number} delay Delay in milliseconds
- * @method _throttle
- * @private
- */
- _throttle: function(fn, delay) {
- var timer = null;
- return function() {
- var context = this, args = arguments;
- clearTimeout(timer);
- timer = setTimeout(function() {
- fn.apply(context, args);
- }, delay);
- };
- },
-
- /**
- * Update the preview div to match the current equation.
- *
- * @param {EventFacade} e
- * @method _updatePreview
- * @private
- */
- _updatePreview: function(e) {
- var textarea = this._content.one(SELECTORS.EQUATION_TEXT),
- equation = textarea.get('value'),
- url,
- currentPos = textarea.get('selectionStart'),
- prefix = '',
- cursorLatex = '\\Downarrow ',
- isChar,
- params;
-
- if (e) {
- e.preventDefault();
- }
-
- // Move the cursor so it does not break expressions.
- // Start at the very beginning.
- if (!currentPos) {
- currentPos = 0;
- }
-
- // First move back to the beginning of the line.
- while (equation.charAt(currentPos) === '\\' && currentPos >= 0) {
- currentPos -= 1;
- }
- isChar = /[a-zA-Z\{]/;
- if (currentPos !== 0) {
- if (equation.charAt(currentPos - 1) != '{') {
- // Now match to the end of the line.
- while (isChar.test(equation.charAt(currentPos)) &&
- currentPos < equation.length &&
- isChar.test(equation.charAt(currentPos - 1))) {
- currentPos += 1;
- }
- }
- }
- // Save the cursor position - for insertion from the library.
- this._lastCursorPos = currentPos;
- equation = prefix + equation.substring(0, currentPos) + cursorLatex + equation.substring(currentPos);
-
- equation = DELIMITERS.START + ' ' + equation + ' ' + DELIMITERS.END;
- // Make an ajax request to the filter.
- url = M.cfg.wwwroot + '/lib/editor/atto/plugins/equation/ajax.php';
- params = {
- sesskey: M.cfg.sesskey,
- contextid: this.get('contextid'),
- action: 'filtertext',
- text: equation
- };
-
- Y.io(url, {
- context: this,
- data: params,
- timeout: 500,
- on: {
- complete: this._loadPreview
- }
- });
- },
-
- /**
- * Load returned preview text into preview
- *
- * @param {String} id
- * @param {EventFacade} e
- * @method _loadPreview
- * @private
- */
- _loadPreview: function(id, preview) {
- var previewNode = this._content.one(SELECTORS.EQUATION_PREVIEW);
-
- if (preview.status === 200) {
- previewNode.setHTML(preview.responseText);
-
- // Notify the filters about the modified nodes.
- require(['core/event'], function(event) {
- event.notifyFilterContentUpdated(previewNode.getDOMNode());
- });
- }
- },
-
- /**
- * Return the dialogue content for the tool, attaching any required
- * events.
- *
- * @method _getDialogueContent
- * @return {Node}
- * @private
- */
- _getDialogueContent: function() {
- var library = this._getLibraryContent(),
- throttledUpdate = this._throttle(this._updatePreview, 500),
- template = Y.Handlebars.compile(TEMPLATES.FORM);
-
- this._content = Y.Node.create(template({
- elementid: this.get('host').get('elementid'),
- component: COMPONENTNAME,
- library: library,
- texdocsurl: this.get('texdocsurl'),
- CSS: CSS
- }));
-
- // Sets the default focus.
- this._content.all(SELECTORS.LIBRARY_GROUP).each(function(group) {
- // The first button gets the focus.
- this._setGroupTabFocus(group, group.one('button'));
- // Sometimes the filter adds an anchor in the button, no tabindex on that.
- group.all('button a').setAttribute('tabindex', '-1');
- }, this);
-
- // Keyboard navigation in groups.
- this._content.delegate('key', this._groupNavigation, 'down:37,39', SELECTORS.LIBRARY_BUTTON, this);
-
- this._content.one(SELECTORS.SUBMIT).on('click', this._setEquation, this);
- this._content.one(SELECTORS.EQUATION_TEXT).on('valuechange', throttledUpdate, this);
- this._content.one(SELECTORS.EQUATION_TEXT).on('mouseup', throttledUpdate, this);
- this._content.one(SELECTORS.EQUATION_TEXT).on('keyup', throttledUpdate, this);
- this._content.delegate('click', this._selectLibraryItem, SELECTORS.LIBRARY_BUTTON, this);
-
- return this._content;
- },
-
- /**
- * Callback handling the keyboard navigation in the groups of the library.
- *
- * @param {EventFacade} e The event.
- * @method _groupNavigation
- * @private
- */
- _groupNavigation: function(e) {
- e.preventDefault();
-
- var current = e.currentTarget,
- parent = current.get('parentNode'), // This must be the