32961 Commits

Author SHA1 Message Date
Huong Nguyen
ffc32f80a5
Merge branch 'MDL-82554-MOODLE_404_STABLE' of https://github.com/micaherne/moodle into MOODLE_404_STABLE 2024-07-25 08:50:32 +07:00
Huong Nguyen
28a7d39b2a
Merge branch 'MDL-82528-404' of https://github.com/paulholden/moodle into MOODLE_404_STABLE 2024-07-24 12:00:09 +07:00
Michael Aherne
da95f8d083 MDL-82554 question: Allow null createdby in question_has_capability_on. 2024-07-23 10:47:07 +01:00
Jun Pataleta
cbafc55078
MDL-82553 behat: Run accessibility tests using WCAG 2.2 success criteria 2024-07-22 14:37:49 +08:00
Jun Pataleta
b7bd55bc82
MDL-82551 core: Set welcome message heading to level 1 2024-07-22 14:21:02 +08:00
Ilya Tregubov
c930111e17 Merge branch 'MDL-82499-MOODLE_404_STABLE' of https://github.com/micaherne/moodle into MOODLE_404_STABLE 2024-07-22 09:42:53 +08:00
djarrancotleanu
f0c5d668e9 MDL-82187 core: Add default type for single button in template 2024-07-22 08:48:26 +10:00
Paul Holden
85c7dcaf05
MDL-82528 courseformat: switch to existing group action icon.
Use a version that already exists in our fontawesome mapping so it
can be consistently styled/overridden.
2024-07-19 12:54:42 +01:00
Jun Pataleta
2e8bf841c6
MDL-82540 core: Use an empty check for $CFG->debugdisplay 2024-07-19 16:25:12 +08:00
Leon Stringer
e96db7beec MDL-82530 core: Fix spelling 2024-07-18 14:51:00 +01:00
Paul Holden
f1bc96a8ab
MDL-82527 h5p: improve editor Behat scenarios for embedding content.
* Move the shared drag fixture out of the Atto plugin;
* Switch to using faster generators for populating private files;
* Clarify required fields for private files generator
2024-07-18 09:37:47 +01:00
Ilya Tregubov
38ab94e04b Merge branch 'MDL-82445-404' of https://github.com/andrewnicols/moodle into MOODLE_404_STABLE 2024-07-18 11:37:02 +08:00
Andrew Nicols
03f840b4f2
MDL-82445 core: Create locale helper utility 2024-07-18 11:00:42 +08:00
Ilya Tregubov
1291503846 Merge branch 'MDL-82444-404' of https://github.com/paulholden/moodle into MOODLE_404_STABLE 2024-07-18 10:32:55 +08:00
Paul Holden
b99a81af8e MDL-82499 question: test for invalid question in capability check. 2024-07-17 09:57:42 +01:00
Andrew Nicols
908488e472
MDL-82373 contentbank: Pause in Behat before interacting with h5p
It seems that the loading of the h5p content upsets other interactions
with the page in Firefox as it loads. Unfortunately I haven't found a
reliable way to handle this with pendingJS yet.

This is the poor man's fix and we should find a better solution.
2024-07-17 13:28:57 +08:00
Andrew Nicols
389e4fc011
MDL-82373 behat: Wait for alerts before accepting/dismissing them 2024-07-17 13:28:56 +08:00
Andrew Nicols
ed4a47302e
MDL-82373 core: Make CollapsibleRegion more tolerant to behat 2024-07-17 13:28:55 +08:00
Andrew Nicols
42511349ae
MDL-82373 behat: Stop killing the entire Behat run on driver error
If there's a driver error, for example from a step taking too long, then
this kills the entire Behat run and we have to start from scratch.

This change instead throws away the original connection and starts a new
one to try and continue the test.
2024-07-17 13:28:55 +08:00
Andrew Nicols
32f1542b5e
MDL-82373 behat: Stop calling ensure_node_is_visible before click
W3C WebDriver Element::Click, Element::Clear, and Element::SendKeys all
state that the WebDriver implementation (chromedriver, geckodriver,
edgedriver) should scroll the element into view if it is not already
visible.

It is wrong for us to check if the element is visible or not before
calling these as it may not be but will during the click/clear/type
event.
2024-07-17 13:28:55 +08:00
Brendan Heywood
31e0fd81a7 MDL-82171 core: Rewarm bootstrap.php after a cache purge 2024-07-17 15:16:12 +10:00
Michael Aherne
43b3bda115 MDL-82499 question: Fail if questionid does not exist. 2024-07-16 14:59:55 +01:00
Dale Davies
088c523df0 MDL-82286 core: Set serialize_precision to current PHP default 2024-07-16 10:01:57 +01:00
Andrew Nicols
b2018b2fbc
MDL-77706 atto_link: Work around Mozilla bug 1906559
This upstream bug prevents creation of an anchor with a hyperlink where
the content has a block-like display.

The workaround is to wrap the content in a span, set the display to
inline, call the `createLink` command on the span, move the content out
of the span, and then remove it.

This is only done for Firefox-based browsers.
2024-07-16 15:37:46 +08:00
Andrew Nicols
8b7270f9b1
MDL-66903 core: Check PHPUNIT_TEST defined before using 2024-07-15 13:45:36 +07:00
Andrew Nicols
d36cf65ef3
MDL-66903 core: Introduce \core_component::reset to replace hacks
Traditionally we have done this using reflection and it would be better
to do this in a 'proper' fashion in case we ever need to change how it
works.
2024-07-15 12:22:19 +08:00
Andrew Nicols
39d46917bb
MDL-66903 testing: Helper to load fixture files 2024-07-15 12:22:17 +08:00
Andrew Nicols
6b3d8fd889
MDL-66903 testing: Add support for a \tests\ namespace during tests
This commit:
- introduces a \tests\ sub-namespace for use in unit tests only
- the path to this the tests/classes directory of the owning parent
- files here are excluded from unit test runs

This is agreed per policy in MDL-80855.
2024-07-15 12:21:54 +08:00
Andrew Nicols
b15b73848a
MDL-66903 testing: Fix whitespace 2024-07-15 12:21:06 +08:00
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