2613 Commits

Author SHA1 Message Date
Sara Arjona
09cfed9186 Merge branch 'MDL-70439-master' of https://github.com/DinhHien0307/moodle 2021-02-03 13:03:02 +01:00
hiendinh
c3b7e5fe16 MDL-70439 Profile: Indicate user email address settings on own profile 2021-01-27 13:37:18 +07:00
Andrew Nicols
a61c4fbce3 MDL-66979 behat: Switch to generators
These steps were creating content manually in an unnecessary fashion. I
had to debug some issues with features in these areas so took the time
to update them to make use of data generators, which are significantly
faster.
2021-01-22 14:52:11 +08:00
Andrew Nicols
31402aa406 MDL-69107 user: Fix autocomplete usages 2020-12-16 07:50:56 +08:00
Jun Pataleta
a6e4ea65a4 MDL-69145 core_user: Set default filter to ALL 2020-12-09 10:51:12 +08:00
Gareth Barnard
ac7cf94d96
MDL-70267 ux, theme: Course user profile inconsistent page layout. 2020-11-29 23:48:56 +00:00
Andrew Nicols
5a929185c5 Merge branch 'MDL-65852-master' of git://github.com/ilya-catalyst/moodle 2020-11-26 12:46:10 +01:00
Eloy Lafuente (stronk7)
9860796cbb Merge branch 'MDL-42382-master' of git://github.com/NoelDeMartin/moodle into master 2020-11-26 12:46:10 +01:00
Ilya Tregubov
b71615f5e2 MDL-65852 user: Fix permission check to download course participants. 2020-11-25 11:25:34 +02:00
Eloy Lafuente (stronk7)
6ca32e21e5 Merge branch 'MDL-70148-master' of git://github.com/andrewnicols/moodle into master 2020-11-17 23:12:56 +01:00
Noel De Martin
c74fa727db MDL-42382 admin: Add replace filters button
Co-authored-by: Luca Bösch <luca.boesch@bfh.ch>
Co-authored-by: Andrei Bautu <abautu@gmail.com>
2020-11-17 10:21:40 +01:00
Andrew Nicols
ba34d6e225 MDL-70148 behat: Update steps for keyboard 2020-11-17 15:14:43 +08:00
Paul Holden
5fb73c9639 MDL-69964 course: toggle participant checkboxes in root element.
For a given toggleGroup, the relevant action elements are not
necessarily descendants of the same tableRoot element, on the
course participants page.
2020-11-16 17:44:17 +00:00
andreasschenkel
85994027bd MDL-69844 user: Fix no email in download_participants_table
Only include eMail in download_participants_table 
if selected in showuseridentity 
($identityfieldsselect)
2020-11-03 12:34:28 +01:00
Shamim Rezaie
c682aa5f97 MDL-68167 user: Fix missing label for participants filter input fields 2020-10-30 16:01:38 +11:00
Shamim Rezaie
cb0bf0ffe0 MDL-68167 lib: Clear single-select autocomplete elements with keyboard
Following MDL-57680, it should be possible to clear the selected option
using keyboard as well.
2020-10-30 16:01:38 +11:00
Shamim Rezaie
6fdfbc44f9 MDL-68167 user: Fix a hardcoded string to be read from lang pack 2020-10-30 16:01:38 +11:00
Shamim Rezaie
b6d733dd4e MDL-68167 lib: Fix label for autocomplete selection/suggestion box
The content of the autocomplete selection div is purged by javascript
so we have to move its label outside of it. aria-labeledby is the way
to go.

Each time the suggestion box is expanded, autocomplete js renders the
autocomplete suggestions template. So the label cannot be outside the
suggestions ul.
2020-10-30 16:01:38 +11:00
Shamim Rezaie
ceda24637d MDL-68167 user: filter elements should listen to accessibleChange event 2020-10-30 14:52:52 +11:00
Shamim Rezaie
b643c88682 MDL-68167 lib: Autocomplete selection to use listbox aria role
The aria-selected state cannot be used for the listitem role. The
autocomplete widget highly uses the aria-selected state internally.
2020-10-30 14:43:00 +11:00
Shamim Rezaie
ce484f2872 MDL-68167 user: Improve keyboard navigation on autocomplete fields 2020-10-30 14:43:00 +11: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
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
Paul Holden
2175216110 MDL-66648 user: consistent checks for linking to full profile.
The access checks for displaying a link to a users' full profile
now match the checks performed on the full profile page itself.
2020-09-14 20:22:07 +01:00
Mathew May
5a5f95e843 MDL-69240 tool_moodlenet: Clean MoodleNet profile field
Amended by: Eloy Lafuente (stronk7) <stronk7@moodle.org>
- adjust versions for every branch.
- modify verify_webfinger->profileurl external to PARAM_NOTAGS.
2020-09-07 17:44:41 +02:00
Paul Holden
0cfa744fd9 MDL-63387 user: show both role names on course participants page. 2020-09-01 12:05:20 +01:00
Andrew Nicols
d48a0a9a5d Merge branch 'MDL-61215-master' of git://github.com/sarjona/moodle 2020-08-20 07:14:15 +08:00
Eloy Lafuente (stronk7)
fbb0767536 MDL-69475 versions: bump all versions and requires in master
version = 2021052500 release version
requires= 2021052500 same than version

Why 20210525? (25th May 2021) ?

