32489 Commits

Author SHA1 Message Date
Andrew Nicols
becd11a84a
MDL-80862 testing: Reset task manager between behat tests 2024-02-20 10:54:12 +08:00
Huong Nguyen
6bddb8626f
MDL-80207 core: Remove Horde library 2024-02-20 09:36:24 +07:00
Pedro Jordao
9239366aa7 MDL-80197 forms: Added attributes to the calendar link
The datepicker is not keyboard accessible when in a modal.

As we are using yui datepicker and the change is not simple, I added aria-hidden and tabindex properties to avoid screenreaders.
2024-02-19 20:57:52 -03:00
Sara Arjona
cf8bb7abb6
Merge branch 'MDL-80082-main' of https://github.com/lucaboesch/moodle 2024-02-19 15:28:08 +01:00
Luca Bösch
6bb59759e7 MDL-80082 table: Output 'Nothing to display' as notification. 2024-02-19 15:10:32 +01:00
Marina Glancy
5117dee664 MDL-80821 dml: declare arguments for sql_concat() 2024-02-19 12:27:51 +00:00
Paul Holden
9572e0fdd8
MDL-79673 libraries: upgrade to version 1.15.1 of js-beautify. 2024-02-19 12:10:47 +00:00
Frederik Milling Pytlick
ab517483a0 MDL-80684 core: Fail running tasks on shutdown
When you kill a process which is executing a task, it now marks it as failed.
2024-02-19 12:07:56 +01:00
Jun Pataleta
32ae09a672
MDL-79674 behat: Use proper tags for testing WCAG 2.1 criteria
`wcag2a` and `wcag2aa` refer to WCAG 2.0 standards. We should be using
`wcag21a` and `wcag21aa` to test against WCAG 2.1 standards.

See:
https://github.com/dequelabs/axe-core/blob/develop/doc/API.md#axe-core-tags
2024-02-16 11:53:53 +08:00
Jun Pataleta
ecb8465ebe
MDL-79674 behat: Disable target-size rule
Since axe-core has introduced WCAG 2.2 Level AA support, a `target-size`
rule has been added which is a Level AA success criterion. Since we
haven't started working on WCAG 2.2 Level AA compliance, let's disable
this rule for now.

See https://www.w3.org/WAI/WCAG22/Understanding/target-size-minimum.html
2024-02-16 11:53:53 +08:00
Jun Pataleta
f47baadc93
MDL-79674 behat: Bump axe-core to v4.8.4
* Improve readme_moodle.txt and add more detailed instructions
* Update \behat_accessibility::run_axe_validation_for_tags()'s
  PHPDoc block to reflect the current version.
* Fix incorrect copyright tag for the library
2024-02-16 11:53:52 +08:00
Eloy Lafuente (stronk7)
6e2c5b7b45
MDL-80844 phpunit: Only some tests can use the debugging sink
The only tests that have COMPLETE* support for the debugging sink
are the advanced_testcase and the database_driver ones (store and
report). So we must ensure that the rest of tests don't use the
debugging sink at all.

Right now we are using it for storing, but later there is not
reporting, so any debugging happening within non advanced tests
is not detected.

This commit just ensures that we stop making that storing for
non advanced/database_driver tests. Nothing more, nothing less.

* Note that we have had to add a few missing bits to the
database_driver testcase because it was not 100% complete. Now
it behaves 100% the same than the advanced_testcase one regarding
the debugging sink.
2024-02-15 18:46:16 +01:00
Eloy Lafuente (stronk7)
97a69a8360
MDL-76441 env: Moodle 4.2.x and 4.3.x do not support PHP 8.3 2024-02-15 18:44:42 +01:00
Sara Arjona
fc191c76c6
MDL-80950 external: Fix PHP deprecated error for explode()
This patch fixes the following error:
PHP Deprecated:  explode(): Passing null to parameter #2 ($string)
of type string is deprecated in lib/upgradelib.php on line 1299
2024-02-15 17:52:23 +01:00
Sara Arjona
8cdd62ca88
MDL-78284 theme: Add new interactive content and update styles 2024-02-15 17:49:43 +01:00
sam marshall
14b1e93e85 MDL-80805 core_form: Accessibility - add aria-required to form fields
Most types of form field will now include aria-required="true" if the
field is marked as required. This causes assistive technology to inform
users that the field is required.

Before this change, in some cases (e.g. screen reader users tabbing
through fields) users were not informed that a field is required.
2024-02-15 14:30:33 +00:00
Huong Nguyen
f364cf18eb Merge branch 'MDL-80823-wwwroot-redirect' of https://github.com/brendanheywood/moodle 2024-02-15 11:13:33 +07:00
Stevani Andolo
7917d779d1 MDL-80391 tiny_html: Fixed the loose focus in window manager 2024-02-15 10:06:46 +08:00
Alexander Van der Bellen
34492bec74 MDL-80917 core_backup: Clear restored course cache 2024-02-15 09:06:57 +08:00
sam marshall
4bb42cc362 MDL-80608 core_form: Fire modal form event for errors in definition
The ERROR event is defined as being fired if an exception occurs while
contacting the server. This change ensures it is fired for exceptions
in the form definition AJAX request, not just form submission.

