The assumption that the settings checkbox always stores boolean values
(e.g. 0/1) isn't correct. The `perfdebug` configuration instead uses
the values 7/15.
Default value of the $flag argument changed in PHP 8.1 from ENT_COMPAT to ENT_QUOTES | ENT_SUBSTITUTE
To ensure consistent behavior across different PHP version the second parameter is now required for the functions:
htmlspecialchars(), htmlentities(), htmlspecialchars_decode(), html_entity_decode() and get_html_translation_table()
Including in this commit:
- Convert existing Behat scenario to use Data generators
- Convert existing Behat scenario to use Provider
- Add new scenario for Include users setting in General restore page
This partially reverts MDL-73270, where some useful environmental
checks and notifications in the admin UI were added to inform
about different parts of Moodle relying on the "unsupported"
php-xmlrpc extension.
Since then, some changes have happened in core, only available
for Moodle 4.1 and up (see the MDL-70889 mini-epic). Namely:
- MNet (SSO, roaming, auth, enrol and Mahara portfolio) are not
using the php-xmlrpc extension anymore, but a pure php library.
- The xmlrpc webservices protocol, has been move from core to
the plugins directory, although it continues using the php-xmlrpc
extension.
Because of that here we are removing all the checks and notifications
related with MNet (not using the extension anymore), but keeping the
webservice plugin ones (still using the extension). Surely if some day the
protocol stops using the extension, we'll be able to remove the
corresponding checks too. But that's future.
Note the associated lang strings have been also removed (not deprecated)
because they were highly specific and hardly reusable:
- xmlrpcmaharaenabled
- xmlrpcmnetauthenticationenabled
- xmlrpcmnetenabled
And very same applies, because MNet doesn't contain anything deprecated
or not supported anymore, hence, straight deletion, to the function:
- mnet_get_deprecation_notice()
Also, related tests using any of the removed stuff above have been deleted.
In the other side, the "check_xmlrpc_usage" continues existing and
being used both by environment checks and admin notifications but,
as commented above, now it only looks for the xmlrpc webservice
protocol now.
For Moodle 4.1 and up, the php-xmlrpc is not needed anymore:
- All the MNet stuff has been moved to use php library (MDL-76055).
- The webservice/xmlrpc has been moved from core to contrib (MDL-76052).
So we just remove the check here. Starting with 4.1, it's not
needed for any core functionality.
Note that the string has been removed, and not deprecated, because it's
a non-generic string, not belonging to core/moodle main lang file, and
hardly reused ever. That fits with the allowed deletions, not requiring
any deprecation.
Of course, the lang removal only has been applied to master (4.1dev).
Older branches still keep it and will be used when checking < 4.1
upgradability.
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.
It has been detected that there are various uses of the plugins
breaking the inter-communication principles, with core_webservice
implementing functionality plugin-dependent that should belong
to the plugins.
Because of that, https://tracker.moodle.org/browse/MDL-76078 has
been created and we have added some TODO/@todo comments in core
pointing to that issue, for further analysis and fixes there.
* When the language pack being deleted is
- the same as the site default language, we must set the site default
language to 'en'.
- fix the user's current language to the default site language.
This service is different from the rest because it
doesn't run encrypted, but plain xmlrpc. Hence, we
cannot use the normal mnet_xmlrpc_client (that provides
on-the-fly encryption and signing).
So, instead, let's instantiate a custom client here
and use it for this pure xmlrpc request and response.
PS: It's curious that this exact sevice has support
for proxies but the mnet_xmlrpc_client one has not. I'm not
going to modify that here, but have left a comment
in the code about that.
PS: Some small style changes have been applied around
the modified code (spacing, &&, comments...)
Adjusts the testing scenarios so that we don't rely on endpoint
discovery being run during an issuer edit, which is no longer the case.
For scenarios that need a userinfo endpoint, set this manually.
This allows admins to configure whether contact site support is
available to everyone, authenticated users, or nobody.
The behat testing checks linked and direct access for each setting,
as well as adding testing that the support page override works as
expected.