Commit Graph

2967 Commits

Author SHA1 Message Date
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
Sara Arjona 099ceb42a0 Merge branch 'MDL-81456-main' of https://github.com/andrewnicols/moodle 2024-04-08 16:11:26 +02:00
Andrew Nicols 4475617583 MDL-81456 core: Provide info about mocking hooks 2024-04-08 09:39:18 +08:00
Andrew Nicols 4a1752781f MDL-81456 core: Coding style fixups 2024-04-08 09:36:22 +08:00
Andrew Nicols fa2e11105a MDL-81456 core: Stop injecting test data into real hook manager 2024-04-08 09:36:21 +08:00
Andrew Nicols 2b49ad42f5 MDL-81456 core: Use DI for all hook access
Using DI for all hook access means that it becomes significantly easier
to mock hooks and callbacks for unit testing without fundamentally
altering the structure of the code purely for the purposes of unit
testing.
2024-04-08 09:35:41 +08:00
Juan Leyva e09930bab6 MDL-81405 session: New core cookie helper utility class 2024-04-06 12:20:59 +02:00
Andrew Nicols 91cacf6319 MDL-81084 core: Correct | to || 2024-04-05 07:02:35 +08:00
Sara Arjona 5949ac50f6 Merge branch 'MDL-81084-main' of https://github.com/andrewnicols/moodle 2024-04-04 17:55:48 +02:00
Huong Nguyen 857fe04b95 Merge branch 'MDL-79131-main' of https://github.com/raortegar/moodle 2024-04-04 10:31:46 +08:00
Ilya Tregubov ddc1c5ee9a Merge branch 'MDL-81144-main' of https://github.com/andrewnicols/moodle 2024-04-04 10:30:37 +08:00
raortegar 5488908538 MDL-79131 core: Hook listener callback for failed_task_max_delay 2024-04-03 09:08:50 +02:00
raortegar 10ecfa731d MDL-79131 core: Dispatch the new Hook 2024-04-03 09:08:50 +02:00
raortegar abefcdb09a MDL-79131 core: Added new Hook instance for task failed max delay 2024-04-03 09:08:50 +02:00
Huong Nguyen 8cd8838acd Merge branch 'MDL-80838-main' of https://github.com/andrewnicols/moodle 2024-04-03 10:05:42 +07:00
Huong Nguyen 07680ea817 Merge branch 'MDL-81366-main' of https://github.com/meirzamoodle/moodle 2024-04-02 17:43:42 +11:00
Andrew Nicols 298c13ac3b MDL-80838 core: Add PSR-20/Clock support
This commit adds the PSR-20 ClockInterface to core, with a
moodle-specific extension to the Interface at `\core\clock`, and a
standard clock at `\core\system_clock`.

Further clocks are provided as `\incrementing_clock` and `\frozen_clock`
which are available to unit tests using:

- `$this->mock_clock_with_incrementing(?int $starttime = null);`
- `$this->mock_clock_with_frozen(?int $time = null);`

For the incrementing clock, every call to fetch the time will bump the
current time by one second.

