33032 Commits

Author SHA1 Message Date
Andrew Nicols
6cd08cc382
MDL-66903 testing: Reset CFG and component after test
This change moves the reset of global test state to the finally section
rather than doing it only if the test passes.

Previously if a test which modifies the `core_component` internals
failed, it would not reset the internal state and impact subsequent
tests.
2024-07-15 12:21:06 +08:00
Paul Holden
384300011c
MDL-82444 core: skip environment test on optional plugin extensions. 2024-07-12 13:49:54 +01:00
Andrew Nicols
95274afe55
Merge branch 'MDL-78936-404' of https://github.com/HuongNV13/moodle into MOODLE_404_STABLE 2024-07-11 11:53:21 +08:00
Andrew Nicols
8d1bf9d92d
Merge branch 'MDL-82431-404' of https://github.com/paulholden/moodle into MOODLE_404_STABLE 2024-07-11 11:46:26 +08:00
Huong Nguyen
799e5c9ecc
Merge branch 'MDL-79717-404' of https://github.com/paulholden/moodle into MOODLE_404_STABLE 2024-07-11 09:35:15 +07:00
Paul Holden
ed5fde9c1f
MDL-82431 phpunit: correct unit test filename and classname.
Standardise the same test cases, e.g. make final, covers notation,
static data providers, namespaces, etc.

Once the tests run, a couple of them failed. They required changes
to assertions to make them pass.
2024-07-10 19:06:17 +01:00
Paul Holden
2196813e1e
MDL-79717 phpunit: ensure unique data provider keys in tests.
Duplicate data provider keys were overwriting and/or duplicating
one another, leading to some cases being skipped.

Other "duplicate array key" errors were picked up by `phpcs` in
this dragnet across all tests, which have also been fixed.
2024-07-10 14:08:52 +01:00
Huong Nguyen
562b9775b2
Merge branch 'MDL-82308_404' of https://github.com/timhunt/moodle into MOODLE_404_STABLE 2024-07-10 14:57:24 +07:00
Ilya Tregubov
cbe78bb3a6 Merge branch 'MDL-82323-striptags_error-404' of https://github.com/leonstr/moodle into MOODLE_404_STABLE 2024-07-10 12:18:40 +08:00
Sara Arjona
ba80f884f7
Merge branch 'MDL-81991-404-alt' of https://github.com/HuongNV13/moodle into MOODLE_404_STABLE 2024-07-09 13:07:47 +02:00
meirzamoodle
3ae349b86e MDL-66251 form: Hiding and disabling static elements.
Added functionality to locate static text elements within the form,
improving the ability to target and manipulate the static elements for
hiding and disabling purposes.
2024-07-08 09:17:26 +07:00
Huong Nguyen
a0a2015027
Merge branch 'MDL-80907-404' of https://github.com/marinaglancy/moodle into MOODLE_404_STABLE 2024-07-04 11:13:38 +07:00
Leon Stringer
f523a01673 MDL-82323 core: Fix get_striptags must be bool
If an exception occurs during install $CFG->formatstringstriptags may
not be populated, if so fall back to a default value.
2024-06-28 10:23:49 +01:00
Amaia Anabitarte
2c804c3ab2 MDL-79971 completion: Don't assume a completed activity is viewed 2024-06-28 10:16:28 +02:00
Huong Nguyen
32d08ee47f
Merge branch 'MDL-62958-404' of https://github.com/paulholden/moodle into MOODLE_404_STABLE 2024-06-27 11:05:03 +07:00
Huong Nguyen
ef45ffc444
Merge branch 'MDL-82251-404' of https://github.com/paulholden/moodle into MOODLE_404_STABLE 2024-06-27 10:56:26 +07:00
Tim Hunt
2ac781b76d MDL-82308 forms: set a nice default size for multi-selects
This is a backport of MDL-81515.
2024-06-26 13:24:24 +01:00
Huong Nguyen
306b5289a7
MDL-81991 core: Reload accessdata for dirty users in CLI mode 2024-06-26 16:27:46 +07:00
Huong Nguyen
99ae088704
MDL-78936 editor_tiny: Disable quickbars for small target
The quickbars selection toolbar is not displayed correctly
if the target element is too small. We will wait for it
to be fixed in the future before we re-enable it in Moodle
2024-06-26 10:16:52 +07:00
Ilya Tregubov
0f7d291b9c Merge branch 'MDL-82167-404' of https://github.com/ferranrecio/moodle into MOODLE_404_STABLE 2024-06-26 10:19:59 +08:00
Paul Holden
e9683d416f
MDL-62958 admin: ensure uploaded plugin directory structure present.
Including any empty directories, which would cause validation to
subsequently fail when they were skipped.