Additionally, if such an error occurs in submission, the form buttons
were left in disabled state. This change makes them enabled again.
2024-02-14 13:49:39 +00:00
Sara Arjona
1ea31db81c
MDL-80249 course: Hide secondary menu and add breadcrumb to section page 2024-02-14 08:03:56 +01:00
Sara Arjona
b91ec287dc
Merge branch 'MDL-80190-main' of https://github.com/ferranrecio/moodle 2024-02-13 15:28:05 +01:00
Huong Nguyen
c5eefd2782 Merge branch 'MDL-80557-main' of https://github.com/aanabit/moodle 2024-02-13 09:54:49 +07:00
Amaia Anabitarte
1ce32e3a60 MDL-80557 courseformat: Change default plugin order 2024-02-13 09:54:18 +07:00
meirzamoodle
d1c27bba15 MDL-78256 lib: Code adjustments to the Zipstream 3.1.0 2024-02-12 16:56:37 +07:00
meirzamoodle
6972e9c83d MDL-78256 lib: Upgrade Zipstream to 3.1.0 2024-02-12 16:51:02 +07:00
Jun Pataleta
0a0d4b20a7
Merge branch 'MDL-80072-main' of https://github.com/andrewnicols/moodle 2024-02-12 14:31:11 +08:00
Andrew Nicols
f0e46b994f
MDL-80072 core: Whitespace fix 2024-02-12 14:28:56 +08:00
Jun Pataleta
a8a31f648d
Merge branch 'MDL-80072-main' of https://github.com/andrewnicols/moodle 2024-02-12 13:58:05 +08:00
Andrew Nicols
4349a9164e
MDL-80072 editor_tiny: Editor options should not be passed to format_text 2024-02-12 11:11:19 +08:00
Andrew Nicols
3e6437e67c
MDL-80072 core: Mark nocache option to format_text as deprecated
This was actually deprecated back in MDL-34347 but never actually
emitted.
2024-02-12 11:11:19 +08:00
Andrew Nicols
85c1dd0077
MDL-80072 core: Deprecate format_text smiley option
This was actually deprecated in Moodle 2.0 but did not emit.
2024-02-12 11:11:18 +08:00
Andrew Nicols
d56303aa54
MDL-80072 core: Promote all formatting options to parameters
Now that PHP has support for named parameters, and we can use them in
Moodle, we should ditch `$options` arrays and use first-class,
documented, parameters.

Whilst this may seem scary, dumb, overwhelming, please note that you do
not need to supply all args, for example, to change the last parameter
of `format_text` you no longer need to do this:

    return \core\container::get(\core\formatting::class)->format_text(
       $text,
       FORMAT_MOODLE,
       $context,
       false,
       null,
       true,
       true,
       true,
       false,
       false,
       true,
    );

Instead you can do:

    return \core\container::get(\core\formatting::class)->format_text(
       $text,
       FORMAT_MOODLE,
       $context,
       allowid: true,
    );

Or better still:

    return \core\container::get(\core\formatting::class)->format_text(
       text: $text,
       format: FORMAT_MOODLE,
       context: $context,
       allowid: true,
    );

This means that we can get defaults in the function signature, improves
our typing, and allows for deprecation and changes to options. It also
sets us up for success in the future.
2024-02-12 11:11:18 +08:00
Andrew Nicols
b353c8e1e2
MDL-80072 core: Improve format_* APIs to improve clarity 2024-02-12 11:11:18 +08:00
Andrew Nicols
fb1d9d65e0
MDL-80072 core: Move format_string cache to class prop
This means that the cache will be automatically reset between tests.
2024-02-12 11:11:18 +08:00
Andrew Nicols
ae80cd739b
MDL-80072 core: Coding Style fixes 2024-02-12 11:11:17 +08:00
Andrew Nicols
e8eb163ff9
MDL-80072 core: Move CFG->filterall to formatter property 2024-02-12 11:11:17 +08:00
Andrew Nicols
35a8e23034
MDL-80072 core: Move CFG->formatstringstriptags to formatter property 2024-02-12 11:11:17 +08:00
Andrew Nicols
f9dc48691d
MDL-80072 core: Move CFG->forceclean to formatter property 2024-02-12 11:11:17 +08:00
Andrew Nicols
6bb0c91a73
MDL-80072 core: Move format_text to core\formatting 2024-02-12 11:11:16 +08:00
Andrew Nicols
37ec9ee8ee
MDL-80072 core: Move format_string to core\formatting 2024-02-12 11:11:16 +08:00
Andrew Nicols
9ed3f83dd2
MDL-80072 core: Add \core\di wrapper to php-di
The \core\di class is a Moodle wrapper to php-di which is intended to
allow Moodle to switch to an alternate DI solution in the future if
required. All interaction with the container uses the PSR-11 Container
interfaces, which allows for normalisation of configuration, setting,
and retrieving of DI container-identified classes.
2024-02-12 11:11:16 +08:00
Andrew Nicols
192a7797ab
MDL-80072 core: Add php-di codebase 2024-02-12 11:11:15 +08:00
Gregor Eichelberger
7c4ca5f269
MDL-79044 gradebook: Add default export method setting
Introduces a new admin setting to configure the default export method
used for redirecting the user via /grade/export/index.php

Signed-off-by: Gregor Eichelberger <gregor.eichelberger@tuwien.ac.at>
2024-02-09 22:31:57 +01:00
Jun Pataleta
f96df76bfc
Merge branch 'MDL-79788' of https://github.com/paulholden/moodle 2024-02-09 16:46:54 +08:00
Andrew Nicols
12dcde3fae
MDL-80072 core: Add PSR-11 interfaces 2024-02-09 15:03:57 +08:00
Paul Holden
d057af03e9
MDL-79788 tag: convert tag collection page to reportbuilder report. 2024-02-08 16:31:02 +00:00
Paul Holden
d30b526bb7
MDL-80868 question: correct deleted format plugin definitions. 2024-02-08 16:15:29 +00:00
Sara Arjona
f5a9e9478f
Merge branch 'MDL-80544' of https://github.com/paulholden/moodle 2024-02-08 11:27:05 +01:00
Paul Holden
3fd7875322
MDL-80544 h5p: add v126 library to list of standard plugins. 2024-02-08 10:03:42 +00:00