32427 Commits

Author SHA1 Message Date
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
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
Paul Holden
dae077e86a
MDL-78427 report: add theme usage report to list of standard plugins. 2024-02-08 09:44:17 +00:00
Andrew Nicols
a06f1a7910
Merge branch 'MDL-80768' of https://github.com/paulholden/moodle 2024-02-08 15:32:31 +08:00
Ilya Tregubov
fba3e87a24
Merge branch 'MDL-80753-main' of https://github.com/andrewnicols/moodle 2024-02-08 15:32:31 +08:00
Huong Nguyen
4025771583
Merge branch 'MDL-80544-main' of https://github.com/sarjona/moodle 2024-02-08 15:32:29 +08:00
Andrew Nicols
b156b34552
Merge branch 'MDL-80667' of https://github.com/paulholden/moodle 2024-02-08 15:32:28 +08:00
Sara Arjona
d3cac65bf9
Merge branch 'mdl-80576_master' of https://github.com/james-cnz/moodle 2024-02-08 15:32:27 +08:00
Sara Arjona
bc82ddcfb5
Merge branch 'MDL-74500' of https://github.com/paulholden/moodle 2024-02-08 15:32:26 +08:00
Sara Arjona
ff50da59e9
Merge branch 'MDL-79577' of https://github.com/paulholden/moodle 2024-02-08 15:32:00 +08:00
Jun Pataleta
53e5c0da37
Merge branch 'MDL-80784-main' of https://github.com/noeldemartin/moodle 2024-02-08 15:31:59 +08:00
Paul Holden
6f60461220
MDL-80338 core: encode moodle_url instance anchor properties. 2024-02-07 12:21:26 +00:00
Ferran Recio
97a7958aee MDL-80190 core_courseformat: do not render delegated sections in course 2024-02-07 12:06:03 +01:00
Jun Pataleta
9e7777c6ce
Merge branch 'MDL-75081' of https://github.com/paulholden/moodle 2024-02-07 11:36:44 +08:00