634 Commits

Author SHA1 Message Date
Andrew Nicols
196ed7530b
Merge branch 'MDL-69231-401' of https://github.com/lameze/moodle into MOODLE_401_STABLE 2023-06-15 10:56:53 +08:00
Andrew Nicols
a6fde372ab
Merge branch 'MDL-78026-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-06-08 11:36:54 +08:00
Petr Skoda
79981290d9 MDL-76683 core_group: fix template 2023-06-06 09:30:27 +00:00
Simey Lameze
fc10598d63 MDL-69231 behat: remaining work for role capability generator
This commit does few things:
* Unify data generators usage to role short name.
* Replace remaining manual steps to use the new data generator.
* Also replaced other manual steps to set config to use data generators.
* Tidy up of some tests, aligning pipes and splitting one line steps into multiple lines.
* Fixes tests to have one Given/When/Then per scenario.
2023-06-02 12:42:35 +08:00
Andrew Nicols
b67b10af29 MDL-69231 behat: Update tests to use new generator 2023-06-02 12:42:35 +08:00
Paul Holden
017f8a9c4d
MDL-73138 group: remove double encoding of group/role names. 2023-05-26 10:25:50 +01:00
Paul Holden
7a23da59ce
MDL-78026 group: format retrieved group names from external methods. 2023-05-16 10:10:06 +01:00
Angelia Dela Cruz
03035dcf71 MDL-77413 Behat: Minor changes to optimise the existing tests 2023-02-28 17:22:25 +08:00
Angelia Dela Cruz
93525ebdd9 MDL-77413 Behat: Add coverage to verify groups can have a picture 2023-02-28 17:22:04 +08:00
Paul Holden
4ecd652189 MDL-76221 reportbuilder: improve report test generator methods.
Test generators for creating report columns, filters and conditions
now allow for setting all persistent properties.
2023-01-04 10:56:23 +00:00
Paul Holden
b10b89ec74 MDL-75349 group: implement groups datasource for custom reporting.
Create new entities for exposing report data on course groups and
groupings, joining to existing course/user entities to provide data
for the reportbuilder editor.
2022-10-20 12:30:06 +01:00
Sujith Haridasan
73d604369d MDL-71062 core: Step 1 deprecation of print_error function 2022-07-13 08:20:54 +05:30
Anastasios Bithas
3df0908e72 MDL-22570 group: Export groups/groupings to ods/xls/txt
A new feature that enables teachers to export groups and
groupings through the groups overview page, making use of the dataformat api.
2022-05-11 03:00:36 +03:00
Mihail Geshoski
1060ee827c MDL-73645 core_group: Update breadcrumb nodes 2022-03-02 13:00:25 +08:00
Eloy Lafuente (stronk7)
100bc51f1d MDL-73485 phpunit: externallib, generator and filter tescase names
All externallib_test, generator_test and filter_test classes:

- Namespaced with component[\level2-API]
- Moved to level2-API subdirectory when required.
- Fixed incorrect use statements with leading backslash.
- Changed code to point to global scope when needed.
- Fix some relative paths and comments here and there.
- All them passing individually.
- Complete runs passing too.

Special mention to tests under testing/tests:

1) The core_testing component doesn't exist.
2) But testing/tests are allowed because there is a suite pointing to it (phpunit.xml).
3) So, the only possible namespace for them is "core".
4) And to avoid problems with other core testcases (under lib/tests)
   they have been renamed to have testing_xxxx as prefix.

Finally, also modified calendar/tests/events/events_test.php because it uses
some renamed (core_calendar_externallib_testcase => \core_calendar\externallib_test)
classes.
2022-01-21 19:48:23 +01:00
Eloy Lafuente (stronk7)
511801cb46 MDL-73352 phpunit: lib_test and locallib_test testcase names
All lib_test and locallib_test classes:

- Namespaced with component (and API whenever makes sense).
- Fixed incorrect use statements with leading backslash.
- Changed code to point to global scope when needed or add new uses.
- All them passing individually.
- Complete runs passing too.

Special mention to tests under login/tests:

