2622 Commits

Author SHA1 Message Date
Adrian Greeve
a0ba1ae381 Merge branch 'MDL-65843-task-overrides' of https://github.com/jamie-catalyst/moodle 2020-11-19 11:29:01 +08:00
Jamie Stamp
3a232840a5 MDL-65843 tasks: Allow schedules to be overridden in config 2020-11-18 12:44:05 +00:00
Andrew Nicols
ba34d6e225 MDL-70148 behat: Update steps for keyboard 2020-11-17 15:14:43 +08:00
Andrew Nicols
9c35ea1040 MDL-70148 behat: Add steps to send keys without an element 2020-11-17 15:14:43 +08:00
Marina Glancy
e30716a16e MDL-70130 core: allow to attach files from localrequestdir to emails
Co-authored-by: Paul Holden <paulh@moodle.com>
2020-11-06 10:02:04 +08:00
Andrew Nicols
931f36ce15 Merge branch 'MDL-69166-master-4' of git://github.com/rezaies/moodle 2020-10-27 12:47:50 +08:00
Shamim Rezaie
9d77bf7c9b MDL-69166 core: define payment as a subsystem and pg as a plugin type 2020-10-27 08:37:08 +11:00
Michael Hawkins
eb54686500 MDL-69559 course: Add capability and access checks for course download 2020-10-26 10:00:47 +08:00
Sara Arjona
6d6f30f298 Merge branch 'MDL-69553' of https://github.com/NeillM/moodle 2020-10-22 08:55:55 +02:00
Adrian Greeve
a9ab6a1db7 Merge branch 'MDL-69788' of https://github.com/paulholden/moodle 2020-10-22 09:08:50 +08: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
Neill Magill
b65c22de20 MDL-69553 output: Unit tests for loading multiline string defines 2020-10-21 10:08:54 +01:00
Paul Holden
59ec5b1851 MDL-69788 lang: fallback to all translations if misconfigured.
If given translation list contains only invalid entries, fallback
to returning the complete list of available language translations.
2020-10-16 14:33:39 +01:00
Andrew Nicols
deb400c6bf MDL-69549 core: Add context export API 2020-10-15 13:45:58 +08:00
Brendan Heywood
9fabe1dda5 MDL-66928 core: Move request dirs to system tmp instead of localcache 2020-10-13 14:17:39 +11:00
Víctor Déniz
c064f06ea1 Merge branch 'MDL-62678-core-fetch-notifications' of https://github.com/brendanheywood/moodle 2020-10-06 22:59:24 +01:00
Eloy Lafuente (stronk7)
202a4cc6b8 Merge branch 'MDL-69746-Master' of https://github.com/tuanngocnguyen/moodle into master 2020-10-06 23:53:14 +02:00
Eloy Lafuente (stronk7)
9427ae82ce Merge branch 'MDL-69772-master-allcountrycodes' of git://github.com/mudrd8mz/moodle into master 2020-10-06 00:03:54 +02:00
Nathan Nguyen
6ced7617c5 MDL-69746 tool_replace: additional skip tables 2020-10-02 14:57:18 +10:00
Sara Arjona
32f5dbbb80 Merge branch 'MDL-69050-master-allowlist' of git://github.com/mudrd8mz/moodle into master 2020-10-01 14:51:11 +02:00
Jake Dallimore
0d0c8252d6 Merge branch 'MDL-69573-Master' of https://github.com/tuanngocnguyen/moodle 2020-10-01 12:19:16 +08:00
Nathan Nguyen
10db3a0b0a MDL-69573 core_course: Make MAX_COURSES_IN_CATEGORY configurable 2020-09-30 16:02:39 +10:00
Brendan Heywood
f3844e595e MDL-62678 core: Improve efficiency of notifications and avoid ajax call 2020-09-30 13:55:30 +10:00
Jun Pataleta
83cf43b045 Merge branch 'MDL-69600-divertemails' of https://github.com/brendanheywood/moodle 2020-09-29 20:28:05 +08:00
Juan Leyva
417e5b9f84 MDL-65976 completion: New course completion message provider 2020-09-29 13:40:32 +02:00
Brendan Heywood
0983a1c3d1 MDL-69600 core: Expose divertallemails config in UI 2020-09-29 20:29:32 +10:00
David Mudrák
9ce768008c MDL-69050 lang: Stop using the term blacklist in mustache output engine 2020-09-24 19:41:58 +02:00
David Mudrák
dbaeeeb0ec MDL-69050 lang: Fix variables and methods names in curl_security_helper
The code has been using terms that were found exclusive and potentially
derogatory. Fixing the terms and making the variables and methods
consistent with the related admin settings.
2020-09-24 19:41:57 +02:00
David Mudrák
7bd57c30a1 MDL-69772 lang: Ignore misconfigured allcountrycodes filter
If the allcountrycodes filter contains only invalid values, ignore the
whole filter setting and make get_list_of_countries() return the full
list of all known countries, rather than empty list.
2020-09-24 18:14:43 +02:00
Brendan Heywood
6e935cc29c MDL-69718 core: Added support for TB and PT to display_size 2020-09-21 11:02:16 +10:00
Sara Arjona
7c99f40d61 Merge branch 'MDL-69521' of https://github.com/stronk7/moodle into master 2020-09-09 08:08:06 +02:00
Eloy Lafuente (stronk7)
74ee34fd87 MDL-69521 core: Move all comments in code from 4.1 to 3.11 2020-09-08 18:59:30 +02:00
Andrew Nicols
303119ad5b MDL-68974 admin: Unit tests for context parent/child test 2020-09-08 08:54:26 +02:00
Andrew Nicols
c8283518ad MDL-68974 admin: Unit tests for loginas 2020-09-08 08:54:26 +02:00
Eloy Lafuente (stronk7)
e02e90fa52 Merge branch 'MDL-55971' of https://github.com/paulholden/moodle into master 2020-09-03 00:50:39 +02:00
Peter Burnett
309f54bf81 MDL-67306 webservices: Added webservice for Grade category creation 2020-09-03 00:20:44 +02:00
Sara Arjona
124a368a11 Merge branch 'MDL-38350-master' of https://github.com/sammarshallou/moodle into master 2020-09-01 07:26:42 +08:00
Andrew Nicols
517ac3f3bb Merge branch 'master-MDL-67211_v6' of https://github.com/golenkovm/moodle 2020-08-27 12:47:59 +08:00
Mikhail Golenkov
674f126d0b MDL-67211 phpunit: Do not test the order of the running adhoc tasks. 2020-08-27 13:02:36 +10:00
Andrew Nicols
e471d82358 Merge branch 'MDL-66222-antivirus-reporting' of https://github.com/Peterburnett/moodle 2020-08-27 09:34:37 +08:00
Adrian Greeve
80326f90c4 Merge branch 'MDL-69419-master' of git://github.com/andrewnicols/moodle 2020-08-27 08:08:51 +08:00
Andrew Nicols
72616bfd46 MDL-69419 core: Task reset tests cannot use random test times
If a scheduled task which uses a 'R' field is picked, then the reset of
updated task times will not necessarily be correctly determined as the
randomisation is picked during reset.

This can lead to some random test failures.

Actively specifying a test which does not make use of the 'R' random
field time addresses this issue.
2020-08-26 09:57:47 +08:00
Andrew Nicols
23517d9034 Merge branch 'master-MDL-67211_v6' of https://github.com/golenkovm/moodle 2020-08-26 09:37:16 +08:00
Paul Holden
b670d3adb6 MDL-55971 dataformat: method to write exports to file storage. 2020-08-25 17:28:55 +01:00