Commit graph

3303 commits

Author SHA1 Message Date
Jun Pataleta
de4a2a1b9e Merge branch 'MDL-77092-master' of https://github.com/sammarshallou/moodle 2023-02-02 09:57:13 +08:00
Ilya Tregubov
939ef5197a Merge branch 'MDL-76135-master' of https://github.com/safatshahin/moodle 2023-02-01 15:47:12 +08:00
Andrew Nicols
2b6224a345 Merge branch 'MDL-75945-master' of https://github.com/meirzamoodle/moodle 2023-01-31 22:12:16 +08:00
sam marshall
b639c1455a MDL-77092 Behat: Expand all fieldsets fails with single fieldset
The Behat step to expand all fieldsets did not work if the page
contains only one fieldset.
2023-01-31 13:56:04 +00:00
Safat
e2d4a543b0 MDL-76135 core: Implement Guzzle cache middleware 2023-01-30 13:05:27 +11:00
Safat
7c5363eed3 MDL-76135 core: Implement the Guzzle library in core
This commit will implement the Guzzle library in core
to make it usable in different locations.

Co-Authored-By: Andrew Nicols <andrew@nicols.co.uk>
Co-Authored-By: Safat Shahin <safat.shahin@moodle.com>
2023-01-30 13:05:27 +11:00
Eloy Lafuente (stronk7)
0cbf52d3f4 MDL-76675 date: Only test all TZ names with PHPUNIT_LONGTEST enabled
It happens often that some timezone is renamed, split, added to the
IANAs list of timezones (that, for PHP is kept updated by the
php-timezonedb PECL extension).

When the information coming from the extension changes, all the
PHPUnit jobs in the world start failing (that's when CIs update
their PHP images, when devs update their packages, ...).

So, what we are doing here is to move that test that check for
every single string existing to be run only when PHPUNIT_LONGTEST
is enabled. That way only places running all tests will run that
one. And every other run just will skip it.

This corresponds to point 1 & 2 of the issue, lower impact in general
and, still be able to enable the tests to run.
2023-01-26 14:18:29 +01:00
Jun Pataleta
f15855ecd6 Merge branch 'MDL-76977' of https://github.com/paulholden/moodle 2023-01-25 16:10:28 +08:00
Sara Arjona
ae53d04144 Merge branch 'MDL-75337-master' of https://github.com/laurentdavid/moodle 2023-01-24 16:07:35 +01:00
Meirza
bf3a9c3b3f MDL-75945 core: Convert a floating value to an integer.
In PHP 8.1, any implicit conversion of float to int, which leads to a loss in precision, is now deprecated.
To avoid the error warning, the code must explicitly convert a floating value to an integer.
2023-01-24 16:49:10 +07:00
Laurent David
377c962f11 MDL-75337 core: Single button - API changes
* Update component library for new features of single_button and modal
    * Update core_notification javascript
2023-01-23 13:45:21 +01:00
Andrew Nicols
19bedb8eba MDL-76362 core: Short-circuit strip_querystring on empty values 2023-01-23 09:15:55 +08:00
Andrew Nicols
93ab932211 MDL-76362 core: plugin names must be strings to be valid 2023-01-23 09:15:55 +08:00
Andrew Nicols
e068f2284f MDL-76362 core: Update core_component plugin name tests 2023-01-23 09:15:55 +08:00
Marina Glancy
b0a83aa7bd MDL-76362 various: Avoid passing nulls to functions that don't allow nulls
PHP 8.1 is more strict on the parameter type. Functions such as trim(), strlen(), str_replace(), etc
show notice when null is passed as an argument
2023-01-23 09:15:54 +08:00
Paul Holden
5414b82e6e MDL-76977 phpunit: ensure unique data provider keys in mustache test. 2023-01-20 17:19:16 +00:00
Jun Pataleta
6538b400df Merge branch 'MDL-76583-master-withoutrename' of https://github.com/andrewnicols/moodle 2023-01-19 11:18:43 +08:00
Andrew Nicols
fcbad1f68a MDL-76583 external: Add unit test for deprecated test helper 2023-01-19 11:02:31 +08:00
Jun Pataleta
fad05d7929 Merge branch 'MDL-76583-master-withoutrename' of https://github.com/andrewnicols/moodle 2023-01-19 09:44:48 +08:00
Andrew Nicols
3731f4e263 Merge branch 'MDL-70070' of https://github.com/paulholden/moodle 2023-01-19 08:47:51 +08:00
Andrew Nicols
a3cc26f8bb MDL-76583 core: Update uses of external_* classes 2023-01-19 07:34:09 +08:00
Andrew Nicols
6325775551 MDL-76583 core_external: external_api unit tests coding style fixes 2023-01-19 07:33:46 +08:00
Andrew Nicols
caddb452f0 MDL-76583 core_external: Migrate string formatting functions to util 2023-01-19 07:33:35 +08:00
Andrew Nicols
7f5fb6a592 MDL-76583 core_external: Migrate token functions class 2023-01-19 07:33:35 +08:00
Andrew Nicols
7d079e82e1 MDL-76583 core_external: Move util test and update 2023-01-19 07:33:35 +08:00
Andrew Nicols
453738e3fd MDL-76583 core_external: Move files test and update 2023-01-19 07:33:35 +08:00
Andrew Nicols
ecbb31b160 MDL-76583 core_external: Migrate external_settings class 2023-01-19 07:33:35 +08:00
Andrew Nicols
cdd51a663b MDL-76583 core_external: Move external_api unit tests 2023-01-19 07:33:34 +08:00
Andrew Nicols
56bcaf409f MDL-76583 core_external: Migrate external_api to core_external\external_api 2023-01-19 07:33:18 +08:00
Andrew Nicols
4a2793002c MDL-76583 core_external: Add new core_external subsystem 2023-01-17 10:59:15 +08:00
Sara Arjona
d62f6ae036 Merge branch 'MDL-61789-master' of https://github.com/meirzamoodle/moodle 2023-01-16 17:08:38 +01:00
Paul Holden
af8da7c737 MDL-70070 phpunit: correct data provider method names.
They should not be prefixed `test_` because that's how actual
test methods containing assertions are identified by PHPUnit.
2023-01-16 08:28:37 +00:00
Jun Pataleta
5166c729b4 MDL-76739 behat: Replace occurrences of "surname" in Behat tests
Replace occurrences of "surname" in Behat tests with "last name"
2023-01-12 09:53:41 +08:00
Mathew May
bf783645e1 MDL-76134 gradebook: Modify user story behat tests into passable runs 2023-01-09 09:22:20 +08:00
Mathew May
9af57b7180 MDL-76134 core: User story behat test 2023-01-09 09:21:19 +08:00
Meirza
b79231361b MDL-61789 auth_oauth2: Update profile fields based on data mapping.
After the user creation, the system must call an update function to update profile_fields_*.
We also provided two functions into user/profile/lib.php to get available from other areas.
We added PHP unit testing for new public functions and
the Behat tests for custom profile fields with locked and unlocked statuses.

