Commit Graph

3317 Commits

Author SHA1 Message Date
Andrew Nicols
220191eca5 MDL-77461 behat: Use get_course_id instead of DB fetch 2023-03-02 11:06:28 +08:00
Ilya Tregubov
9f062f1379 MDL-75719 completion: Fix unit tests and Behat tests.
Fix tests since we changed behavior of completions (completion
state an UI).
2023-03-02 11:03:02 +08:00
David Mudrák
fcfe8ceef1 MDL-74586 rss: Make rss_get_userid_from_token() use table index
Due to missing `AND k.script = 'rss'` condition, the query did not make
use of the existing script-value compound index defined for the table.
So it had to perform the full sequential scan for all rows when
searching for the token. This had serious performance issues on sites
with many users, especially in case on non-existing token / key.
2023-02-28 13:21:35 +01:00
Andrew Nicols
a95f9fc1fb Merge branch 'MDL-69838' of https://github.com/paulholden/moodle 2023-02-23 10:39:42 +08:00
Paul Holden
273e006419 Merge branch 'MDL-76797-master' of https://github.com/JBThong/moodle 2023-02-20 10:00:16 +00:00
Thong Bui
5db011a600 MDL-76797 core_role: Add create role event class 2023-02-20 12:37:35 +07:00
Tomo Tsuyuki
9e725bc168 MDL-45301 assign: Add font options for EditPDF 2023-02-17 15:30:25 +11:00
Andrew Nicols
bea9ec6435 Merge branch 'MDL-77207-master' of https://github.com/meirzamoodle/moodle 2023-02-16 11:38:19 +08:00
Andrew Nicols
4fa300b78f Merge branch 'MDL-76415-master' of https://github.com/meirzamoodle/moodle 2023-02-16 11:31:42 +08:00
Meirza
e2cd808b34 MDL-76415 core: Fixed ${var} string interpolation deprecations.
Since PHP 8.2, placing the dollar sign outside the curly brace is deprecated when
the expression inside the braces resolves to a variable or an expression.
2023-02-13 19:51:46 +07:00
Meirza
b77041ff28 MDL-77207 core: PHP 8.2 makes exported class name fully qualified. 2023-02-11 16:12:37 +07:00
Paul Holden
889f35fc26 MDL-69838 core: final removal of deprecated 310 methods. 2023-02-10 11:20:00 +00:00
Matthew Hilton
95077da502 MDL-73317 session: Improve session diff detection
Previously, newly added keys to the session were not detected. Objects
with the same properties were also incorrectly reported as different.

This commit improves this, and updates the unit tests to reflect the
new functionality.
2023-02-09 12:03:49 +10:00
Andrew Nicols
11d09ef410 Merge branch 'MDL-76675' of https://github.com/stronk7/moodle 2023-02-02 11:02:21 +08:00
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