3014 Commits

Author SHA1 Message Date
Andrew Nicols
dc9b44f531
MDL-82747 core: Register composer autoload files
Unfortunately PHP does not provide any means to autoload the files that
a functions is located in, even if they are in an namespace.

To work around this, Composer makes use of an `autoload.files` section
in the `composer.json` file. Shortly after the Composer autoloader is
registered with the `spl_autoload_register` call it also includes any
files listed in this section.

Moodle does not do this and really we should be doing so.

This change adds a section to the autoloader registration method which
loads all of the files defined in any third-party library included in
our `lib` directory which contains any `composer.json` file with such a
stanza.
2024-08-14 21:59:53 +08:00
Andrew Nicols
2243d1b395
MDL-82747 core: Provide a standard way to register the Autoloader 2024-08-14 21:59:52 +08:00
Ilya Tregubov
a7f19c9072 Merge branch 'MDL-82525-404' of https://github.com/paulholden/moodle into MOODLE_404_STABLE 2024-08-08 08:27:15 +08:00
Paul Holden
23a61db0f0 MDL-82392 blocks: consistent cleaning of block instance names. 2024-08-07 04:13:49 +00:00
Ilya Tregubov
96f76208d1 Merge branch 'MDL-81689_MOODLE_404_STABLE' of https://github.com/rzhtwberlin/moodle into MOODLE_404_STABLE 2024-08-01 09:59:26 +08:00
Paul Holden
fd63451ecc
MDL-82525 user: correct course parameter for course profile page. 2024-07-29 09:22:03 +01:00
Ilya Tregubov
5bcdefb516 Merge branch 'MDL-80345-404' of https://github.com/MartinGauk/moodle into MOODLE_404_STABLE 2024-07-29 11:33:22 +08:00
Johannes Burk
30bae49637 MDL-81689 tests: Check task DB record for nextruntime 2024-07-26 10:36:29 +02:00
Huong Nguyen
a03674de6f
Merge branch 'MDL-82530-spelling-404' of https://github.com/leonstr/moodle into MOODLE_404_STABLE 2024-07-25 10:41:38 +07: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
Leon Stringer
e96db7beec MDL-82530 core: Fix spelling 2024-07-18 14:51:00 +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
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
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
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
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
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
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
Paul Holden
4d4efaa72c
MDL-82169 user: remove access to non-existent $options array. 2024-06-11 21:25:59 +01:00
Paul Holden
e858c2e747
MDL-78773 report_stats: improve display of mode selection element.
Make use of existing theme selectors for navigation elements to style.
2024-06-07 11:34:17 +01:00
Paul Holden
f2dbbfe66e
MDL-81781 dataformat: public helper method to get writer instance. 2024-06-07 11:30:18 +01:00
Andrew Nicols
f6be7e2a3e
Merge branch 'MDL-81794-404' of https://github.com/meirzamoodle/moodle into MOODLE_404_STABLE 2024-06-06 22:06:29 +08:00
Andrew Nicols
253c16b64d
MDL-81894 core: system_clock should use the server timezone 2024-06-06 00:18:52 +08:00
meirzamoodle
55163a6ba9 MDL-81794 core: Fix the TLS issue on the Redis 2024-05-24 14:28:10 +07:00
Mikel Martín
4c1beb921f
MDL-81460 theme_boost: Fix loading spinner wobbles 2024-04-24 12:11:01 +08:00
Jun Pataleta
9966241efb
Merge branch 'MDL-81525-main' of https://github.com/andrewnicols/moodle 2024-04-17 23:42:22 +08:00
Andrew Nicols
6db4285eaa
MDL-81525 core_user: Move after_complete_login to correct NS 2024-04-15 13:05:10 +08:00
Andrew Nicols
eb2c2117a0
MDL-81525 core: Improve hook docs 2024-04-15 13:05:08 +08:00
Andrew Nicols
613f933442
Merge branch 'MDL-80820' of https://github.com/marinaglancy/moodle 2024-04-15 10:42:22 +08:00
Andrew Nicols
8be87eb633
MDL-81525 core: Coding style fixes 2024-04-14 21:49:33 +08:00
Andrew Nicols
6b0793d480
MDL-81525 core: Correct deprecated hook docs 2024-04-14 21:44:07 +08:00
Andrew Nicols
1e36531d0d
MDL-81525 core: Tidy up hook tags 2024-04-14 14:45:09 +08:00
Jun Pataleta
3856addfdd
Merge branch 'MDL-67667-main' of https://github.com/andrewnicols/moodle 2024-04-12 12:41:39 +08:00
Andrew Nicols
6f1df841f7
MDL-67667 core: Deprecate and removal task blocking
There are inherent issues with task blocking which mean that it has
never worked properly. It is also very buggy and can lead to massive
performance issues with task processing.

