9350 Commits

Author SHA1 Message Date
Huong Nguyen
a5a80952de MDL-74996 tool_recyclebin: Fix Behat failure 2022-11-11 14:12:50 +07:00
Jun Pataleta
da21308a7b Merge branch 'MDL-63037-master' of https://github.com/snake/moodle 2022-11-11 10:42:27 +08:00
Sara Arjona
ac11386831 Merge branch 'MDL-75974' of https://github.com/paulholden/moodle 2022-11-10 12:51:24 +01:00
Jun Pataleta
9555637d64 Merge branch 'MDL-76053' of https://github.com/stronk7/moodle 2022-11-09 21:28:30 +08:00
Eloy Lafuente (stronk7)
621d75dbce MDL-76053 admin: Remove various warnings related to MNet
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.
2022-11-08 16:49:18 +01:00
Eloy Lafuente (stronk7)
c763d40704 MDL-76054 environment: Remove the php-xmlrpc extension check
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.
2022-11-08 16:45:12 +01:00
Jake Dallimore
d2dd970b19 MDL-63037 mnet: fix hostexists string usage 2022-11-08 17:01:40 +08:00
Jake Dallimore
dd21b9971c Merge branch 'MDL-72882-master-3' of https://github.com/junpataleta/moodle 2022-11-08 11:31:30 +08:00
Paul Holden
4f3e8c9b39 MDL-75974 tool_customlang: check out language pack in CLI import. 2022-11-07 22:40:53 +00:00
Andrew Nicols
6fae54c10e Merge branch 'MDL-75880' of https://github.com/stronk7/moodle 2022-11-07 21:56:06 +08:00
Eloy Lafuente (stronk7)
d590b08dfa MDL-75880 phpunit: fix all @coversDefaultClass missing @covers
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.
2022-11-04 16:51:20 +01:00
Eloy Lafuente (stronk7)
e7d3e042fc MDL-76052 webservice_xmlrpc: Annotate some wrong plugin uses
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.
2022-11-04 16:49:57 +01:00
Jake Dallimore
446a9e64f0 Merge branch 'MDL-76055' of https://github.com/stronk7/moodle 2022-11-04 12:06:38 +03:00
Jun Pataleta
05c5dc7f9c Merge branch 'MDL-76072-master' of https://github.com/lameze/moodle 2022-11-04 12:06:37 +03:00
Sara Arjona
35d2061018 Merge branch 'MDL-61880-master' of https://github.com/snake/moodle 2022-11-03 12:44:39 +03:00
Jun Pataleta
f91261c9fa MDL-72882 tool_langimport: Set default language when deleting lang pack
* 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.
2022-11-03 13:27:11 +08:00
Simey Lameze
ac8dcf13da MDL-76072 tool_lp: only init inlineGrader module if user can grade 2022-11-03 10:51:27 +08:00
Eloy Lafuente (stronk7)
73bc677346 MDL-76055 mnet: Switch the keyswap to use the library
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...)
2022-11-02 15:56:38 +01:00
Jake Dallimore
c48e83db0e MDL-61880 tool_oauth2: don't rely on discovery when editing issuers
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.
2022-11-02 11:11:00 +08:00
Jun Pataleta
5e84f00acb Merge branch 'MDL-73141-master' of https://github.com/dravek/moodle 2022-11-01 09:25:34 +08:00
Michael Hawkins
336d8c5fab MDL-74643 tool_mobile: Update API to support supportavailability config
Co-authored-by: Juan Leyva <juanleyvadelgado@gmail.com>
2022-10-31 18:58:10 +08:00
Michael Hawkins
e3b3ba90c8 MDL-74643 core_user: New admin setting for site support availability
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.
2022-10-31 18:58:06 +08:00
David Matamoros
b0802f49a6 MDL-73141 core_cohort: Convert cohort listing to Report Builder 2022-10-29 12:45:50 +02:00
Jun Pataleta
c76a2a05ba Merge branch 'MDL-72558' of https://github.com/NoelDeMartin/moodle 2022-10-26 13:37:45 +08:00
Jun Pataleta
6c0631b2d3 Merge branch 'MDL-75099-master' of https://github.com/rmady/moodle 2022-10-25 11:46:25 +08:00
Andrew Nicols
6d5c70a286 Merge branch 'master-MDL-74991' of https://github.com/golenkovm/moodle 2022-10-25 11:14:06 +08:00
Sara Arjona
5e9d99eeaf Merge branch 'MDL-61921-master' of https://github.com/HuongNV13/moodle 2022-10-21 16:22:44 +02:00
Huong Nguyen
986910d6ff MDL-61921 admin: Support XOAUTH2 for incoming mail 2022-10-21 09:34:53 +07:00
Huong Nguyen
bc80531188 MDL-61921 admin: Support XOAUTH2 for outgoing mail 2022-10-21 09:33:48 +07:00
Matthew Hilton
cfb643293c MDL-56567 competency: Course module competency option to override grade
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.
2022-10-17 08:00:20 +10:00
Sara Arjona
0b4de0c41f Merge branch 'MDL-75984-master-v1' of https://github.com/lameze/moodle 2022-10-13 15:55:09 +02:00
Ilya Tregubov
3f6a102704 Merge branch 'MDL-75970' of https://github.com/paulholden/moodle 2022-10-13 14:08:35 +03:00
Simey Lameze
e654b6dbd6 MDL-75984 admin_presets: split test into smaller ones 2022-10-13 15:20:35 +08:00
Noel De Martin
594a64348a MDL-72558 behat: Remove legacy mobile app code 2022-10-13 09:18:40 +02:00
Paul Holden
abeedec596 MDL-75970 tool_customlang: clarify CLI export target/filename. 2022-10-12 10:13:48 +01:00
Jun Pataleta
36e4ca71c6 Merge branch 'MDL-75034' of https://github.com/paulholden/moodle 2022-10-12 14:24:35 +08:00
Rodrigo Mady da Silva
9526610c64 MDL-75099 tool_mobile: Contact site support option in disabledfeatures 2022-10-10 16:25:48 -03:00
Mikhail Golenkov
04e2e00976 MDL-74991 CLI: Add a script to delete courses 2022-10-10 14:40:23 +11:00
Simey Lameze
6c7f570e14 MDL-75923 tool_usertours: Update tour content to match formatted content
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.
2022-10-10 09:09:54 +08:00
Paul Holden
b3828cebd2 MDL-75034 reportbuilder: move classes into consistent namespace.
Use `reportbuilder` level two namespace for report related classes
(entities, system reports, etc) within components and sub-systems.
2022-10-07 15:05:34 +01:00
Andrew Nicols
0c7243af38 Merge branch 'MDL-75738-master' of https://github.com/sammarshallou/moodle 2022-09-29 11:39:31 +08:00
Jun Pataleta
f680348048 Merge branch 'MDL-66902' of https://github.com/stronk7/moodle 2022-09-28 23:15:52 +08:00
Andrew Nicols
182649d7d5 Merge branch 'MDL-73421-master' of https://github.com/marinaglancy/moodle 2022-09-27 17:06:51 +08:00
Eloy Lafuente (stronk7)
0ed53be9b2 MDL-66902 tests: Fix all incorrect namespaces
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.
2022-09-26 14:12:16 +02:00
sam marshall
5afc441506 MDL-75738 tool_moodlenet: Upgrade clean user profile slow, pointless
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.
2022-09-26 11:25:27 +01:00
Mihail Geshoski
3001995be8 MDL-75153 grade: Update behat tests 2022-09-20 00:17:56 +08:00
Marina Glancy
741b3572cc MDL-73421 core: Calling static method on trait deprecated in PHP8.1 2022-09-16 15:04:02 +02:00
Jun Pataleta
402136ef80 Merge branch 'MDL-75308' of https://github.com/paulholden/moodle 2022-09-14 05:33:09 +08:00
Paul Holden
b40d438fbf MDL-75708 reportbuilder: consider stress tests as requiring longtest.
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.
2022-09-09 11:11:39 +01:00
Jun Pataleta
adba94a873 Merge branch 'MDL-75553-master' of https://github.com/junpataleta/moodle 2022-09-07 12:59:42 +08:00