This commit removes several contentious formatting options for now,
pending further consideration, in particular it removes:
- forecolor
- backcolor
- fontfamily
- styles
The two color plugins are written in such a way that the chosen colour
is embedded into a style tag in the generated content. This is not
ideal as it removes these decisions away from theme developers and upon
theme changes to a site, is likely to lead to inaccessible and/or broken
content.
We feel that a new colour plugin will be required which links to known
colour style classes within the theme to allow a subset of colours which
are guaranteed to work with the theme.
The fontfamily plugin is removed pending further administrator
configuration in a future release.
In the case of the 'styles' plugin, this duplicates large parts of the
Format menu into which it is placed but does so in a way that does
respect the configuration of other areas - for example the block_formats
tag is ignored in this menu.
Part of MDL-75966
The template plugin is a part of Tiny, and requires us to create an
administrator UI to configure the templates.
This requires much more thought on workflows, intent, and so on so we'll
park it for later.
Part of MDL-75966.
Part of MDL-75966
This commit adds a cache-busting loader API for use in the TinyMCE
plugin.
This is not for use in any TinyMCE subplugins at this time as we have no
use-case outside of AMD modules.
This loader ensures that only files within the js/tiny directory are
loaded, and it only supports either .js or .css files at this time.
The client-side of the loader makes use of the jsrevision as a
cache-buster, including for CSS files included with TinyMCE.
If the revision is negative, then files are not cached.
If the revision is positive, then the requested file is cached in a
candidate file and served using aggressive cache headers.
Part of MDL-75966
Add support for translation of the TinyMCE interface.
TinyMCE translates English language strings rather than keys, and a tool
to perform this translation is included.
Part of MDL-75966
This commit adds TinyMCE version 6.1 into Moodle core.
A basic editor implementation is included, along with Moodle loader, and
basic Plugin API for Moodle. The Plugin API will be extended and
improved in future changes.
A new subplugin is defined for this plugin.
Because @coversDefaultClass doesn't indicate any coverage (it's
just an alias to avoid having to write the class name in @covers),
this commit fixes all the files that were using that annotation
and missing any @covers.
Basically, replacing one by the other and done.
Normal removal procedure:
- Remove the plugin completely from core.
- Document it in the webservices upgrade.txt file.
- Add a core upgrade step to proceed to remove any configuration
if the plugin has not been re-installed manually.
Plus:
- Remove a few remaining uses in the hub/sites registration scripts,
that were moved from xmlrpc to hand.made rest calls by MDL-31436
(Moodle 3.4.1 and up) and never removed then.
- Remove the php-xmlrpc extension as a recommendation in composer.
- Remove "xmlrpc" from various comments, trivial cleanup.
Note:
- While working on this MDL-76078 has been created about to
fix a serious design problem detected (it does not affect
functionality). That's out from this issue scope.
These steps have accepted a NodeElement instance as an argument for some
time, but were trying to cast it to string when formulating exception
messages, making it harder to debug and, in the case of the 'should see'
step, not work at all.
This patch introduces a new function to produce a consistent naming for
them.
This commit adds new steps related to action menus to support:
* Choosing an item in a named action menu
* Choosing an item in a named action menu within a container
* Confirming that an action menu item does or does not exist in a named
action menu
* Confirming that an action menu item does or does not exist in a named
action menu within a container
The existing action menu steps were insufficient as they assume that
there is only one action menu within he container, which is not
necessarily the case.
The existing action menu steps are not non-JS friendly and will error if
JS is disabled, without providing any fallback when one is easily
available.
Unfortunately these steps cannot be used to replace the existing steps
without manual intervention.
This patch should fix a regression introduced in MDL-75171, raised
while running the OBv2.1 certification.
The new method get_raw_userinfo() can return stdClass or false but
the second one was not taken into account from get_userid() (so an
error was thrown: "Argument 1 passed to
core\oauth2\client::map_userinfo_to_fields() must be an instance
of stdClass, bool given").