Because master is going to be Moodle 4.0, to be released
on November 2021. And, until then, we are going to have
a couple of "intermediate" releases:

- Moodle 3.10 to be released 9th November 2020. (2020110900)

  This version will be using versions from today to 2020110900
  (once it's released the YYYYMMDD part stops advancing).

- Moodle 3.11 to be released 10th May 2021. (2021051000)

  This version will be using versions from 3.10 release to 2021051000
  (once it's released the YYYYMMDD part stops advancing).

That means that all versions from today to 2021051000 are going
to be used by those 2 "intermediate" releases (3.10 and 3.11).

And we cannot use them in master, because it's forbidden to have
any overlapping of versions between branches (or different upgrade
paths will fail).

So, get that 2021051000, let's add it a couple of weeks to cover
the on-sync period (or a 2 weeks delay max!) and, the first version
that master can "own" in exclusive (without any overlap) is, exactly,
25th May 2021, hence our 20210525.
2020-08-18 00:47:15 +02:00
Sara Arjona
489cae2601 MDL-61215 core_user: use the new optimised_image filetype group
For the user profile picture (instead of the web_image which includes
SVG files).
2020-08-14 17:06:23 +02:00
Luca Bösch
4994817908 MDL-68334 user: Display name in footer as elsewhere. 2020-08-08 10:38:56 +02:00
Adrian Greeve
8fcba35fd8 Merge branch 'MDL-60932-master' of git://github.com/aanabit/moodle 2020-08-05 10:07:24 +08:00
Michael Hawkins
c2f188311e MDL-69336 lib: Reinstating tablelib column show/hide functionality
Also added behat testing for hide/show columns in participants table.
2020-08-04 15:18:39 +08:00
Amaia Anabitarte
becb9e8579 MDL-60932 core_user: Fix docs link for participants page
Co-authored by: David Mudrák <david@moodle.com>
2020-07-31 10:29:56 +02:00
Paul Holden
ca02422d66 MDL-69214 user: correct participant table forced group SQL. 2020-07-07 14:31:31 +01:00
Andrew Nicols
8d5926bead MDL-69026 user: Correct statuses => status in test 2020-06-12 10:03:06 +08:00
Andrew Nicols
8bcf74e9bc MDL-69026 user: Wrap sub-query in brackets
It is perfectly valid to have a query like:

Match None of the following:
- Role is ANY of the following:
-- 'Teacher'
-- 'Editing teacher'
-- 'Manager'; AND
- Keyword is NONE of the following:
-- 'Kevin'

However, due to the way in which the query is constructed, this leads to
a query which includes

    WHERE NOT ef.id IS NOT NULL
    AND NOT
        u.id IN (SELECT userid FROM {role_assignments} WHERE roleid IN (...) AND contextid IN (...))
    AND NOT
        NOT (u.firstname || ' ' || u.lastname LIKE '%Kevin%')

The use of NOT NOT is valid in Postgres, MariaDB, MySQL, and MSSQL, but
not in Oracle.

To counter this when the outer jointype is of type NONE, we must wrap
each of the inner WHERE clauses in a set of brackets, which makes the
query:

    WHERE NOT ef.id IS NOT NULL
    AND NOT
        (u.id IN (SELECT userid FROM {role_assignments} WHERE roleid IN (...) AND contextid IN (...)))
    AND NOT
        (NOT (u.firstname || ' ' || u.lastname LIKE '%Kevin%'))

Whilst Oracle does not support the use of `AND NOT NOT ...`, it does support
`AND NOT (NOT ...)`
2020-06-12 10:03:06 +08:00
Jun Pataleta
02b7fac93d Merge branch 'MDL-69017-master' of git://github.com/andrewnicols/moodle 2020-06-11 16:59:04 +08:00
Andrew Nicols
d3bfae8fcc MDL-69017 user: Show all links should work for students 2020-06-11 15:51:41 +08:00
Jun Pataleta
49a34f1593 Merge branch 'MDL-68912' of https://github.com/rlorenzo/moodle 2020-06-11 11:01:05 +08:00
Rex Lorenzo
330c871c3f MDL-68912 user: "Send a message" select all not working 2020-06-10 17:53:53 -07:00
Eloy Lafuente (stronk7)
5364577065 Merge branch 'MDL-68994-master' of git://github.com/andrewnicols/moodle 2020-06-10 23:31:11 +02:00
Victor Deniz Falcon
034ba327d0 Merge branch 'MDL-68980-master' of git://github.com/andrewnicols/moodle 2020-06-10 21:41:56 +01:00
Jun Pataleta
15823a94c1 Merge branch 'MDL-68989-master' of git://github.com/mickhawkins/moodle 2020-06-11 00:03:54 +08:00
Andrew Nicols
9a7bd66b4e MDL-68980 user: Add additional groupmode participants tests 2020-06-10 16:23:58 +08:00
Jake Dallimore
337e2e2b23 Merge branch 'MDL-68973' of https://github.com/stronk7/moodle 2020-06-10 16:13:57 +08:00
Jake Dallimore
2b983d29a0 Merge branch 'MDL-68977-master' of git://github.com/andrewnicols/moodle 2020-06-10 15:36:44 +08:00
Andrew Nicols
eb45751b7b MDL-68994 user: Reset filterverb value when resetting filter 2020-06-10 14:19:02 +08:00