Co-authored-by: Matt Porritt <matt.porritt@moodle.com>
2023-01-07 20:59:26 +07:00
Paul Holden
121f5b6300 MDL-76221 core: method to filter by defined properties of persistent. 2022-12-29 14:02:58 +00:00
Ilya Tregubov
e93d2b0cbe Merge branch 'MDL-76399' of https://github.com/paulholden/moodle 2022-12-29 09:40:51 +07:00
Ilya Tregubov
dee383a0fa Merge branch 'MDL-76731_master' of https://github.com/PhilippImhof/moodle 2022-12-28 15:13:21 +07:00
Ilya Tregubov
1e4612ddb5 Merge branch 'MDL-76129-master' of https://github.com/sammarshallou/moodle 2022-12-28 11:26:26 +07:00
Philipp Imhof
75be72b2d6
MDL-76731 behat: add steps to check for version
Co-authored-by: Andrew Nicols <andrew@nicols.co.uk>
2022-12-22 17:13:02 +01:00
sam marshall
7724e543ff MDL-76129 accesslib: Speed up adding new cloned capabilities
Adding new capabilities can be slow if they have permissions cloned
from an existing capability, and if there are many places in the
database where the existing capability was overridden.

This change optimises the clone-capability performance, approximately
halving the number of queries required.
2022-12-22 11:05:39 +00:00
sam marshall
fe6a51265a MDL-76129 accesslib: Improve performance of adding new capabilities
Adding multiple capabilities was very slow because it clears and
rebuilds the capability cache after each one. This change makes it
clear the cache once after adding all capabilities, before adding
permissions to the archetype roles.
2022-12-22 11:05:14 +00:00
Mark Johnson
b05efb43a4 MDL-75105 tool_behat: List available data generators
This will find all data generators that can be used in behat via the
'the following "something" exist:' step, and display them in a select
list on the step definitions page.

When a generator is selected, it will fetch the required fields for that
generator and display them on the page.
2022-12-21 08:38:09 +00:00
Paul Holden
7d78fb0928 MDL-76399 behat: improvements to "should exist in" thrown exception. 2022-12-16 12:30:03 +00:00
Sara Arjona
d98be6a34e Merge branch 'MDL-71096' of https://github.com/stronk7/moodle 2022-12-14 17:51:44 +01:00
Andrew Nicols
c6e9959a40 Merge branch 'MDL-76235' of https://github.com/paulholden/moodle 2022-12-13 20:56:32 +08:00
Sara Arjona
86218ccb3d Merge branch 'MDL-72451_master' of https://github.com/marxjohnson/moodle 2022-12-12 17:34:07 +01:00
Andrew Nicols
82fe292772 Merge branch 'MDL-71261' of https://github.com/timhunt/moodle 2022-12-12 21:20:56 +08:00
Rex Lorenzo
ebeaa4b3f2 MDL-71261 mod_quiz: Quiz user override should only get enrolled users
Also update similar code in mod_assign to use the improved APIs.

Co-Authored-By: Tim Hunt <T.J.Hunt@open.ac.uk>
2022-12-12 12:29:19 +00:00