Commit graph

112923 commits

Author SHA1 Message Date
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
d6dc3847f4
MDL-80072 core: Update uses of courseid to format_text 2024-02-12 11:11:17 +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
AMOS bot
ad221f7828 Automatically generated installer lang files 2024-02-12 00:11:24 +00: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
Mikel Martín
e788ed509c MDL-80622 core_courseformat: Fix activity card drag image 2024-02-09 09:48:49 +01:00
Mikel Martín
0efe999276 MDL-80219 core_courseformat: Add course section and activity new styling
- Add border to sections (not in single section page)
- Remove border to activity cards and add single line separators
- Refactor activity and sections styles to fit this new layout
- Remove styles that are not necessary with this new layout
2024-02-09 09:47:03 +01:00
Jun Pataleta
f96df76bfc
Merge branch 'MDL-79788' of https://github.com/paulholden/moodle 2024-02-09 16:46:54 +08:00
Jun Pataleta
aa921c0c7f
Merge branch 'MDL-80874-main' of https://github.com/andrewnicols/moodle 2024-02-09 16:42:50 +08:00
Andrew Nicols
12dcde3fae
MDL-80072 core: Add PSR-11 interfaces 2024-02-09 15:03:57 +08:00
Andrew Nicols
7b72ead9e5
MDL-80874 core: Correct repo name for PR closer 2024-02-09 15:00:56 +08:00
Paul Holden
27ca0daf87
MDL-79788 tag: convert module creation of tags to generators.
We don't need to use the tags UI directly for creating tags in module
scenarios, because it's slow and prone to error in case of interface
changes.
2024-02-08 16:31:02 +00: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
328b48ebc5
weekly release 4.4dev 2024-02-08 16:18:06 +01:00
Sara Arjona
de632c0117
NOBUG: Fixed SVG browser compatibility 2024-02-08 16:18:01 +01:00
Paul Holden
d519d7b8b7
MDL-80869 mod_bigbluebuttonbn: ensure test retrieves expected record. 2024-02-08 13:21:44 +00:00
Sara Arjona
f5a9e9478f
Merge branch 'MDL-80544' of https://github.com/paulholden/moodle 2024-02-08 11:27:05 +01:00
Jun Pataleta
66584a81a9
Merge branch 'MDL-78427' of https://github.com/paulholden/moodle 2024-02-08 18:09:04 +08: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
Philipp Imhof
5ec21f8d82
MDL-80630 mod_quiz: keep timer hidden across pages
If a student hides the timer, store that setting in their user
preferences in order to keep it hidden even if they go from one page
to another in a quiz.
2024-02-08 09:43:01 +01:00
Laurent David
716da575e7 MDL-80326 course_format: Visibility changes only when capability is set
* When an editing teacher has not the capability to change visibility
(for example if for a given module the capability is removed), the visibility
drop down menu in the card should not be available.
2024-02-08 09:21:09 +01:00
Jun Pataleta
081767e803
MDL-77166 core: Point to CONTRIBUTING.md file
MDL-80577 formatted CONTRIBUTING.txt and moved to CONTRIBUTING.md so
the message needs to be updated accordingly
2024-02-08 15:32:33 +08:00
Jun Pataleta
72bb1899e0
Merge branch 'MDL-77166' of https://github.com/stronk7/moodle 2024-02-08 15:32:32 +08:00
Huong Nguyen
5f3729eb63
Merge branch 'MDL-80809' of https://github.com/paulholden/moodle 2024-02-08 15:32:32 +08:00
Jun Pataleta
fd25a26efb
Merge branch 'MDL-80577-main' of https://github.com/andrewnicols/moodle 2024-02-08 15:32:32 +08:00
Huong Nguyen
1c5e98c63e
Merge branch 'MDL-80839-main' of https://github.com/aanabit/moodle 2024-02-08 15:32:32 +08:00
Andrew Nicols
a06f1a7910
Merge branch 'MDL-80768' of https://github.com/paulholden/moodle 2024-02-08 15:32:31 +08:00
Ilya Tregubov
1c059cb3fe
MDL-80504 forum: Fix seperate group mode 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
Andrew Nicols
8c627ce745
Merge branch 'MDL-80738' of https://github.com/paulholden/moodle 2024-02-08 15:32:30 +08:00
Ilya Tregubov
436331e053
Merge branch 'MDL-80716-master' of https://github.com/sh-csg/moodle 2024-02-08 15:32:30 +08:00
Leon Stringer
662192fcec
MDL-80501 mod_h5pactivity: activity group mode
Respect activity's group mode when checking access to the report.
Previously only the course's group mode was checked.
2024-02-08 15:32:30 +08:00
Huong Nguyen
4025771583
Merge branch 'MDL-80544-main' of https://github.com/sarjona/moodle 2024-02-08 15:32:29 +08:00
Huong Nguyen
97ef09c7f8
Merge branch 'MDL-80832-main' of https://github.com/davewoloszyn/moodle 2024-02-08 15:32:29 +08:00
Andrew Nicols
3a73e8046c
Merge branch 'MDL-80648_CFG-xsendfilealiases-in-config-dist-php-is-missing-localrequestdir' of https://github.com/ziegenberg/moodle 2024-02-08 15:32:29 +08:00
Andrew Nicols
d05f271528
Merge branch 'MDL-80803' of https://github.com/paulholden/moodle 2024-02-08 15:32:28 +08:00