1) The core_login component doesn't exist.
2) But login/tests are allowed because there is a suite pointing to it (phpunit.xml).
3) So, the only possible namespace for them is "core".
4) And to avoid problems with other core testcases (under lib/tests)
   they have been renamed to have login_xxxx as prefix.
2021-12-30 16:21:42 +01:00
Eloy Lafuente (stronk7)
e4a2d9c1d4 MDL-73348 phpunit: normalize all privacy provider tests
As far as now all them have correct privacy level2 namespace:
- Move them to "privacy" subdir.
- Rename the files to "provider_test.php", this includes old
  privacy_test.php and privacy_provider_test.php files
- Rename the testcase to provider_test too (to match file name)

Also, change some relative paths and comments to point to new
locations.
2021-12-17 14:21:02 +01:00
Eloy Lafuente (stronk7)
57e6fb7ad9 MDL-73348 phpunit: privacy and privacy_provider testcase names
All privacy_test and privacy_provider_test classes:

- Namespaced with component\privacy.
- Fixed incorrect use statements with leading backslash.
- Changed code to point to global scope when needed.
- Renamed a few files to make all be privacy_test or privacy_provider_test.php
- All them passing individually.
- Complete runs passing too.
2021-12-17 14:21:02 +01:00
abgreeve
fcd4de8639 MDL-72090 navigation: Update to behat feature files for navigation.
This updates feature files to use the new steps to navigate to certain
pages.
2021-12-09 11:13:35 +08:00
Peter Dias
3cddee197f MDL-72875 course: Update behat test to use the tertiary nav 2021-12-02 13:09:12 +08:00
Peter Dias
e0d7dbd022 MDL-72875 course: Introduce tertiary nav in participants
- Introduce tertiary nav in the participants page
2021-12-02 13:09:12 +08:00
Huong Nguyen
ffca35b805 MDL-72896 Accessibility: Make html_table responsive
The tables are generated by html_table will responsive across viewports
2021-11-09 09:41:27 +07:00
Jun Pataleta
385438b463 Merge branch 'MDL-72589' of https://github.com/stronk7/moodle 2021-09-16 09:46:56 +08:00
Eloy Lafuente (stronk7)
c60ea2cde3 Merge branch 'MDL-72432-master' of https://github.com/katerynadegtyariova/moodle 2021-09-16 00:37:10 +02:00
Eloy Lafuente (stronk7)
433212a33e Merge branch 'MDL-72093-master' of git://github.com/mihailges/moodle 2021-09-16 00:32:47 +02:00
Eloy Lafuente (stronk7)
9f9fe79c26 MDL-72589 behat: Add @skip_chrome_zerosize to failing scenarios
All the scenarios failing with Chrome zero-size errors are
getting the @skip_chrome_zerosize to be able to keep them apart from
regular runs. See MDL-71108 for more information about
that error.

They will be run by another job, specifically using that tag to
keep them failing and under control.
2021-09-15 20:25:11 +02:00
Mihail Geshoski
7d821080f0 MDL-72093 navigation: Update behat tests 2021-09-14 12:02:35 +08:00
Paul Holden
e814b5f0a0 MDL-71846 group: consistent escaping of user/group names. 2021-08-31 12:15:41 +01:00
Kateryna Degtyariova
b25e1738a6 MDL-72342 groups: Use get_columns() to handle BOM in CSV
Ensuring that BOM was properly removed from input CSV file by using get_columns() instead of parsing the raw data.
2021-08-24 10:33:29 +10:00
Huong Nguyen
36d5b918f0 MDL-58592 group: Remove group description on the groups overview page 2021-06-02 09:29:36 +07:00
ScottVerbeek
8bd9dca9a8 MDL-66673 groups: Stop notice when messaging system is disabled 2021-04-23 08:52:48 +10:00
Katie Ransom
d916cd77ca MDL-71186 core_user: show custom user fields in group management screens 2021-04-15 15:28:17 +01:00
sam marshall
5e72715e4f MDL-71099 Lib: Move new user_fields class from core to core_user
This class would belong more appropriately within the 'user' API
(core_user) instead of within the 'core' API, since it is
directly related to user data.