For the frozen clock the time will not change, but can be modified with:
- `$clock->set_to(int $time);`; and
- `$clock->bump(int $seconds = 1);`
2024-04-02 10:24:54 +08:00
Andrew Nicols 9bd3228d69 MDL-81144 core: Standardise init of standard_head_html_prepend hook 2024-04-02 10:23:44 +08:00
Andrew Nicols 305248f41d MDL-81144 core: Convert before_http_headers 2024-04-02 10:23:44 +08:00
Andrew Nicols 679001e729 MDL-81144 core: Convert before_footer to hook 2024-04-02 10:23:44 +08:00
Andrew Nicols e4a8ed5cc2 MDL-81144 core: Convert standard_after_main_region_html to hook 2024-04-02 10:23:43 +08:00
Andrew Nicols ecd5274e74 MDL-81144 core: Convert add_htmlattributes to hook 2024-04-02 10:23:42 +08:00
Andrew Nicols 770e6b49f4 MDL-81144 core: Convert standard_footer_html to hook 2024-04-02 10:23:41 +08:00
Andrew Nicols 3105ea7dc2 MDL-81144 core: Convert before_standard_top_of_body_html to hook 2024-04-02 10:23:41 +08:00
meirzamoodle ce5b7edd5c MDL-81366 redis: Remove the named parameters
Unfortunately, the read_timeout named parameter was not recognized on some machines.
To avoid such errors, this patch removed the named parameter on a single Redis connect() and the Redis cluster.
2024-03-28 10:19:35 +07:00
Huong Nguyen cb3494dcd4 Merge branch 'MDL-81222-main' of https://github.com/andrewnicols/moodle 2024-03-28 09:19:45 +07:00
Huong Nguyen bc6795074d Merge branch 'MDL-81000-main2' of https://github.com/raortegar/moodle 2024-03-28 08:53:50 +07:00
Andrew Nicols 7233cdad81 MDL-81084 core: Provide \core\plugin_manager
This is just a lightweight way of providing \core\plugin_manager and
aliasing \core_plugin_manager for b/c as a pathway out of our dim and
dark ways of PSR-0 class names.
2024-03-28 09:50:15 +08:00
Andrew Nicols 5f62d5a759 MDL-81084 core: Move standard plugins to plugins.json 2024-03-28 09:31:31 +08:00
Andrew Nicols 2c57fc46b6 MDL-81084 core: Tidy up coding style for \core_plugin_manager 2024-03-28 09:31:14 +08:00
raortegar 8698a9a229 MDL-81000 core: Update "attemptsavailable" value and remove "MAX_RETRY" 2024-03-27 14:00:52 +01:00
Ilya Tregubov 24347e3309 Merge branch 'MDL-80828-main' of https://github.com/roland04/moodle 2024-03-27 11:14:02 +08:00
Andrew Nicols bb80e4f90d MDL-80332 core: Coding style fixes 2024-03-26 22:43:12 +08:00
Andrew Nicols c9030a8243 Merge branch 'MDL-80332-master' of https://github.com/jleyva/moodle 2024-03-26 22:10:29 +08:00
Huong Nguyen b283ca354e Merge branch 'MDL-78551-main' of https://github.com/safatshahin/moodle 2024-03-26 10:08:06 +07:00
Safat fc7127e867 MDL-78551 core_access: Add support for hooks api 2024-03-26 13:53:39 +11:00
Jun Pataleta 281fecbd54 Merge branch 'MDL-78885-main' of https://github.com/rezaies/moodle 2024-03-25 23:37:57 +08:00
Sara Arjona 8e1e0dbfb4 Merge branch 'MDL-80088' of https://github.com/paulholden/moodle 2024-03-25 16:20:25 +01:00
Juan Leyva 658d96f889 MDL-80332 login: New hooks for complete login and passed MFA 2024-03-25 15:48:39 +01:00
Mikel Martín cd8a089d7a MDL-80828 core_courseformat: Modify availability subpanel visibility
In the activity action menu, show only the subpanel when the options are different
than show or hide. In those cases the show/hide option will be directly displayed
in the menu instead of a subpanel.

Co-authored-by: ferran@moodle.com
2024-03-25 13:54:42 +01:00
Ilya Tregubov d1a34c7d23 Merge branch 'MDL-63128-main' of https://github.com/meirzamoodle/moodle 2024-03-25 14:23:53 +08:00
meirzamoodle b7452d44de MDL-63128 core: Add support for use redis cluster as session handler
Co-authored-by: Avi Levy <avi@sysbind.co.il>
2024-03-25 12:47:40 +07:00
Luca Bösch b2af5134b8 MDL-81074 core: align core_date::strftime results for numeric and string 2024-03-25 09:51:25 +08:00
Ilya Tregubov 9f10899178 Merge branch 'MDL-80099_main' of https://github.com/marxjohnson/moodle 2024-03-22 11:07:55 +08:00
Mathew May 68bf0f5b77 MDL-78885 comboboxsearch: Points from review 2024-03-22 05:50:06 +11:00
Shamim Rezaie c122998463 MDL-78885 comboboxsearch: Comboboxes should have a meaningful label
Also, used the combobox's label as the dialogue's label as well
2024-03-22 04:24:23 +11:00
Shamim Rezaie 60aa3614f4 MDL-78885 comboboxsearch: Remove the redundant rtl context variable 2024-03-22 04:24:23 +11:00
Shamim Rezaie b4bb1cde97 MDL-78885 comboboxesearch: Comboboxes should have a name and value
- core_grades_renderer::group_selector() was changed previously, but it
  was providing redundant context data to
core_group/comboboxsearch/group_selector and on the other hand, it was
not providing 'name' and 'value' for core/comboboxsearch
- The $groupactionbaseurl parameter of
  core_grades_renderer::group_selector() is now deprecated as it was not
used.
- a bug is fixed: if only a lastname initial was set, the clear search
  button was not being displayed.
2024-03-22 04:23:25 +11:00
Huong Nguyen b0220f27cb MDL-80850 Javascript: Add new core/dropzone module 2024-03-21 12:45:55 +07:00