22233 Commits

Author SHA1 Message Date
David Mudrák
e576fef1fa MDL-69998 lang: Fix reworded strings in Behat test scenarios 2020-10-27 11:32:10 +01:00
Helen Foster
dd7a1d60e2 MDL-69998 lang: Import fixed English strings (en_fix) 2020-10-27 11:32:10 +01:00
Sara Arjona
ca2db4be71 Merge branch 'MDL-67673' of https://github.com/stronk7/moodle into master 2020-10-21 17:38:05 +02:00
Víctor Déniz
06fdc6aacf Merge branch 'MDL-69392-master' of git://github.com/junpataleta/moodle 2020-10-21 16:27:05 +01:00
Eloy Lafuente (stronk7)
8183def69e MDL-67673 phpunit: Move tests to use new phpunit_dataset
- Make advanced_testcase old methods to use new ones internally.
- Fix advanced_testcase, statslib, mod/quiz and mod/data tests.

Originally MDL-64600
2020-10-21 12:46:00 +02:00
Eloy Lafuente (stronk7)
3a5641cb74 MDL-67673 phpunit: Remove deprecated assertEquals() params
The optional parameters of assertEquals() and assertNotEquals()
are deprecated in PHPUnit 8 (to be removed in PHPUnit 9):

- delta => use assertEqualsWithDelta()
- canonicalize => use assertEqualsCanonicalizing()
- ignoreCase => use assertEqualsIgnoringCase
- maxDepth => removed without replacement.

More info @ https://github.com/sebastianbergmann/phpunit/issues/3341

Initial search done with:

ag 'assert(Not)?Equals\(.*,.*,' --php

Then, running tests and fixing remaining cases.
2020-10-21 12:46:00 +02:00
Eloy Lafuente (stronk7)
40de097e65 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\('
2020-10-21 12:46:00 +02:00
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)
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
Jun Pataleta
6ca0291f5a Merge branch 'MDL-37226-master' of git://github.com/lucaboesch/moodle 2020-10-21 17:46:55 +08:00
Jun Pataleta
e58bb28610 MDL-69392 mod_forum: Colour contrast check for locked discussions 2020-10-21 14:11:39 +08: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
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
Luca Bösch
9340b2a18e MDL-37226 assign: align select all header checkbox 2020-10-16 16:09:09 +02:00
Adrian Greeve
a83c69c2f5 Merge branch 'MDL-69549-master-7' of git://github.com/andrewnicols/moodle 2020-10-15 15:10:05 +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
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
Víctor Déniz
e335eb092a Merge branch 'MDL-68900-master' of https://github.com/sumitnegi933/moodle 2020-10-14 12:35:26 +01:00
Juan Leyva
1a09fc8d34 MDL-63805 glossary: New WS mod_glossary_prepare_entry_for_edition 2020-10-14 12:46:41 +02:00
Juan Leyva
b4a30d7acc MDL-63805 glossary: New WS mod_glossary_update_entry 2020-10-14 12:46:41 +02:00
Juan Leyva
3f5d99063b MDL-63805 glossary: Glossary API refactor 2020-10-14 12:46:41 +02:00
Eloy Lafuente (stronk7)
05f18c4d01 Merge branch 'MDL-63806-master' of git://github.com/jleyva/moodle into master 2020-10-13 22:26:27 +02:00
Andrew Nicols
60dc6b01b5 Merge branch 'MDL-67654' of https://github.com/paulholden/moodle 2020-10-13 07:57:15 +08:00
Paul Holden
bdfe918b13 MDL-67654 mod_forum: formchangechecker for discussion inline replies. 2020-10-12 23:32:50 +01:00
Adrian Greeve
8a22784785 Merge branch 'master-MDL-69818' of https://github.com/golenkovm/moodle 2020-10-12 14:49:40 +08:00
Juan Leyva
8441d551ea MDL-63806 glossary: New WS mod_glossary_delete_entry 2020-10-09 09:42:56 +02:00
Juan Leyva
f9b56649e7 MDL-63806 glossary: Return user permissions for entries in WS 2020-10-09 09:42:56 +02:00
Juan Leyva
a7a1f0d48c MDL-63806 glossary: Move delete code to API function 2020-10-09 09:42:56 +02:00
Adrian Greeve
611a42b934 Merge branch 'MDL-68384-fix-spec-violations' of https://github.com/cengage/moodle 2020-10-09 12:06:37 +08:00
Sumit Negi
bd6449fca9 MDL-68900 mod_forum: permission check for user who is viewing timed post
Pass current user object to post builder as argument, so that the permission to view timed post
will check with current user, who is viewing the posts instead of user who made that post.
2020-10-08 12:47:31 +05:30
Adrian Greeve
b239ee8f1c Merge branch 'MDL-69805-master' of https://github.com/dravek/moodle 2020-10-08 15:01:35 +08:00
Jake Dallimore
87abb87ebd Merge branch 'MDL-69192-master-behat' of https://github.com/andrewnicols/moodle 2020-10-08 09:22:21 +08:00
Andrew Nicols
36419cf8d5 MDL-68665 assignfeedback_editpdf: Coding style fixes 2020-10-08 08:23:03 +08:00
Andrew Nicols
814ec28fef Merge branch 'MDL-68665-assign-stamp-cache' of https://github.com/jamie-catalyst/moodle 2020-10-08 08:17:01 +08:00
Andrew Nicols
f908e8beef MDL-69192 mod_assign: Stop clicking OK on non-existent modal 2020-10-08 08:04:10 +08:00
Jamie Stamp
e522d6dad4 MDL-68665 assignfeedback_editpdf: Fix systemsstamp URLs 2020-10-07 16:26:16 +01:00
Jamie Stamp
74b4d6368a MDL-68665 assignfeedback_editpdf: Add filearea to persist stamps 2020-10-07 16:25:59 +01:00
Andrew Nicols
675d90a39a Merge branch 'MDL-69192' of https://github.com/willob99/moodle 2020-10-07 13:15:08 +08:00
Andrew Nicols
b702feb38d Merge branch 'MDL-67275-master-post_noun_verb' of git://github.com/mudrd8mz/moodle 2020-10-07 12:16:39 +08:00
Eloy Lafuente (stronk7)
fd46cc5b37 Merge branch 'MDL-65074' of https://github.com/hitteshahuja/moodle into master 2020-10-05 23:12:01 +02:00
Eloy Lafuente (stronk7)
79e1ab91d4 Merge branch 'master-MDL-69752' of https://github.com/golenkovm/moodle into master 2020-10-05 10:54:45 +02:00
Mikhail Golenkov
33f4559da1 MDL-69818 mod_feedback: Fix item dependency during activity restoration 2020-10-04 18:25:43 +11:00
Mikhail Golenkov
0f7c2b92f6 MDL-69752 mod_data: Format module intro on Database activities page 2020-10-04 13:44:17 +11:00
Mikhail Golenkov
252e85be58 MDL-53966 lesson: Allow maximum number of attempts to be unlimited 2020-10-04 13:20:39 +11:00
Víctor Déniz
b39c286ea4 Merge branch 'MDL-69572-Master' of https://github.com/tuanngocnguyen/moodle 2020-10-01 23:29:22 +01:00