It is almost impossible to deprecate this in a staged fashion because
various APIs use the methods and it is not possible to determine which
are API uses and which are other valid uses.

In reality there has been little-to-no uptake on the use of this feature
and it should just be removed.
2024-04-12 12:34:20 +08:00
Andrew Nicols
a1b0fe9b9c
MDL-67667 core: Deprecate task blocking 2024-04-12 12:15:44 +08:00
Andrew Nicols
601ef0f72d
Merge branch 'MDL-81192_main' of https://github.com/marxjohnson/moodle 2024-04-12 11:48:06 +08:00
Mark Johnson
337a0ee705
MDL-81192 sessions: Prevent false positive session change errors
If $CFG->enable_read_only_sessions_debug was not enabled, debugging could be
enabled part-way through a request when restart_with_write_lock was
called. This meant that a diff between the initial and final session
would be made during write_close(), although the intial session state
was never captured. This generated false positives in the logs, and it
thought any variable set in the session was a change from the original
value.

This ensures that debugging is enabled before the debug flag is allowed
to change, preventing false positives.
2024-04-11 08:55:11 +01:00
Ilya Tregubov
c9eab29d37 Merge branch 'MDL-81480-main' of https://github.com/meirzamoodle/moodle 2024-04-11 15:48:07 +08:00
Huong Nguyen
7e2da937d5
Merge branch 'MDL-81327-main' of https://github.com/laurentdavid/moodle 2024-04-11 12:49:32 +08:00
Ilya Tregubov
dd364a04a0 Merge branch 'MDL-81494-main' of https://github.com/HuongNV13/moodle 2024-04-11 09:19:54 +08:00
meirzamoodle
c9cb89323c MDL-81480 core: Sets user-level session storage functions
Also added @runInSeparateProcess on each session Redis cluster test to let the test run
in a separate process to avoid the error "the headers are not already sent" by PHPUnit.
2024-04-10 17:27:20 +07:00
Huong Nguyen
6012fa0af6
MDL-81494 adhoc_task: Added missing space for query condition 2024-04-10 17:15:55 +07:00
Andrew Nicols
dae36f6cfa
MDL-81063 core: Add helper to get component name from classname 2024-04-10 12:41:31 +08:00
Andrew Nicols
29fc61c2a5
MDL-81063 core: Add option to get core in list of components 2024-04-10 12:41:31 +08:00
Andrew Nicols
a1ee9cdbdb MDL-81327 report_log: Make group filtering logstore agnostic
The original implementation of group filtering introduced in MDL-80565
assumed that the log table existed in Moodle's own database. This is not
the case of the database logstore, or any similar logstore implemetning
the database \core\log\sql_reader interface.

Furthermore this check was also applying the SQL when the user had the
`accessallgroups` capability, or when the course was not in SEPARATE
groups mode (no groupmode and/or visible groups).

Co-authored: Laurent David <laurent.david@moodle.com>
2024-04-09 15:10:37 +02:00
Sara Arjona
099ceb42a0
Merge branch 'MDL-81456-main' of https://github.com/andrewnicols/moodle 2024-04-08 16:11:26 +02:00
Marina Glancy
ef1759da74 MDL-80820 various: fix incorrect phpdocs 2024-04-08 10:13:10 +01:00