Co-authored-by: Leon Stringer <leon.stringer@ntlworld.com>
2024-06-24 12:47:38 +01:00
Martin Gauk
f341c774de MDL-80345 core_lock: deal with hash collisions in postgres_lock_factory 2024-06-21 13:42:59 +02:00
Mikel Martín
731bf1cb78 MDL-82160 renderer: Add render_context_header method to core_renderer
In MDL-81597 the original render_context_header method was removed and converted to a template.
That caused a regression, so this patch adds the method again but using the new template.
2024-06-21 11:55:56 +02:00
Paul Holden
ce6b2f77c9
MDL-82251 customfield: correct field management icon sizes. 2024-06-20 09:55:18 +01:00
Huong Nguyen
a74b702a23
Merge branch 'MDL-78773-404' of https://github.com/paulholden/moodle into MOODLE_404_STABLE 2024-06-20 11:06:22 +07:00
Jun Pataleta
4246ca2fbf
Merge branch 'MDL-82246-404' of https://github.com/andrewnicols/moodle into MOODLE_404_STABLE 2024-06-20 11:41:49 +08:00
Andrew Nicols
f3ade2b67a
MDL-82246 tiny_recordrtc: Correct string name for insecure alert title 2024-06-20 10:58:13 +08:00
Huong Nguyen
c2cd21be15
Merge branch 'MDL-82169-404' of https://github.com/paulholden/moodle into MOODLE_404_STABLE 2024-06-20 09:19:45 +07:00
Sara Arjona
d84efee3e2
Merge branch 'MDL-82181-404' of https://github.com/paulholden/moodle into MOODLE_404_STABLE 2024-06-19 15:42:27 +02:00
Sara Arjona
4bdf820437
Merge branch 'MDL-77665-404' of https://github.com/laurentdavid/moodle into MOODLE_404_STABLE 2024-06-19 07:35:22 +02:00
Andrew Nicols
877e585704
Merge branch 'MDL-81739-404' of https://github.com/davewoloszyn/moodle into MOODLE_404_STABLE 2024-06-18 22:34:10 +08:00
Laurent David
941c866216 MDL-77665 core_h5p: Allow deployment if user has been deleted
* If user has been deleted we consider that the content can be deployed
by a user who can deploy other packages
* Add behat test to cover for this use case
* Fix the content bank generator as it was failing to upload the content
as the given user
2024-06-17 06:32:13 +02:00
Eloy Lafuente (stronk7)
202c58888a
MDL-82148 phpunit: Remove all cases of multiple @coversDefaultClass
Only one by class is allowed (to be used as shortcut exclusively).
2024-06-14 16:05:15 +02:00
Huong Nguyen
d1f4ca4505
Merge branch 'MDL-81781-404' of https://github.com/paulholden/moodle into MOODLE_404_STABLE 2024-06-13 10:13:00 +07:00
Huong Nguyen
f5a2ddef9f
Merge branch 'MDL-69514-404' of https://github.com/pedrojordao/moodle into MOODLE_404_STABLE 2024-06-13 09:54:11 +07:00
Huong Nguyen
9874249ad1
Merge branch 'MDL-82155-404' of https://github.com/paulholden/moodle into MOODLE_404_STABLE 2024-06-13 09:03:12 +07:00
Paul Holden
c8bdae260b
MDL-82181 tiny_media: correctly determine whether to show dropzone. 2024-06-12 14:19:47 +01:00
Huong Nguyen
6d717d9c8a
Merge branch 'MDL-81522_404' of https://github.com/stronk7/moodle into MOODLE_404_STABLE 2024-06-12 08:46:59 +07:00
Paul Holden
4d4efaa72c
MDL-82169 user: remove access to non-existent $options array. 2024-06-11 21:25:59 +01:00
ferranrecio
b2ce12db1d MDL-82167 core: fix reactive debug panel 2024-06-11 16:16:25 +02:00
Eloy Lafuente (stronk7)
2a86638a15
MDL-81522 phpunit: Add a few non-void return types to tests
This is the final (3rd) commit, where we are adding missing
return types to a few tests (using @depends) which return
types are non-void, but something really returned (for consume
by the dependent test).
2024-06-11 12:18:05 +02:00
Eloy Lafuente (stronk7)
091b458c52
MDL-81522 phpunit: Add missing void return type to all tests #2
This commit includes more changes, all them also adding the :void
return type to unit tests missing them.

The difference is that all these changes, while also detected
perfectly by the moodle.PHPUnit.TestReturnType sniff, were not
auto-fixed (like the previous commit ones), because all them
do include some "return" statement and, for safety, we don't
fix them.

All the cases have been visually inspected and confirmed that
the existing "return" statements always belong to anon
functions within the test body and not the test own return statement.
2024-06-11 12:18:05 +02:00
Eloy Lafuente (stronk7)
1093256560
MDL-81522 phpunit: Add missing void return type to all tests
While this change is not 100% required now, it's good habit
and we are checking for it since Moodle 4.4.

All the changes in this commit have been applied automatically
using the moodle.PHPUnit.TestReturnType sniff and are, exclusively
adding the ": void" return types when missing.
2024-06-11 12:18:04 +02:00
Huong Nguyen
d376d8cdbf
Merge branch 'MDL-68540-404' of https://github.com/davewoloszyn/moodle into MOODLE_404_STABLE 2024-06-11 15:32:23 +07:00
Jun Pataleta
dd345ab8ee
Merge branch 'MDL-81428-404' of https://github.com/HuongNV13/moodle into MOODLE_404_STABLE 2024-06-11 13:41:49 +08:00
David Woloszyn
90c5adee7c MDL-68540 form: Correctly target editors in node tree
This fix solves the hideIf and disabledIf form conditions that were not
correctly targetting the editor due to a name attribute mismatch.
2024-06-11 13:06:12 +10:00
Paul Holden
d5395c4f47
MDL-82155 core: define/correct third party library names. 2024-06-10 19:52:08 +01:00
Pedro Jordao
c0a966d944 MDL-69514 Core: Close popover when modal is closed
Currently in Firefox, if we opened a popover that was inside a modal
and closed the modal by pressing the ESC key, the popover remained on
the screen. With this change, we will ensure that popovers are closed
when the modal is closed.
2024-06-10 12:14:44 -03:00
Huong Nguyen
83b9f0e29d MDL-81428 core: Display the correct status for the contact request 2024-06-10 17:08:22 +07:00
Paul Holden
2b4769bb73
MDL-81678 enrol: don't escape course name in welcome message. 2024-06-07 11:39:43 +01:00