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.
Previously, if a course module had already been graded, course module
completion linked to the course module would not update. This
commit adds the option to enable overriding the grade at the course
module competency level.
This ensures that if enabled and a user completes a module associated
with a competency, that competency will be graded appropriately.
When an HTML content area contains invalid HTML, some editors will clean
and validate the content upon submission.
In this case the content was:
<b>Test content</b>
But this should be wrapped in some form of container which accepts
phrasing content (such as a <p> tag).
Some editors, such as TinyMCE, will normalise the content and add the
wrapping paragraph tags to it.
Furthermore, the bold tag is purely stylistic and does not have semantic
meaning. As a result, the <strong> tag is favoured and some editors,
again such as TinyMCE, will replace bold tags with strong tags.
We should update the content here to be valid HTML (wrap the bold tag
in a para), and use a strong tag rather than bold. This allows this test
to pass both with Atto, and other stricter editors such as TinyMCE 6.
This issue just goes over all the currently incorrect
namespaces in test cases and:
1. Change the namespace to the correct one.
2. Move/rename it to correct location if needed (level 2 and down).
3. Remove not needed MOODLE_INTERNAL check when possible.
4. Remove file phpdoc when the file only has one class.
5. Make small adjustments in case the change of namespace requires it.
There is an upgrade to clean the moodlenetprofile field which
performs very poorly, but it is also not needed because an upgrade
further down sets this field to empty string anyway.
We should respect the value of the PHPUNIT_LONGTEST constant in the
report source stress tests, as it was discovered after 165e26fa that
the default configuration of some CIs (GHA) was not sufficient to run
them.
Hence, use the PHPUNIT_LONGTEST to determine whether to execute said
tests. Note this constant is enabled on internal CI.
Implement stress tester methods for iterating over report columns,
aggregation and conditions. Assert that each works correctly in
isolation, and when used in conjunction with other columns.
Oracle 21 performs worse than previous versions and this
is causing some tool_httpsreplace jobs to, near consistently,
fail with timeouts.
This can be workaround in a number of ways:
1) Hacking tool_httpsreplace to detect when it's running a
behat test and avoid running it completely. We did something
like that for tool_customlang in the past. Ugly exception.
2) For Oracle jobs, set BEHAT_INCREASE_TIMEOUT to 2 or higher, that
will allow the whole behat run to have more time. Maybe too much
if only the tool_httpsreplace scenarios are affected. And requires
special configuration in sites running the tests.
3) Improve Oracle 21 performance. There are some remaining tests to
perform to achieve that, but it's extremely slow process, so it
won't happen soon.
4) Give more time to the failing tests using the step: "I mark this
test as slow setting a timeout factor of X". It applies to all
databases, but we are already using it, so no big problem. It's the
same than solution 2) but from within the tests instead of affecting
to the whole run.
From all the alternatives above, this patch implements 4), doubling
(from current 2 to 4), to give each test up to two minutes
(30 secs * 4 = 120 secs) with the new allowed timeout-factor.