8423 Commits

Author SHA1 Message Date
Adrian Greeve
a9ab6a1db7 Merge branch 'MDL-69788' of https://github.com/paulholden/moodle 2020-10-22 09:08:50 +08:00
Eloy Lafuente (stronk7)
284d0ae8f8 Merge branch 'MDL-66392' of https://github.com/paulholden/moodle into master 2020-10-21 19:43:13 +02:00
Paul Holden
cecd90ffec MDL-66392 analytics: make model output directory default to empty.
Falling back to path within $CFG->dataroot/models.
2020-10-21 18:04:26 +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
3e6892af4b Merge branch 'MDL-69513-dkim-settings' of https://github.com/brendanheywood/moodle 2020-10-21 11:57:11 +01: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)
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
Paul Holden
7337934484 MDL-69788 admin: validate language menu configuration. 2020-10-21 11:24:26 +01:00
Katie Ransom
ad7d432ebe MDL-69962 tool_usertours: Fix increase in included files 2020-10-19 10:45:26 +01:00
Brendan Heywood
1b47d4bc0e MDL-69513 email: Add support for email DKIM signatures 2020-10-19 16:20:24 +11:00
Jun Pataleta
f720b77ab6 Merge branch 'MDL-69583-master' of git://github.com/ferranrecio/moodle 2020-10-15 13:56:47 +08:00
Katie Ransom
51caf76655 MDL-69739 tool_usertours: Add tour-level CSS selector 2020-10-14 13:17:16 +01:00
Ferran Recio
fed691aa17 MDL-69583 tool_customlang: add CLI import 2020-10-14 11:59:17 +02:00
Ferran Recio
489f6f2684 MDL-69583 tool_customlang: add customization import 2020-10-13 13:26:21 +02:00
Jake Dallimore
502a5d8a74 Merge branch 'MDL-68292-admin-sesskey' of https://github.com/brendanheywood/moodle 2020-10-12 14:36:41 +08:00
Brendan Heywood
155b0da5a5 MDL-68292 core: Remove sesskey leakage on module pages 2020-10-12 17:10:03 +11:00
Jake Dallimore
411d12bc9c Merge branch 'MDL-68406-master' of git://github.com/jleyva/moodle 2020-10-12 09:50:56 +08:00
Paul Holden
96ec6ee826 MDL-69825 admin: externalpage class using a callback for access check.
Co-Authored-By: Marina Glancy <marina@moodle.com>
2020-10-09 15:09:09 +01:00
Juan Leyva
328396c0d5 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.
2020-10-09 09:59:15 +02:00
Jun Pataleta
b68708059f Merge branch 'MDL-69740' of https://github.com/timhunt/moodle 2020-10-09 11:56:54 +08:00
Eloy Lafuente (stronk7)
56be458c45 Merge branch 'MDL-69582-master' of git://github.com/ferranrecio/moodle into master 2020-10-08 22:44:21 +02:00
Thomas Wedekind
40fecef9d2 MDL-69582 tool_customlang: export cli script 2020-10-08 19:08:15 +02:00
Thomas Wedekind
1f4a5e485e MDL-69582 tool_customlang: add export langstring feature 2020-10-08 19:08:15 +02:00
Eloy Lafuente (stronk7)
2be470ab4b Merge branch 'MDL-69810-master' of git://github.com/jleyva/moodle into master 2020-10-08 16:36:48 +02:00
Sara Arjona
7941ada0ee Merge branch 'MDL-65451' of https://github.com/marinaglancy/moodle into master 2020-10-07 09:39:46 +02: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
Marina Glancy
7a9c8cbd3e MDL-65451 tool_uploaduser: move code away from index.php, add CLI script 2020-10-06 15:54:09 +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
Tim Hunt
3a048549de MDL-69740 Behat init: more progress info at the end of the install 2020-10-02 23:15:50 +01:00
Juan Leyva
09cc128f95 MDL-69810 tool_mobile: Return support contact information via WS 2020-10-02 21:02:10 +02:00
Nathan Nguyen
6ced7617c5 MDL-69746 tool_replace: additional skip tables 2020-10-02 14:57:18 +10:00
Eloy Lafuente (stronk7)
e47c357cc1 Merge branch 'MDL-69586' of https://github.com/paulholden/moodle into master 2020-10-01 17:12:24 +02: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
David Mudrák
659e5282a4 MDL-69772 admin: Better validation for the allcountrycodes setting
The patch introduces a new admin_setting fiela type that can be used for
specifying comma separated list of countries. The field has inbuilt
validation so that only valid country codes can be inserted.
2020-10-01 13:39:46 +02:00
Sara Arjona
a8d07a8737 MDL-69050 lang: Fix few remaining places spotted during integration 2020-10-01 13:02:48 +02:00
Sara Arjona
6bb0262ed8 Merge branch 'MDL-68098-master' of git://github.com/dpalou/moodle into master 2020-10-01 12:56:16 +02:00
Ferran Recio
757f832ffc MDL-69582 tool_customlang: fix options layout 2020-10-01 11:08:37 +02:00
Ferran Recio
55c0e80595 MDL-69582 tool_customlang: add label to textarea 2020-10-01 11:08:37 +02:00
Víctor Déniz
8787cfe6c5 Merge branch 'MDL-67841-master' of git://github.com/jleyva/moodle 2020-09-29 18:25:25 +01:00
Jun Pataleta
83cf43b045 Merge branch 'MDL-69600-divertemails' of https://github.com/brendanheywood/moodle 2020-09-29 20:28:05 +08:00
Brendan Heywood
0983a1c3d1 MDL-69600 core: Expose divertallemails config in UI 2020-09-29 20:29:32 +10:00
Juan Leyva
fada51aa32 MDL-67841 tool_mobile: Inform about last access with the app 2020-09-28 21:40:08 +02:00
Víctor Déniz
8512efb07e Merge branch 'MDL-69644' of https://github.com/paulholden/moodle 2020-09-28 20:33:35 +01:00
Paul Holden
6a2720b0e6 MDL-69586 tool_usertours: use specified user in privacy prefs export. 2020-09-25 09:13:14 +01:00
David Mudrák
7a079a890b MDL-69050 lang: Fix the variable name in the admin/cli/svgtool.php 2020-09-24 19:41:58 +02:00
David Mudrák
801ee23427 MDL-69050 lang: Improve the wording of the comments
Stop using the terms whitelist/blacklist when used to allow/deny things.
2020-09-24 19:41:58 +02:00
David Mudrák
e7806fa918 MDL-69772 admin: Fix legacy coding style on Location settings admin page
No actual change here. Just polishing the coding style and adding
fulltree check.
2020-09-24 18:14:44 +02:00