Eloy Lafuente (stronk7) [Mon, 31 Aug 2020 22:44:13 +0000 (00:44 +0200)]
MDL-67673 phpunit: Remove deprecated assertContains() uses on strings
Both assertContains() and assertNotContains() are deprecated in PHPUnit 8
for operations on strings. Also the optional case parameter is. All uses
must be changed to one of:
- assertStringContainsString()
- assertStringContainsStringIgnoringCase()
- assertStringNotContainsString()
- assertStringNotContainsStringIgnoringCase()
More info: https://github.com/sebastianbergmann/phpunit/issues/3422
Regexp to find all uses:
ag 'assert(Not)?Contains\('
Eloy Lafuente (stronk7) [Mon, 31 Aug 2020 22:07:51 +0000 (00:07 +0200)]
MDL-67673 phpunit: Remove deprecated non-public attribute assertions
With PHPUnit 8 a good number of assertions, all them related with
operations on non-public attributes have been deprecated. And will
be removed with PHPUnit 9.
The main point is that unit tests shouldn't be testing non-public
APIs (good practice) and those assertions were an error originally.
See https://github.com/sebastianbergmann/phpunit/issues/3338 for
the complete list and other details.
When possible (the attributes being checked are public), the change
is simple, just switching to normal assertions.
When the attributes are not public we need to find a workaround
to be able to test the same using public APIs, or use Reflection,
or remove the tests.
For the records, this is the regexp used to find all the cases:
ag '>(assertAttribute|attribute\(|readAttributte|getStaticAttribute| \
getObjectAttribute)' -G "test.php"
Eloy Lafuente (stronk7) [Sun, 2 Aug 2020 23:19:50 +0000 (01:19 +0200)]
MDL-67673 phpunit: Remove expectedException annotations
While this is not strictly required, because removal will
happen in PHPUnit 9.0, we are already getting rid of all
uses in core.
From release notes:https://phpunit.de/announcements/phpunit-8.html
The annotations `@expectedException`, `@expectedExceptionCode`,
`@expectedExceptionMessage`, and `@expectedExceptionMessageRegExp`
are now deprecated.
Using these annotations will trigger a deprecation warning
in PHPUnit 8 and in PHPUnit 9 these annotations will be removed.
Also, all uses of expectExceptionMessageRegExp() has been moved
to expectExceptionMessageMatches(). See https://github.com/sebastianbergmann/phpunit/issues/3957
TODO: Various weirdness found while doing the changes with these tests:
- vendor/bin/phpunit lib/tests/exporter_test.php (created MDL-69700)
- vendor/bin/phpunit competency/tests/external_test.php (same issue than prev one)
- vendor/bin/phpunit question/engine/tests/questionengine_test.php (created MDL-69624)
- vendor/bin/phpunit lib/tests/event_test.php (created MDL-69688)
Eloy Lafuente (stronk7) [Sun, 2 Aug 2020 11:43:32 +0000 (13:43 +0200)]
MDL-67673 phpunit: Remove deprecated assertArraySubset()
While this is not strictly required, because removal will
happen in PHPUnit 9.0, we are already getting rid of all
uses in core.
From release notes:https://phpunit.de/announcements/phpunit-8.html
assertArraySubset() is deprecated and will be removed in PHPUnit 9.
Eloy Lafuente (stronk7) [Sun, 2 Aug 2020 11:08:42 +0000 (13:08 +0200)]
MDL-67673 phpunit: Remove deprecated assertInternalType()
While this is not strictly required, because removal will
happen in PHPUnit 9.0, we are already getting rid of all
uses in core.
From release notes:https://phpunit.de/announcements/phpunit-8.html
assertInternalType() is deprecated and will be removed in
PHPUnit 9. Refactor your test to use assertIsArray(), assertIsBool(),
assertIsFloat(), assertIsInt(), assertIsNumeric(), assertIsObject(),
assertIsResource(), assertIsString(), assertIsScalar(),
assertIsCallable(), or assertIsIterable() instead.
Eloy Lafuente (stronk7) [Sun, 2 Aug 2020 08:50:59 +0000 (10:50 +0200)]
MDL-67673 phpunit: phpunit_constraint_object_is_equal_with_exceptions
Constraints are now declared final, so we cannot extend them anymore.
Hence, instead of extending PHPUnit\Framework\Constraint\IsEqual we
are just wrapping it into our constraint.
Eloy Lafuente (stronk7) [Sun, 2 Aug 2020 08:59:12 +0000 (10:59 +0200)]
MDL-67673 phpunit: Fix the return type of template methods
All the setup/teardown/pre/post/conditions template methods
now are required to return void. This was warned with phpunit 7
and now is enforced.
At the same time, fix a few wrong function names,
provider data and param types, return statements...
Eloy Lafuente (stronk7) [Sat, 1 Aug 2020 16:15:28 +0000 (18:15 +0200)]
MDL-67673 phpunit: Bump to PHPUnit 8.5 and remove DBunit
This makes everything to break, but it's what we'll be fixing
in the next commits, heh. :-)
Generated with php72 (min version supported), following the
instructions @ https://docs.moodle.org/dev/Composer
Eloy Lafuente (stronk7) [Tue, 20 Oct 2020 22:51:10 +0000 (00:51 +0200)]
on-demand release 3.10dev+
Luca Bösch [Mon, 19 Oct 2020 07:52:54 +0000 (09:52 +0200)]
MDL-65448 block_site_main_menu: Restyle moving.
Jake Dallimore [Tue, 20 Oct 2020 03:08:46 +0000 (11:08 +0800)]
Merge branch 'MDL-67695-MOODLE_310_STABLE_get_lti_proxies' of https://github.com/andrewmadden/moodle into MOODLE_310_STABLE
Adrian Greeve [Tue, 20 Oct 2020 00:49:06 +0000 (08:49 +0800)]
Merge branch 'MOODLE_310_STABLE-MDL-68284' of https://github.com/yao9394/moodle into MOODLE_310_STABLE
Katie Ransom [Mon, 19 Oct 2020 09:45:26 +0000 (10:45 +0100)]
MDL-69962 tool_usertours: Fix increase in included files
Andrew Nicols [Tue, 20 Oct 2020 00:02:22 +0000 (08:02 +0800)]
Merge branch 'MDL-69687-m310' of https://github.com/sammarshallou/moodle into MOODLE_310_STABLE
Jenkins Automation [Fri, 18 Sep 2020 01:04:10 +0000 (10:34 +0930)]
MDL-69726 calendar: fix raw event fetcher under postgres
Without this, there's a code path that under the right circumstances is hit and
results in a query with `FROM (mdl_event) ev` in it - which is not valid syntax
under postgres.
Eloy Lafuente (stronk7) [Mon, 19 Oct 2020 20:56:31 +0000 (22:56 +0200)]
Merge branch 'MDL-69906-310-searchsimpledb' of git://github.com/mudrd8mz/moodle into MOODLE_310_STABLE
Eloy Lafuente (stronk7) [Mon, 19 Oct 2020 20:32:02 +0000 (22:32 +0200)]
Merge branch 'MDL-57756-text-customparams-310' of https://github.com/cengage/moodle into MOODLE_310_STABLE
Andrew Madden [Mon, 19 Oct 2020 03:35:19 +0000 (14:35 +1100)]
MDL-67695 mod_lti: Use correct return structure for get_tool_proxies.
* Deprecated serialise_tool_proxy() as no longer used.
* Use tool_proxy_return_structure for each proxy.
* Added tests for getting all proxies and orphaned proxies.
Sara Arjona [Mon, 19 Oct 2020 16:14:54 +0000 (18:14 +0200)]
Merge branch 'MDL-69897-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE
Sara Arjona [Mon, 19 Oct 2020 11:41:59 +0000 (13:41 +0200)]
Merge branch 'MDL-69900-310' of git://github.com/mihailges/moodle into MOODLE_310_STABLE
sam marshall [Mon, 19 Oct 2020 09:14:09 +0000 (10:14 +0100)]
MDL-69687 Course: remove_course_contents orphaned completion data
The remove_course_contents function did not delete data from
course_module_completion table in most cases, resulting in large
quantities of orphaned data.
Sara Arjona [Mon, 19 Oct 2020 08:07:21 +0000 (10:07 +0200)]
Merge branch 'MOODLE_310_MDL-69791' of https://github.com/golenkovm/moodle into MOODLE_310_STABLE
Andrew Nicols [Mon, 19 Oct 2020 07:54:36 +0000 (15:54 +0800)]
Merge branch 'MDL-65448-310' of git://github.com/lucaboesch/moodle into MOODLE_310_STABLE
Luca Bösch [Mon, 19 Oct 2020 07:43:42 +0000 (09:43 +0200)]
MDL-65448 block_social_activities: Restyle moving.
Luca Bösch [Mon, 19 Oct 2020 07:33:19 +0000 (09:33 +0200)]
MDL-65448 core_course: Restyle non-JS activity moving.
Luca Bösch [Mon, 19 Oct 2020 07:14:26 +0000 (09:14 +0200)]
MDL-65448 gradebook: Remove erraneous dev .movehere class left over.
Luca Bösch [Sat, 15 Feb 2020 16:43:55 +0000 (17:43 +0100)]
MDL-65448 core_course: Restyle non-JS activity moving.
Luca Bösch [Wed, 1 May 2019 09:27:38 +0000 (11:27 +0200)]
MDL-65448 block_site_main_menu: Restyle moving.
Luca Bösch [Wed, 1 May 2019 09:54:09 +0000 (11:54 +0200)]
MDL-65448 block_social_activities: Restyle moving.
Luca Bösch [Sat, 15 Feb 2020 16:46:30 +0000 (17:46 +0100)]
MDL-65448 gradebook: Restyle moving.
Sara Arjona [Mon, 19 Oct 2020 07:03:51 +0000 (09:03 +0200)]
Merge branch 'MDL-69736-310' of git://github.com/ferranrecio/moodle into MOODLE_310_STABLE
Andrew Nicols [Mon, 19 Oct 2020 05:19:28 +0000 (13:19 +0800)]
Merge branch 'MDL-69687-m310' of https://github.com/sammarshallou/moodle into MOODLE_310_STABLE
Andrew Nicols [Mon, 19 Oct 2020 02:07:45 +0000 (10:07 +0800)]
Merge branch 'MDL-65448-310' of git://github.com/lucaboesch/moodle into MOODLE_310_STABLE
sam marshall [Mon, 5 Oct 2020 09:27:38 +0000 (10:27 +0100)]
MDL-69687 Course: Improve removal of completion data on MySQL
sam marshall [Mon, 14 Sep 2020 10:23:56 +0000 (11:23 +0100)]
MDL-69687 DB: Add API for deleting data based on subquery
The new API works on normal databases (by deleting data based on the
subquery) and also on MySQL (by deleting the data using a weird join
on the subquery).
Luca Bösch [Wed, 1 May 2019 09:27:38 +0000 (11:27 +0200)]
MDL-65448 block_site_main_menu: Restyle moving.
Luca Bösch [Wed, 1 May 2019 09:54:09 +0000 (11:54 +0200)]
MDL-65448 block_social_activities: Restyle moving.
Luca Bösch [Sat, 15 Feb 2020 16:43:55 +0000 (17:43 +0100)]
MDL-65448 core_course: Restyle non-JS activity moving.
Luca Bösch [Sat, 15 Feb 2020 16:46:30 +0000 (17:46 +0100)]
MDL-65448 gradebook: Restyle moving.
Sara Arjona [Fri, 16 Oct 2020 11:18:54 +0000 (13:18 +0200)]
on-demand release 3.10dev+
Sagar Ghimire [Mon, 24 Aug 2020 01:40:49 +0000 (11:40 +1000)]
MDL-68284 gradebook: Prevent exposing hidden quiz grade item
Jake Dallimore [Fri, 16 Oct 2020 03:52:29 +0000 (11:52 +0800)]
Merge branch 'MOODLE_310_MDL-47178' of https://github.com/golenkovm/moodle into MOODLE_310_STABLE
Jun Pataleta [Fri, 16 Oct 2020 02:09:40 +0000 (10:09 +0800)]
Merge branch 'MDL-69266-310' of https://github.com/HuongNV13/moodle into MOODLE_310_STABLE
Huong Nguyen [Mon, 5 Oct 2020 06:33:08 +0000 (13:33 +0700)]
MDL-69266 qtype_ddwtos: 'unlimited' options fail in 3.9
Adrian Greeve [Thu, 15 Oct 2020 07:11:29 +0000 (15:11 +0800)]
Merge branch 'MDL-69549-310-7' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE
Jun Pataleta [Thu, 15 Oct 2020 05:56:58 +0000 (13:56 +0800)]
Merge branch 'MDL-69583-310' of git://github.com/ferranrecio/moodle into MOODLE_310_STABLE
Jun Pataleta [Thu, 15 Oct 2020 05:53:36 +0000 (13:53 +0800)]
Merge branch 'MDL-69520-310' of git://github.com/sarjona/moodle into MOODLE_310_STABLE
Simey Lameze [Wed, 30 Sep 2020 07:06:12 +0000 (15:06 +0800)]
MDL-69549 mod_resource: content export implementation
Andrew Nicols [Wed, 14 Oct 2020 23:31:11 +0000 (07:31 +0800)]
MDL-69549 mod_page: Content export implementation
Andrew Nicols [Wed, 14 Oct 2020 23:31:05 +0000 (07:31 +0800)]
MDL-69549 mod_folder: Content export implementation
Andrew Nicols [Thu, 24 Sep 2020 04:25:31 +0000 (12:25 +0800)]
MDL-69549 core: Add context export API
Katie Ransom [Wed, 30 Sep 2020 13:32:58 +0000 (14:32 +0100)]
MDL-69739 tool_usertours: Add tour-level CSS selector
Eloy Lafuente (stronk7) [Wed, 14 Oct 2020 20:47:12 +0000 (22:47 +0200)]
Merge branch 'MDL-69813-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE
Eloy Lafuente (stronk7) [Wed, 14 Oct 2020 19:22:08 +0000 (21:22 +0200)]
Merge branch 'MDL-63805-310' of git://github.com/jleyva/moodle into MOODLE_310_STABLE
Eloy Lafuente (stronk7) [Wed, 14 Oct 2020 09:22:23 +0000 (11:22 +0200)]
MDL-68070 messaging: Ensure that error is shown on first messages
Before there is a conversation, messages between users are sent
using core_message_send_instant_messages instead of
core_message_send_messages_to_conversation.
That method had an undefined $errormessage variable, ultimately
causing the problem detected on message_post_message()/message_send()
to never been returned by the external.
This just adds the same error than already existing conversations do,
but returning it as warning, for BC, JS will show it.
Sara Arjona [Thu, 24 Sep 2020 19:23:36 +0000 (21:23 +0200)]
MDL-69520 core_h5p: unit tests for covering example and tutorial
Sara Arjona [Thu, 24 Sep 2020 12:03:04 +0000 (14:03 +0200)]
MDL-69520 core_h5p: add example and tutorial links
Eloy Lafuente (stronk7) [Wed, 14 Oct 2020 14:53:22 +0000 (16:53 +0200)]
MDL-68070 messaging: Amend lang string to be clearer for any user.
Credit goes to Helen Foster for the improvement, thanks!
Víctor Déniz [Wed, 14 Oct 2020 10:27:14 +0000 (11:27 +0100)]
Merge branch 'MDL-68900-m310' of https://github.com/sumitnegi933/moodle into MOODLE_310_STABLE
Juan Leyva [Tue, 29 Sep 2020 15:34:57 +0000 (17:34 +0200)]
MDL-63805 glossary: New WS mod_glossary_prepare_entry_for_edition
Juan Leyva [Mon, 28 Sep 2020 19:22:20 +0000 (21:22 +0200)]
MDL-63805 glossary: New WS mod_glossary_update_entry
Juan Leyva [Mon, 28 Sep 2020 19:22:16 +0000 (21:22 +0200)]
MDL-63805 glossary: Glossary API refactor
Ferran Recio [Tue, 25 Aug 2020 14:20:16 +0000 (16:20 +0200)]
MDL-69583 tool_customlang: add CLI import
Jake Dallimore [Wed, 14 Oct 2020 01:42:43 +0000 (09:42 +0800)]
Merge branch 'MOODLE_310_MDL-69848' of https://github.com/golenkovm/moodle into MOODLE_310_STABLE
Víctor Déniz [Tue, 13 Oct 2020 22:41:59 +0000 (23:41 +0100)]
Merge branch 'MDL-69779-better-x-redirect-by-MOODLE_310_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_310_STABLE
Víctor Déniz [Tue, 13 Oct 2020 22:15:48 +0000 (23:15 +0100)]
Merge branch 'MDL-68440-310' of https://github.com/Peterburnett/moodle into MOODLE_310_STABLE
Simon Mok [Mon, 12 Oct 2020 11:30:02 +0000 (19:30 +0800)]
MDL-68070 messaging: Fix error when personal notification is disabled
Eloy Lafuente (stronk7) [Tue, 13 Oct 2020 20:26:35 +0000 (22:26 +0200)]
Merge branch 'MDL-63806-310' of git://github.com/jleyva/moodle into MOODLE_310_STABLE
Sara Arjona [Tue, 13 Oct 2020 11:25:30 +0000 (13:25 +0200)]
on-demand release 3.10dev+
Ferran Recio [Tue, 25 Aug 2020 09:06:14 +0000 (11:06 +0200)]
MDL-69583 tool_customlang: add customization import
Andrew Nicols [Tue, 13 Oct 2020 03:49:10 +0000 (11:49 +0800)]
Merge branch 'MDL-66928-request-dir-purge-bug-MOODLE_310_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_310_STABLE
Brendan Heywood [Sat, 26 Sep 2020 13:36:41 +0000 (23:36 +1000)]
MDL-66928 core: Move request dirs to system tmp instead of localcache
Andrew Nicols [Mon, 12 Oct 2020 23:58:20 +0000 (07:58 +0800)]
Merge branch 'MDL-67654-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE
Paul Holden [Fri, 2 Oct 2020 06:46:45 +0000 (07:46 +0100)]
MDL-67654 mod_forum: formchangechecker for discussion inline replies.
Adrian Greeve [Mon, 12 Oct 2020 06:48:48 +0000 (14:48 +0800)]
Merge branch 'MOODLE_310_MDL-69818' of https://github.com/golenkovm/moodle into MOODLE_310_STABLE
Jake Dallimore [Mon, 12 Oct 2020 06:37:07 +0000 (14:37 +0800)]
Merge branch 'MDL-68292-admin-sesskey-MOODLE_310_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_310_STABLE
Brendan Heywood [Thu, 24 Sep 2020 07:01:31 +0000 (17:01 +1000)]
MDL-68292 core: Remove sesskey leakage on module pages
Adrian Greeve [Mon, 12 Oct 2020 05:41:44 +0000 (13:41 +0800)]
Merge branch 'MDL-65743-310' of git://github.com/lameze/moodle into MOODLE_310_STABLE
Simey Lameze [Mon, 5 Oct 2020 05:37:07 +0000 (13:37 +0800)]
MDL-65743 lib: update moodle library docs
Simey Lameze [Mon, 5 Oct 2020 05:35:56 +0000 (13:35 +0800)]
MDL-65743 lib: add XMPPHP namespace and update calls
Simey Lameze [Mon, 5 Oct 2020 05:34:41 +0000 (13:34 +0800)]
MDL-65743 lib: upgrade XMPPHP library to v2.2
Andrew Nicols [Mon, 12 Oct 2020 04:33:51 +0000 (12:33 +0800)]
Merge branch 'MDL-69776-310' of git://github.com/jleyva/moodle into MOODLE_310_STABLE
Adrian Greeve [Mon, 12 Oct 2020 02:15:41 +0000 (10:15 +0800)]
Merge branch 'MDL-69649-310' of git://github.com/rezaies/moodle into MOODLE_310_STABLE
Jake Dallimore [Mon, 12 Oct 2020 02:05:43 +0000 (10:05 +0800)]
Merge branch 'MDL-69910-calendar-protectusername-MOODLE_310_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_310_STABLE
Jake Dallimore [Mon, 12 Oct 2020 01:57:46 +0000 (09:57 +0800)]
Merge branch 'MDL-69707-redis-avoid-write-MOODLE_310_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_310_STABLE
Peter Burnett [Tue, 21 Apr 2020 00:00:35 +0000 (10:00 +1000)]
MDL-68440 cache: Added counting of default mappings
Jake Dallimore [Mon, 12 Oct 2020 01:51:51 +0000 (09:51 +0800)]
Merge branch 'MDL-68406-310' of git://github.com/jleyva/moodle into MOODLE_310_STABLE
Adrian Greeve [Mon, 12 Oct 2020 00:09:47 +0000 (08:09 +0800)]
Merge branch 'MDL-69825-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE
Brendan Heywood [Thu, 24 Sep 2020 06:30:39 +0000 (16:30 +1000)]
MDL-69779 core: Improved the X-Redirect-By header when debugging is on
Brendan Heywood [Sat, 10 Oct 2020 08:24:38 +0000 (19:24 +1100)]
MDL-69910 calendar: Fix export exception when both params are sent
Paul Holden [Tue, 29 Sep 2020 21:37:01 +0000 (22:37 +0100)]
MDL-69825 admin: externalpage class using a callback for access check.
Co-Authored-By: Marina Glancy <marina@moodle.com>
David Mudrák [Fri, 9 Oct 2020 12:01:00 +0000 (14:01 +0200)]
MDL-69906 admin: Display Setup search engine as link only if it is valid
We use auto-generated admin section name here so we need to check that
the target section actually exists.
Sara Arjona [Fri, 9 Oct 2020 09:12:48 +0000 (11:12 +0200)]
on-demand release 3.10dev+
Juan Leyva [Fri, 2 Oct 2020 09:37:14 +0000 (11:37 +0200)]
MDL-68406 tool_mobile: Allow users to log-out from the app
In this commit, we also reorganised how the Mobile box is displayed in the user profile.
We are allowing now site admins to see the user last access time.
Juan Leyva [Fri, 25 Sep 2020 15:25:34 +0000 (17:25 +0200)]
MDL-63806 glossary: New WS mod_glossary_delete_entry
Juan Leyva [Fri, 25 Sep 2020 12:02:26 +0000 (14:02 +0200)]
MDL-63806 glossary: Return user permissions for entries in WS
Juan Leyva [Fri, 25 Sep 2020 12:01:59 +0000 (14:01 +0200)]
MDL-63806 glossary: Move delete code to API function
Adrian Greeve [Fri, 9 Oct 2020 04:05:34 +0000 (12:05 +0800)]
Merge branch 'MDL-68384-fix-spec-violations-310' of https://github.com/cengage/moodle into MOODLE_310_STABLE
Jun Pataleta [Fri, 9 Oct 2020 03:56:44 +0000 (11:56 +0800)]
Merge branch 'MDL-69740_310' of https://github.com/timhunt/moodle into MOODLE_310_STABLE
Jun Pataleta [Fri, 9 Oct 2020 03:12:16 +0000 (11:12 +0800)]
Merge branch 'MDL-69257-310' of git://github.com/mihailges/moodle into MOODLE_310_STABLE