Commit graph

1793 commits

Author SHA1 Message Date
Bas Brands
2d81fc6f65 MDL-69878 core_message: always show message drawer close icon 2020-11-26 12:51:52 +01:00
David Matamoros
873e8961e5 MDL-69411 core_message: Fix return structure for empty result set
Passing a timefrom higher than last message timecreated needs to
return a formatted response so it does not break ws.
2020-11-23 19:25:42 +01:00
Andrew Nicols
5b9b1f07e6 MDL-70148 behat: Update steps for keyboard 2020-11-17 15:14:43 +08:00
Eloy Lafuente (stronk7)
4aa83d92bf MDL-70146 upgrade: add 3.10.0 separation line to all upgrade scripts 2020-11-07 23:26:09 +01:00
Eloy Lafuente (stronk7)
b0a1b4ce8b MDL-70089 versions: bump all versions and requires near release
version = 2020110900 release version
requires= 2020110300 current beta+ (week6roll1) version

Note that, because we are under parallel development period,
this is being done in the branch that is going to be released
(MOODLE_310_STABLE already existing) for Moodle 3.10.0 and
not in master, that is the one getting the bump under normal
(non-parallel) periods.
2020-11-03 19:34:52 +01:00
Juan Leyva
63da614e4f MDL-70081 airnotifier: Add missing device type in token registration 2020-11-03 01:25:57 +01:00
Matteo Scaramuccia
4ca3d0a0ae MDL-70042 message_popup: Trivial savepoint comment cleanup 2020-10-28 23:00:48 +01:00
Matteo Scaramuccia
75c793f830 MDL-70042 message_popup: progress bar on upgrade only when necessary 2020-10-28 23:00:32 +01:00
Jake Dallimore
0a43a459ba Merge branch 'MDL-68438_310' of https://github.com/t-schroeder/moodle into MOODLE_310_STABLE 2020-10-22 09:30:48 +08:00
Eloy Lafuente (stronk7)
46606b3ddd 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:05 +02:00
Eloy Lafuente (stronk7)
35bc26b516 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:05 +02:00
Eloy Lafuente (stronk7)
106c64ac24 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"
2020-10-21 12:46:05 +02:00
Eloy Lafuente (stronk7)
ddf72dd60d 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:05 +02:00
Eloy Lafuente (stronk7)
d81a94807b 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:46:04 +02:00
Tim Schroeder
3fcba4be5e
MDL-68438 message: fixed email format change with messaging disabled 2020-10-21 11:29:15 +02:00
Eloy Lafuente (stronk7)
eb4c7963c0 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:29 +02:00
Jake Dallimore
2cb45addb1 Merge branch 'MOODLE_310_MDL-69848' of https://github.com/golenkovm/moodle into MOODLE_310_STABLE 2020-10-14 09:42:43 +08:00
Simon Mok
1a7928173b MDL-68070 messaging: Fix error when personal notification is disabled 2020-10-13 23:40:46 +02:00
Simey Lameze
decd480c42 MDL-65743 lib: add XMPPHP namespace and update calls 2020-10-12 13:10:12 +08:00
Mikhail Golenkov
bec49592ce MDL-69848 upgrade: Delete notifications in chunks 2020-10-05 13:13:51 +11:00
Sara Arjona
7db1a61a72 Merge branch 'MDL-69050-310-allowlist' of git://github.com/mudrd8mz/moodle into MOODLE_310_STABLE 2020-10-01 14:51:12 +02:00
Sara Arjona
e2a73965ca Merge branch 'MDL-68098-310' of git://github.com/dpalou/moodle into MOODLE_310_STABLE 2020-10-01 12:56:23 +02:00
David Mudrák
19fe7f27a8 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:32:40 +02:00
Bas Brands
02829c03c1 MDL-69454 core_search: message search 2020-09-23 17:36:14 +02:00
Bas Brands
1fdb4fda4a MDL-69454 core_search: consistent navbar search 2020-09-23 17:36:14 +02:00
Dani Palou
e16b858ff9 MDL-68098 ws: Add unit tests to test mathjax in WS 2020-09-23 12:08:52 +02:00
Dani Palou
f4bdb898c7 MDL-68098 ws: Fix WebServices broken by filters HTML 2020-09-23 12:08:40 +02:00
Sara Arjona
c83543095a Merge branch 'MDL-69521_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2020-09-09 08:08:29 +02:00
Eloy Lafuente (stronk7)
8452418666 MDL-69521 core: Move all comments in code from 4.1 to 3.11 2020-09-08 19:01:36 +02:00
Mathew May
1bc2a3b345 MDL-63261 messaging: Final 3.6 deprecations 2020-09-07 09:09:07 +08:00
Bas Brands
49f1803c9d MDL-67735 theme_boost: remove bs2 and bs4alpha compatibility css 2020-08-19 08:29:50 +08:00
Adrian Greeve
b713aa80b4 Merge branch 'MDL-68423-master' of git://github.com/ferranrecio/moodle 2020-08-13 11:02:04 +08:00
Eloy Lafuente (stronk7)
ff7ec42832 Merge branch 'MDL-67831-master' of git://github.com/bmbrands/moodle into master 2020-08-05 00:45:20 +02:00
Eloy Lafuente (stronk7)
f8666013b3 Merge branch 'MDL-68390-master' of git://github.com/andrewnicols/moodle into master 2020-07-29 19:34:45 +02:00
Bas Brands
8e039a5662 MDL-67831 core_message: use space available for message index page
- the prevents the message reply box from being out of view when
a user has many conversations.
2020-07-23 11:34:19 +02:00
Ferran Recio
1d8cbfb81b MDL-68423 message: avoid self-xss when send a message 2020-07-20 19:48:17 +02:00
Paul Holden
809be05428 MDL-65819 message: send contact requests using recipient language. 2020-07-15 20:24:44 +01:00
Andrew Nicols
7cc18dc2ad MDL-68390 js: Update to use Aria mod 2020-07-15 14:40:49 +08:00
Mathew May
b44495cecc MDL-63966 messaging: Make tests pass after deprecation 2020-07-06 11:44:04 +08:00
Mathew May
d0ba284421 MDL-63966 core: Remove tests covering removed functions 2020-07-06 11:44:04 +08:00
Andrew Nicols
e6ff582e1a Merge branch 'MDL-69150' of https://github.com/paulholden/moodle 2020-07-01 08:34:30 +08:00
Paul Holden
9071b2314f MDL-69151 message_airnotifier: start output before accesskey request.
This allows debugging generated by the request to be shown on the
page.
2020-06-26 17:34:02 +01:00
Paul Holden
54393e223a MDL-69150 message_airnotifier: correct apps portal link. 2020-06-26 17:13:56 +01:00
Eloy Lafuente (stronk7)
b764343e5a MDL-69044 upgrade: add 3.9.0 separation line to all upgrade scripts 2020-06-14 13:08:09 +02:00
Eloy Lafuente (stronk7)
115cc0214f MDL-68973 versions: bump all versions and requires near release
version = 2020061500 release version
requires= 2020060900 current rc1 (week7roll1) version
2020-06-09 16:23:09 +02:00
Andrew Nicols
9777b0fa19 Merge branch 'MDL-68312-master-2' of git://github.com/rezaies/moodle 2020-06-03 08:00:57 +08:00
Shamim Rezaie
65b73df1c9 MDL-68353 message: enclose privacy settings within a fieldset 2020-05-29 14:37:05 +10:00
Shamim Rezaie
21d1a03b51 MDL-68312 output: Fix empty links
If a link contains no text, the function or purpose of the link will not
be presented to the user. This can introduce confusion for keyboard and
screen reader users.
2020-05-28 19:18:38 +10:00
Jun Pataleta
87decf6e00 Merge branch 'MDL-65796' of https://github.com/paulholden/moodle 2020-05-22 11:50:53 +08:00
Andrew Nicols
c225a42c19 Merge branch 'MDL-67700-master' of git://github.com/ferranrecio/moodle 2020-05-22 10:51:31 +08:00