Since the class has only just been added to Moodle, now is a good
time to move it.
2021-03-25 13:47:23 +00:00
Eloy Lafuente (stronk7)
8a14a7bd22 MDL-71036 phpunit: assertContains() now performs strict comparison
The methods assertContains() and assertNotContains() now perform
strict (type and value) comparison, pretty much like assertSame()
does.

A couple of new assertContainsEquals() and assertNotContainsEquals()
methods have been created to provide old (non-strict) behavior, pretty
much like assertEquals() do.

Apart from replacing the calls needing a relaxed comparison to those
new methods, there are also a couple of alternative, about how to
fix this, depending of every case:

- If the test is making any array_values() conversion, then it's better
  to remove that conversion and use assertArrayHasKey(), that is not
  strict.
- Sometimes if may be also possible to, simply, cast the expectation
  to the exact type coming in the array. I've not applied this technique
  to any of the cases in core.

Link: https://github.com/sebastianbergmann/phpunit/issues/3426
2021-03-11 23:04:31 +01:00
sam marshall
558cc1b85e MDL-45242 Lib: Replace calls to deprecated functions
In all cases changes have been kept to a minimum while not making
the code completely horrible. For example, there are many instances
where it would probably be better to rewrite a query entirely, but
I have not done that (in order to reduce the risk of changes).
2021-03-10 10:57:10 +00:00
Jun Pataleta
666cce74e5 MDL-48269 group: Remove additional occurrences of hidepicture 2021-02-16 12:48:44 +08:00
Frederic Massart
3aed37ee4d MDL-48269 group: Remove the option to hide the picture of a group
Plus additional amendments to Fred's original commit:
1. Updating the version numbers
2. Merging the original two-step upgrade below into one for simplicity:
   1. Deleting the pictures for groups with hidepicture set to 1; and
   2. Dropping the hidepicture field itself.
3. Converted array() usages to the short syntax [].
2021-02-16 12:46:58 +08:00
Andrew Nicols
bce46258a4 MDL-66979 group: Replace direct element interaction with steps
The W3C WebDriver leads to faster operation of individual steps which
highlights where WebDriver is moving to a new step faster than the
browser can process it.

The solution here is to use the `execute` function to interact with the
browsers as this makes use of the various wait and check steps.
2021-01-22 14:52:10 +08:00
Andrew Nicols
31402aa406 MDL-69107 user: Fix autocomplete usages 2020-12-16 07:50:56 +08:00
Jun Pataleta
48397d35ab Merge branch 'MDL-68167-master' of git://github.com/rezaies/moodle 2020-10-30 13:17:02 +08:00
Shamim Rezaie
ce484f2872 MDL-68167 user: Improve keyboard navigation on autocomplete fields 2020-10-30 14:43:00 +11:00
David Mudrák
e576fef1fa MDL-69998 lang: Fix reworded strings in Behat test scenarios 2020-10-27 11:32:10 +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
Paul Holden
ad7d46ed2e MDL-63387 course: use renamed role names, update Behat tests.
Specify that we want both role names (renamed course role plus
original).
2020-09-01 12:05:20 +01:00
Andrew Nicols
d8d05f04d9 Merge branch 'MDL-26401-master' of git://github.com/lameze/moodle 2020-08-19 08:50:37 +08:00
Bas Brands
4394f9e358 MDL-67735 theme_boost: remove bs2 and bs4alpha compatibility css 2020-08-17 08:16:42 +00:00
Simey Lameze
f9cfa28338 MDL-26401 group: change import to use csv_import_reader class 2020-08-12 16:35:23 +08:00
Simey Lameze
8668a5a536 MDL-26401 group: add delimiter and encoding fields to import 2020-08-11 08:35:25 +08:00
Michael Hawkins
5187e7c515 MDL-68612 core: Behat tests updated to support new participants filter
Existing tests have been updated, rewritten and/or expanded to support
the new participants filter.
2020-06-03 14:29:22 +08:00
Andrew Nicols
7afd16ad84 MDL-66109 behat: Require newline at EOF
This change enables the gherkinlint rule to require a new line at the
end of the file. This change is in keeping with existing Moodle coding
style guidelines.
2020-05-11 11:07:49 +08:00