99109 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7)
d95c378771 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)
2020-10-21 12:46:00 +02:00
Eloy Lafuente (stronk7)
598d578af7 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.
2020-10-21 12:45:59 +02:00
Eloy Lafuente (stronk7)
f94195c320 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.
2020-10-21 12:45:59 +02:00
Eloy Lafuente (stronk7)
80be8d2204 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.
2020-10-21 12:45:59 +02:00
Eloy Lafuente (stronk7)
f6711bb394 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...
2020-10-21 12:45:59 +02:00
Eloy Lafuente (stronk7)
bdc3ad00c9 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
2020-10-21 12:45:59 +02:00
Eloy Lafuente (stronk7)
3ba1073919 weekly release 4.0dev 2020-10-21 00:50:19 +02:00
Luca Bösch
97a37413b9 MDL-65448 block_site_main_menu: Restyle moving. 2020-10-20 17:23:48 +02:00
Jake Dallimore
6325f848d8 Merge branch 'MDL-67695-master_get_lti_proxies' of https://github.com/andrewmadden/moodle 2020-10-20 11:08:16 +08:00
Adrian Greeve
33831f6e21 Merge branch 'master-MDL-68284' of https://github.com/yao9394/moodle 2020-10-20 08:48:05 +08:00
Víctor Déniz
b79f17e609 Merge branch 'MDL-69962-master' of https://github.com/clransom/moodle 2020-10-20 01:28:31 +01:00
Andrew Nicols
178e343a0f Merge branch 'MDL-69687-master' of https://github.com/sammarshallou/moodle 2020-10-20 08:01:51 +08:00
Jake Dallimore
b0c0d612d7 Merge branch 'MDL-69726' of git://github.com/aolley/moodle 2020-10-20 07:45:35 +08:00
Eloy Lafuente (stronk7)
4f3d5dfcb4 Merge branch 'MDL-69906-master-searchsimpledb' of git://github.com/mudrd8mz/moodle into master 2020-10-19 22:56:20 +02:00
Eloy Lafuente (stronk7)
6b3774b7b7 Merge branch 'MDL-57756-text-customparams' of https://github.com/cengage/moodle into master 2020-10-19 22:31:51 +02:00
Andrew Madden
8177ccf566 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.
2020-10-20 04:08:35 +11:00
Sara Arjona
d09980a8b0 Merge branch 'MDL-69897' of https://github.com/paulholden/moodle into master 2020-10-19 18:14:45 +02:00
Sara Arjona
66e3cceaa2 Merge branch 'MDL-69900-master' of git://github.com/mihailges/moodle into master 2020-10-19 13:41:51 +02:00
Katie Ransom
ad7d432ebe MDL-69962 tool_usertours: Fix increase in included files 2020-10-19 10:45:26 +01:00
sam marshall
4dcca1b084 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.
2020-10-19 10:26:12 +01:00
Sara Arjona
c8ad0ca25b Merge branch 'master-MDL-69791' of https://github.com/golenkovm/moodle into master 2020-10-19 10:07:11 +02:00
Andrew Nicols
0fa7d368a6 Merge branch 'MDL-65448-master' of git://github.com/lucaboesch/moodle 2020-10-19 15:49:13 +08:00
Luca Bösch
bdc639de03 MDL-65448 block_social_activities: Restyle moving. 2020-10-19 09:43:42 +02:00
Luca Bösch
60b2431798 MDL-65448 core_course: Restyle non-JS activity moving. 2020-10-19 09:33:19 +02:00
Luca Bösch
96d54e2ac9 MDL-65448 gradebook: Remove erraneous dev .movehere class left over. 2020-10-19 09:14:30 +02:00
Sara Arjona
d06da02935 Merge branch 'MDL-69736-master' of git://github.com/ferranrecio/moodle into master 2020-10-19 09:03:42 +02:00
Andrew Nicols
f9482497c1 Merge branch 'MDL-69687-master' of https://github.com/sammarshallou/moodle 2020-10-19 11:27:04 +08:00
Andrew Nicols
0f049286f0 Merge branch 'MDL-65448-master' of git://github.com/lucaboesch/moodle 2020-10-19 10:04:11 +08:00
sam marshall
2fe87d9566 MDL-69687 Course: Improve removal of completion data on MySQL 2020-10-16 18:20:23 +01:00
sam marshall
edb5cd0de4 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).
2020-10-16 18:20:23 +01:00
Luca Bösch
531ce52940 MDL-65448 core_course: Restyle non-JS activity moving. 2020-10-16 14:50:21 +02:00
Luca Bösch
71f05ec9cb MDL-65448 block_site_main_menu: Restyle moving. 2020-10-16 14:50:21 +02:00
Luca Bösch
d1c884a56a MDL-65448 block_social_activities: Restyle moving. 2020-10-16 14:50:21 +02:00
Luca Bösch
411432c434 MDL-65448 gradebook: Restyle moving. 2020-10-16 14:50:21 +02:00
Sara Arjona
149fdcf075 weekly release 4.0dev 2020-10-16 13:18:32 +02:00
Sagar Ghimire
a0ffd0de5f MDL-68284 gradebook: Prevent exposing hidden quiz grade item 2020-10-16 15:08:08 +11:00
Jake Dallimore
e19669e432 Merge branch 'master_MDL-47178' of https://github.com/golenkovm/moodle 2020-10-16 11:52:09 +08:00
Jun Pataleta
3ae9f39c5c Merge branch 'MDL-69266-master' of https://github.com/HuongNV13/moodle 2020-10-16 10:09:47 +08:00
Huong Nguyen
0ee64fbc9c MDL-69266 qtype_ddwtos: 'unlimited' options fail in 3.9 2020-10-15 19:44:35 +07:00
Adrian Greeve
a83c69c2f5 Merge branch 'MDL-69549-master-7' of git://github.com/andrewnicols/moodle 2020-10-15 15:10:05 +08:00
Jun Pataleta
f720b77ab6 Merge branch 'MDL-69583-master' of git://github.com/ferranrecio/moodle 2020-10-15 13:56:47 +08:00
Jun Pataleta
8252b24f95 Merge branch 'MDL-69520-master' of git://github.com/sarjona/moodle 2020-10-15 13:53:26 +08:00
Simey Lameze
d6c5df42a4 MDL-69549 mod_resource: content export implementation 2020-10-15 13:45:59 +08:00
Andrew Nicols
bf535c522d MDL-69549 mod_page: Content export implementation 2020-10-15 13:45:59 +08:00
Andrew Nicols
1e6f81659e MDL-69549 mod_folder: Content export implementation 2020-10-15 13:45:59 +08:00
Andrew Nicols
deb400c6bf MDL-69549 core: Add context export API 2020-10-15 13:45:58 +08:00
Andrew Nicols
e5371191c6 Merge branch 'MDL-69739-master' of https://github.com/clransom/moodle 2020-10-15 13:16:32 +08:00
Eloy Lafuente (stronk7)
7a478c3211 Merge branch 'MDL-69813' of https://github.com/paulholden/moodle into master 2020-10-14 22:47:02 +02:00
Eloy Lafuente (stronk7)
76cfbfc5bc Merge branch 'MDL-63805-master' of git://github.com/jleyva/moodle into master 2020-10-14 21:22:02 +02:00
Eloy Lafuente (stronk7)
19b0f08cc2 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.
2020-10-14 18:57:16 +02:00