Compare commits

...

635 Commits

Author SHA1 Message Date
Mihail Geshoski e27e1ed7bc Moodle release 5.0.2 2025-08-08 10:48:06 +08:00
Mihail Geshoski 7f9b287f42 NOBUG: Add upgrade notes 2025-08-08 10:48:06 +08:00
Sara Arjona 1295393145 weekly release 5.0.1+ 2025-08-07 16:45:05 +02:00
Sara Arjona 5bdb6936c8 NOBUG: Add upgrade notes 2025-08-07 16:45:04 +02:00
Sara Arjona 2b97cc0de3 NOBUG: Fixed file access permissions 2025-08-07 16:44:58 +02:00
Sara Arjona 9b5963b683 Merge branch 'install_500_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_500_STABLE 2025-08-07 16:44:54 +02:00
Huong Nguyen 203f6bb20f Merge branch 'MDL-86004-500' of https://github.com/davewoloszyn/moodle into MOODLE_500_STABLE 2025-08-07 14:09:21 +07:00
David Woloszyn aed28401be MDL-86004 core: Modify upgrade step for Microsoft endpoints
The upgrade step for Microsoft OAuth2 issuers has been modified
to address an oversight in MDL-84432. The upgrade now only updates
service base urls for multi-tenant issuers.

Co-authored-by: Raju Tummoji <raju.tummoji@moodle.com>
2025-08-07 16:54:50 +10:00
Ilya Tregubov 8ba7c1f0f3 Merge branch 'MDL-85260-500' of https://github.com/tasiobg/moodle into MOODLE_500_STABLE 2025-08-07 09:11:27 +03:00
Huong Nguyen dae9a97e9a Merge branch 'MDL-85718-500' of https://github.com/yusufwib01/moodle into MOODLE_500_STABLE 2025-08-07 12:21:39 +07:00
Huong Nguyen 40a5b8c018 Merge branch 'MDL-86205-500' of https://github.com/junpataleta/moodle into MOODLE_500_STABLE 2025-08-07 12:14:57 +07:00
Huong Nguyen 5127c9c87c Merge branch 'MDL-85794-500' of https://github.com/junpataleta/moodle into MOODLE_500_STABLE 2025-08-07 11:37:25 +07:00
Huong Nguyen 8597284d8a Merge branch 'MDL-85795-500-2' of https://github.com/junpataleta/moodle into MOODLE_500_STABLE 2025-08-07 11:26:17 +07:00
Huong Nguyen efab967320 Merge branch 'MDL-84217-500' of https://github.com/stevandoMoodle/moodle into MOODLE_500_STABLE 2025-08-07 10:56:28 +07:00
Ilya Tregubov 14fa538ea3 MDL-63395 user: Fix profile visibility check.
It needs to be done in user_get_user_details as well.
2025-08-07 10:29:14 +07:00
Jun Pataleta a8c8fc5b31 MDL-86205 message: Close drawer when activating elements outside of it 2025-08-07 11:23:19 +08:00
Jun Pataleta 4d39f092f7 Merge branch 'MDL-85674-500' of https://github.com/lameze/moodle into MOODLE_500_STABLE 2025-08-07 10:44:11 +08:00
Jun Pataleta b8cd47df05 Merge branch 'MDL-85701-500' of https://github.com/NashTechOpenUniversity/moodle into MOODLE_500_STABLE 2025-08-07 10:39:01 +08:00
Jun Pataleta caf2a6f129 Merge branch 'MDL-78233-500' of https://github.com/Tasiobg/moodle into MOODLE_500_STABLE 2025-08-07 10:35:11 +08:00
Jun Pataleta 401720a4fb Merge branch 'MDL-85802-500' of https://github.com/mihailges/moodle into MOODLE_500_STABLE 2025-08-07 10:33:41 +08:00
Mihail Geshoski 3f7b1ab5b5 Merge branch 'MDL-79540_500_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_500_STABLE 2025-08-07 10:19:42 +08:00
Huong Nguyen 7884309434 Merge branch 'MDL-84010-m500' of https://github.com/sammarshallou/moodle into MOODLE_500_STABLE 2025-08-07 09:17:40 +07:00
AMOS bot 36557f6243 Automatically generated installer lang files 2025-08-07 00:07:59 +00:00
ferran 8ac53d5231 Merge branch 'MDL-86176-500' of https://github.com/sarjona/moodle into MOODLE_500_STABLE 2025-08-06 16:21:58 +02:00
Sara Arjona 7ca14924c4 MDL-86176 badges: Adjust badges due to Canvas Credentials changes
This change addresses necessary adjustments to how OBV2.0 badges are
sent to backpacks, specifically to ensure compatibility and correct
functionality following recent updates to Canvas Credentials' conditions.

It ensures our badge integration continues to operate smoothly despite
these external changes.
2025-08-06 15:04:51 +02:00
Jun Pataleta 7f4770736b MDL-85795 behat: Update button text used in search steps 2025-08-06 19:56:31 +08:00
Simey Lameze 6f2f617a17 MDL-85674 behat: replace multiple steps by a single table step 2025-08-06 18:20:19 +08:00
andelacruz 879fbe0083 MDL-85674 mod_grade: Behat test for multiple questions manual grading 2025-08-06 17:39:06 +08:00
Jun Pataleta 3629975896 Merge branch 'MDL-86095-500' of https://github.com/rjnl/moodle into MOODLE_500_STABLE 2025-08-06 15:41:15 +08:00
yusufwib01 6ea99ba11e MDL-85718 tiny_link: Improve image link behavior in TinyMCE 2025-08-06 14:31:09 +07:00
Rajneel Totaram 9d2d5ea984 MDL-86095 mod_book: Let screenreader know print book opens in new window 2025-08-06 18:16:00 +12:00
Sara Arjona d49a5649e2 Merge branch 'MDL-86098-500' of https://github.com/roland04/moodle into MOODLE_500_STABLE 2025-08-06 06:53:49 +02:00
Huong Nguyen cbdeddcccf Merge branch 'MDL-85132_500_STABLE' of https://github.com/vladaskidanovas/moodle into MOODLE_500_STABLE 2025-08-06 10:54:12 +07:00
Huong Nguyen 575c22badb MDL-84464 report_log: Fix EOF 2025-08-06 10:38:04 +07:00
hieuvu f13043c44b MDL-85701 mod_quiz: Move delete activities before questions.
Make sure the question is not used when activities has been deleted.
2025-08-06 10:25:17 +07:00
Laurent David 84f558d47f MDL-84464 report_loglive: Hide report for teacher without groups 2025-08-06 10:15:25 +07:00
Laurent David 14c293058c MDL-84464 report_log: Hide report for teachers without groups
* Teachers without groups in SEPARATEGROUP mode should not see the report log page nor access it
2025-08-06 10:15:25 +07:00
Laurent David 47323247a4 MDL-84463 mod_feedback: Fix typo in behat test description 2025-08-06 01:34:17 +00:00
Laurent David 893e1c1005 MDL-84463 mod_feedback: Fix users in no group and email
* Non editing teachers in no group should not receive feedback emails
from students in no group
2025-08-06 01:34:17 +00:00
Laurent David 390333268c MDL-84463 mod_feedback: Fix show entries and nonrespondents
* Non editing teachers not in a groups should not see entries
from other users
2025-08-06 01:34:17 +00:00
raortegar 8fb680a4a8 MDL-85704 mod_bigbluebuttonbn: Update sesskey handling for compatibility 2025-08-06 01:34:17 +00:00
Huong Nguyen c7399d8aaf Merge branch 'MDL-85510-500' of https://github.com/NashTechOpenUniversity/moodle into MOODLE_500_STABLE 2025-08-06 08:30:11 +07:00
Khoa Nguyen Dang e417341fe1 MDL-85510 Questions: clearfix from MDL-84708 affects spacing
Co-authored-by: Mikel Martín Corrales <mikel@moodle.com>
2025-08-05 15:54:20 +07:00
Stevani Andolo 87d95b7a12 MDL-84217 editor_tiny: Added 'img-fluid' class to dropped image files 2025-08-05 15:07:21 +08:00
sam marshall c7760d4ae5 MDL-84010 core_files: sync_external_file can cause infinite recursion 2025-08-05 07:48:36 +01:00
Mihail Geshoski 1f497d91ac Merge branch 'MDL-86001-500' of https://github.com/paulholden/moodle into MOODLE_500_STABLE 2025-08-05 11:43:18 +08:00
Mihail Geshoski 42a3afdd97 Merge branch 'MDL-85565_500' of https://github.com/PhilippImhof/moodle into MOODLE_500_STABLE 2025-08-05 11:36:18 +08:00
Mihail Geshoski 93d8ca693d Merge branch 'MDL-85492_500' of https://github.com/krisbax/moodle into MOODLE_500_STABLE 2025-08-05 11:21:19 +08:00
Huong Nguyen f8925dccfd Merge branch 'MDL-85338-500' of https://github.com/paulholden/moodle into MOODLE_500_STABLE 2025-08-05 09:10:58 +07:00
Huong Nguyen 380f5a89fc Merge branch 'MDL-85231-500' of https://github.com/junpataleta/moodle into MOODLE_500_STABLE 2025-08-05 08:50:26 +07:00
Huong Nguyen 066c42f396 Merge branch 'MDL-86080-500' of https://github.com/roland04/moodle into MOODLE_500_STABLE 2025-08-05 08:40:23 +07:00
Huong Nguyen d5e8fa372b Merge branch 'MDL-86043-500' of https://github.com/tasiobg/moodle into MOODLE_500_STABLE 2025-08-05 08:32:06 +07:00
Jun Pataleta 81af2286bf MDL-85795 message: Enclose the search widget in a group 2025-08-04 19:15:01 +08:00
Jun Pataleta 77065687fa MDL-85795 search: Enclose the search widget in a group 2025-08-04 19:15:00 +08:00
Shamim Rezaie f212c7f477 Merge branch 'MDL-85787-500-2' of https://github.com/junpataleta/moodle into MOODLE_500_STABLE 2025-08-04 09:53:26 +10:00
Jun Pataleta 565fe4bc07 MDL-85794 message: Set notification preferences controls within a group 2025-08-01 18:50:22 +08:00
Mihail Geshoski de28b775ad MDL-85802 mod_quiz: Fix double-escaping in notification content
Avoids double-escaping when filtering notification content. Adds
a unit test to validate the content filtering logic.
2025-08-01 18:50:06 +08:00
Iñigo Zendegi 0c7746bdea MDL-85802 mod_quiz: format course/quiz notification content. 2025-08-01 18:50:05 +08:00
Mikel Martín 5be547bd21 MDL-86080 theme_boost: Fix YUI tables styles
MDL-85659 generated a regression on YUI tables that are displayed
without borders. This patch improves the fix including YUI tables
as an exception too.
2025-08-01 08:49:47 +02:00
Jun Pataleta ad93f921e5 Merge branch 'MDL-85945-500-enfix' of https://github.com/mudrd8mz/moodle into MOODLE_500_STABLE 2025-08-01 14:34:46 +08:00
Jun Pataleta 4998facd49 MDL-85231 message: Style the notification buttons consistently 2025-08-01 13:08:34 +08:00
Jun Pataleta 57e18d38d5 MDL-85231 message_popup: Add a close button on the notification popover
This follows the recommendation on the ARIA Authoring Practices Guide
(APG) for modal dialogues:
> It is strongly recommended that the tab sequence of all dialogs
> include a visible element with role button that closes the dialog,
such as a close icon or cancel button.

https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/
2025-08-01 13:08:34 +08:00
Laurent David 6470c5444d MDL-85231 message_popup: Add focustrap in message popup 2025-08-01 13:08:34 +08:00
Huong Nguyen 2b8ce68fd3 Merge branch 'MDL-86137-500' of https://github.com/roland04/moodle into MOODLE_500_STABLE 2025-08-01 09:15:06 +07:00
David Mudrák adf34486b2 MDL-85945 lang: Use fixed strings in the tests, too 2025-07-31 17:00:29 +02:00
Helen Foster 0327b79d68 MDL-85945 lang: Import fixed English strings (en_fix) 2025-07-31 17:00:29 +02:00
Sara Arjona 34968cacf5 weekly release 5.0.1+ 2025-07-31 16:08:31 +02:00
Sara Arjona e17ca51752 NOBUG: Add upgrade notes 2025-07-31 16:08:30 +02:00
Sara Arjona 4885e99858 Merge branch 'install_500_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_500_STABLE 2025-07-31 16:07:21 +02:00
Michael Hawkins 02353916b0 Merge branch 'MDL-85362-500' of https://github.com/HuongNV13/moodle into MOODLE_500_STABLE 2025-07-31 14:35:52 +08:00
Huong Nguyen 33fb09b447 Merge branch 'MDL-85967-500' of https://github.com/davewoloszyn/moodle into MOODLE_500_STABLE 2025-07-31 10:51:38 +07:00
Huong Nguyen bf0f98505b Merge branch 'MDL-86062-500' of https://github.com/andrewnicols/moodle into MOODLE_500_STABLE 2025-07-31 10:20:57 +07:00
Huong Nguyen 130d1ff7b4 Merge branch 'MDL-84485-Select-webservice-in-wstoken-behat-breadcrumb-500' of https://github.com/farhan6318/moodle into MOODLE_500_STABLE 2025-07-31 10:17:47 +07:00
David Woloszyn ef99ad55eb MDL-85967 aiprovider_openai: Modify action config on upgrade 2025-07-31 13:12:53 +10:00
David Woloszyn 1cc02578c2 MDL-85967 aiprovider_openai: O1 model settings updated 2025-07-31 13:12:53 +10:00
David Woloszyn 9928d23bc0 MDL-85967 aiprovider_openai: Cast types to stored model settings 2025-07-31 13:12:53 +10:00
David Woloszyn 830c66e7ad MDL-85967 aiprovider_openai: Update param max_completion_tokens
AMOS BEGIN
  MOV [settings_max_tokens_help,aiprovider_openai],[settings_max_completion_tokens_help,aiprovider_openai]
AMOS END
2025-07-31 13:12:31 +10:00
Huong Nguyen 3b786b87c3 Merge branch 'MDL-85897-500' of https://github.com/andrewnicols/moodle into MOODLE_500_STABLE 2025-07-31 08:58:27 +07:00
AMOS bot c57f19419f Automatically generated installer lang files 2025-07-31 00:08:06 +00:00
Shamim Rezaie 92adb9005c Merge branch 'MDL-85295-500' of https://github.com/rjnl/moodle into MOODLE_500_STABLE 2025-07-31 02:43:33 +10:00
Shamim Rezaie c539d4bfb8 Merge branch 'MDL-72133-filter-deleted-logs-MOODLE_500_STABLE' of https://github.com/bwalkerl/moodle into MOODLE_500_STABLE 2025-07-31 02:26:53 +10:00
Mihail Geshoski 72fea763a5 Merge branch 'MDL-86113-500' of https://github.com/snake/moodle into MOODLE_500_STABLE 2025-07-30 23:29:44 +08:00
Mihail Geshoski c50df31426 Merge branch 'MDL-85470-500' of https://github.com/junpataleta/moodle into MOODLE_500_STABLE 2025-07-30 23:11:28 +08:00
Tasio 1a6d4949cf MDL-86043 core: keep SQL consistent with other Moodle versions.
This change resolves issues with Oracle in Moodle 4.5. It has been ported to newer Moodle versions as it improves
the existing SQL and helps maintain consistency across different Moodle versions.
2025-07-30 16:18:41 +02:00
Paul Holden 85fe9d9239 MDL-85338 message: make messaging drawer responsive to sticky footer.
Co-authored-by: David Woloszyn <david.woloszyn@moodle.com>
2025-07-30 13:58:45 +01:00
Tasio b9ba50fbb6 MDL-86043 core: test for the task sending new users an email 2025-07-30 14:32:57 +02:00
Jun Pataleta 62b1b3af74 Merge branch 'MDL-85995-500' of https://github.com/rjnl/moodle into MOODLE_500_STABLE 2025-07-30 17:10:14 +08:00
Mikel Martín 4c2dc280ef MDL-86137 core_role: Fix role tables styles 2025-07-30 10:42:37 +02:00
Mikel Martín 76251e49f4 MDL-86098 badges: Fix manage backpacks table styles 2025-07-30 09:20:29 +02:00
Andrew Nicols 7e7023923c MDL-86062 mod_choice: Stop calling get_string from lib.php 2025-07-30 13:58:40 +08:00
Andrew Nicols bf18273a08 MDL-85897 core: Move all deprecations to emit_deprecation 2025-07-30 13:53:27 +08:00
Andrew Nicols 18586a863d MDL-85897 core: Add emit_deprecation() method
This changeset adds a new `\core\deprecation::emit_deprecation` method
with the same signature as the `emit_deprecation_if_found()` method.

It is intended to be used in places where something is guaranteed to
have been deprecated, and will throw appropriate debugging if the
deprecated attribute is not found.

The `emit_deprecation_if_found()` method should still be used where the
item being checked is not known to be deprecated or not, for example in
calling code.
2025-07-30 13:53:21 +08:00
Huong Nguyen adb245071a Merge branch 'MDL-85590_fix_modal_backdrop_attachment_point_500' of https://github.com/MariaMozgunova/moodle into MOODLE_500_STABLE 2025-07-30 08:37:41 +07:00
Farhan Karmali d2fcaa515b MDL-84485 webservice: Add Behat step for mobile web service selection
This commit introduces a mandatory service selection step in our Behat tests
to ensure consistent behavior in environments with multiple third-party services.
2025-07-29 15:58:50 +05:30
Huong Nguyen 5a2127519d Merge branch 'MDL-85855-500' of https://github.com/paulholden/moodle into MOODLE_500_STABLE 2025-07-29 16:49:46 +07:00
Jun Pataleta c11f3c4f07 MDL-85470 badges: Add a11y Behat test for the manage badges page 2025-07-29 15:15:18 +08:00
Jun Pataleta 7ab43c028c MDL-85470 badges: Use badge:namewithimagelink column in badges table 2025-07-29 15:15:17 +08:00
Jun Pataleta 13c95e480e MDL-85470 reportbuilder: New column containing badge image, name, link 2025-07-29 15:15:17 +08:00
Jun Pataleta 6d6b7dc8b2 MDL-85787 course: Limit course index drag and drop to certain pages only
Only allow the drag and drop functionality in the course index on pages
that provide alternatives to move course items such as the course
homepage and the course section view pages.

This is to meet the WCAG 2.2 Level AA Success Criterion 2.5.7 for
dragging movements.
See: https://www.w3.org/WAI/WCAG22/Understanding/dragging-movements
2025-07-29 11:46:14 +08:00
Jayce Birrell 096be6d576 MDL-85698 core: combo box informs screen reader users 2025-07-29 10:50:16 +09:30
AMOS bot 4445d5f475 Automatically generated installer lang files 2025-07-28 13:17:04 +00:00
Maria Mozgunova e8f71adf00 MDL-85590 core: Fix modal backdrop attachment point for full screen 2025-07-28 10:46:58 +01:00
Benjamin Walker c9fe936e29 MDL-72133 report_log: Add fallback context display 2025-07-28 09:06:42 +10:00
Benjamin Walker ff8f5d06a5 MDL-72133 report_loglive: Display logs filtered by deleted course ids 2025-07-28 09:06:42 +10:00
Benjamin Walker 283f0855c0 MDL-72133 report_log: Display logs filtered by deleted course ids 2025-07-28 09:06:42 +10:00
Philipp Imhof 8c22b5537a MDL-85565 phpunit: check for <select> before <option>
Make sure that assert_select_options() will fail when the output does
not contain a <select> and therefore does not have the given options.
2025-07-25 13:13:09 +02:00
Jake Dallimore 3a7bdef5b6 MDL-86113 mod_lti: skip slow network calls during tests
This check exists to determine whether a given tool URL is a cartridge,
specifically when the URL does not end in .xml. It hits the URL to
determine this. In tests, we have many mock tool URLs, which won't
resolve, and running this code causes large hangs and random failures.
Any tests covering cartridge support still work fine, provided they
continue to use URLs ending in .xml; this change only skips the check
during tests for other non-xml URLs.
2025-07-25 16:39:26 +08:00
Michael Hawkins 5780da5481 weekly release 5.0.1+ 2025-07-25 12:14:11 +08:00
Michael Hawkins 3bcb3343da Merge branch 'MDL-83111-500' of https://github.com/sh-csg/moodle into MOODLE_500_STABLE 2025-07-24 12:01:01 +08:00
Huong Nguyen 2ccf85b0eb Merge branch 'MDL-86049-500' of https://github.com/andrewnicols/moodle into MOODLE_500_STABLE 2025-07-24 09:47:47 +07:00
Huong Nguyen 498c972374 Merge branch 'MDL-85504-500' of https://github.com/junpataleta/moodle into MOODLE_500_STABLE 2025-07-24 09:43:59 +07:00
Huong Nguyen 8fecec1471 Merge branch 'MDL-85759-500' of https://github.com/paulholden/moodle into MOODLE_500_STABLE 2025-07-24 09:30:36 +07:00
Rajneel Totaram 2d93e34ef1 MDL-85995 mod_book: Make previous/next buttons accessible 2025-07-24 10:08:18 +12:00
Jun Pataleta e85f5beef6 MDL-85504 mod_feedback: Enhance the question edit form via JS
The drag handle and actions menu should not be within the accessible
labels of the question items. In order to enhance the question edit
form with these, they need to be rendered via JS outside of container
of the questions' accessible name.
2025-07-23 16:15:36 +08:00
Amaia Anabitarte c82ba0b35e Merge branch 'MDL-85989-500' of https://github.com/sarjona/moodle into MOODLE_500_STABLE 2025-07-23 10:13:33 +02:00
Jun Pataleta 2d0b20c180 MDL-85504 form: Legend's label template data should not be escaped
The label context data in the fieldset's legend tag should not be
escaped and allow raw HTML given that legend tags can contain
phrasing content and headings.

See developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/legend.
2025-07-23 16:09:20 +08:00
Huong Nguyen ced7437759 Merge branch 'MDL-60799_500' of https://github.com/jonof/moodle into MOODLE_500_STABLE 2025-07-23 09:03:36 +07:00
Huong Nguyen aa70d4652e Merge branch 'MDL-83996-readonly-false-positive-MOODLE_500_STABLE' of https://github.com/bwalkerl/moodle into MOODLE_500_STABLE 2025-07-23 09:00:07 +07:00
Huong Nguyen cbe6e407ab Merge branch 'MDL-84787-500' of https://github.com/paulholden/moodle into MOODLE_500_STABLE 2025-07-23 08:51:31 +07:00
Huong Nguyen 8f1b1275f2 Merge branch 'MDL-85573-tool-brickfield-uninstall-500' of https://github.com/szymonk1101/moodle into MOODLE_500_STABLE 2025-07-23 08:33:44 +07:00
Shamim Rezaie bccd5d8a0b Merge branch 'MDL-85307-500' of https://github.com/Jayce0808/moodle into MOODLE_500_STABLE 2025-07-23 09:22:14 +10:00
Mihail Geshoski 7066bc6e9a Merge branch 'MDL-86073-500' of https://github.com/paulholden/moodle into MOODLE_500_STABLE 2025-07-22 23:53:43 +08:00
Mihail Geshoski 9f9ac79d0a Merge branch 'MDL-85997-500' of https://github.com/paulholden/moodle into MOODLE_500_STABLE 2025-07-22 23:36:57 +08:00
Mihail Geshoski 1b4d6d8f26 Merge branch 'MDL-85038-M500_dml_missing_record_exception-when-running-mod_assign-task-send_assignment_due_soon_notification_to_user' of https://github.com/ziegenberg/moodle into MOODLE_500_STABLE 2025-07-22 23:29:17 +08:00
Mihail Geshoski 3394936d37 Merge branch 'MDL-83558-500' of https://github.com/andrewgos/moodle into MOODLE_500_STABLE 2025-07-22 13:54:24 +08:00
Huong Nguyen e8add02056 MDL-85362 core: Define environment requirements for Moodle 5.1 2025-07-22 10:53:25 +07:00
Rajneel Totaram 8c0157a7e0 MDL-85295 qtype_ordering: render feedback properly
'answertext' is already passed through format_text(), so no need to escape it in the template.
2025-07-22 11:40:26 +12:00
Andrew Nicols e642fad70f MDL-86049 core: Do not use the component cache before purge
When trying to resolve a corrupt cache where it is not possible to
complete the Moodle setup/bootstrap, it is necessary to ignore the
current cache to load the cache purging infrastructure.
2025-07-21 12:25:26 +08:00
Benjamin Walker 859fb5a319 MDL-83996 sessions: Fix false positive read only sessions errors 2025-07-21 10:26:29 +10:00
Paul Holden 5062363f32 MDL-86073 reportbuilder: fix external assertions of button property.
The tests from c439e2d3 tried to assert they were empty, when in fact
they didn't exist at all. Caused PHPUnit warnings.
2025-07-18 18:54:40 +01:00
Mihail Geshoski d52b2568b0 weekly release 5.0.1+ 2025-07-18 14:52:33 +08:00
Mihail Geshoski 9a9adc8069 NOBUG: Add upgrade notes 2025-07-18 14:52:33 +08:00
Mihail Geshoski 7d66c0c37b Merge branch 'install_500_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_500_STABLE 2025-07-18 14:52:19 +08:00
Paul Holden 3d24c81e18 MDL-85944 block_myoverview: fix previously badly nested SCSS. 2025-07-17 15:24:45 +07:00
Mihail Geshoski b1f771062a Merge branch 'MDL-85055-500' of https://github.com/lameze/moodle into MOODLE_500_STABLE 2025-07-17 12:15:30 +08:00
Huong Nguyen 0668e2186a Merge branch 'MDL-85050-500' of https://github.com/NashTechOpenUniversity/moodle into MOODLE_500_STABLE 2025-07-17 10:24:29 +07:00
Huong Nguyen a2495a7e7d Merge branch 'MDL-85944-500' of https://github.com/paulholden/moodle into MOODLE_500_STABLE 2025-07-17 08:52:55 +07:00
Huong Nguyen 06c44dc7d2 Merge branch 'MDL-81384-500' of https://github.com/paulholden/moodle into MOODLE_500_STABLE 2025-07-17 08:43:58 +07:00
Shamim Rezaie ae14c21753 Merge branch 'MDL-73003-500' of https://github.com/Jayce0808/moodle into MOODLE_500_STABLE 2025-07-17 07:29:59 +10:00
Paul Holden 1ceae923f3 MDL-85055 task: correct use of DI provided frozen Clock API.
Fixes some of the usage introduced in tests as part of a35335a9.
2025-07-16 19:49:14 +01:00
Mihail Geshoski 241094d371 Merge branch 'MDL-77237-500' of https://github.com/meirzamoodle/moodle into MOODLE_500_STABLE 2025-07-16 23:53:57 +08:00
Mihail Geshoski eac831f04f Merge branch 'MDL-84466_500_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_500_STABLE 2025-07-16 13:16:21 +08:00
Huong Nguyen f280d19a55 Merge branch 'MDL-85609-500' of https://github.com/paulholden/moodle into MOODLE_500_STABLE 2025-07-16 09:52:43 +07:00
Andrew Gosali 729b1753b5 MDL-83558 mod_forum: fix incorrect message on edge case scenario
(when student tries to see all participants on a forum with visible groups mode)
2025-07-15 22:45:55 +07:00
Mark Johnson 7b45a898b0 MDL-84466 question/qbank: Update pending transfer notification
This updates the logic and text of the notification that is shown while
the question transfer task is still pending, to include instances of the
new transfer_questions task. It also ensures the notification is shown
if a user tries to access the question editing screen from outside the
question bank.
2025-07-15 12:03:25 +01:00
Mark Johnson 60f58afc5f MDL-84466 qbank: Transfer question files and tags in separate tasks
On a large site, the task to transfer question categories to the new
mod_qbanks contexts could take a very long time, as of any transferred
categories contain questions using files, each file has to be updated
individually.

This change splits up the transfer into 2 stages. The first stage
(transfer_question_categories) updates the context IDs on each question
category and moves them to their new top category, then spawns an
instance of transfer_questions for each category that was moved.
transfer_questions then handles moving the files and tags for questions
in a single category at a time. This allows the transfer process to be
parallelised by using multi cron or ad-hoc task runners, so should speed
things up on larger sites.
2025-07-15 12:03:25 +01:00
Daniel Ziegenberg d0c9e9c208 MDL-85038 assignment: fix exception on sending assignment notification
When the assignment gets deleted between the creation of the ad-hoc task
mod_assign\task\send_assignment_due_soon_notification_to_user or
mod_assign\task\send_assignment_overdue_notification_to_user and its
execution, the ad-hoc task fails with a dml_missing_record_exception and
the task gets stuck.

In this case we do not want the task to fail and just return with an
appropriate mtrace.

Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
2025-07-15 10:46:14 +02:00
meirzamoodle 86021f2698 MDL-77237 core: Suppress debugging during capabilities cleanup
To prevent the debugging messages from appearing during the upgrade,
I set a flag to hide them.

For the test file, I adjusted the parameters in
the unassign_capability() function, which seemed to be using
the parameter intended for assign_capability().
2025-07-15 14:33:26 +07:00
Paul Holden 18eb86b680 MDL-85944 block_myoverview: specific styling for "My courses" page. 2025-07-15 08:02:14 +01:00
Mihail Geshoski ceb7919450 Merge branch 'MDL-85257_500_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_500_STABLE 2025-07-15 11:22:36 +08:00
Mihail Geshoski b584feb11f Merge branch 'MDL-85246-500' of https://github.com/rjnl/moodle into MOODLE_500_STABLE 2025-07-15 11:11:54 +08:00
Huong Nguyen 59bfbfac49 Merge branch 'MDL-72582-MOODLE_500_STABLE' of https://github.com/tsmilan/moodle into MOODLE_500_STABLE 2025-07-15 10:07:50 +07:00
Huong Nguyen 1189b22417 Merge branch 'MDL-86016-500' of https://github.com/andrewnicols/moodle into MOODLE_500_STABLE 2025-07-15 09:56:33 +07:00
Huong Nguyen 90cfc6aaee Merge branch 'MDL-85040-500-new' of https://github.com/meirzamoodle/moodle into MOODLE_500_STABLE 2025-07-15 09:42:22 +07:00
Mihail Geshoski ca2bbff2b3 Merge branch 'MDL-85754_500_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_500_STABLE 2025-07-15 10:31:41 +08:00
Mihail Geshoski 18a208be56 Merge branch 'MDL-84385-requireonce-500' of https://github.com/leonstr/moodle into MOODLE_500_STABLE 2025-07-15 09:41:45 +08:00
Andrew Nicols 946e3934a3 MDL-86016 core: Remove xmldb test in favour of unit test 2025-07-15 09:32:55 +08:00
Andrew Nicols 35e27f754e MDL-86016 tests: Make install.xml test less restrictive 2025-07-15 09:32:55 +08:00
Paul Holden ac432b5c14 MDL-81384 theme_boost: centre help icon margin/padding. 2025-07-14 21:32:26 +01:00
meirzamoodle 2a107a1306 MDL-85040 forms: Make required form icons decorative
The required icon in mforms is not necessary. The div containing it
already has a title attribute that enables mouse users to hover on the
icon and see its meaning.

Screen reader users will know whether a field is required or not via
the `aria-required` attribute.

Labelling the required icon via `aria-label` does not pass the
a11y audit.

Given these, it only makes sense to make the required icon decorative
for mforms.

Co-authored-by: Jun Pataleta <jun@moodle.com>
2025-07-14 14:23:45 +07:00
Huong Nguyen 3a116dddfa Merge branch 'MDL-85817-500' of https://github.com/davewoloszyn/moodle into MOODLE_500_STABLE 2025-07-14 13:52:30 +07:00
AMOS bot 5582d18482 Automatically generated installer lang files 2025-07-12 00:07:58 +00:00
Paul Holden b64e870f28 MDL-86001 qbank_columnsortorder: populate preview data question text. 2025-07-11 15:23:41 +01:00
Paul Holden 1829c5e8b2 MDL-85997 output: require CLI library from corresponding renderer. 2025-07-11 11:59:33 +01:00
Mark Johnson 57553a1b19 MDL-79540 qbank_managecategories: Don't allow own child as parent
When we build the options for a question category selector, the
"nochildrenof" option isn't correctly compared to the category ID. This
means we can select a category's own children as its new parent.
2025-07-11 10:08:33 +01:00
Sara Arjona 16303a2dd2 MDL-85989 output: Fix choicelist when selected 0 is not first
Previously, when the selected value in a choicelist was 0 but not in
the first position, the behavior was incorrect.
This commit fixes that issue, ensuring the choicelist behaves as expected
regardless of the position of the 0 value.
2025-07-11 09:15:06 +02:00
Michael Hawkins 61af040cd5 weekly release 5.0.1+ 2025-07-11 12:48:56 +08:00
Michael Hawkins 96b1cd1700 NOBUG: Add upgrade notes 2025-07-11 12:48:56 +08:00
Leon Stringer 9ff8b12333 MDL-84385 mod_assign: Remove unneeded require_once 2025-07-10 09:27:48 +01:00
Mark Johnson 4eace2bee8 MDL-85257 mod_quiz: Dont show edit links when you dont have permission
The quiz editing page includes an edit link for each question, and a
badge for questions in a shared bank that links to that bank.

It is possible that the user viewing the quiz does not have access to
edit the question or view the question bank, which means these links are
broken.

This change only adds the links if the user has permission for the pages
they link to.
2025-07-10 09:16:44 +01:00
Huong Nguyen f7155bf7e9 Merge branch 'MDL-85863-500' of https://github.com/yusufwib01/moodle into MOODLE_500_STABLE 2025-07-10 10:46:39 +07:00
Mihail Geshoski 607a2f9c78 Merge branch 'MDL-85689-500' of https://github.com/andelacruz/moodle into MOODLE_500_STABLE 2025-07-10 11:38:57 +08:00
Mark Johnson 3bc23527e7 MDL-85721 qtype_multianswer: Update find_duplicated_subquestions for Oracle compatibility 2025-07-10 10:28:48 +07:00
Mihail Geshoski c71ca318f5 MDL-84695 mod_qbank: Fix illegal whitespace 2025-07-10 11:08:27 +08:00
Mark Johnson dd87321d18 MDL-84695 mod_qbank: fix unit test for MS SQL server 2025-07-10 10:29:25 +08:00
Huong Nguyen e02277fa76 Merge branch 'MDL-85262-500' of https://github.com/paulholden/moodle into MOODLE_500_STABLE 2025-07-10 08:33:29 +07:00
Huong Nguyen 3a96c45fff Merge branch 'MDL-84901-500' of https://github.com/paulholden/moodle into MOODLE_500_STABLE 2025-07-10 08:25:38 +07:00
Mihail Geshoski e27a882ce7 Merge branch 'MDL-85939-500' of https://github.com/paulholden/moodle into MOODLE_500_STABLE 2025-07-09 23:25:46 +08:00
Mihail Geshoski 4d549717e0 Merge branch 'MDL-84255-500' of https://github.com/lucaboesch/moodle into MOODLE_500_STABLE 2025-07-09 23:18:21 +08:00
Rajneel Totaram b76b1a074a MDL-85246 mod_quiz: Fix quiz grade feedback
Using $CFG->recovergradesdefault and/or $gradeitem->refresh_grades()
are problematic when viewing a quiz. When reenrolling a user with
previous attempts, a teacher can choose not to recover the user's grades,
even when recovergradesdefault=true. This must be respected when
the user views the quiz. For site with recovergradesdefault=false,
the users always see a grade of 0, which is wrong.

This change shows the correct grade score and feedback to users and
avoids unintentionally recovering the grades.
2025-07-09 20:33:00 +12:00
Mihail Geshoski 577411727e MDL-85721 qtype_multianswer: Fix version bump 2025-07-09 11:38:03 +08:00
andelacruz 0b66b8db21 MDL-85689 mod_quiz: Behat for adding and deleting page from quiz 2025-07-09 10:20:45 +08:00
Mihail Geshoski 0d1f74f1e3 Merge branch 'MDL-85721_500_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_500_STABLE 2025-07-09 10:20:35 +08:00
Huong Nguyen 9f45c875e6 Merge branch 'MDL-85697-500' of https://github.com/andelacruz/moodle into MOODLE_500_STABLE 2025-07-09 09:10:46 +07:00
Huong Nguyen b6d55490c3 Merge branch 'MDL-85779-500' of https://github.com/paulholden/moodle into MOODLE_500_STABLE 2025-07-09 09:06:10 +07:00
Paul Holden bf2f2174e4 MDL-85759 qbank_history: define core t/log fontawesome icon mapping.
Its lack of existence caused question action menu misalignment.
2025-07-08 18:05:48 +01:00
Paul Holden 265f24bd4f MDL-85939 qbank_columnsortorder: improve preview page table alignment. 2025-07-08 17:58:34 +01:00
Kristiina.Bax 9340119538 MDL-85492 report_questioninstances: sort qtypes in alphabetical order 2025-07-08 17:18:20 +01:00
Amaia Anabitarte 71cd06c57c Merge branch 'MDL-85659-500' of https://github.com/roland04/moodle into MOODLE_500_STABLE 2025-07-08 17:36:20 +02:00
Mihail Geshoski 6e4e00b0fe Merge branch 'MDL-85069_500_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_500_STABLE 2025-07-08 22:28:36 +08:00
Mihail Geshoski 9416ffd303 Merge branch 'MDL-84695-500' of https://github.com/lucaboesch/moodle into MOODLE_500_STABLE 2025-07-08 22:21:25 +08:00
Mihail Geshoski c3c2b58a7f Merge branch 'MDL-85881_500_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_500_STABLE 2025-07-08 22:14:31 +08:00
Paul Holden f096b8a658 MDL-84901 auth: specific session start error language string. 2025-07-08 12:33:05 +01:00
Huong Nguyen becb2dfd80 Merge branch 'MDL-84976-500' of https://github.com/rjnl/moodle into MOODLE_500_STABLE 2025-07-08 18:13:38 +07:00
Huong Nguyen f3d15ba5fd Merge branch 'MDL-85037-500' of https://github.com/paulholden/moodle into MOODLE_500_STABLE 2025-07-08 18:08:52 +07:00
Mark Johnson d0a3348bf0 MDL-85754 quiz: Test for permission checks in "Add from question bank" 2025-07-08 12:01:44 +01:00
Mark Johnson 563280c99a MDL-85754 question: Don't show banks where user has no permission
The Switch Banks UI was listing all question banks on the course where
the use had the managecategory permission, plus the other banks they had
used recently.

This conflicted with the check when it tried to load a selected bank,
which checked the useall/usemine permissions. This could lead to errors
if this permission had been removed.

This applies consistent checks to both lists with the useall/usermine
permissions instead.
2025-07-08 12:01:43 +01:00
Mark Johnson 84d7c6ce6d MDL-85754 question: Only use current context in question_edit_contexts
Due to the changes in question sharing, it no longer makes sense to look
at parent contexts when establishing permissions in the question bank.

Questions now belong to a single activity module, and we should be able
to inherit and override permisions at that level like we do with any
other.

In the longer term, we probably want to replace question_edit_contexts
with something simpler, but for the time being this should apply the
correct permission checks where it's used without requiring a big
refactor of existing code.
2025-07-08 12:01:42 +01:00
Huong Nguyen a875d60beb Merge branch 'MDL-85947-M500_bump-GHA-ubuntu-24-04' of https://github.com/ziegenberg/moodle into MOODLE_500_STABLE 2025-07-08 17:35:07 +07:00
Mihail Geshoski 78cb9483b6 Merge branch 'MDL-41924_500_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_500_STABLE 2025-07-08 17:06:32 +08:00
andelacruz 4e09d3dd33 MDL-85697 mod_lesson: Behat for lesson group and user overrides 2025-07-08 16:41:01 +08:00
andelacruz 69ba3e7149 MDL-85697 mod_assign: Behat for assignment group and user overrides 2025-07-08 16:17:46 +08:00
andelacruz 09873ae9ce MDL-85697 mod_quiz: Behat for quiz group and user overrides 2025-07-08 16:17:46 +08:00
Luca Bösch ca806aaeaf MDL-84255 quiz: Show quiz title in heading in accessrule_seb layout. 2025-07-08 07:52:21 +02:00
Daniel Ziegenberg 4be548dafc MDL-85947 ci: Bump GHA to Ubuntu 24.04
Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
2025-07-07 16:13:49 +02:00
yusufwib01 7ad990513b MDL-85863 user: Defer new-password email until after transaction commit 2025-07-07 21:03:26 +07:00
Trisha Milan 6c8921f730 MDL-72582 core_files: Add unit test for readfile_accel debugging output
Adds a unit test for the debugging message triggered when readfile_accel() detects
a non-empty output buffer. The readfile_accel() function directly manipulates the
output buffers, so calling it from within PHPUnit triggers an error like "Test code
or tested code closed output buffers other than its own".

As a workaround, the test runs a CLI script in a separate process, allowing buffer
behaviour to be isolated and debugging output to be captured for assertions.
2025-07-07 18:56:48 +10:00
Matt Rice 5b5b3367bb MDL-72582 core_files: Update readfile_accel error handling
Correct the error handling in readfile_accel to properly log errors when
working on a stored_file, rather than hiding the true error behind the
incorrect "Object of class stored_file could not be converted to
string."

Co-authored-by: Simey Lameze <simey@moodle.com>
Co-authored-by: Trisha Milan <trishamilan@catalyst-au.net>
2025-07-07 18:56:39 +10:00
Mikel Martín 5615a83e58 MDL-85659 theme_boost: Fix editor generated tables styles 2025-07-07 10:52:17 +02:00
Laurent David 742b352229 MDL-81702 core_message: Add focustrap and backdrop
* Add focustrap and backdrop to message drawer.
2025-07-07 07:09:02 +02:00
Laurent David 2d1268a5dd MDL-81702 theme_boost: Add focus lock to drawers
* Add focus lock to drawers for small screens
2025-07-07 07:09:01 +02:00
Laurent David 7212d35a88 MDL-81702 theme_boost: Remove site home link from drawers
* The site-home-link was added to all menu drawers and should
only be added to the main menu drawer (mobile version)
2025-07-07 07:09:01 +02:00
David Woloszyn 043caa723a MDL-85817 mod_assign: Update assignment SMS strings 2025-07-07 11:30:48 +10:00
Luca Bösch e2e5de61da MDL-84695 mod_qbank: More precise get_qbank_ids_of_type_in_course query. 2025-07-06 12:14:37 +02:00
Mihail Geshoski 0365910448 weekly release 5.0.1+ 2025-07-06 09:25:48 +08:00
Mihail Geshoski c31fd05b33 NOBUG: Add upgrade notes 2025-07-06 09:25:48 +08:00
Mihail Geshoski 22456ecb9b Merge branch 'install_500_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_500_STABLE 2025-07-06 09:25:34 +08:00
Mihail Geshoski 0739459df4 Merge branch 'MDL-85350_500' of https://github.com/PhilippImhof/moodle into MOODLE_500_STABLE 2025-07-05 20:13:13 +08:00
Mihail Geshoski a5d1f7638b Merge branch 'MDL-84487_500_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_500_STABLE 2025-07-05 20:13:13 +08:00
Mihail Geshoski c6e6c86753 Merge branch 'MDL-85200_500_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_500_STABLE 2025-07-05 20:13:13 +08:00
Mihail Geshoski a11ed5ab3c Merge branch 'MDL-85563-m500' of https://github.com/NeillM/moodle into MOODLE_500_STABLE 2025-07-05 20:13:13 +08:00
Mihail Geshoski 8fecd39ac1 Merge branch 'MDL-85210_500_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_500_STABLE 2025-07-05 20:13:13 +08:00
Mihail Geshoski dc15dee3ae Merge branch 'MDL-85432-500' of https://github.com/sh-csg/moodle into MOODLE_500_STABLE 2025-07-05 20:13:13 +08:00
Paul Holden 24419c84c6 MDL-85037 block_html: correct access checks for plugin file serving. 2025-07-04 08:55:52 +08:00
Mark Johnson 3094adbb91 MDL-41924 quiz: Annotate questions for backups
Find question bank entries for all questions referenced by a question
slot, and for all questions matching a question bank referenced used for
a random question, and record their IDs so they can be included in
backups.
2025-07-03 14:50:53 +01:00
Mark Johnson 006568435d MDL-41924 backup: Reduce questions included in backups
Historically, backups of an activity using questions would include all
questions for the entire context, where any question had been used. This
could lead to very large backup files, and exacerbated problems with
question duplication.

This changes the process for annotating categories to include in the
backup to find specific categories, rather than whole contexts. It
includes 3 groups of categories:
1. Those that belong to the backed up activity's context.
2. Those that contain a question used directly in a question_reference
belonging to the activity.
3. Those that contain a question used via a question_set_reference
belonging to the activity.
It also adds in any parent categories that are not included by the
above, so we have a complete hierarchy.

For group 1, the backup will include all questions belonging to these
categories, as before. For groups 2 and 3, it will only include
questions for question bank entries that have been annotated by the
activity.
2025-07-03 14:50:52 +01:00
Huong Nguyen ff520ebf34 Merge branch 'MDL-76342-500' of https://github.com/yusufwib01/moodle into MOODLE_500_STABLE 2025-07-03 09:07:36 +07:00
Huong Nguyen 9d14a3a81d Merge branch 'MDL-85769-500' of https://github.com/meirzamoodle/moodle into MOODLE_500_STABLE 2025-07-03 09:05:13 +07:00
Mihail Geshoski d2a192eddb Merge branch 'patch/MDL-85666-500' of https://github.com/skodak/moodle into MOODLE_500_STABLE 2025-07-03 09:55:22 +08:00
Mark Johnson e4a39caeaa MDL-85069 qbank_bulkmove: Load banks and categories dynamically
The bulk move question dialogue presents 2 autocomplete fields for
selection of the target bank and category to move questions to. This was
loading all banks and categories the user could access, and filtering
categories based on the selected bank.

On large sites, this was not usable as there were too many banks and
categories to load leading to timeouts.

This refactors the dialogue to load just the current bank and cagtegory
initially, then load other options on demand via AJAX.
2025-07-02 10:59:05 +01:00
Mark Johnson b9b69a5e3e MDL-85069 question: Services for question bank and category search
This updates the core_question_search_shared_banks external function
with additional parameters to make it applicable outside of the "Switch
bank" dialogue in the quiz, with the corresponding changes to the
question_banks_datasource Javascript module, and unit test coverage.

It also adds a new \core_question\output\question_category_selector
class for rendering a select list of question categories, migrating
the logic used in qbank_managecategories to a core namespace. There
is a fragment callback for rendering this via AJAX.
2025-07-02 10:59:04 +01:00
Petr Skoda c652c8e4d3 MDL-85666 phpunit: add general plugin tests
This defines new group which can be used
to limit execution of these tests to one plugin only.

For example to execute all tests for Label module use:

phpunit --testsuite=mod_label_testsuite
phpunit --group=plugin_checks --filter=mod_label

or

phpunit --filter=mod_label
2025-07-02 07:12:33 +02:00
AMOS bot dd3379abf9 Automatically generated installer lang files 2025-07-02 00:09:57 +00:00
Mark Johnson 448223d32c MDL-85721 qtype_numerical: Prevent duplication on restore
If question_numerical record for a question has been deleted, when its
options are loaded its answers will not have a tolerance property. This
can lead to duplication.

Also, older questions may not have a question_numerical_options record.

To avoid this, we use 0 as a default tolerance for all answers if there
is no matching record, and do the same when reading the question
structure from backups. We also generate default values for the rest of
the options.
2025-07-01 11:52:48 +01:00
Mark Johnson 0105cdb0de MDL-85721 qtype: Cope with missing options records
If we restore a question (or any other) which has had its
qtype_xxx_options record deleted, we get a notification output when we
try to build the options.

This may be called from an AJAX request (such as when we duplicate a
quiz), and outputting the notification breaks the AJAX response.
Returning false also means we don't get the answers attached to the
questiondata options, so the structure doesn't match the restored data,
and we get duplication.

This emits the errors via debugging instead, which allows it to be
supressed or logged, and allows get_question_options() to continue
running.
2025-07-01 11:52:48 +01:00
Mark Johnson 4f196b4671 MDL-85721 qtype_multianswer: Clean up duplicate subquestions
This adds an ad-hoc task to clean up duplicate subquestions created by
the bug.

When the upgrade is run, it will run a query to check if any
subquestions have been duplicated (if there are multiple questions with
the same parent, text and stamp), and queue the cleanup task if there
are.

For each stamp identified, the task will find instances of the question
that are not referred to in their parent's sequence field, confirm that
they have 0 usages, and delete them.
2025-07-01 11:52:48 +01:00
Mark Johnson 64d721484a MDL-85721 qtype_multichoice: Generate default options on restore
qtype_multichoice::get_question_options() will create a default options
object if no qtype_multichoice_options record exists. This means if we
restore a backup containing a multichoice question without any options
(see previous commit), it will always create a duplicate.

This change generates a default set of options for the backupdata if
none exists, so the identity hash will match if the same question exists
in the database without options, and we dont get duplicates.
2025-07-01 11:46:27 +01:00
Mark Johnson 1f245b21c9 MDL-85721 qtype_multianswer: Don't delete qtype data for subquestions
Historically, multianswer would re-use question IDs from subquestions,
so it was necessary to delete qtype-specific data if the qtype changed.
Since versioning was introduced, editing creates new versions of the
qtype and subquestions. Deleting the data means the original versions of
the subquestions cannot function correctly, so we shouldn't do that
anymore.
2025-07-01 11:46:27 +01:00
Andrew Nicols 13ce5af041 Merge branch 'MDL-84531-500' of https://github.com/paulholden/moodle into MOODLE_500_STABLE 2025-07-01 17:36:07 +08:00
Mark Johnson 3f4478a7b7 MDL-85069 question: Fix return URL parameters after moving questions
When calling the core_question_move_questions external function, the
returned $returnurl paramater kept the original `cat`, `category` and
`lastchanged` parameters.

If the question was moved to another question bank, this meant the user
would be redirected to that bank, but the URL would still refer to the
category in the original bank. Opening the bulk move dialogue again
would then show the original bank and category selected by default, not
the current one.

This change ensures the cat parameter is updated to match the new
category, unsets the `category` parameter as it is redundant. If a single
question is moved, "lastchanged" is updated to that question, otherwise
it is unset.
2025-06-30 15:27:36 +01:00
Mark Johnson 043980d193 MDL-85069 qbank: Add tool_generator callback
This adds a callback for tool_generator and the required lang strings to
allow qbanks to be generated as part of test courses, by passing the
--additionalmodules=qbank argument to maketestcourse.php.
2025-06-30 15:27:35 +01:00
Neill Magill e7a72b4354 MDL-85563 phpunit: Clock API should always use Moodle system time
When using `clock::now()` the frozen cloxk and incrementing clock will now
always return a `DateTimeImmutable` that uses the configured Moodle system
time. In unit tests this will be Australia/Perth.

Before this change, it would sometimes be UCT.
2025-06-30 11:42:23 +01:00
Mark Johnson 22bfb8f591 MDL-85881 questions: Handle multi-byte names during migration
We were using strlen() instead of core_text::strlen() when checking the
length of a question bank name created during the migration. This meant
that multibyte strings were counted as being too long, even though they
were within the character limit.
2025-06-30 11:09:47 +01:00
Paul Holden d2751479fc MDL-85779 block_timeline: fix/restore sort toggle dropdown behaviour.
Changes during Bootstrap upgrade, in conjunction with both 8a8c8ab2 and
0c586b41, caused the layout to deviate from that expected elsewhere for
managing of Bootstrap dropdown elements. Thus the dynamically chosen
item was no longer being shown as selected. Fix that here.
2025-06-29 23:17:17 +08:00
Huong Nguyen 3e6d669b34 weekly release 5.0.1+ 2025-06-29 16:18:33 +07:00
meirzamoodle 2be5e0551f MDL-85769 AI: Trap focus within AI drawer on smaller screens
Co-authored-by: Laurent David <laurent.david@moodle.com>
2025-06-28 10:55:18 +07:00
Paul Holden fac98622d3 MDL-85855 calendar: format course shortname attribute correctly. 2025-06-26 21:47:01 +08:00
Mark Johnson 734097729d MDL-84487 mod_quiz: Use modal form for editing random questions
Creating and editing random questions were using 2 different forms - one
dynamic form in a modal, and the other a regular form on a standalone
page. The "Switch bank" UI only works in a modal, so while it was
displayed on the edit page, it didn't function.

This combines the editing functionality with the existing modal form, so
the same UI can be used for both operations, and the "Switch bank"
functionality works.
2025-06-26 14:26:50 +01:00
Mihail Geshoski 0c8ff67983 Merge branch 'MDL-85665-500' of https://github.com/andelacruz/moodle into MOODLE_500_STABLE 2025-06-26 10:45:10 +08:00
Huong Nguyen 938b63bc02 Merge branch 'MDL-83752-M500' of https://github.com/ziegenberg/moodle into MOODLE_500_STABLE 2025-06-26 09:19:34 +07:00
Huong Nguyen f1389b7961 Merge branch 'MDL-76414-500' of https://github.com/yusufwib01/moodle into MOODLE_500_STABLE 2025-06-26 08:29:39 +07:00
Huong Nguyen 89d4e6425f Merge branch 'MDL-85734-500' of https://github.com/lucaboesch/moodle into MOODLE_500_STABLE 2025-06-26 08:25:49 +07:00
Huong Nguyen 33a256386d Merge branch 'MDL-85466-500' of https://github.com/lucaboesch/moodle into MOODLE_500_STABLE 2025-06-26 08:22:20 +07:00
Huong Nguyen c0818ffcf4 Merge branch 'MDL-82109-500' of https://github.com/paulholden/moodle into MOODLE_500_STABLE 2025-06-26 08:19:47 +07:00
Jonathon Fowler 1a3a89b90f MDL-60799 enrol: update_instance() needs separate objects passed
Passing the same object means enrol_cohort does not recognise a change
in role when an edit or batch course upload operation is done.

 * enrol/editinstance.php was modifying $instance before passing it to
   enrol_plugin::update_instance() so the latter never sees a difference
   versus $data. This is redundant since update_instance() is doing the
   same thing a second time.
 * admin/tool/uploadcourse/classes/course.php is passing the same object
   as both arguments to enrol_plugin::update_instance().

There is an expectation that update_enrol_plugin_data() is to mutate its
$instance argument and then return it based on how derived classes in
enrol_guest and enrol_self behave, so cloning $instance within
update_enrol_plugin_data() before mutating it isn't an option.
2025-06-25 09:43:06 +10:00
andelacruz 9ddc63eb82 MDL-85665 mod_quiz: Behat to build quiz in single activity format course 2025-06-24 18:57:53 +08:00
Daniel Ziegenberg bb7eec3886 MDL-83752 workshop: Handle empty feedbackreviewer
Causes PHP warnings when null on PHP 8.1.

Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
2025-06-24 12:41:39 +02:00
Huong Nguyen 9c5567cba2 Merge branch 'MDL-85683-500' of https://github.com/paulholden/moodle into MOODLE_500_STABLE 2025-06-24 09:21:13 +07:00
Huong Nguyen b76ea1942b Merge branch 'MDL-85644-500' of https://github.com/paulholden/moodle into MOODLE_500_STABLE 2025-06-24 09:20:00 +07:00
Huong Nguyen a74b536a12 Merge branch 'MDL-85407-50' of https://github.com/durenadev/moodle into MOODLE_500_STABLE 2025-06-24 09:16:53 +07:00
Luca Bösch ae930707d7 MDL-85734 calendar: support multilang group names. 2025-06-20 16:47:40 +02:00
Luca Bösch 746dcabe44 MDL-85466 course: space between number and course icon. 2025-06-20 16:47:13 +02:00
Huong Nguyen 46884140c3 weekly release 5.0.1+ 2025-06-20 15:14:19 +07:00
Huong Nguyen 677d0b3866 Merge branch 'install_500_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_500_STABLE 2025-06-20 15:14:08 +07:00
Sara Arjona e1ab4f3ee9 Merge branch 'MDL-75947-integration-500-fix' of https://github.com/mihailges/moodle into MOODLE_500_STABLE 2025-06-19 17:22:03 +02:00
Mark Johnson 89a613460a MDL-85210 mod_qbank: Update question set references during upgrade
When moving question categories during the migration to mod_qbank, set
references using questions in those categories were not updated with the
new context.

Furthermore, since top categories from system, category and course
contexts are deleted and not moved, and set references that filtered
based on a top category were left pointing to a non-existant category.

This change updates set references using the top category to point to
the new top category where its subcategories are moved, and updates set
references for all subcategories to set the new context.
2025-06-19 12:43:38 +01:00
Mark Johnson a0dab33a23 MDL-85210 question: Update move_question_set_references
move_question_set_references expected the set reference to use the old
filter format.

This change converts the filter to the new format if required, before
updating the category and context ids.
2025-06-19 12:43:37 +01:00
Mihail Geshoski d5a747c507 MDL-75947 ltiservice_gradebookservices: Fix unit test
Fixes the test_sequential_score_posts() unit test in lineitem_test
by removing dynamic class property assignments, which were triggering
deprecation notices.
2025-06-19 16:24:41 +08:00
yusufwib01 5b2ec9c015 MDL-76414 navigation: Show 'Calendar' link in primary nav to guests 2025-06-19 13:13:49 +07:00
Jayce Birrell cb526af973 MDL-85307 filter_glossary: Do not filter concept
Filtering the concept here causes a recursive loop, disabling it here will prevent this.
2025-06-19 14:09:47 +09:30
Huong Nguyen a80fb1bbbb Merge branch 'MDL-85223-500' of https://github.com/paulholden/moodle into MOODLE_500_STABLE 2025-06-19 11:26:09 +07:00
Mihail Geshoski eefb11f3a9 Merge branch 'MDL-75947-500' of https://github.com/Jayce0808/moodle into MOODLE_500_STABLE 2025-06-19 12:19:18 +08:00
Huong Nguyen 644e986301 Merge branch 'MDL-85678-500' of https://github.com/junpataleta/moodle into MOODLE_500_STABLE 2025-06-19 11:07:40 +07:00
Mihail Geshoski c1ee2623b7 Merge branch 'MDL-83487-500' of https://github.com/muhammadarnaldo/moodle into MOODLE_500_STABLE 2025-06-19 11:32:06 +08:00
Huong Nguyen ccaf7293a6 Merge branch 'MDL-85159-500' of https://github.com/stevandoMoodle/moodle into MOODLE_500_STABLE 2025-06-19 10:03:39 +07:00
yusufwib01 258ba46df7 MDL-76342 core_output: Wrap buttons below heading on small screens 2025-06-19 10:01:26 +07:00
Mihail Geshoski 2eb4929a34 Merge branch 'MDL-85514-500' of https://github.com/snake/moodle into MOODLE_500_STABLE 2025-06-19 10:59:53 +08:00
Jake Dallimore d18f7da487 MDL-85514 core_form: support 'in' rule for multiselects via subset of
The 'in' rule currently behaves the same way that 'eq' does when used
with multi-selects, which is not correct. It should be modelled by
checking whether the selected values are a subset of the rule values
(i.e. selected values are 'in' the rule values). This patch implements
that for core form rules as well as for the admin settings show/hide.
Several behat features are updated as well, because these were verifying
the incorrect behaviour for multi-select in rules.
2025-06-19 09:54:45 +08:00
Mihail Geshoski 5c1f21c234 Merge branch 'MDL-42263-500' of https://github.com/Jayce0808/moodle into MOODLE_500_STABLE 2025-06-18 16:18:24 +08:00
Jayce Birrell f7f35e15e6 MDL-73003 core_grades: Don't use 'scale' to determine grading method.
When a forum activity used a rubrics with a scale for grading, it was not treated as an advanced grading method, causing
the code to mishandle the grading object and not return any grades.
2025-06-18 16:51:25 +09:30
Huong Nguyen 88b1f459a7 Merge branch 'MDL-85742-500' of https://github.com/lucaboesch/moodle into MOODLE_500_STABLE 2025-06-18 10:11:06 +07:00
Huong Nguyen 5a1af882ab Merge branch 'MDL-84832-500' of https://github.com/junpataleta/moodle into MOODLE_500_STABLE 2025-06-18 09:50:44 +07:00
Paul Holden b2d268a757 Merge branch 'MDL-85773-500' of https://github.com/sebastsg/moodle into MOODLE_500_STABLE 2025-06-17 11:08:45 +01:00
Sebastian Gundersen 31c51c1d0d MDL-85773 forms: Read-only selects must have static labels
This is to prevent labels with an invalid for attribute, referencing non-existing elements.
2025-06-17 11:43:46 +02:00
Tasio 007449c03f MDL-78233 accesslib: remove unreliable test
Co-authored-by: Marina Glancy <marina.glancy@gmail.com>
2025-06-17 10:32:14 +02:00
Mihail Geshoski ddcedb9982 Merge branch 'MDL-84978-500' of https://github.com/olivabigyo/moodle into MOODLE_500_STABLE 2025-06-17 15:16:24 +08:00
Mihail Geshoski a97e6ab834 Merge branch 'MDL-82797_500' of https://github.com/cwarwicker/moodle into MOODLE_500_STABLE 2025-06-17 15:00:50 +08:00
Luca Bösch 6da87980db MDL-85742 block_timeline: Fix active item indicator spacing 2025-06-17 07:02:53 +02:00
Paul Holden 6fa39fbfc6 MDL-85609 tool_mfa: fix user counting for factors in use table. 2025-06-16 13:03:36 +01:00
Jun Pataleta 4ecac80c91 MDL-85678 mod_feedback: a11y Behat coverage for Manage templates page 2025-06-16 13:51:11 +08:00
Jun Pataleta 60cc8cfd76 MDL-85678 mod_feedback: Fix a11y issues in the Manage templates page
- Fix the heading hierarchy.
- Add a visually-hidden column header for the actions column.
2025-06-16 13:51:11 +08:00
Jake Dallimore ba27489569 MDL-75947 ltiservice_gradebookservices: score->timestamp as dategraded
If this is not passed in to grade_update(), then it's not passed on to
update_raw_grade(), resulting in time() being used instead, which isn't
correct. The grade timemodified value should be set to the timestamp
provided by the tool in the score post JSON, not the time of the score
post itself.

Co-authored-by: Jayce Birrell <jayce.birrell@moodle.com>
2025-06-16 14:43:51 +09:30
Jake Dallimore 3dba1502c1 MDL-75947 ltiservice_gradebookservices: test sequential score posting
This tests highlights a problem with the score handling logic and
will currently fail. On score post, the current time is used for
grade->timemodified instead of the score->timestamp provided by the
tool in the POST JSON.
2025-06-16 14:43:51 +09:30
AMOS bot 1925c307b4 Automatically generated installer lang files 2025-06-15 00:09:55 +00:00
Mihail Geshoski a46fde054a weekly release 5.0.1+ 2025-06-13 14:43:27 +08:00
Mihail Geshoski 0c50167c4b NOBUG: Add upgrade notes 2025-06-13 14:43:27 +08:00
Paul Holden 6e5b925517 MDL-84531 core: default deprecated attribute $replacement to null. 2025-06-12 14:50:50 +01:00
Jun Pataleta 37b41eab86 Merge branch 'MDL-84752-500' of https://github.com/paulholden/moodle into MOODLE_500_STABLE 2025-06-12 17:15:39 +08:00
Paul Holden 9b7b841b75 MDL-84752 qtype_essay: create accessible min/max words form elements.
Because of historical requirements involving fieldsets in question
type forms (see 958e7671), we should use ARIA label attribute on
grouped elements rather than normal labels in order to make them
accessible.

Co-authored-by: Jun Pataleta <jun@moodle.com>
2025-06-12 10:11:41 +01:00
Jun Pataleta c0ae0c50fd Merge branch 'MDL-85700-500' of https://github.com/roland04/moodle into MOODLE_500_STABLE 2025-06-12 17:05:59 +08:00
Huong Nguyen d6af4f24f5 MDL-72123 message: Add upgrade note 2025-06-12 17:05:59 +08:00
Huong Nguyen 55a481f052 Merge branch 'MDL-72123-500' of https://github.com/yusufwib01/moodle into MOODLE_500_STABLE 2025-06-12 17:05:58 +08:00
Huong Nguyen 5594d5e860 Merge branch 'MDL-84611-500' of https://github.com/sh-csg/moodle into MOODLE_500_STABLE 2025-06-12 08:37:22 +07:00
Mikel Martín 79f2234bdc MDL-85700 theme_boost: Fix singleselect spacing
- Fix single_select template adding gap between elements.
2025-06-11 13:52:09 +02:00
Justin Hunt 70778c49f5 MDL-82797 question engine: gift import fix 2025-06-11 12:03:44 +01:00
Stefan Hanauska 4568f58385 MDL-84611 blocks: Respect instance_allow_multiple() 2025-06-11 11:21:39 +02:00
Stefan Hanauska b5d4d5ed5c MDL-84611 block_html: Change tests to respect capabilities 2025-06-11 11:21:39 +02:00
Huong Nguyen 61be0ff0f9 Merge branch 'MDL-77964-500' of https://github.com/paulholden/moodle into MOODLE_500_STABLE 2025-06-11 14:08:40 +07:00
Huong Nguyen 88b45b4acc Merge branch 'MDL-85316-500-mysql-version' of https://github.com/meirzamoodle/moodle into MOODLE_500_STABLE 2025-06-11 13:33:39 +07:00
Huong Nguyen 65b0d6356d Merge branch 'MDL-85274-500' of https://github.com/davewoloszyn/moodle into MOODLE_500_STABLE 2025-06-11 13:30:08 +07:00
David Woloszyn e564114c63 MDL-85274 calendar: Duration limits added to forms 2025-06-11 14:30:00 +10:00
meirzamoodle 8bb9fe14ca MDL-85316 admin: Add environment check for AWS Aurora database 2025-06-11 10:16:21 +07:00
Philipp Imhof 9dde1fe9fe MDL-85350 questions: skip restore test for certain 3rd party plugins
The test_restore_course_with_same_stamp_questions() test assumes
that all question types using answers will also use the table
"question_answers" to store said answers. However, some 3rd party
qtypes might use custom tables and for those, the test would fail.
2025-06-06 15:56:08 +02:00
Mihail Geshoski ffb6475f6a Moodle release 5.0.1 2025-06-06 12:32:05 +08:00
Mihail Geshoski a237da2cd7 NOBUG: Add upgrade notes 2025-06-06 12:32:05 +08:00
Rajneel Totaram 33e190452b MDL-84976 tool_policy: noclean param was not set 2025-06-06 15:15:41 +12:00
yusufwib01 5517b264f3 MDL-72123 message: Hide add to contacts button if user not allowed 2025-06-06 08:28:56 +07:00
Paul Holden 71879d5688 MDL-85683 enrol: use formatted course name for notification context. 2025-06-06 00:22:07 +01:00
Szymon Karolczuk 84c4ca67f8 MDL-85573 tool_brickfield: fix uninstall code 2025-06-05 19:19:47 +02:00
Sara Arjona 5f0de664bd weekly release 5.0+ 2025-06-05 16:43:29 +02:00
Sara Arjona c32e894dc2 NOBUG: Add upgrade notes 2025-06-05 16:43:28 +02:00
Michael Hawkins a98bb76076 MDL-83762 core_files: Bind resolve IPs and ports to cURL calls 2025-06-05 12:09:36 +07:00
Michael Hawkins 6d240f17ae Merge branch 'MDL-85571-500' of https://github.com/HuongNV13/moodle into MOODLE_500_STABLE 2025-06-05 12:34:37 +08:00
Mihail Geshoski 5f265a8be5 Merge branch 'MDL-85645-500' of https://github.com/lameze/moodle into MOODLE_500_STABLE 2025-06-05 12:31:56 +08:00
Mihail Geshoski 39fb6431d0 Merge branch 'MDL-85556_500_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_500_STABLE 2025-06-05 12:25:44 +08:00
Vincent Schneider 94d5d89e4b MDL-84518 course: improved course visibility state handling 2025-06-05 11:22:11 +07:00
Michael Hawkins 7db7444d53 Merge branch 'MDL-80380-500' of https://github.com/HuongNV13/moodle into MOODLE_500_STABLE 2025-06-05 12:19:35 +08:00
Jun Pataleta 9d8cf5fb22 Merge branch 'MDL-85450-500' of https://github.com/rjnl/moodle into MOODLE_500_STABLE 2025-06-05 12:15:48 +08:00
Huong Nguyen d0a00b74d8 MDL-80380 core_auth: Add upgrade note 2025-06-05 11:12:27 +07:00
Huong Nguyen 1db743ea9a MDL-80380 admin: Support Microsoft XOAUTH2 for outgoing email 2025-06-05 11:12:22 +07:00
Mihail Geshoski 971f1fc25f Merge branch 'MDL-69765-500' of https://github.com/lucaboesch/moodle into MOODLE_500_STABLE 2025-06-05 12:10:56 +08:00
Jun Pataleta 571990b7de Merge branch 'MDL-84941-500' of https://github.com/paulholden/moodle into MOODLE_500_STABLE 2025-06-05 12:08:39 +08:00
Mihail Geshoski 45ed9e9127 Merge branch 'MDL-85072-500' of https://github.com/olivabigyo/moodle into MOODLE_500_STABLE 2025-06-05 11:00:24 +07:00
Mihail Geshoski 1fbd0fd3ee Merge branch 'MDL-83654-500-5' of https://github.com/junpataleta/moodle into MOODLE_500_STABLE 2025-06-05 11:00:24 +07:00
Mihail Geshoski 22f52b9b4a Merge branch 'MDL-85369_500' of https://github.com/agaranin/moodle into MOODLE_500_STABLE 2025-06-05 11:00:24 +07:00
Martin Gauk db8f7fc95a MDL-85488 mathjax: refactor loader to enhance configuration and loading 2025-06-05 11:00:24 +07:00
Mark Johnson 7ac6e421ab MDL-85323 core: Don't cache the login page 2025-06-05 11:00:12 +07:00
meirzamoodle 07a58bdb33 MDL-85375 libraries: Escaping a query parameter on pg_insert_id() 2025-06-05 01:34:18 +00:00
Vincent Schneider dfec066e2e MDL-84706 bigbluebuttonbn: improved authorization and mitigate CSRF risks 2025-06-05 01:34:18 +00:00
Huong Nguyen 847a39b6d5 MDL-79993 course: Fix PHPUnit failure 2025-06-05 01:34:18 +00:00
raortegar 4a2d2b54b2 MDL-79993 course: Improve user access to recent courses service 2025-06-05 01:34:18 +00:00
Vincent Schneider 7979e44436 MDL-84497 badges: fix missing action sesskey checks. 2025-06-05 01:34:18 +00:00
andelacruz e0e626f684 MDL-85645 mod_quiz: Behat to display questionbank name of quiz question. 2025-06-05 09:28:58 +08:00
Jun Pataleta 98a80ac3ca MDL-85239 mod_quiz: Use visually-hidden instead of deprecated sr-only 2025-06-05 09:26:07 +08:00
Jun Pataleta 0f8951ce28 Merge branch 'MDL-85239-500' of https://github.com/NashTechOpenUniversity/moodle into MOODLE_500_STABLE 2025-06-05 09:22:50 +08:00
Jun Pataleta f26f018876 Merge branch 'MDL-84804-500' of https://github.com/paulholden/moodle into MOODLE_500_STABLE 2025-06-05 08:12:39 +08:00
Sara Arjona 637f6dc508 Merge branch 'MDL-82069-500' of https://github.com/aanabit/moodle into MOODLE_500_STABLE 2025-06-04 15:37:00 +02:00
Paul Holden 9bed548080 MDL-84804 output: amend page title when navigating dynamic tabs.
Prepend the current tab name to the page title, to ensure we can
easily identify the current page/tab and that it is both unique
and accessible.
2025-06-04 14:07:38 +01:00
Paul Holden 410747af21 MDL-84804 javascript: new module for manipulating the page title. 2025-06-04 14:07:21 +01:00
cescobedo e20e2c044b Merge branch 'MDL-85273-500' of https://github.com/paulholden/moodle into MOODLE_500_STABLE 2025-06-04 12:59:13 +02:00
Jun Pataleta 03b1a727b6 Merge branch 'MDL-85041-500' of https://github.com/junpataleta/moodle into MOODLE_500_STABLE 2025-06-04 17:48:18 +08:00
Jun Pataleta a92df9e0ee MDL-85041 core: Make methods calling announceChanges async as well 2025-06-04 17:33:18 +08:00
meirzamoodle 25f8dd9d63 MDL-85041 core: Improve autocomplete/tag a11y for assistive tech
- Updated autocomplete behavior to announce dynamic changes
via ARIA live regions
- Fixed focus management for keyboard and screen reader navigation
- Added proper role/aria tags for interactive tag components
2025-06-04 17:33:17 +08:00
Mark Johnson 898f4bd286 MDL-85200 mod_quiz: Improve efficience of populate_question_sources
This uses the contexts from the categories of questions in the quiz to
narrow down the list of course modules we are querying to just those we
will need.
2025-06-04 08:42:01 +01:00
Mark Johnson ce08706925 MDL-85200 mod_quiz: Expand behat test to cover shared bank display
This extends the existing behat test for adding a question from a shared
bank to confirm that the source bank is displayed with the question on
the Questions page.

The bank name is already passed through format_string() before being
passed to the template, so additional encoding by the template is not
necessary, hence the template has been changed to use triple braces.
2025-06-04 08:42:00 +01:00
Huong Nguyen 72c71a1f89 MDL-85571 mod_assign: Improve PHPUnit tests 2025-06-04 12:50:33 +07:00
raortegar a52d4ed032 MDL-85571 mod_assign: Add visibility check to due digest notification 2025-06-04 12:50:33 +07:00
Jun Pataleta c947a7c303 Merge branch 'MDL-85507-500-enfix' of https://github.com/mudrd8mz/moodle into MOODLE_500_STABLE 2025-06-04 11:58:12 +08:00
Huong Nguyen 41c19a5e02 Merge branch 'MDL-84732-m500' of https://github.com/sammarshallou/moodle into MOODLE_500_STABLE 2025-06-04 10:53:19 +07:00
Mihail Geshoski 301ae93c4a Merge branch 'MDL-84432-500' of https://github.com/HuongNV13/moodle into MOODLE_500_STABLE 2025-06-04 10:47:05 +08:00
Huong Nguyen d207b50abf MDL-84432 core: Use discovery endpoint for Microsoft OAuth2 service
- Instead of creating the endpoints manually, use the OpenId
configuration endpoint to auto-configure endpoints
- Updates user field mappings so they map the new OpenId userinfo fields
2025-06-04 08:36:50 +07:00
Amaia Anabitarte c1552bc519 Merge branch 'MDL-85471-500' of https://github.com/junpataleta/moodle into MOODLE_500_STABLE 2025-06-03 16:18:59 +02:00
cescobedo b2f4f7ab62 Merge branch 'MDL-85398-500' of https://github.com/paulholden/moodle into MOODLE_500_STABLE 2025-06-03 15:51:32 +02:00
Amaia Anabitarte 50d9f8f70e Merge branch 'MDL-85327-500' of https://github.com/paulholden/moodle into MOODLE_500_STABLE 2025-06-03 13:37:38 +02:00
cescobedo 9bc8fe3bc1 Merge branch 'MDL-85326-500' of https://github.com/paulholden/moodle into MOODLE_500_STABLE 2025-06-03 13:10:46 +02:00
Jun Pataleta a716da64af Merge branch 'MDL-85467-500' of https://github.com/yusufwib01/moodle into MOODLE_500_STABLE 2025-06-03 17:28:35 +08:00
Paul Holden 290104c964 MDL-85326 theme_boost: hide footer popover icon on small screens.
Fixes regression from add6f71d which forced `.btn-icon` display.

Co-authored-by: Mikel Martín <mikel@moodle.com>
2025-06-03 09:18:06 +01:00
Paul Holden 5487d418b6 MDL-85644 course: bottom margin for course category listing actions. 2025-06-02 23:03:00 +01:00
Rajneel Totaram a0c88aec39 MDL-85450 block_calendar_upcoming: Fix heading level 2025-06-03 09:39:18 +12:00
Mark Johnson dfd0dc28e8 MDL-85556 backup: Only update question refs in restored course
The previous query updated all question references matching the original
question bank entry, regardless of whether they were part of the restore
or not. When we are dealing with duplicated questions, this means we
could accidentally change question references in the backed-up course as
well as the restored one.

This change filters the references to ensure they exist in a context
within the restored course, before updating them.
2025-06-02 15:53:37 +01:00
Amaia Anabitarte 30b08ee83a Merge branch 'MDL-85412-500' of https://github.com/aanabit/moodle into MOODLE_500_STABLE 2025-06-02 13:24:17 +02:00
yusufwib01 e5da273f9a MDL-85467 core: Replace orphaned label with span for accessibility
This commit replaces orphaned labels with spans for improved
accessibility. It also updates the XPATH partial named selector
for select_menu fields to target span elements.
2025-06-02 13:45:03 +07:00
hieuvu c248e82b52 MDL-85239 mod_quiz: Add caption for Attempt tables. 2025-06-02 13:38:24 +07:00
Luca Bösch 6d2b25f10f MDL-69765 qtype_essay: Create temporary draft file area only one time. 2025-05-31 12:58:52 +02:00
Jun Pataleta 8d57b56b5a MDL-83654 qtype_match: Only add the question text to the first field
In order to avoid repetition of the question text as the user navigates
to each answer field in a matching question (e.g. by tabbing).
2025-05-31 09:25:22 +08:00
Jun Pataleta edcff12191 MDL-83654 qtype_match: Add presentation role to table-related elements
The question and answer are displayed on a layout table and
does not really help with accessibility. We need to set a
presentation role for the table-related elements.
2025-05-31 09:25:22 +08:00
Jun Pataleta 1229c2b1ef MDL-83654 qtype_match: Provide better information to answer fields
* In order to provide better context for screen reader users about the
answer fields in matching questions, the question text and the
corresponding item to be matched are included to the answer fields via
the aria-describedby attribute.
2025-05-31 09:25:22 +08:00
Amaia Anabitarte 7edec4866f MDL-85412 course: adding and removing elements feedback message 2025-05-30 16:42:43 +02:00
Sara Arjona 5c22b04af4 Merge branch 'MDL-85315-500' of https://github.com/lucaboesch/moodle into MOODLE_500_STABLE 2025-05-30 12:33:05 +02:00
Luca Bösch 01866455af MDL-85315 themes: align modal closing button. 2025-05-30 11:32:01 +02:00
vlad.kidanov 15e0fa6ecb MDL-85132 mod_glossary: Add missing end div for entrybox element. 2025-05-30 10:30:33 +01:00
Jun Pataleta b3619e08e4 MDL-84832 tiny_media: Announce when alt text maxlength is reached
Co-authored-by: Meirza <meirza.arson@moodle.com>
2025-05-30 17:09:26 +08:00
Michael Hawkins 1260cb24b8 weekly release 5.0+ 2025-05-30 16:28:46 +08:00
Michael Hawkins 77e0f0a889 NOBUG: Add upgrade notes 2025-05-30 16:28:46 +08:00
Michael Hawkins 9330731d93 Merge branch 'install_500_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_500_STABLE 2025-05-30 16:28:24 +08:00
Artem Garanin 8fa9939614 MDL-85369 question: fix tag collection ID in legacy‑filter upgrade.
Use the actual tag collection for the 'question' tag area instead of
the default collection.
2025-05-29 14:08:42 -04:00
Paul Holden 373bc98921 MDL-85223 reportbuilder: initialize user entity filters just once. 2025-05-29 15:32:09 +01:00
Paul Holden b27318d022 MDL-77964 availability: avoid JS console errors when closing modal. 2025-05-29 10:15:25 +01:00
Michael Hawkins 89d34beece Merge branch 'MDL-84824-500' of https://github.com/stevandoMoodle/moodle into MOODLE_500_STABLE 2025-05-29 12:27:08 +08:00
Michael Hawkins 325f273ca9 Merge branch 'MDL-83448-500' of https://github.com/stevandoMoodle/moodle into MOODLE_500_STABLE 2025-05-29 12:18:32 +08:00
Michael Hawkins c471fa4986 Merge branch 'MDL-84996-500' of https://github.com/paulholden/moodle into MOODLE_500_STABLE 2025-05-29 12:09:55 +08:00
Michael Hawkins b4e3dca13f Merge branch 'MDL-85513-500' of https://github.com/paulholden/moodle into MOODLE_500_STABLE 2025-05-29 12:04:15 +08:00
Michael Hawkins 7310e7d908 Merge branch 'MDL-85552-500' of https://github.com/yusufwib01/moodle into MOODLE_500_STABLE 2025-05-29 11:59:47 +08:00
Michael Hawkins e14e0428db Merge branch 'MDL-85437-500' of https://github.com/meirzamoodle/moodle into MOODLE_500_STABLE 2025-05-29 11:52:29 +08:00
Stevani Andolo 7f756ae983 MDL-84824 core_message: Fixed popup accessibility issue 2025-05-29 11:51:25 +08:00
Huong Nguyen 0e24a0400d Merge branch 'MDL-83044-500' of https://github.com/catalyst/moodle into MOODLE_500_STABLE 2025-05-29 10:27:10 +07:00
Huong Nguyen 1ad351d4a2 Merge branch 'MDL-85177-500' of https://github.com/lucaboesch/moodle into MOODLE_500_STABLE 2025-05-29 09:53:47 +07:00
Huong Nguyen 6c045bfefc Merge branch 'MDL-85525-500' of https://github.com/andelacruz/moodle into MOODLE_500_STABLE 2025-05-29 09:51:44 +07:00
Huong Nguyen 47c8a3ad7e Merge branch 'MDL-85400-500' of https://github.com/lameze/moodle into MOODLE_500_STABLE 2025-05-29 08:59:42 +07:00
Huong Nguyen aae09ebb6b Merge branch 'MDL-85389-500' of https://github.com/andelacruz/moodle into MOODLE_500_STABLE 2025-05-29 08:52:32 +07:00
AMOS bot 5feec7a0b0 Automatically generated installer lang files 2025-05-29 00:08:00 +00:00
andelacruz 28cf9407dd MDL-85525 mod_quiz: Behat test for quiz attempt page block display 2025-05-28 16:51:27 +08:00
andelacruz 06fd97cae1 MDL-85389 mod_lesson: Behat for filtering lesson reports/essays by group 2025-05-28 15:17:41 +08:00
sam marshall 82eecc9475 MDL-85400 PHPunit: Hard to test code that uses encryption
This change stops the encryption code setting created key files to
read-only during PHPunit runs, which means they will be safely
deleted when the system resets after a test.
2025-05-28 12:55:46 +08:00
meirzamoodle 499715e17e MDL-85437 AI: Move focus to the AI drawer 2025-05-28 11:31:06 +07:00
Mark Johnson 643eaa3418 MDL-85556 questions: Fix repeated_restore unit test
This unit test is meant to test restoring duplicated questions that
exist in a shared question bank. However, due to improvements in the
restore process from the introduction of mod_qbank, having the questions
in a bank that is not in the restored course means the questions don't
get restored at all, and we can't test that the process is working.

This changes the test to use a bank in the target course instead.
2025-05-27 10:46:44 +01:00
Jun Pataleta 181c55ad1c Merge branch 'MDL-84806-500' of https://github.com/davewoloszyn/moodle into MOODLE_500_STABLE 2025-05-27 15:37:08 +08:00
Huong Nguyen cb7d72d31d Merge branch 'MDL-85169-500' of https://github.com/paulholden/moodle into MOODLE_500_STABLE 2025-05-27 09:16:03 +07:00
aya-saad1 a3d6763e71 MDL-42263 assign: Force language of email sent to graders
Co-authored-by: Jayce Birrell <jayce.birrell@moodle.com>
2025-05-27 10:14:38 +09:30
Alexander Van der Bellen 114ff5fa92 MDL-83044 core_block: Add return value check on form submission 2025-05-26 23:03:27 +08:00
ferran dda97bdbfc Merge branch 'MDL-84304-500' of https://github.com/laurentdavid/moodle into MOODLE_500_STABLE 2025-05-26 13:50:05 +02:00
Sara Arjona e5d7e554ab Merge branch 'MDL-85404-500' of https://github.com/ferranrecio/moodle into MOODLE_500_STABLE 2025-05-26 11:27:45 +02:00
cescobedo 35588bca41 Merge branch 'MDL-85435-500' of https://github.com/aanabit/moodle into MOODLE_500_STABLE 2025-05-26 10:01:08 +02:00
David Mudrák e4247c79a6 MDL-85507 lang: Use fixed strings in tests, too 2025-05-25 08:54:02 +02:00
Helen Foster 00b809dbc5 MDL-85507 lang: Import fixed English strings (en_fix) 2025-05-25 08:53:09 +02:00
sam marshall d21fcdee19 MDL-84732 Accessibility: Focus issue after closing nested modal 2025-05-23 15:47:12 +01:00
Luca Bösch a8b08ea6fc MDL-85177 quiz: style the question version pulldown nicely. 2025-05-23 06:43:18 +02:00
Huong Nguyen a52fbcced6 weekly release 5.0+ 2025-05-23 11:03:46 +07:00
Huong Nguyen c957b909aa Merge branch 'install_500_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_500_STABLE 2025-05-23 11:03:39 +07:00
David Woloszyn 86990aaab5 MDL-84806 tiny_aiplacement: Remove unused div and css 2025-05-23 12:36:46 +10:00
David Woloszyn 3cebd0e59a MDL-84806 tiny_aiplacement: Announce action results for accessibility
The generatetext.js and associated templates have been adjusted to
match more closely with the generate image files. The generate image
way of displaying content was better suited to aria.
2025-05-23 12:36:46 +10:00
yusufwib01 077fbd22cf MDL-85552 core: Make group selector label use normal font weight 2025-05-22 16:28:56 +07:00
Stevani Andolo 56a250792c MDL-83448 core_hub: Fixed registration check 2025-05-22 13:44:57 +08:00
Huong Nguyen ace36dc3df Merge branch 'MDL-84899-500' of https://github.com/laurentdavid/moodle into MOODLE_500_STABLE 2025-05-22 11:00:21 +07:00
Huong Nguyen e8b3c7174a Merge branch 'MDL-84793-m500' of https://github.com/sammarshallou/moodle into MOODLE_500_STABLE 2025-05-22 10:48:19 +07:00
Huong Nguyen 1edb106e9b Merge branch 'MDL-84918-500' of https://github.com/HuongNV13/moodle into MOODLE_500_STABLE 2025-05-22 10:34:23 +07:00
David Woloszyn abae164f41 MDL-84918 core: Add zend.exception_ignore_args environment check 2025-05-22 10:09:44 +07:00
Huong Nguyen c7912e21ba MDL-84918 core: Add initial environment requirements for Moodle 5.1 2025-05-22 10:08:46 +07:00
Huong Nguyen 7df8f6e430 Merge branch 'MDL-74900-500' of https://github.com/raortegar/moodle into MOODLE_500_STABLE 2025-05-22 09:37:14 +07:00
Huong Nguyen 475ef128ae Merge branch 'MDL-85193-500' of https://github.com/junpataleta/moodle into MOODLE_500_STABLE 2025-05-22 09:23:14 +07:00
Amaia Anabitarte 586ae425e6 MDL-85435 course: Render HTML in activity overview name mustache 2025-05-21 17:37:11 +02:00
Katalin Lukacs Toth b5a7a463c0 MDL-84978 mod_forum: Fix latest/earliest post id lookup in a discussion
This properly fixes the problems that commit 0f5a96f in MDL-80848 tried
to address.
2025-05-21 11:03:24 +02:00
Katalin Lukacs Toth 8f6e56173e MDL-85072 qtype_ordering: Fix XML export
Option fields should not be left empty.
2025-05-21 10:52:45 +02:00
Huong Nguyen a23635adc0 Merge branch 'MDL-84274-500' of https://github.com/davewoloszyn/moodle into MOODLE_500_STABLE 2025-05-21 13:35:45 +07:00
raortegar bfdcf4b490 MDL-74900 core_course: Exception in module deletion if missing instance 2025-05-21 08:27:23 +02:00
Huong Nguyen 2e7c195aee Merge branch 'MDL-85311-500' of https://github.com/rjnl/moodle into MOODLE_500_STABLE 2025-05-21 10:23:04 +07:00
Huong Nguyen d7f7653a8e Merge branch 'MDL-84296-500' of https://github.com/davewoloszyn/moodle into MOODLE_500_STABLE 2025-05-21 10:00:08 +07:00
Huong Nguyen 00652388c5 Merge branch 'MDL-85374-500' of https://github.com/andrewnicols/moodle into MOODLE_500_STABLE 2025-05-21 09:55:54 +07:00
AMOS bot 3c83131e34 Automatically generated installer lang files 2025-05-21 00:07:57 +00:00
Paul Holden ae1a251b3f MDL-82109 notes: include link to add site note if user has capability. 2025-05-20 13:18:30 +01:00
Andrew Nicols dff4bc87f5 MDL-85374 report_competency: Create custom step for setting autocomplete
The autocompletes used in the competency report have been bastardised to
redirect on selection. Unfortunately this also applies when when making
null-op changes like deleting the initial "Please select a value"
option.

The autocomplete code removes all current options before creating an
option, and because of this redirect the browser is redirecting before
the new value can be entered, but we retain a reference to the field as
`$this->field`, which is now stale.
2025-05-20 12:42:11 +08:00
Amaia Anabitarte 4a1395205f Merge branch 'MDL-85397-500' of https://github.com/tasiobg/moodle into MOODLE_500_STABLE 2025-05-19 12:43:35 +02:00
Amaia Anabitarte e534517f7f Merge branch 'MDL-85264-500' of https://github.com/paulholden/moodle into MOODLE_500_STABLE 2025-05-19 12:38:25 +02:00
Laurent David f17a871f1d MDL-84304 core_courseformat: Remove COMPLETION_COMPLETE_FAIL test
* Because we removed this status in mod_scorm, we cannot test it
anymore against any module as no module has custom_rules that leads
to COMPLETION_COMPLETE_FAIL
2025-05-19 11:56:40 +02:00
Laurent David ef5c806a70 MDL-84304 mod_scorm: Remove completion failed from behat test
* Now that we removed the COMPLETION_COMPLETE_FAIL status for scorm
behat tests needs to be updated
2025-05-19 11:56:40 +02:00
Magnus Samuelsson 4de4029044 MDL-84304 mod_scorm: Remove the COMPLETION_COMPLETE_FAIL status 2025-05-19 11:56:40 +02:00
Stevani Andolo db1932d9d7 MDL-85159 editory_tiny: Fix language list and track srclang a11y issue 2025-05-19 16:51:40 +08:00
Amaia Anabitarte 2a2e18461f MDL-82069 core_completion: Improve errors for multiple grading items 2025-05-19 09:32:59 +02:00
Jun Pataleta 44d1a98e70 MDL-85471 theme_boost: Dismiss tooltips on escape 2025-05-16 14:23:37 +08:00
Mihail Geshoski 328810e933 weekly release 5.0+ 2025-05-16 12:58:25 +08:00
Mihail Geshoski b6b043b147 Merge branch 'install_500_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_500_STABLE 2025-05-16 12:57:31 +08:00
Muhammad Arnaldo 70f0b13a28 MDL-83487 mod_forum: retain upcoming posts in user digests 2025-05-16 11:54:17 +07:00
Paul Holden 1babb4f4c2 MDL-85513 output: centre chevron icons within collapsible section. 2025-05-15 23:20:09 +01:00
toanlamt 002d1171bd MDL-85050 Javascript: core/dropzone Fix link & box click event conflict 2025-05-15 15:04:54 +07:00
sam marshall b5bb67d1f1 MDL-84793 Behat: Allow CLI scripts to run on Behat instance 2025-05-15 08:50:30 +01:00
Stevani Andolo 89358f92fb MDL-84296 core_hub: Added detailed AI usage data to registration page 2025-05-15 16:52:26 +10:00
Huong Nguyen 17f6225bc4 Merge branch 'MDL-83350-500' of https://github.com/meirzamoodle/moodle into MOODLE_500_STABLE 2025-05-15 12:02:14 +07:00
Huong Nguyen 77d63230a1 Merge branch 'MDL-84073-500' of https://github.com/sh-csg/moodle into MOODLE_500_STABLE 2025-05-15 11:57:21 +07:00
Huong Nguyen 43b4e56f8b Merge branch 'MDL-83943-500' of https://github.com/meirzamoodle/moodle into MOODLE_500_STABLE 2025-05-15 11:45:27 +07:00
Huong Nguyen 40add60152 Merge branch 'MDL-85279-500' of https://github.com/andelacruz/moodle into MOODLE_500_STABLE 2025-05-15 11:42:23 +07:00
Huong Nguyen 64e07e7afb Merge branch 'MDL-84009-500' of https://github.com/raortegar/moodle into MOODLE_500_STABLE 2025-05-14 21:51:53 +07:00
Huong Nguyen 1c67b54aa2 Merge branch 'MDL-84751-500' of https://github.com/davewoloszyn/moodle into MOODLE_500_STABLE 2025-05-14 21:41:44 +07:00
Amaia Anabitarte 2099b2cafb Merge branch 'MDL-85167-500' of https://github.com/roland04/moodle into MOODLE_500_STABLE 2025-05-14 21:41:44 +07:00
Amaia Anabitarte ef4af9dd82 Merge branch 'MDL-85205-500' of https://github.com/roland04/moodle into MOODLE_500_STABLE 2025-05-14 21:41:44 +07:00
Amaia Anabitarte 1c8d59349e Merge branch 'MDL-85360-500' of https://github.com/sarjona/moodle into MOODLE_500_STABLE 2025-05-14 21:41:43 +07:00
Sara Arjona ed999bea4b Merge branch 'MDL-85449-500' of https://github.com/paulholden/moodle into MOODLE_500_STABLE 2025-05-14 21:41:43 +07:00
Sara Arjona 1066601f0b Merge branch 'MDL-81436-500' of https://github.com/rjnl/moodle into MOODLE_500_STABLE 2025-05-14 21:41:43 +07:00
Sara Arjona b721f37d91 Merge branch 'MDL-81842-500' of https://github.com/laurentdavid/moodle into MOODLE_500_STABLE 2025-05-14 21:41:43 +07:00
Huong Nguyen b06bcdc209 Merge branch 'MDL-84128-500' of https://github.com/meirzamoodle/moodle into MOODLE_500_STABLE 2025-05-14 21:41:43 +07:00
Huong Nguyen 8e1c86a9a3 Merge branch 'MDL-85294-500' of https://github.com/lucaboesch/moodle into MOODLE_500_STABLE 2025-05-14 21:41:43 +07:00
Huong Nguyen b479e86c08 Merge branch 'MDL-85224_500' of https://github.com/PhilippImhof/moodle into MOODLE_500_STABLE 2025-05-14 21:41:43 +07:00
Huong Nguyen e927264c5a Merge branch 'MDL-85363-500' of https://github.com/lucaboesch/moodle into MOODLE_500_STABLE 2025-05-14 21:41:43 +07:00
Huong Nguyen 6effd2064a Merge branch 'MDL-84964-500' of https://github.com/Jayce0808/moodle into MOODLE_500_STABLE 2025-05-14 21:41:43 +07:00
ferran b969f89b01 Merge branch 'MDL-85364-500' of https://github.com/sarjona/moodle into MOODLE_500_STABLE 2025-05-14 21:41:43 +07:00
ferran 674a4c2a5f Merge branch 'mdl-84520_500' of https://github.com/james-cnz/moodle into MOODLE_500_STABLE 2025-05-14 21:41:43 +07:00
Sara Arjona 549e311fee Merge branch 'MDL-85248-500' of https://github.com/albertgasset/moodle into MOODLE_500_STABLE 2025-05-14 21:41:43 +07:00
Tasio c312a9871c MDL-85397 theme: update reports to use container queries
With container queries, responsive design is no longer limited to the full browser width. For example, we can now display
the report in a compact side panel, and it will automatically adapt its styling to suit smaller spaces.
2025-05-14 15:50:03 +02:00
Tasio 9847d4484b MDL-85260 core: prevent background scrolling
After upgrading to Bootstrap 5 (Moodle v5), opening a modal no longer prevents the background content from scrolling.
This fix restores the intended behavior by mimicking Bootstrap 5's JavaScript logic that disables background scrolling
when a modal is open.
2025-05-14 15:36:00 +02:00
raortegar 0f244e11a0 MDL-84009 factor_webauthn: Add additional security keys 2025-05-14 11:18:07 +02:00
raortegar 7d794f8a3e MDL-84009 tool_mfa: Additional factor instances support 2025-05-14 11:18:07 +02:00
Paul Holden f8db554520 MDL-84996 enrol_manual: ensure externally supplied users are valid. 2025-05-14 09:55:48 +01:00
ferran 38b9eb2653 MDL-85404 format_social: allow subsections in social activities 2025-05-14 09:58:59 +02:00
andelacruz 94233d6242 MDL-85279 mod_assign: Renamed behat test to a more specific name 2025-05-14 15:11:42 +08:00
andelacruz e8580cf851 MDL-85279 mod_page: Fix behat to match the expected behaviour 2025-05-14 15:07:14 +08:00
Paul Holden bc1a8d0c5a MDL-85262 tool_task: switch next run time comparison in renderer.
If a task is "due", then next run time should be considered "ASAP".
2025-05-13 22:13:15 +01:00
Stefan Hanauska a246580a27 MDL-85432 mod_qbank: Don't support completion 2025-05-13 10:31:24 +02:00
Rajneel Totaram b407011b18 MDL-81436 theme: Fix scope of showmore button selector
Co-authored-by: Mikel Martín <mikel@moodle.com>
2025-05-13 17:33:18 +12:00
David Woloszyn 67d2b86614 MDL-84751 aiprovider_ollama: Fix settings help spacing 2025-05-13 13:52:50 +10:00
David Woloszyn 52e9b4cdbe MDL-84751 aiprovider_openai: Fix settings help spacing 2025-05-13 13:52:50 +10:00
meirzamoodle 7725baa9db MDL-83350 files: Avoid cacheing user and file repo files
Set the lifetime to zero for files referenced in
the local/internal repository (private files and file system),
because they should not be cached.

Add `no-store` to the cache-control to ensure resources are
never cached, always fetching the latest version.
2025-05-13 09:37:40 +07:00
Jun Pataleta 3f534cad09 Merge branch 'MDL-84817-500' of https://github.com/davewoloszyn/moodle into MOODLE_500_STABLE 2025-05-12 12:44:37 +08:00
Laurent David be1e8f8887 MDL-81842 formlibs: Change display in sticky footer
* Make sure that form elements that are inserted in the
sticky footer are not wrapped
2025-05-12 06:23:50 +02:00
Paul Holden edd0e76bd1 MDL-85449 block_myoverview: preserve documentation language params.
Fixes the link to Moodle docs from zero state.
2025-05-11 19:27:36 +01:00
AMOS bot f84f671994 Automatically generated installer lang files 2025-05-10 00:08:00 +00:00
Philipp Imhof 237f9bd7c0 MDL-85224 quiz: consider submitted state when filtering
In function quiz_report_grade_method_sql(), also consider the new state 'submitted' when filtering for FIRSTATTEMPT or LASTATTEMPT.
2025-05-09 17:59:33 +02:00
Mikel Martín 3f832fda4d MDL-85205 theme_boost: Fix incorrect uses of 'btn-link' class
Because btn-link relies on $link-hover-decoration variable, some incorrect
btn-link usages need to be fixed.
2025-05-09 13:57:53 +02:00
Mikel Martín fad9778f8b MDL-85205 theme_boost: Add link hover underline 2025-05-09 13:57:53 +02:00
Paul Holden 406980d1b1 MDL-85398 blocks: constrain width of block controls dropdown menu. 2025-05-09 12:52:45 +01:00
Mikel Martín 7b472fae76 MDL-85167 theme_boost: Fix tertiary navigation key listeners 2025-05-09 13:47:41 +02:00
Laurent David c6253c34bb MDL-84899 mod_forum: Fix summary report form change checker
* The forum summary report was not removing the right form
from the list of forms to check for changes.
2025-05-09 08:43:43 +02:00
Laurent David ee9cc3b397 MDL-84899 core_form: Fix unWatchForm in FormChangeChecker
* The unWatchForm as it stood was not removing the form from the list.
2025-05-09 08:43:43 +02:00
Luca Bösch bbcc5462af MDL-85363 quiz: style the question number inplace editable nicely. 2025-05-09 08:13:07 +02:00
Luca Bösch 5ab4641119 MDL-85294 qbank: Align header, buttons and switch in "Edit categories". 2025-05-09 08:13:01 +02:00
meirzamoodle efacf36423 MDL-83943 core_tag: Fix the broken user tag pagination 2025-05-09 12:49:48 +07:00
meirzamoodle ffa4c0ea3f MDL-84128 core: Flip the image according to its orientation in PHP GD 2025-05-09 11:17:28 +07:00
Huong Nguyen 6999197243 weekly release 5.0+ 2025-05-09 09:50:13 +07:00
Huong Nguyen 4345819a25 Merge branch 'install_500_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_500_STABLE 2025-05-09 09:50:05 +07:00
Stefan Hanauska 1540e90991 MDL-84073 blocks: Load invisible blocks 2025-05-08 14:36:54 +02:00
Daniel Ureña a1d74cde4b MDL-85407 mod_data: Fix unclosed HTML in list view 2025-05-08 11:06:22 +02:00
David Woloszyn 758a35058f MDL-84817 core_message: Fix display issues in drawer at 400% 2025-05-08 17:07:28 +10:00
Huong Nguyen 2654ce0457 Merge branch 'MDL-85341-500' of https://github.com/snake/moodle into MOODLE_500_STABLE 2025-05-08 10:52:31 +07:00
Huong Nguyen 4220abfd22 Merge branch 'MDL-85280-500' of https://github.com/abias/moodle into MOODLE_500_STABLE 2025-05-08 10:38:27 +07:00
danghieu1407 62c3325c06 MDL-84708 question: Fixing layout answer box issue causing images 2025-05-08 09:48:04 +07:00
Huong Nguyen cc63c27931 Merge branch 'MDL-84677-500' of https://github.com/lucaboesch/moodle into MOODLE_500_STABLE 2025-05-08 09:28:13 +07:00
Huong Nguyen b47fc4a266 Merge branch 'MDL-84597-500' of https://github.com/paulholden/moodle into MOODLE_500_STABLE 2025-05-08 09:05:05 +07:00
Huong Nguyen dad46b2976 Merge branch 'MDL-85220-500' of https://github.com/rjnl/moodle into MOODLE_500_STABLE 2025-05-08 08:59:02 +07:00
Huong Nguyen e14280bf94 Merge branch 'MDL-84654-500' of https://github.com/andelacruz/moodle into MOODLE_500_STABLE 2025-05-08 08:44:13 +07:00
Amaia Anabitarte 685da75cd9 Merge branch 'MDL-85361-500' of https://github.com/sarjona/moodle into MOODLE_500_STABLE 2025-05-07 14:01:51 +02:00
Mikel Martín a6ce0dc708 MDL-83422 tiny_media: Fix modal footer layout 2025-05-07 13:51:26 +02:00
Jun Pataleta 0c8e1b6256 MDL-85193 course: Fix restore of backups with missing activity plugins
Show debugging instead of throwing an error when fetching an activity
icon from a missing activity plugin.
2025-05-07 18:10:25 +08:00
AMOS bot 5c89e91dad Automatically generated installer lang files 2025-05-07 00:07:53 +00:00
Angelia Dela Cruz 5b1761963c MDL-84654 mod_assign: Assignment additional files can be hidden 2025-05-06 12:41:47 +08:00
Huong Nguyen ebc9254a33 Merge branch 'MDL-85310-500' of https://github.com/andelacruz/moodle into MOODLE_500_STABLE 2025-05-06 10:31:59 +07:00
Sara Arjona f9dc580bb9 MDL-85364 block_social_activities: Move activities in mod pages too 2025-05-05 09:16:35 +02:00
Sara Arjona e1b0d8b770 MDL-85360 theme_boost: Fix active item indicator spacing
The fix in MDL-85017 covered the More menu; however, the secondary
navigation within the Single activity course format was not updated.
2025-05-05 08:38:02 +02:00
Sara Arjona 687857ea58 MDL-85361 block_social_activity: Fix inline editing text field 2025-05-04 19:37:40 +02:00
Paul Holden c3056486bf MDL-85264 javascript: reject promise when hiding saveCancel modal. 2025-05-02 17:30:09 +01:00
Paul Holden 5ee54fe953 MDL-85169 forms: focus grouped fields element based on parent data.
This fixes the previous attempt at focusing the first field within
grouped elements (aec60788) which inadvertently introduced duplicate
IDs.
2025-05-02 13:47:14 +01:00
Luca Bösch 1c0a30495c MDL-84677 backup: Filter course shortnames in copy progress viewer. 2025-05-02 08:51:34 +02:00
Huong Nguyen 69b36a36b4 weekly release 5.0+ 2025-05-02 09:16:13 +07:00
Huong Nguyen 4fb1ca66b4 Merge branch 'install_500_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_500_STABLE 2025-05-02 09:16:07 +07:00
Jake Dallimore 9c31818311 MDL-85341 core: remove unnecessary sesskey from module controlmenu items
This impacts those items using basemodurl:
- edit item
- move item
neither of which need sesskey at this stage as changes aren't being made
yet.
2025-05-02 09:55:37 +08:00
Paul Holden 286e5f0a7d MDL-85273 output: fix custom menu dropdowns within "More" sub-menu.
Since move to BS5 data-* attributes in 0c586b41 trying to open custom
menu dropdowns that had been moved to the "More" sub-menu was broken.

It appears that Bootstrap now handles open/close for us automatically
(so we were effectively closing the menu immediately after Bootstrap
opened it).
2025-05-01 22:04:11 +01:00
Paul Holden aab3c0722f MDL-85327 admin: observe show/hide settings on category page.
Co-authored-by: Carlos Castillo <carlos.castillo@moodle.com>
2025-05-01 10:55:22 +01:00
Huong Nguyen 536391d442 Merge branch 'MDL-85178-500' of https://github.com/lucaboesch/moodle into MOODLE_500_STABLE 2025-05-01 11:02:47 +07:00
Huong Nguyen a6a6e54862 Merge branch 'MDL-85107-500' of https://github.com/ferranrecio/moodle into MOODLE_500_STABLE 2025-05-01 09:50:51 +07:00
Rajneel Totaram 9026613016 MDL-85311 mod_forum: Fix broken unread posts styles 2025-05-01 13:05:04 +12:00
AMOS bot 60fd449bc6 Automatically generated installer lang files 2025-05-01 00:07:59 +00:00
Angelia Dela Cruz 8982f5ee9e MDL-85310 qtype: Renamed duplicate scenario names to fix warning 2025-04-30 13:32:43 +08:00
Huong Nguyen 1b9dfd94c1 Merge branch 'MDL-85222-500' of https://github.com/tasiobg/moodle into MOODLE_500_STABLE 2025-04-30 10:05:39 +07:00
Huong Nguyen 684a9fc34b Merge branch 'MDL-85208-500' of https://github.com/paulholden/moodle into MOODLE_500_STABLE 2025-04-30 10:03:48 +07:00
Sara Arjona d26bcd0069 Merge branch 'MDL-84805-500' of https://github.com/aanabit/moodle into MOODLE_500_STABLE 2025-04-29 15:31:51 +02:00
Amaia Anabitarte f083271328 MDL-84805 badges: Titles must be unique 2025-04-29 11:14:31 +02:00
Rajneel Totaram e64903b7b2 MDL-85220 block_recentlyaccesseditems: Fix heading level 2025-04-29 10:11:23 +12:00
Paul Holden 6f14d54be9 MDL-84941 course: fix activity button label on end of section.
Where the button is rendered after all section content, we should
fix the ARIA label attribute to refer to the current section rather
than non-existing subsequent activity.
2025-04-28 11:22:56 +01:00
Sara Arjona 2a131a18c3 Merge branch 'MDL-84192-500' of https://github.com/paulholden/moodle into MOODLE_500_STABLE 2025-04-28 11:25:05 +02:00
Paul Holden 2e90ab1ee8 MDL-84983 core: account for invalid locales in intl extension.
Recent PHP versions are now stricter on the `$locale` value passed
to `IntlDateFormatter` class and will throw exceptions for invalid
values (some of which may be present in our language packs).

See: https://github.com/php/php-src/issues/12912
2025-04-28 10:56:21 +07:00
Huong Nguyen 89285b7efc Merge branch 'MDL-84539-500' of https://github.com/andrewgos/moodle into MOODLE_500_STABLE 2025-04-28 08:59:27 +07:00
Paul Holden e8a93d6c63 MDL-84787 calendar: restore course-specific management page parameter. 2025-04-25 12:27:47 +01:00
Paul Holden daa6fe8af1 MDL-84597 blog: confirm blogs enabled prior to settings nav access. 2025-04-25 12:22:08 +01:00
Luca Bösch 6ad24df3d0 MDL-85178 quiz: style the question number inplace editable nicely. 2025-04-25 08:39:11 +02:00
Alexander Bias 9b7ac2d4d1 MDL-85280 communication: Adapt communication button style 2025-04-25 08:15:41 +02:00
Andrew Nicols 15ab527174 MDL-84421 tool_uploadcourse: Stop MUC caching enrol instances
We should not normally cache instances of a class. This can lead to poor
design to work around the limitations of PHP Serialization, and could
theoretically cause issues with PHP versions changing within a Moodle
version.
2025-04-25 09:10:09 +07:00
Huong Nguyen 5511a18ae5 weekly release 5.0+ 2025-04-24 22:05:39 +07:00
Huong Nguyen 9bd83512e6 NOBUG: Add upgrade notes 2025-04-24 22:05:38 +07:00
Huong Nguyen 32fa48c8c9 Merge branch 'install_500_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_500_STABLE 2025-04-24 22:05:23 +07:00
Paul Holden 34bdcdaa00 MDL-84192 course: update course information page language string.
The previous version used an incorrectly deprecated summary string.
2025-04-24 11:53:36 +01:00
Paul Holden 20fb7a4f1a MDL-84480 files: correct text formatting params when filtering files. 2025-04-24 07:31:17 +02:00
Nathan Nguyen ec4bfaf137 MDL-84233 core_user: fix unit test 2025-04-24 07:31:17 +02:00
Lars Bonczek 742b58fb04 MDL-83563 form: Fix hideIf and disabledIf dependent on multiselects 2025-04-24 07:31:17 +02:00
Huong Nguyen a440099d46 Merge branch 'MDL-84442-metadata-task-logs-MOODLE_500_STABLE' of https://github.com/bwalkerl/moodle into MOODLE_500_STABLE 2025-04-24 07:31:17 +02:00
Huong Nguyen 13f476b154 Merge branch 'MDL-85202-500' of https://github.com/paulholden/moodle into MOODLE_500_STABLE 2025-04-24 07:31:16 +02:00
David Woloszyn 09b72f375e MDL-84274 tool_policy: Policy acceptance pages use secure layout 2025-04-24 12:00:03 +10:00
David Woloszyn 65a3bf07c4 MDL-84274 tool_mfa: Prevent tool_policy pages from redirecting 2025-04-24 12:00:03 +10:00
Paul Holden 03ee9f3c1d MDL-85264 output: fix form change checker when switching tabs.
During the Bootstrap 5.0 upgrade the event handling within dynamic
tabs appears to have changed such that the "click" event happens
too late for the form change checker module to determine whether
there were any "dirty" forms on the tab being switched from.

This is related to, although not specifically caused by, changes
made in 0c586b41.
2025-04-23 18:03:32 +01:00
Jayce a4f96dce4d MDL-84964 mod_glossary: min width only apply for large device 2025-04-23 10:01:53 +09:30
AMOS bot 62def094c8 Automatically generated installer lang files 2025-04-23 00:07:57 +00:00
Sara Arjona 01ae63ca47 Merge branch 'MDL-82658-500' of https://github.com/paulholden/moodle into MOODLE_500_STABLE 2025-04-22 16:46:29 +02:00
David Woloszyn 05f009fc14 MDL-84807 AI: Remove records on provider uninstall 2025-04-22 16:43:59 +02:00
Albert Gasset 997122cde0 MDL-85248 qtype_ddimageortext: Revert MDL-66584
This reverts commit d792c4916a.
2025-04-22 16:41:22 +02:00
Paul Holden 92a20551cf MDL-82658 mod_forum: calculate maxbytes correctly in reply handler. 2025-04-22 08:43:06 +01:00
Huong Nguyen 7582e6a677 Merge branch 'MDL-85182-500' of https://github.com/lucaboesch/moodle into MOODLE_500_STABLE 2025-04-22 10:09:07 +07:00
Brendan Heywood f3ab1afd05 MDL-84070 core: Fix race conditions setting user preferences 2025-04-22 08:39:17 +07:00
Benjamin Walker 9e34a5f4c0 MDL-84442 core_task: Add finalise log param to task failers 2025-04-22 09:26:56 +10:00
Andrew Gosali d4e9ca5712 MDL-84539 report_participation: use capability viewanonymousevents 2025-04-21 09:56:43 +07:00
Huong Nguyen c5d88c2426 Merge branch 'mdl-83262_500' of https://github.com/james-cnz/moodle into MOODLE_500_STABLE 2025-04-21 09:12:36 +07:00
AMOS bot 1eab163f65 Automatically generated installer lang files 2025-04-20 00:08:19 +00:00
AMOS bot edc2b3d49c Automatically generated installer lang files 2025-04-19 00:07:57 +00:00
Stefan Hanauska 3d6a0f5b73 MDL-83111 tool_recyclebin: Avoid null value 2025-04-18 07:15:56 +02:00
AMOS bot 408adbe49a Automatically generated installer lang files 2025-04-18 00:08:00 +00:00
Luca Bösch 97752da2a8 MDL-85182 block_myoverview: Fix choice active item indicator spacing 2025-04-17 17:09:09 +02:00
Sara Arjona ba42149eb1 weekly release 5.0+ 2025-04-17 14:29:57 +02:00
Sara Arjona ac88fe5b13 NOBUG: Add upgrade notes 2025-04-17 14:29:57 +02:00
Tasio 6d522be2cf MDL-85222 themes: Remove grey zebra-striping background on reports
Only removing the grey background in small sceens when
the table is displayed as an accordion

Co-authored-by: Mikel Martín Corrales <mikel@moodle.com>
2025-04-17 14:16:16 +02:00
Paul Holden 6f28ea370d MDL-84298 mod_assign: target only first label for grade popout button. 2025-04-17 10:52:39 +07:00
Huong Nguyen 4a37e4438a Merge branch 'MDL-84625-M500_close-recordset-in-core_analytics-model-add_prediction_ids' of https://github.com/ziegenberg/moodle into MOODLE_500_STABLE 2025-04-17 10:27:50 +07:00
Huong Nguyen 40b6c3233c Merge branch '83713-javascript-error-xml-grades-import-500' of https://github.com/DSI-Universite-Rennes2/moodle into MOODLE_500_STABLE 2025-04-17 10:11:57 +07:00
Dagoberto Robayo 2a48472266 MDL-84232 mod_quiz: Avoid recover grades in quiz view page
- If Recover grades default is not enabled, quiz grades should not be recover.
2025-04-17 08:39:15 +07:00
James C 49eccd6af2 MDL-83262 course: Refresh all-sections toggler on section delete 2025-04-17 12:49:52 +12:00
Paul Holden 8968b682be MDL-85208 core: switch to ARIA attribute to label table headings.
Since ad14d58d visually hidden text within tables was displayed as
block elements, which introduced artificial line breaks in headings
for column names and sorting icons.

Co-authored-by: Mikel Martín <mikel@moodle.com>
2025-04-16 21:25:05 +01:00
Julien Boulen 388d53c3fe MDL-83713 form: Fix javascript selector on file picker
Co-authored-by: Meirza <meirza.arson@moodle.com>
2025-04-16 16:46:38 +02:00
Paul Holden a5588f890e MDL-84820 moodlenet: correct activity modal icon size/alignment. 2025-04-16 15:24:59 +02:00
Amaia Anabitarte c06bf3b038 MDL-85170 mod_choice: Remove the unnecessary ul closing tag 2025-04-16 15:12:14 +02:00
Sara Arjona 5a3e26b0f2 Merge branch 'MDL-82132-500' of https://github.com/paulholden/moodle into MOODLE_500_STABLE 2025-04-16 14:55:05 +02:00
Leon Stringer 2b05496629 MDL-83195 mod_assign: Individual grade release
Fix pushing individual grades into the gradebook (as opposed to the
batch release of grades) when "Allow partial release of grades while
marking anonymously" is enabled.

This change reworks MDL-73626's fix for the same issue for releasing
multiple grades in a batch operation.
2025-04-16 09:39:37 +07:00
Paul Holden e2f4f23f34 MDL-82132 user: less restrictive returning first/lastname details.
The `viewfullnames` capability check was overeager in restricting
the inclusion of user first and lastname properties in the returned
structure. Especially given that the same data was almost always
present in the fullname property of the same structure.
2025-04-15 16:05:39 +01:00
Paul Holden 5a28a54627 MDL-82132 user: re-factor code for generating dummy user fullname. 2025-04-15 16:05:28 +01:00
Sara Arjona 1e3f359acf Merge branch 'MDL-84149-500' of https://github.com/paulholden/moodle into MOODLE_500_STABLE 2025-04-15 16:44:58 +02:00
Paul Holden 14bf5bd303 MDL-84140 course: more resilient check for activity footer component. 2025-04-15 16:31:14 +02:00
Paul Holden 803b561f80 MDL-83990 course: ensure course start/end dates set in external call. 2025-04-15 16:18:40 +02:00
Paul Holden 2bafdb41ab MDL-83537 check: confirm presence of instance action link. 2025-04-15 16:09:22 +02:00
Jun Pataleta 18a588063e Merge branch 'MDL-83979-url-always-proxy' of https://github.com/brendanheywood/moodle into MOODLE_500_STABLE 2025-04-15 20:38:56 +08:00
Sara Arjona d5c3f2325d Merge branch 'MDL-55034-500' of https://github.com/paulholden/moodle into MOODLE_500_STABLE 2025-04-15 13:36:44 +02:00
Huong Nguyen afc530a43f Merge branch 'MDL-85207-500' of https://github.com/sarjona/moodle into MOODLE_500_STABLE 2025-04-15 18:30:34 +07:00
Paul Holden 1ba74349e7 MDL-78381 course: observe default "showactivitydates" in external call. 2025-04-15 11:36:49 +02:00
Paul Holden 0d9d1ff504 MDL-80337 availability: more robust checking for plugin class presence.
Co-authored-by: Dustin Brisebois <dustin.brisebois@lambdasolutions.net>
2025-04-15 11:30:30 +02:00
Sara Arjona fae86af494 MDL-85207 glossary: Add missing step for autolink behat test 2025-04-15 10:34:37 +02:00
Paul Holden e1c750b49d MDL-84149 gradereport_grader: better support for collapse preferences.
The privacy provider is now resilient against missing courses, and also
supports retrieving preferences from multiple courses for the user.
2025-04-15 07:32:15 +01:00
Huong Nguyen 11a31a6b2c Merge branch 'MDL-85179-500' of https://github.com/lucaboesch/moodle into MOODLE_500_STABLE 2025-04-15 08:31:55 +02:00
Huong Nguyen 68cdd9d50c Merge branch 'MDL-85195-500' of https://github.com/lucaboesch/moodle into MOODLE_500_STABLE 2025-04-15 08:31:55 +02:00
Sara Arjona e5b9a12966 Merge branch 'MDL-62230' of https://github.com/paulholden/moodle into MOODLE_500_STABLE 2025-04-15 08:31:55 +02:00
Sara Arjona 033447ee87 Merge branch 'MDL-81454-main' of https://github.com/daniil-berg/moodle into MOODLE_500_STABLE 2025-04-15 08:31:55 +02:00
Sara Arjona 7195df2ca1 Merge branch 'MDL-83550-main' of https://github.com/andrewgos/moodle into MOODLE_500_STABLE 2025-04-15 08:31:55 +02:00
Sara Arjona 17f0b61b1d Merge branch 'MDL-78886-main' of https://github.com/mwehr/moodle into MOODLE_500_STABLE 2025-04-15 08:31:55 +02:00
Sara Arjona bf943db69e Merge branch 'MDL-66584-master' of https://github.com/danghieu1407/moodle into MOODLE_500_STABLE 2025-04-15 08:31:55 +02:00
Sara Arjona 3b62816190 Merge branch 'MDL-84833-main' of https://github.com/ferranrecio/moodle into MOODLE_500_STABLE 2025-04-15 08:31:55 +02:00
Sara Arjona c9defe656a Merge branch 'MDL-79464-main' of https://github.com/mihailges/moodle into MOODLE_500_STABLE 2025-04-15 08:31:55 +02:00
Sara Arjona cc73f24d4f Merge branch 'MDL-84937' of https://github.com/jfederico/moodle into MOODLE_500_STABLE 2025-04-15 08:31:55 +02:00
Wehr Mario f098bcde4f MDL-78886 assignfeedback_editpdf: Fix broken next page button in PDFView
Credits go to Cédric Gerbault cdgerbault@gmail.com for providing the fix.
2025-04-15 08:31:53 +02:00
ferran 80af23cdd3 MDL-84833 course: completion feedback messages 2025-04-15 08:31:53 +02:00
jfederico 26f7f7ef21 MDL-84937 mdl_bigbluebuttonbn: Hide Settings for RecordingsOnly 2025-04-15 08:31:52 +02:00
Paul Holden 6a462b63f1 MDL-55034 blog: update external blog deletion to not leak sesskey. 2025-04-14 17:32:29 +01:00
Paul Holden ad48d8ee81 MDL-85202 core: update list of stale files for 5.0 release. 2025-04-14 17:07:59 +01:00
ferran 377e0b4e46 MDL-85107 calendar: fix humandate year display 2025-04-14 12:46:01 +02:00
Luca Bösch 561842d7fe MDL-85195 block_myoverview: colour the button as in Bootstrap 4. 2025-04-14 11:54:00 +02:00
Luca Bösch f02a3572e2 MDL-85179 mod_data: colour the buttons upon creation as in Bootstrap 4. 2025-04-14 11:36:09 +02:00
Daniel Ziegenberg f721c97a19 MDL-84625 analytics: close recordset when it's not needed anymore
Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
2025-04-14 10:05:36 +02:00
Jun Pataleta 6f6b960cf8 MDL-85187 upgrade: Add the 5.0.0 separation line to all upgrade scripts 2025-04-14 09:32:14 +07:00
James C 4e6310fbe8 MDL-84520 course: CM anchor scrolls to specified CM 2025-04-14 12:19:07 +12:00
Alec Gullon 7f708eaff9 MDL-79464 mod_assign: Limit user navigation if grading fails validation 2025-04-10 16:27:24 +08:00
Daniil Fajnberg b41bf2f579 MDL-81454 core: Remove incorrect @property-read annotation 2025-04-09 08:59:59 +02:00
danghieu1407 d792c4916a MDL-66584 qtype_ddimageortext: Move JSON data to data-attribute 2025-03-25 16:48:52 +07:00
Andrew Gosali f846c47ecf MDL-83550 gradingform_rubric: fix submit no grade when remark disabled 2025-03-17 14:49:35 +07:00
Paul Holden 0d487fd8de MDL-62230 mod_feedback: define exporter format for name/presentation. 2025-03-04 14:12:56 +00:00
Brendan Heywood edea4a41af MDL-83979 repository_url: Always use the proxy for url downloads 2024-12-11 13:35:01 +11:00
1547 changed files with 15756 additions and 5143 deletions
+3 -3
View File
@@ -19,7 +19,7 @@ env:
jobs:
Grunt:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Checking out code
@@ -61,12 +61,12 @@ jobs:
matrix:
include:
# MySQL builds always run with the lowest PHP supported version.
- os: ubuntu-22.04
- os: ubuntu-24.04
php: 8.2
extensions:
db: mysqli
# PostgreSQL builds always run with the highest PHP supported version.
- os: ubuntu-22.04
- os: ubuntu-24.04
php: 8.4
db: pgsql
+96
View File
@@ -6,6 +6,102 @@ More detailed information on key changes can be found in the [Developer update n
The format of this change log follows the advice given at [Keep a CHANGELOG](https://keepachangelog.com).
## 5.0.2
### core
#### Added
- Add a new method has_valid_group in \core\report_helper that will return true or false depending if the user has a valid group. This is mainly false in case the user is not in any group in SEPARATEGROUPS. Used in report_log and report_loglive
For more information see [MDL-84464](https://tracker.moodle.org/browse/MDL-84464)
#### Changed
- The `\core\attribute\deprecated` attribute constructor `$replacement` parameter now defaults to null, and can be omitted
For more information see [MDL-84531](https://tracker.moodle.org/browse/MDL-84531)
- Added a new `\core\deprecation::emit_deprecation()` method which should be used in places where a deprecation is known to occur. This method will throw debugging if no deprecation notice was found, for example:
```php
public function deprecated_method(): void {
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
}
```
For more information see [MDL-85897](https://tracker.moodle.org/browse/MDL-85897)
### core_message
#### Added
- The web service `core_message_get_member_info` additionally returns `cancreatecontact` which is a boolean value for a user's permission to add a contact.
For more information see [MDL-72123](https://tracker.moodle.org/browse/MDL-72123)
### core_question
#### Added
- The question backup API has been improved to only include questions that are actually used or owned by backed up activities.
Any activities that use question references should be supported automatically. Activities that use *question set references* (for example, random quiz questions) need to add a call to `backup_question_set_reference_trait::annotate_set_reference_bank_entries()` alongside the call to `backup_question_set_reference_trait::add_question_set_references()` in their backup step. See `backup_quiz_activity_structure_step::define_structure()` for an example.
For more information see [MDL-41924](https://tracker.moodle.org/browse/MDL-41924)
#### Changed
- `core_question_search_shared_banks` will now search all question banks, not just those outside the current course.
This makes the service usable in cases outside of the current "Switch banks" UI, which require searching all banks on the site.
It also makes the autocomplete in the "Switch banks" UI more consistent, as it was previously excluding some of the banks listed in the UI (Question banks in this course), but not others (Recently viewed question banks).
This change has also adds a 'requiredcapabilties' parameter to the function, which accepts an list of abbreviated capabilities for checking access against question banks before they are returned.
For more information see [MDL-85069](https://tracker.moodle.org/browse/MDL-85069)
- `question_edit_contexts` now only considers the provided context when checking permissions, rather than all parent contexts as well. As questions now exist only at the activity module context level, permissions can be inherited or overridden as normal for each question bank. The previous pattern of checking for a permission in any parent context circumvented the override system, and no longer makes sense.
For more information see [MDL-85754](https://tracker.moodle.org/browse/MDL-85754)
## 5.0.1
### core
#### Added
- - Added is_site_registered_in_hub method in lib/classes/hub/api.php to
check if the site is registered or not.
- Added get_secret method in lib/classes/hub/registration.php to get site's secret.
For more information see [MDL-83448](https://tracker.moodle.org/browse/MDL-83448)
- Added a new optional param to adhoc_task_failed and scheduled_task_failed to allow skipping log finalisation when called from a separate task.
For more information see [MDL-84442](https://tracker.moodle.org/browse/MDL-84442)
- There is a new `core/page_title` Javascript module for manipulating the current page title
For more information see [MDL-84804](https://tracker.moodle.org/browse/MDL-84804)
### core_auth
#### Added
- A new method called `get_additional_upgrade_token_parameters` has been added to `oauth2_client` class. This will allow custom clients to override this one and add their extra parameters for upgrade token request.
For more information see [MDL-80380](https://tracker.moodle.org/browse/MDL-80380)
### core_question
#### Fixed
- The unit test repeated\_restore\_test::test\_restore\_course\_with\_same\_stamp\_questions was passing incorrectly on 5.x for question types that use answers.
Maintainers of third-party question types may want to re-run the test with the fix in place, or if they have copied parts of this test as the basis of a test in their own plugin, review the changes and see if they should be reflected in their own test.
For more information see [MDL-85556](https://tracker.moodle.org/browse/MDL-85556)
### core_user
#### Added
- New method `\core_user::get_dummy_fullname(...)` for returning dummy user fullname comprised of configured name fields only
For more information see [MDL-82132](https://tracker.moodle.org/browse/MDL-82132)
## 5.0
### core
+4
View File
@@ -118,6 +118,10 @@ foreach ($settingspage->children as $childpage) {
}
$outputhtml .= html_writer::tag('div', '<!-- -->', array('class' => 'clearer'));
$outputhtml .= $setting->output_html($data);
if ($childpage->has_dependencies()) {
$opts = ['dependencies' => $childpage->get_dependencies_for_javascript()];
$PAGE->requires->js_call_amd('core/showhidesettings', 'init', [$opts]);
}
}
$outputhtml .= html_writer::end_tag('fieldset');
}
+1
View File
@@ -24,6 +24,7 @@
*/
define('CLI_SCRIPT', true);
define('IGNORE_COMPONENT_CACHE', true);
require(__DIR__.'/../../config.php');
require_once($CFG->libdir.'/clilib.php');
+203
View File
@@ -4716,6 +4716,7 @@
<VENDOR name="mysql" version="8.4" />
<VENDOR name="postgres" version="14" />
<VENDOR name="mssql" version="14.0" />
<VENDOR name="auroramysql" version="8.0" />
</DATABASE>
<PHP version="8.2.0" level="required">
</PHP>
@@ -4895,6 +4896,208 @@
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_async_backup" level="recommended">
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_aurora_version" level="optional">
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
<MOODLE version="5.1" requires="4.2.3">
<UNICODE level="required">
<FEEDBACK>
<ON_ERROR message="unicoderequired" />
</FEEDBACK>
</UNICODE>
<DATABASE level="required">
<VENDOR name="mariadb" version="10.11.0" />
<VENDOR name="mysql" version="8.4" />
<VENDOR name="postgres" version="15" />
<VENDOR name="mssql" version="14.0" />
<VENDOR name="auroramysql" version="8.0" />
</DATABASE>
<PHP version="8.2.0" level="required">
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
<ON_CHECK message="pcreunicodewarning" />
</FEEDBACK>
</PCREUNICODE>
<PHP_EXTENSIONS>
<PHP_EXTENSION name="iconv" level="required">
<FEEDBACK>
<ON_ERROR message="iconvrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="mbstring" level="required">
<FEEDBACK>
<ON_ERROR message="mbstringrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="curl" level="required">
<FEEDBACK>
<ON_ERROR message="curlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="openssl" level="required">
<FEEDBACK>
<ON_ERROR message="opensslrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="tokenizer" level="optional">
<FEEDBACK>
<ON_CHECK message="tokenizerrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="soap" level="optional">
<FEEDBACK>
<ON_CHECK message="soaprecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="ctype" level="required">
<FEEDBACK>
<ON_ERROR message="ctyperequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zip" level="required">
<FEEDBACK>
<ON_ERROR message="ziprequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zlib" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="gd" level="required">
<FEEDBACK>
<ON_ERROR message="gdrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="simplexml" level="required">
<FEEDBACK>
<ON_ERROR message="simplexmlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="spl" level="required">
<FEEDBACK>
<ON_ERROR message="splrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="pcre" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="dom" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="xml" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlreader" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="intl" level="required">
<FEEDBACK>
<ON_ERROR message="intlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="json" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="hash" level="required"/>
<PHP_EXTENSION name="fileinfo" level="required"/>
<PHP_EXTENSION name="sodium" level="required"/>
<PHP_EXTENSION name="exif" level="optional"/>
</PHP_EXTENSIONS>
<PHP_SETTINGS>
<PHP_SETTING name="memory_limit" value="96M" level="required">
<FEEDBACK>
<ON_ERROR message="settingmemorylimit" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="file_uploads" value="1" level="optional">
<FEEDBACK>
<ON_CHECK message="settingfileuploads" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="opcache.enable" value="1" level="optional">
<FEEDBACK>
<ON_CHECK message="opcacherecommended" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="zend.exception_ignore_args" value="1" level="optional">
<FEEDBACK>
<ON_CHECK message="settingzendexceptionignoreargs" />
</FEEDBACK>
</PHP_SETTING>
</PHP_SETTINGS>
<CUSTOM_CHECKS>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_storage_engine" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbstorageengine" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="question/engine/upgrade/upgradelib.php" function="quiz_attempts_upgraded" level="required">
<FEEDBACK>
<ON_ERROR message="quizattemptsupgradedmessage" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_slasharguments" level="optional">
<FEEDBACK>
<ON_CHECK message="slashargumentswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_tables_row_format" level="optional">
<FEEDBACK>
<ON_CHECK message="unsupporteddbtablerowformat" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_unoconv_version" level="optional">
<FEEDBACK>
<ON_CHECK message="unoconvwarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_libcurl_version" level="optional">
<FEEDBACK>
<ON_CHECK message="libcurlwarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_file_format" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbfileformat" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_file_per_table" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbfilepertable" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_large_prefix" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddblargeprefix" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_is_https" level="optional">
<FEEDBACK>
<ON_CHECK message="ishttpswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_incomplete_unicode_support" level="optional">
<FEEDBACK>
<ON_CHECK message="incompleteunicodesupport" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_sixtyfour_bits" level="required">
<FEEDBACK>
<ON_ERROR message="sixtyfourbitsrequired" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_max_input_vars" level="optional">
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_admin_dir_usage" level="optional">
<FEEDBACK>
<ON_CHECK message="iscustomadminwarnings" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_xmlrpc_usage" level="optional">
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mod_assignment" level="required">
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_db_prefix_length" level="required">
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_async_backup" level="recommended">
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_aurora_version" level="optional">
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
</COMPATIBILITY_MATRIX>
+2
View File
@@ -23,6 +23,8 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define('IGNORE_COMPONENT_CACHE', true);
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
+7 -5
View File
@@ -34,8 +34,10 @@ admin_externalpage_setup('registrationmoodleorg');
$unregistration = optional_param('unregistration', false, PARAM_BOOL);
$confirm = optional_param('confirm', false, PARAM_BOOL);
// Consider the site 'registered' if records exist locally and at the hub.
$siteisregistered = \core\hub\registration::is_registered() && core\hub\api::is_site_registered_in_hub();
if ($unregistration && \core\hub\registration::is_registered()) {
if ($unregistration && $siteisregistered) {
if ($confirm) {
require_sesskey();
\core\hub\registration::unregister(false, false);
@@ -60,7 +62,7 @@ if (!$returnurl = optional_param('returnurl', null, PARAM_LOCALURL)) {
$returnurl = $isinitialregistration ? '/admin/index.php' : '/admin/registration/index.php';
}
$siteregistrationform = new \core\hub\site_registration_form();
$siteregistrationform = new \core\hub\site_registration_form(null, ['registered' => $siteisregistered]);
$siteregistrationform->set_data(['returnurl' => $returnurl]);
if ($fromform = $siteregistrationform->get_data()) {
@@ -86,7 +88,7 @@ echo $OUTPUT->header();
// Current status of registration.
$notificationtype = \core\output\notification::NOTIFY_ERROR;
if (\core\hub\registration::is_registered()) {
if ($siteisregistered) {
$lastupdated = \core\hub\registration::get_last_updated();
if ($lastupdated == 0) {
$registrationmessage = get_string('pleaserefreshregistrationunknown', 'admin');
@@ -104,7 +106,7 @@ if (\core\hub\registration::is_registered()) {
}
// Heading.
if (\core\hub\registration::is_registered()) {
if ($siteisregistered) {
echo $OUTPUT->heading(get_string('registerwithmoodleorgupdate', 'core_hub'));
} else if ($isinitialregistration) {
echo $OUTPUT->heading(get_string('registerwithmoodleorgcomplete', 'core_hub'));
@@ -117,7 +119,7 @@ echo $renderer->moodleorg_registration_message();
$siteregistrationform->display();
if (\core\hub\registration::is_registered()) {
if ($siteisregistered) {
// Unregister link.
$unregisterhuburl = new moodle_url("/admin/registration/index.php", ['unregistration' => 1]);
echo html_writer::div(html_writer::link($unregisterhuburl, get_string('unregister', 'hub')), 'unregister mt-2');
@@ -43,7 +43,7 @@ abstract class core_role_capability_table_base {
protected $id;
/** Added to the class="" attribute on output. */
protected $classes = array('rolecap table-hover');
protected $classes = ['rolecap table w-auto table-hover'];
/** Default number of capabilities in the table for the search UI to be shown. */
const NUM_CAPS_FOR_SEARCH = 12;
+4
View File
@@ -36,6 +36,10 @@ if (function_exists('opcache_reset')) {
define('CLI_SCRIPT', true);
define('CACHE_DISABLE_ALL', true);
// It makes no sense to use BEHAT_CLI for this script (the Behat launch scripts expect to start
// from the normal environment), so in case user has set tne environment variable, disable it.
putenv('BEHAT_CLI=0');
// Basic functions.
require_once(__DIR__ . '/../../../../lib/clilib.php');
require_once(__DIR__ . '/../../../../lib/behat/lib.php');
+4
View File
@@ -31,6 +31,10 @@ define('ABORT_AFTER_CONFIG', true);
define('CACHE_DISABLE_ALL', true);
define('NO_OUTPUT_BUFFERING', true);
// It makes no sense to use BEHAT_CLI for this script (the Behat launch scripts expect to start
// from the normal environment), so in case user has set tne environment variable, disable it.
putenv('BEHAT_CLI=0');
require_once(__DIR__ .'/../../../../config.php');
require_once(__DIR__.'/../../../../lib/clilib.php');
require_once(__DIR__.'/../../../../lib/behat/lib.php');
+4
View File
@@ -39,6 +39,10 @@ define('NO_OUTPUT_BUFFERING', true);
define('IGNORE_COMPONENT_CACHE', true);
define('ABORT_AFTER_CONFIG', true);
// It makes no sense to use BEHAT_CLI for this script (the Behat launch scripts expect to start
// from the normal environment), so in case user has set tne environment variable, disable it.
putenv('BEHAT_CLI=0');
require_once(__DIR__ . '/../../../../lib/clilib.php');
// CLI options.
+4
View File
@@ -33,6 +33,10 @@ if (isset($_SERVER['REMOTE_ADDR'])) {
die(); // No access from web!.
}
// It makes no sense to use BEHAT_CLI for this script (the Behat launch scripts expect to start
// from the normal environment), so in case user has set tne environment variable, disable it.
putenv('BEHAT_CLI=0');
// Basic functions.
require_once(__DIR__ . '/../../../../lib/clilib.php');
require_once(__DIR__ . '/../../../../lib/behat/lib.php');
@@ -87,7 +87,7 @@ abstract class answerbase extends base {
*/
#[\core\attribute\deprecated(null, since: '5.0', reason: 'This method should not be used', mdl: 'MDL-71378')]
public function find_system_areas(): ?\moodle_recordset {
\core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]);
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
global $DB;
$params = [
'syscontext' => CONTEXT_SYSTEM,
@@ -111,7 +111,7 @@ abstract class base extends area_base {
*/
#[\core\attribute\deprecated(null, since: '5.0', reason: 'This method should not be used', mdl: 'MDL-71378')]
public function find_system_areas(): ?\moodle_recordset {
\core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]);
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
global $DB;
$params = [
'syscontext' => CONTEXT_SYSTEM,
+11 -2
View File
@@ -24,5 +24,14 @@
defined('MOODLE_INTERNAL') || die;
// Remove the 'enableaccessibilitytools' configuration setting in case of reinstall.
unset_config('enableaccessibilitytools');
/**
* Plugin uninstall code.
*
* @return true
*/
function xmldb_tool_brickfield_uninstall(): bool {
// Remove the 'enableaccessibilitytools' configuration setting in case of reinstall.
unset_config('enableaccessibilitytools');
return true;
}
@@ -0,0 +1,70 @@
<?php
// This file is part of Moodle - https://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <https://www.gnu.org/licenses/>.
namespace tool_capability;
// phpcs:disable moodle.PHPUnit.TestCaseProvider.dataProviderSyntaxMethodNotFound
/**
* Detect common problems in capability definitions of plugins.
*
* @group plugin_checks
* @package tool_capability
* @copyright 2025 Petr Skoda
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
final class plugin_checks_test extends \core\tests\plugin_checks_testcase {
/**
* Verify contents of plugin db/access.php file.
*
* @dataProvider all_plugins_provider
* @coversNothing
*
* @param string $component
* @param string $plugintype
* @param string $pluginname
* @param string $dir
*/
public function test_db_access_file(string $component, string $plugintype, string $pluginname, string $dir): void {
global $CFG;
$stringmanager = get_string_manager();
$corerolefile = "$CFG->dirroot/lang/en/role.php";
$langfile = "$dir/lang/en/$component.php";
$file = "$dir/db/access.php";
$capabilities = $this->fetch_array_from_file($file, 'capabilities');
if (!$capabilities) {
$this->expectNotToPerformAssertions();
return;
}
foreach ($capabilities as $capname => $capability) {
if ($plugintype === 'qbank' && str_starts_with($capname, 'moodle/question:')) {
// Question bank capabilities are irregular.
$strname = explode('/', $capname, 2)[1];
$this->assertTrue($stringmanager->string_exists($strname, 'core_role'),
"Missing capability name string '$strname' in $corerolefile");
continue;
}
$this->assertMatchesRegularExpression("|^$plugintype/$pluginname:[a-z0-9_]+$|", $capname);
$strname = substr($capname, strlen($plugintype) + 1);
$this->assertTrue($stringmanager->string_exists($strname, $component),
"Missing capability name string '$strname' in $langfile");
$this->assertSame($capname, clean_param($capname, PARAM_CAPABILITY));
}
}
}
+3
View File
@@ -51,5 +51,8 @@ function xmldb_tool_cohortroles_upgrade($oldversion) {
// Automatically generated Moodle v4.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v5.0.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -36,5 +36,8 @@ function xmldb_tool_customlang_upgrade($oldversion) {
// Automatically generated Moodle v4.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v5.0.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -106,5 +106,8 @@ function xmldb_tool_dataprivacy_upgrade($oldversion) {
// Automatically generated Moodle v4.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v5.0.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -41,5 +41,8 @@ function xmldb_tool_log_upgrade($oldversion) {
// Automatically generated Moodle v4.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v5.0.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -35,5 +35,8 @@ function xmldb_logstore_database_upgrade($oldversion) {
// Automatically generated Moodle v4.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v5.0.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -35,5 +35,8 @@ function xmldb_logstore_standard_upgrade($oldversion) {
// Automatically generated Moodle v4.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v5.0.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -46,11 +46,11 @@ Feature: See the competencies for an activity on the course competencies page.
When I follow "Competencies"
Then I should see "Test-Comp1"
And I should see "Test-Comp2"
And I set the field "Filter competencies by resource or activity" to "PageName1"
And I set the competency filter "Filter competencies by resource or activity" to "PageName1"
And I press the enter key
And I should see "Test-Comp1"
And I should not see "Test-Comp2"
And I set the field "Filter competencies by resource or activity" to "PageName2"
And I set the competency filter "Filter competencies by resource or activity" to "PageName2"
And I press the enter key
And I should not see "Test-Comp1"
And I should not see "Test-Comp2"
+11
View File
@@ -169,6 +169,17 @@ switch ($action) {
echo $OUTPUT->heading(get_string('managefactor', 'factor_' . $factorobject->name));
echo $OUTPUT->active_factors($factor);
echo $OUTPUT->single_button($returnurl, get_string('back'));
// Displays a setup additional button in case it is needed.
if ($factorobject->show_additional_setup_button()) {
echo $OUTPUT->single_button(
url: new \moodle_url('action.php', ['action' => 'setup', 'factor' => $factor]),
label: $factorobject->get_additional_setup_string(),
method: 'post',
options: ['type' => 'primary'],
);
}
// JS for modal confirming replace and revoke actions.
$PAGE->requires->js_call_amd('tool_mfa/confirmation_modal', 'init', [$context->id]);
@@ -433,6 +433,18 @@ abstract class object_factor_base implements object_factor {
return $this->has_setup();
}
/**
* Returns true if a button should be shown to add factors of the same kind on the preferences page.
* For example, give user's the ability to set up multiple security keys.
*
* Override in child class if necessary.
*
* @return bool
*/
public function show_additional_setup_button(): bool {
return false;
}
/**
* Returns true if a factor requires input from the user to verify.
*
@@ -590,6 +602,18 @@ abstract class object_factor_base implements object_factor {
return get_string('setupfactor', 'tool_mfa');
}
/**
* Gets the string for additional setup button on preferences page.
* If the user has the ability to set up multiple security keys.
*
* Override in child class if necessary.
*
* @return string
*/
public function get_additional_setup_string(): string {
return get_string('setupfactorbuttonadditional', 'tool_mfa');
}
/**
* Gets the string for manage button on preferences page.
*
+7
View File
@@ -530,6 +530,13 @@ class manager {
}
}
// Site policies from tool_policy.
$policyviewurl = new \moodle_url('/admin/tool/policy/view.php');
$policyindexurl = new \moodle_url('/admin/tool/policy/index.php');
if ($policyviewurl->compare($url, URL_MATCH_BASE) || $policyindexurl->compare($url, URL_MATCH_BASE)) {
return self::NO_REDIRECT;
}
// WS/AJAX check.
if (WS_SERVER || AJAX_SCRIPT) {
if (isset($SESSION->mfa_pending) && !empty($SESSION->mfa_pending)) {
+11 -11
View File
@@ -147,7 +147,7 @@ class renderer extends \plugin_renderer_base {
*/
#[\core\attribute\deprecated(null, reason: 'It is no longer used', since: '4.4', mdl: 'MDL-79920', final: true)]
public function setup_factor(): void {
\core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]);
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
}
/**
@@ -358,7 +358,7 @@ class renderer extends \plugin_renderer_base {
WHERE deleted = 0
AND suspended = 0
GROUP BY auth";
$allusersinfo = $DB->get_records_sql($alluserssql, []);
$allusersinfo = $DB->get_records_sql_menu($alluserssql);
$noncompletesql = "SELECT u.auth, COUNT(u.id)
FROM {user} u
@@ -367,7 +367,7 @@ class renderer extends \plugin_renderer_base {
AND (mfaa.lastverified < ?
OR mfaa.lastverified IS NULL)
GROUP BY u.auth";
$noncompleteinfo = $DB->get_records_sql($noncompletesql, [$lookback, $lookback]);
$noncompleteinfo = $DB->get_records_sql_menu($noncompletesql, [$lookback, $lookback]);
$nologinsql = "SELECT auth, COUNT(id)
FROM {user}
@@ -375,7 +375,7 @@ class renderer extends \plugin_renderer_base {
AND suspended = 0
AND lastlogin < ?
GROUP BY auth";
$nologininfo = $DB->get_records_sql($nologinsql, [$lookback]);
$nologininfo = $DB->get_records_sql_menu($nologinsql, [$lookback]);
$mfauserssql = "SELECT auth,
COUNT(DISTINCT tm.userid)
@@ -385,7 +385,7 @@ class renderer extends \plugin_renderer_base {
AND u.deleted = 0
AND u.suspended = 0
GROUP BY u.auth";
$mfausersinfo = $DB->get_records_sql($mfauserssql, [$lookback]);
$mfausersinfo = $DB->get_records_sql_menu($mfauserssql, [$lookback]);
$factorsusedsql = "SELECT CONCAT(u.auth, '_', tm.factor) as id,
COUNT(*)
@@ -396,7 +396,7 @@ class renderer extends \plugin_renderer_base {
AND u.suspended = 0
AND (tm.revoked = 0 OR (tm.revoked = 1 AND tm.timemodified > ?))
GROUP BY CONCAT(u.auth, '_', tm.factor)";
$factorsusedinfo = $DB->get_records_sql($factorsusedsql, [$lookback, $lookback]);
$factorsusedinfo = $DB->get_records_sql_menu($factorsusedsql, [$lookback, $lookback]);
// Auth rows.
$authtypes = get_enabled_auth_plugins(true);
@@ -405,10 +405,10 @@ class renderer extends \plugin_renderer_base {
$row[] = \html_writer::tag('b', $authtype);
// Setup the overall totals columns.
$row[] = $allusersinfo[$authtype]->count ?? '-';
$row[] = $mfausersinfo[$authtype]->count ?? '-';
$row[] = $noncompleteinfo[$authtype]->count ?? '-';
$row[] = $nologininfo[$authtype]->count ?? '-';
$row[] = $allusersinfo[$authtype] ?? '-';
$row[] = $mfausersinfo[$authtype] ?? '-';
$row[] = $noncompleteinfo[$authtype] ?? '-';
$row[] = $nologininfo[$authtype] ?? '-';
// Create a running counter for the total.
$authtotal = 0;
@@ -418,7 +418,7 @@ class renderer extends \plugin_renderer_base {
if (!empty($column)) {
// Get the information from the data key.
$key = $authtype . '_' . $column;
$count = $factorsusedinfo[$key]->count ?? 0;
$count = $factorsusedinfo[$key] ?? 0;
$authtotal += $count;
$row[] = $count ? format_float($count, 0) : '-';
@@ -54,5 +54,8 @@ function xmldb_factor_auth_upgrade($oldversion) {
// Automatically generated Moodle v4.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v5.0.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -53,5 +53,8 @@ function xmldb_factor_email_upgrade($oldversion): bool {
upgrade_plugin_savepoint(true, 2024122400, 'factor', 'email');
}
// Automatically generated Moodle v5.0.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -96,5 +96,8 @@ function xmldb_factor_sms_upgrade(int $oldversion): bool {
upgrade_plugin_savepoint(true, 2025040700, 'factor', 'sms');
}
// Automatically generated Moodle v5.0.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -42,5 +42,8 @@ function xmldb_factor_totp_upgrade($oldversion): bool {
// Automatically generated Moodle v4.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v5.0.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -73,7 +73,7 @@ $string['setupfactor:instructionsverification'] = '3. Enter the verification cod
$string['setupfactor:intro'] = 'To set up this method, you need to have a device with an authenticator app. If you don\'t have an app, you can download one. For example, <a href="https://2fas.com/" target="_blank">2FAS Auth</a>, <a href="https://freeotp.github.io/" target="_blank">FreeOTP</a>, Google Authenticator, Microsoft Authenticator or Twilio Authy.';
$string['setupfactor:key'] = 'Secret key: ';
$string['setupfactor:link'] = 'Or enter details manually.';
$string['setupfactor:link_help'] = 'If you are on a mobile device and already have an authenticator app installed this link may work. Note that using TOTP on the same device as you login on can weaken the benefits of MFA.';
$string['setupfactor:link_help'] = 'If you are on a mobile device and already have an authenticator app installed this link may work. Note that using TOTP on the same device as you log in on can weaken the benefits of MFA.';
$string['setupfactor:linklabel'] = 'Open app already installed on this device';
$string['setupfactor:mode'] = 'Mode:';
$string['setupfactor:mode:timebased'] = 'Time-based';
@@ -111,6 +111,15 @@ class factor extends object_factor_base {
return true;
}
/**
* Returns true if an additional setup button should be shown on the preferences page.
*
* @return bool
*/
public function show_additional_setup_button(): bool {
return true;
}
/**
* WebAuthn factor implementation.
*
@@ -151,6 +160,15 @@ class factor extends object_factor_base {
return get_string('setupfactorbutton', 'factor_webauthn');
}
/**
* Gets the string for additional setup button on preferences page.
*
* @return string
*/
public function get_additional_setup_string(): string {
return get_string('setupfactorbuttonadditional', 'factor_webauthn');
}
/**
* Gets the string for manage button on preferences page.
*
@@ -56,6 +56,7 @@ $string['settings:userverification'] = 'User verification';
$string['settings:userverification_help'] = 'Serves to ensure the person authenticating is in fact who they say they are. User verification can take various forms, such as password, PIN, fingerprint, etc.';
$string['setupfactor'] = 'Set up security key';
$string['setupfactorbutton'] = 'Set up';
$string['setupfactorbuttonadditional'] = 'Add security key';
$string['setupfactor:instructionsregistersecuritykey'] = '2. Register a security key.';
$string['setupfactor:instructionssecuritykeyname'] = '1. Give your key a name.';
$string['setupfactor:intro'] = 'A security key is a physical device that you can use to authenticate yourself. Security keys can be USB tokens, Bluetooth devices, or event built-in fingerprint scanners on your phone or computer.';
+1
View File
@@ -150,6 +150,7 @@ $string['settings:redir_exclusions_help'] = 'Each new line is a relative URL fro
$string['settings:weight'] = 'Factor weight';
$string['settings:weight_help'] = 'The weight of this factor if passed. A user needs at least 100 points to log in.';
$string['setupfactor'] = 'Set up factor';
$string['setupfactorbuttonadditional'] = 'Add additional factor';
$string['state:fail'] = 'Fail';
$string['state:locked'] = 'Locked';
$string['state:neutral'] = 'Neutral';
@@ -32,6 +32,7 @@ Feature: Set up and manage user factors
And I click on "Cancel" "button"
And I click on "Manage security key" "button"
And I should see "Manage security key"
And I should see "Add security key"
@javascript
Scenario: I can revoke a factor only when there is more than one active factor
@@ -78,3 +79,15 @@ Feature: Set up and manage user factors
And I click on "Replace" "button" in the "MacBook" "table_row"
When I click on "Yes, replace" "button" in the "Replace 'MacBook' security key?" "dialogue"
Then I should see "Replace security key"
Scenario: I can add a new factor instance on the manage factor page
Given the following config values are set as admin:
| enabled | 1 | factor_webauthn |
And the following "tool_mfa > User factors" exist:
| username | factor | label |
| admin | webauthn | MacBook |
And I follow "Preferences" in the user menu
And I click on "Multi-factor authentication preferences" "link"
And I click on "Manage security key" "button"
When I click on "Add security key" "button"
Then I should see "Set up security key"
+3
View File
@@ -41,5 +41,8 @@ function xmldb_tool_mobile_upgrade($oldversion) {
// Automatically generated Moodle v4.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v5.0.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -41,5 +41,8 @@ function xmldb_tool_monitor_upgrade($oldversion) {
// Automatically generated Moodle v4.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v5.0.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -41,5 +41,8 @@ function xmldb_tool_moodlenet_upgrade(int $oldversion) {
// Automatically generated Moodle v4.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v5.0.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -129,6 +129,7 @@ class issuer extends persistent {
\core\oauth2\issuer::EVERYWHERE => get_string('issueruseineverywhere', 'tool_oauth2'),
\core\oauth2\issuer::LOGINONLY => get_string('issueruseinloginonly', 'tool_oauth2'),
\core\oauth2\issuer::SERVICEONLY => get_string('issueruseininternalonly', 'tool_oauth2'),
\core\oauth2\issuer::SMTPWITHXOAUTH2 => get_string('issueruseinsmtpwithoauth', 'tool_oauth2'),
];
$mform->addElement('select', 'showonloginpage', get_string('issuerusein', 'tool_oauth2'), $options);
$mform->addHelpButton('showonloginpage', 'issuerusein', 'tool_oauth2');
@@ -138,6 +139,13 @@ class issuer extends persistent {
$mform->addRule('loginpagename', get_string('maximumchars', '', 255), 'maxlength', 255, 'client');
$mform->addHelpButton('loginpagename', 'issuerloginpagename', 'tool_oauth2');
$mform->hideIf('loginpagename', 'showonloginpage', 'eq', \core\oauth2\issuer::SERVICEONLY);
$mform->hideIf('loginpagename', 'showonloginpage', 'eq', \core\oauth2\issuer::SMTPWITHXOAUTH2);
// Connected email for XOAUTH2.
$mform->addElement('text', 'systememail', get_string('issuersmtpsystememail', 'tool_oauth2'));
$mform->setType('systememail', PARAM_EMAIL);
$mform->addHelpButton('systememail', 'issuersmtpsystememail', 'tool_oauth2');
$mform->hideIf('systememail', 'showonloginpage', 'ne', \core\oauth2\issuer::SMTPWITHXOAUTH2);
// Login scopes.
$mform->addElement('text', 'loginscopes', get_string('issuerloginscopes', 'tool_oauth2'));
@@ -86,7 +86,8 @@ class renderer extends plugin_renderer_base {
$namecell->header = true;
// Login issuer.
if ((int)$issuer->get('showonloginpage') == issuer::SERVICEONLY) {
if ((int)$issuer->get('showonloginpage') == issuer::SERVICEONLY ||
(int)$issuer->get('showonloginpage') == issuer::SMTPWITHXOAUTH2) {
$loginissuer = $this->pix_icon('no', get_string('notloginissuer', 'tool_oauth2'), 'tool_oauth2');
$logindisplayas = '';
} else {
+4 -1
View File
@@ -89,13 +89,16 @@ $string['issuershowonloginpage'] = 'Show on login page';
$string['issuerrequireconfirmation_help'] = 'Require that all users verify their email address before they can log in with OAuth. This applies to newly created accounts as part of the login process, or when an existing Moodle account is connected to an OAuth login via matching email addresses.';
$string['issuerrequireconfirmation'] = 'Require email verification';
$string['issuers'] = 'Issuers';
$string['issuersmtpsystememail'] = 'SMTP email';
$string['issuersmtpsystememail_help'] = 'If specified, this email will be used to connect a system account for sending email via SMTP. This is required for some OAuth 2 services (e.g. Microsoft). Please check the documentation for your OAuth 2 service to see if this is required.';
$string['issuersservicesallow'] = 'Allow services';
$string['issuersservicesnotallow'] = 'Do not allow services';
$string['issuerusein'] = 'This service will be used';
$string['issuerusein_help'] = 'OAuth 2 services can be used for internal services, on the login page, or both, if required.';
$string['issuerusein_help'] = 'OAuth 2 services can be used for internal services, on the login page, SMTP with XOAUTH2, or both login page and internal services, if required.';
$string['issueruseineverywhere'] = 'Login page and internal services';
$string['issueruseininternalonly'] = 'Internal services only';
$string['issueruseinloginonly'] = 'Login page only';
$string['issueruseinsmtpwithoauth'] = 'SMTP with XOAUTH2 only';
$string['issuerusedforlogin'] = 'Login';
$string['issuerusedforinternal'] = 'Internal services';
$string['linkedin_service'] = 'LinkedIn';
@@ -54,13 +54,17 @@ Feature: Basic OAuth2 functionality
And I should see "Testing service"
And "Allow login" "icon" should exist in the "Testing service" "table_row"
And "Allow services" "icon" should exist in the "Testing service" "table_row"
And I should see "-" in the "Testing service" "table_row"
And "Service discovery successful" "icon" should exist in the "Testing service" "table_row"
And I click on "Configure endpoints" "link" in the "Testing service" "table_row"
And I should see "authorization_endpoint"
And I should not see "discovery_endpoint"
And I should see "discovery_endpoint"
And I should see "device_authorization_endpoint"
And I navigate to "Server > OAuth 2 services" in site administration
And I click on "Configure user field mappings" "link" in the "Testing service" "table_row"
And I should see "firstname" in the "givenName" "table_row"
And I should see "firstname" in the "givenname" "table_row"
And I should see "idnumber" in the "sub" "table_row"
And I should see "email" in the "email" "table_row"
And I should see "lang" in the "locale" "table_row"
And I navigate to "Server > OAuth 2 services" in site administration
And I click on "Edit" "link" in the "Testing service" "table_row"
And I set the following fields to these values:
+4
View File
@@ -34,6 +34,10 @@ if (function_exists('opcache_reset')) {
define('IGNORE_COMPONENT_CACHE', true);
// It makes no sense to use BEHAT_CLI for this script (you cannot initialise PHPunit starting from
// the Behat environment), so in case user has set tne environment variable, disable it.
putenv('BEHAT_CLI=0');
require_once(__DIR__.'/../../../../lib/clilib.php');
require_once(__DIR__.'/../../../../lib/phpunit/bootstraplib.php');
require_once(__DIR__.'/../../../../lib/testing/lib.php');
+4
View File
@@ -30,6 +30,10 @@ if (isset($_SERVER['REMOTE_ADDR'])) {
define('IGNORE_COMPONENT_CACHE', true);
// It makes no sense to use BEHAT_CLI for this script (you cannot initialise PHPunit starting from
// the Behat environment), so in case user has set tne environment variable, disable it.
putenv('BEHAT_CLI=0');
require_once(__DIR__.'/../../../../lib/clilib.php');
require_once(__DIR__.'/../../../../lib/phpunit/bootstraplib.php');
require_once(__DIR__.'/../../../../lib/testing/lib.php');
+2
View File
@@ -590,6 +590,7 @@ class api {
'subdirs' => false,
'maxfiles' => -1,
'context' => context_system::instance(),
'noclean' => true,
];
}
@@ -606,6 +607,7 @@ class api {
'subdirs' => false,
'maxfiles' => -1,
'context' => context_system::instance(),
'noclean' => true,
];
}
+3
View File
@@ -42,5 +42,8 @@ function xmldb_tool_policy_upgrade($oldversion) {
// Automatically generated Moodle v4.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v5.0.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+1 -1
View File
@@ -58,7 +58,7 @@ $agreedocs = array_values(array_unique($agreedocs));
$declinedocs = array_values(array_unique($declinedocs));
$PAGE->set_context(context_system::instance());
$PAGE->set_pagelayout('standard');
$PAGE->set_pagelayout('secure');
$PAGE->set_url('/admin/tool/policy/index.php');
$PAGE->set_popup_notification_allowed(false);
@@ -304,3 +304,12 @@ Feature: Viewing acceptances reports and accepting on behalf of other users
And I log out
When I log in as "user1"
Then I should see "Calendar"
Scenario: Policy acceptance is prioritised when MFA is enabled
Given the following config values are set as admin:
| enabled | 1 | tool_mfa |
And I log in as "user1"
And I press "Next"
And I set the field "I agree to the This site policy" to "1"
When I press "Next"
Then I should see "2-step verification"
@@ -290,9 +290,6 @@ Feature: User must accept policy managed by this plugin when logging in and sign
And I set the field "I agree to the This privacy policy." to "0"
Then I should see "Please agree to the following policies:"
And I should see "Before continuing you need to acknowledge all these policies."
# Confirm that user can not browse the site (edit their profile).
When I follow "Profile" in the user menu
Then I should see "Please agree to the following policies:"
Scenario: Accept policy on login, accept all policies
Given the following config values are set as admin:
+1 -1
View File
@@ -47,7 +47,7 @@ $numpolicy = optional_param('numpolicy', null, PARAM_INT);
$totalpolicies = optional_param('totalpolicies', null, PARAM_INT);
$PAGE->set_context(context_system::instance());
$PAGE->set_pagelayout('standard');
$PAGE->set_pagelayout('secure');
$viewpage = new page_viewdoc($policyid, $versionid, $returnurl, $behalfid, $manage, $numpolicy, $totalpolicies);
+1 -1
View File
@@ -254,7 +254,7 @@ class course_bin extends base_bin {
// This hack will be removed once recycle bin switches to use its own backup mode, with
// own preferences and 100% separate from MOODLE_AUTOMATED.
// TODO: Remove this as part of MDL-65228.
$forcedrestoresettings = $CFG->forced_plugin_settings['restore'] ?? null;
$forcedrestoresettings = $CFG->forced_plugin_settings['restore'] ?? [];
$CFG->forced_plugin_settings['restore']['restore_general_users'] = 1;
$CFG->forced_plugin_settings['restore']['restore_general_groups'] = 1;
+3
View File
@@ -58,5 +58,8 @@ function xmldb_tool_recyclebin_upgrade($oldversion) {
upgrade_plugin_savepoint(true, 2024111500, 'tool', 'recyclebin');
}
// Automatically generated Moodle v5.0.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+1 -1
View File
@@ -287,7 +287,7 @@ class tool_task_renderer extends plugin_renderer_base {
$nextruntime = $task->get_next_run_time();
$due = $nextruntime < $now;
if ($task->get_attempts_available() > 0) {
$nextrun = $due ? userdate($nextruntime) : get_string('asap', 'tool_task');
$nextrun = $due ? get_string('asap', 'tool_task') : userdate($nextruntime);
} else {
$nextrun = get_string('never', 'admin');
}
@@ -0,0 +1,39 @@
@tool @tool_task @javascript
Feature: Manage adhoc task
In order to manage adhoc tasks
As an admin
I need to be able to view and delete adhoc tasks
Scenario Outline: View adhoc tasks next run time
Given the following "tool_task > adhoc tasks" exist:
| classname | seconds | hostname | pid | nextruntime |
| \core\task\asynchronous_backup_task | 0 | c69335460f7f | 1915 | <nextruntime> |
When I log in as "admin"
And I navigate to "Server > Tasks > Ad hoc tasks" in site administration
Then the following should exist in the "Ad hoc tasks" table:
| Component / Class name | Next run |
| asynchronous_backup_task | <nextruntimestr> |
And I click on "asynchronous_backup_task" "link" in the "Ad hoc tasks" "table"
And the following should exist in the "\core\task\asynchronous_backup_task Ad hoc tasks" table:
| Next run |
| <nextruntimestr> |
Examples:
| nextruntime | nextruntimestr |
| ##yesterday## | ASAP |
| ##tomorrow noon## | ##tomorrow noon##%A, %d %B %Y, %I:%M## |
Scenario: Delete an existing adhoc task
Given I log in as "admin"
And the following "tool_task > adhoc tasks" exist:
| classname | seconds | hostname | pid |
| \core\task\asynchronous_backup_task | 7201 | c69335460f7f | 1915 |
| \core\task\asynchronous_restore_task | 172800 | c69335460f7f | 1916 |
And I navigate to "Server > Tasks > Ad hoc tasks" in site administration
Then "asynchronous_backup_task" "table_row" should exist
And "asynchronous_restore_task" "table_row" should exist
And I follow "asynchronous_backup_task"
When I follow "Delete"
And I click on "Delete" "button" in the ".modal-dialog" "css_element"
Then I navigate to "Server > Tasks > Ad hoc tasks" in site administration
And "asynchronous_backup_task" "table_row" should not exist
And "asynchronous_restore_task" "table_row" should exist
@@ -1,21 +0,0 @@
@tool @tool_task @javascript
Feature: Delete an adhoc task
In order to manage adhoc tasks
As an admin
I need to be able to delete adhoc tasks
Scenario: Delete an existing adhoc task
Given I log in as "admin"
And the following "tool_task > adhoc tasks" exist:
| classname | seconds | hostname | pid |
| \core\task\asynchronous_backup_task | 7201 | c69335460f7f | 1915 |
| \core\task\asynchronous_restore_task | 172800 | c69335460f7f | 1916 |
And I navigate to "Server > Tasks > Ad hoc tasks" in site administration
Then "asynchronous_backup_task" "table_row" should exist
And "asynchronous_restore_task" "table_row" should exist
And I follow "asynchronous_backup_task"
When I follow "Delete"
And I click on "Delete" "button" in the ".modal-dialog" "css_element"
Then I navigate to "Server > Tasks > Ad hoc tasks" in site administration
And "asynchronous_backup_task" "table_row" should not exist
And "asynchronous_restore_task" "table_row" should exist
+3 -3
View File
@@ -43,7 +43,7 @@ class tool_task_generator extends testing_module_generator {
global $DB;
$conditions = ['classname' => $data['classname']];
$record = $DB->get_record('task_scheduled', $conditions, '*', MUST_EXIST);
$record->timestarted = time() - $data['seconds'];
$record->timestarted = $data['seconds'] > 0 ? time() - $data['seconds'] : 0;
$record->hostname = $data['hostname'];
$record->pid = $data['pid'];
$DB->update_record('task_scheduled', $record);
@@ -59,8 +59,8 @@ class tool_task_generator extends testing_module_generator {
global $DB;
$adhoctask = (object)[
'classname' => $data['classname'],
'nextruntime' => 0,
'timestarted' => time() - $data['seconds'],
'nextruntime' => $data['nextruntime'] ?? 0,
'timestarted' => $data['seconds'] > 0 ? time() - $data['seconds'] : 0,
'hostname' => $data['hostname'],
'pid' => $data['pid'],
];
+1 -1
View File
@@ -1150,7 +1150,7 @@ class tool_uploadcourse_course {
// Now update values.
// Sort out plugin specific fields.
$modifiedinstance = $plugin->update_enrol_plugin_data($course->id, $method, $instance);
$modifiedinstance = $plugin->update_enrol_plugin_data($course->id, $method, clone $instance);
$plugin->update_instance($instance, $modifiedinstance);
} else {
foreach ($errors as $key => $message) {
+1 -6
View File
@@ -177,12 +177,7 @@ class tool_uploadcourse_helper {
* @return enrol_plugin[]
*/
public static function get_enrolment_plugins() {
$cache = cache::make('tool_uploadcourse', 'helper');
if (($enrol = $cache->get('enrol')) === false) {
$enrol = enrol_get_plugins(false);
$cache->set('enrol', $enrol);
}
return $enrol;
return enrol_get_plugins(false);
}
/**
@@ -126,3 +126,19 @@ Feature: An admin can create courses with cohort enrolments using a CSV file
And I press "Cancel"
And I click on "Edit" "link" in the "Cohort 4" "table_row"
And the field "Assign role" matches value "Non-editing teacher"
@javascript
Scenario: Uploading a cohort enrolment method with a non-default role applies only the specified role
Given the following "users" exist:
| username | firstname | lastname | email |
| t1 | Teacher | 1 | s1@example.com |
And the following "cohort members" exist:
| user | cohort |
| t1 | CV4 |
And I upload "admin/tool/uploadcourse/tests/fixtures/enrolment_cohort_multiple.csv" file to "File" filemanager
And I click on "Preview" "button"
And I click on "Upload courses" "button"
When I am on the "Course 1" "course" page
And I navigate to course participants
Then I should see "Non-editing teacher" in the "Teacher 1" "table_row"
And I should not see "Student" in the "Teacher 1" "table_row"
+3
View File
@@ -52,5 +52,8 @@ function xmldb_tool_usertours_upgrade($oldversion) {
// Automatically generated Moodle v4.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v5.0.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -1,12 +0,0 @@
@tool @tool_xmldb
Feature: The Reconcile XMLDB files report works and all the files are ok
In order to ensure that all the XMLDB Editor xml files are generated properly
As a developer
I need to be able to run the Reconcile XMLDB files report and verify that everything is ok
Scenario: The Reconcile XMLDB files reports that all files are ok
Given I log in as "admin"
And I navigate to "Development > XMLDB editor" in site administration
When I follow "[Reconcile XMLDB files]"
Then I should see "Look for XMLDB files needing reconciling"
And I should see "All files are OK. No reconciling is needed."
@@ -64,7 +64,7 @@ class aiprovider_management_table extends flexible_table implements dynamic_tabl
*/
#[\core\attribute\deprecated(replacement: null, since: '5.0', mdl: 'MDL-82977')]
protected function get_plugintype(): string {
\core\deprecation::emit_deprecation_if_present(__FUNCTION__);
\core\deprecation::emit_deprecation(__FUNCTION__);
return 'aiprovider';
}
@@ -125,7 +125,7 @@ class aiprovider_management_table extends flexible_table implements dynamic_tabl
*/
#[\core\attribute\deprecated(replacement: null, since: '5.0', mdl: 'MDL-82977')]
protected function get_action_url(array $params = []): moodle_url {
\core\deprecation::emit_deprecation_if_present(__FUNCTION__);
\core\deprecation::emit_deprecation(__FUNCTION__);
return new moodle_url('/admin/ai.php', $params);
}
@@ -373,7 +373,7 @@ class aiprovider_management_table extends flexible_table implements dynamic_tabl
'role' => 'button',
'aria-label' => get_string('moveitemup', 'core', $row->name),
'title' => get_string('moveitemup', 'core', $row->name),
'class' => 'btn btn-link btn-icon',
'class' => 'btn btn-link',
]),
);
} else {
@@ -396,7 +396,7 @@ class aiprovider_management_table extends flexible_table implements dynamic_tabl
'role' => 'button',
'aria-label' => get_string('moveitemdown', 'core', $row->name),
'title' => get_string('moveitemdown', 'core', $row->name),
'class' => 'btn btn-link btn-icon',
'class' => 'btn btn-link',
]),
);
} else {
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,3 +1,3 @@
define("aiplacement_courseassist/selectors",["exports"],(function(_exports){Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0;return _exports.default={ELEMENTS:{AIDRAWER:"#ai-drawer",AIDRAWER_BODY:"#ai-drawer .ai-drawer-body",PAGE:"#page",MAIN_REGION:'[role="main"]',AIDRAWER_CLOSE:"#ai-drawer-close",RESPONSE:".course-assist-response"},ACTIONS:{SUMMARY:'.course-assist-controls [data-action="summarise"]',EXPLAIN:'.course-assist-controls [data-action="explain"]',RETRY:'.course-assist-controls [data-action="retry"]',DECLINE:'.ai-policy-block [data-action="decline"]',ACCEPT:'.ai-policy-block [data-action="accept"]',REGENERATE:'.course-assist-controls [data-action="regenerate"]',CANCEL:'.course-assist-controls [data-action="cancel"]'}},_exports.default}));
define("aiplacement_courseassist/selectors",["exports"],(function(_exports){Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0;return _exports.default={ELEMENTS:{AIDRAWER:"#ai-drawer",AIDRAWER_BODY:"#ai-drawer .ai-drawer-body",PAGE:"#page",MAIN_REGION:'[role="main"]',AIDRAWER_CLOSE:"#ai-drawer-close",RESPONSE:".course-assist-response",JUMPTO:'.course-assist-controls [data-region="jumpto"]',ACTION:'.course-assist-controls [data-input-type="action"]'},ACTIONS:{SUMMARY:'.course-assist-controls [data-action="summarise"]',EXPLAIN:'.course-assist-controls [data-action="explain"]',RETRY:'.course-assist-controls [data-action="retry"]',DECLINE:'.ai-policy-block [data-action="decline"]',ACCEPT:'.ai-policy-block [data-action="accept"]',REGENERATE:'.course-assist-controls [data-action="regenerate"]',CANCEL:'.course-assist-controls [data-action="cancel"]'}},_exports.default}));
//# sourceMappingURL=selectors.min.js.map
@@ -1 +1 @@
{"version":3,"file":"selectors.min.js","sources":["../src/selectors.js"],"sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see <http://www.gnu.org/licenses/>.\n\n/**\n * Define all of the selectors we will be using on the AI Course assistant.\n *\n * @module aiplacement_courseassist/selectors\n * @copyright 2024 Huong Nguyen <huongnv13@gmail.com>\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\nexport default {\n ELEMENTS: {\n AIDRAWER: '#ai-drawer',\n AIDRAWER_BODY: '#ai-drawer .ai-drawer-body',\n PAGE: '#page',\n MAIN_REGION: '[role=\"main\"]',\n AIDRAWER_CLOSE: '#ai-drawer-close',\n RESPONSE: '.course-assist-response',\n },\n ACTIONS: {\n SUMMARY: '.course-assist-controls [data-action=\"summarise\"]',\n EXPLAIN: '.course-assist-controls [data-action=\"explain\"]',\n RETRY: '.course-assist-controls [data-action=\"retry\"]',\n DECLINE: '.ai-policy-block [data-action=\"decline\"]',\n ACCEPT: '.ai-policy-block [data-action=\"accept\"]',\n REGENERATE: '.course-assist-controls [data-action=\"regenerate\"]',\n CANCEL: '.course-assist-controls [data-action=\"cancel\"]',\n }\n};\n"],"names":["ELEMENTS","AIDRAWER","AIDRAWER_BODY","PAGE","MAIN_REGION","AIDRAWER_CLOSE","RESPONSE","ACTIONS","SUMMARY","EXPLAIN","RETRY","DECLINE","ACCEPT","REGENERATE","CANCEL"],"mappings":"oLAsBe,CACXA,SAAU,CACNC,SAAU,aACVC,cAAe,6BACfC,KAAM,QACNC,YAAa,gBACbC,eAAgB,mBAChBC,SAAU,2BAEdC,QAAS,CACLC,QAAS,oDACTC,QAAS,kDACTC,MAAO,gDACPC,QAAS,2CACTC,OAAQ,0CACRC,WAAY,qDACZC,OAAQ"}
{"version":3,"file":"selectors.min.js","sources":["../src/selectors.js"],"sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see <http://www.gnu.org/licenses/>.\n\n/**\n * Define all of the selectors we will be using on the AI Course assistant.\n *\n * @module aiplacement_courseassist/selectors\n * @copyright 2024 Huong Nguyen <huongnv13@gmail.com>\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\nexport default {\n ELEMENTS: {\n AIDRAWER: '#ai-drawer',\n AIDRAWER_BODY: '#ai-drawer .ai-drawer-body',\n PAGE: '#page',\n MAIN_REGION: '[role=\"main\"]',\n AIDRAWER_CLOSE: '#ai-drawer-close',\n RESPONSE: '.course-assist-response',\n JUMPTO: '.course-assist-controls [data-region=\"jumpto\"]',\n ACTION: '.course-assist-controls [data-input-type=\"action\"]',\n },\n ACTIONS: {\n SUMMARY: '.course-assist-controls [data-action=\"summarise\"]',\n EXPLAIN: '.course-assist-controls [data-action=\"explain\"]',\n RETRY: '.course-assist-controls [data-action=\"retry\"]',\n DECLINE: '.ai-policy-block [data-action=\"decline\"]',\n ACCEPT: '.ai-policy-block [data-action=\"accept\"]',\n REGENERATE: '.course-assist-controls [data-action=\"regenerate\"]',\n CANCEL: '.course-assist-controls [data-action=\"cancel\"]',\n }\n};\n"],"names":["ELEMENTS","AIDRAWER","AIDRAWER_BODY","PAGE","MAIN_REGION","AIDRAWER_CLOSE","RESPONSE","JUMPTO","ACTION","ACTIONS","SUMMARY","EXPLAIN","RETRY","DECLINE","ACCEPT","REGENERATE","CANCEL"],"mappings":"oLAsBe,CACXA,SAAU,CACNC,SAAU,aACVC,cAAe,6BACfC,KAAM,QACNC,YAAa,gBACbC,eAAgB,mBAChBC,SAAU,0BACVC,OAAQ,iDACRC,OAAQ,sDAEZC,QAAS,CACLC,QAAS,oDACTC,QAAS,kDACTC,MAAO,gDACPC,QAAS,2CACTC,OAAQ,0CACRC,WAAY,qDACZC,OAAQ"}
@@ -32,6 +32,8 @@ import DrawerEvents from 'core/drawer_events';
import {subscribe} from 'core/pubsub';
import * as MessageDrawerHelper from 'core_message/message_drawer_helper';
import {getString} from 'core/str';
import * as FocusLock from 'core/local/aria/focuslock';
import {isSmall} from "core/pagehelpers";
const AICourseAssist = class {
@@ -58,8 +60,12 @@ const AICourseAssist = class {
this.aiDrawerElement = document.querySelector(Selectors.ELEMENTS.AIDRAWER);
this.aiDrawerBodyElement = document.querySelector(Selectors.ELEMENTS.AIDRAWER_BODY);
this.pageElement = document.querySelector(Selectors.ELEMENTS.PAGE);
this.jumpToElement = document.querySelector(Selectors.ELEMENTS.JUMPTO);
this.actionElement = document.querySelector(Selectors.ELEMENTS.ACTION);
this.aiDrawerCloseElement = this.aiDrawerElement.querySelector(Selectors.ELEMENTS.AIDRAWER_CLOSE);
this.lastAction = '';
this.responses = new Map();
this.isDrawerFocusLocked = false;
this.registerEventListeners();
}
@@ -75,6 +81,7 @@ const AICourseAssist = class {
e.preventDefault();
this.openAIDrawer();
this.lastAction = 'summarise';
this.actionElement.focus();
const isPolicyAccepted = await this.isPolicyAccepted();
if (!isPolicyAccepted) {
// Display policy.
@@ -89,6 +96,7 @@ const AICourseAssist = class {
e.preventDefault();
this.openAIDrawer();
this.lastAction = 'explain';
this.actionElement.focus();
const isPolicyAccepted = await this.isPolicyAccepted();
if (!isPolicyAccepted) {
// Display policy.
@@ -105,12 +113,33 @@ const AICourseAssist = class {
}
});
document.addEventListener('keydown', e => {
if (this.isAIDrawerOpen() && e.key === 'Escape') {
this.closeAIDrawer();
}
});
// Close AI drawer if message drawer is shown.
subscribe(DrawerEvents.DRAWER_SHOWN, () => {
if (this.isAIDrawerOpen()) {
this.closeAIDrawer();
}
});
// Focus on the AI drawer's close button when the jump-to element is focused.
this.jumpToElement.addEventListener('focus', () => {
this.aiDrawerCloseElement.focus();
});
// Focus on the action element when the AI drawer container receives focus.
this.aiDrawerElement.addEventListener('focus', () => {
this.actionElement.focus();
});
// Remove active from the action element when it loses focus.
this.actionElement.addEventListener('blur', () => {
this.actionElement.classList.remove('active');
});
}
/**
@@ -212,21 +241,50 @@ const AICourseAssist = class {
// Close message drawer if it is shown.
MessageDrawerHelper.hide();
this.aiDrawerElement.classList.add('show');
this.aiDrawerElement.setAttribute('tabindex', 0);
this.aiDrawerBodyElement.setAttribute('aria-live', 'polite');
if (!this.pageElement.classList.contains('show-drawer-right')) {
this.addPadding();
}
this.jumpToElement.setAttribute('tabindex', 0);
this.jumpToElement.focus();
// If the AI drawer is opened on a small screen, we need to trap the focus tab within the AI drawer.
if (isSmall()) {
FocusLock.trapFocus(this.aiDrawerElement);
this.aiDrawerElement.setAttribute('aria-modal', 'true');
this.aiDrawerElement.setAttribute('role', 'dialog');
this.isDrawerFocusLocked = true;
}
}
/**
* Close the AI drawer.
*/
closeAIDrawer() {
// Untrap focus if it was locked.
if (this.isDrawerFocusLocked) {
FocusLock.untrapFocus();
this.aiDrawerElement.removeAttribute('aria-modal');
this.aiDrawerElement.setAttribute('role', 'region');
}
this.aiDrawerElement.classList.remove('show');
this.aiDrawerElement.setAttribute('tabindex', -1);
this.aiDrawerBodyElement.removeAttribute('aria-live');
if (this.pageElement.classList.contains('show-drawer-right') && this.aiDrawerBodyElement.dataset.removepadding === '1') {
this.removePadding();
}
this.jumpToElement.setAttribute('tabindex', -1);
// We can enforce a focus-visible state on the focus element using element.focus({focusVisible: true}).
// Unfortunately, this feature isn't supported in all browsers, only Firefox provides support for it.
// Therefore, we will apply the active class to the action element and set focus on it.
// This action will make the action element appear focused.
// When the action element loses focus,
// we will remove the active class at {@see registerEventListeners()}
this.actionElement.classList.add('active');
this.actionElement.focus();
}
/**
@@ -28,6 +28,8 @@ export default {
MAIN_REGION: '[role="main"]',
AIDRAWER_CLOSE: '#ai-drawer-close',
RESPONSE: '.course-assist-response',
JUMPTO: '.course-assist-controls [data-region="jumpto"]',
ACTION: '.course-assist-controls [data-input-type="action"]',
},
ACTIONS: {
SUMMARY: '.course-assist-controls [data-action="summarise"]',
@@ -22,6 +22,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$string['aidrawerlabel'] = 'AI-generated content drawer';
$string['aiexplain'] = 'AI explain';
$string['aifeatures'] = 'AI features';
$string['aisummary'] = 'AI summary';
@@ -39,6 +39,8 @@
data-bs-toggle="tooltip"
data-bs-placement="right"
aria-controls="ai-drawer"
data-input-type="action"
data-bs-delay="200"
>
{{^isdropdown}}
{{> aiplacement_courseassist/sparkles_icon }}
@@ -40,7 +40,7 @@
]
}
}}
<div {{#isdropdown}}id="#ai-features"{{/isdropdown}}
<div {{#isdropdown}}id="ai-features"{{/isdropdown}}
class="course-assist-controls py-3">
{{#isdropdown}}
{{> aiplacement_courseassist/actions_dropdown }}
@@ -50,4 +50,5 @@
{{> aiplacement_courseassist/action_button }}
{{/actions}}
{{/isdropdown}}
{{> core_message/message_jumpto }}
</div>
@@ -45,6 +45,7 @@
data-bs-toggle="dropdown"
aria-haspopup="true"
aria-expanded="false"
data-input-type="action"
>
{{> aiplacement_courseassist/sparkles_icon }}
{{#str}} aifeatures, aiplacement_courseassist {{/str}}
@@ -29,7 +29,7 @@
"contextid": "1"
}
}}
<div class="ai-drawer" id="ai-drawer">
<div class="ai-drawer" id="ai-drawer" aria-label={{#quote}}{{#str}} aidrawerlabel, aiplacement_courseassist {{/str}}{{/quote}} tabindex="-1" role="region">
<div class="ai-drawer-header">
<button id="ai-drawer-close" class="btn ai-drawer-button" type="button">
{{#pix}} e/cancel, core {{/pix}}
+4 -2
View File
@@ -103,7 +103,8 @@ class hook_listener {
if ($model == 'custom') {
$mform->addElement('header', 'modelsettingsheader', get_string('settings', 'aiprovider_ollama'));
$mform->addElement('html', get_string('settings_help', 'aiprovider_ollama'));
$settingshelp = \html_writer::tag('p', get_string('settings_help', 'aiprovider_ollama'));
$mform->addElement('html', $settingshelp);
$mform->addElement(
'textarea',
'modelextraparams',
@@ -117,7 +118,8 @@ class hook_listener {
if ($targetmodel) {
if ($targetmodel->has_model_settings()) {
$mform->addElement('header', 'modelsettingsheader', get_string('settings', 'aiprovider_ollama'));
$mform->addElement('html', get_string('settings_help', 'aiprovider_ollama'));
$settingshelp = \html_writer::tag('p', get_string('settings_help', 'aiprovider_ollama'));
$mform->addElement('html', $settingshelp);
$targetmodel->add_model_settings($mform);
}
}
+4 -4
View File
@@ -55,11 +55,11 @@ class gpt4o extends base implements openai_base {
$mform->addElement(
'text',
'max_tokens',
get_string('settings_max_tokens', 'aiprovider_openai'),
'max_completion_tokens',
get_string('settings_max_completion_tokens', 'aiprovider_openai'),
);
$mform->setType('max_tokens', PARAM_INT);
$mform->addHelpButton('max_tokens', 'settings_max_tokens', 'aiprovider_openai');
$mform->setType('max_completion_tokens', PARAM_INT);
$mform->addHelpButton('max_completion_tokens', 'settings_max_completion_tokens', 'aiprovider_openai');
$mform->addElement(
'text',
+13
View File
@@ -16,6 +16,8 @@
namespace aiprovider_openai\aimodel;
use MoodleQuickForm;
/**
* O1 AI model.
*
@@ -40,6 +42,17 @@ class o1 extends gpt4o {
return true;
}
#[\Override]
public function add_model_settings(MoodleQuickForm $mform): void {
$mform->addElement(
'text',
'max_completion_tokens',
get_string('settings_max_completion_tokens', 'aiprovider_openai'),
);
$mform->setType('max_completion_tokens', PARAM_INT);
$mform->addHelpButton('max_completion_tokens', 'settings_max_completion_tokens', 'aiprovider_openai');
}
#[\Override]
public function model_type(): array {
return [self::MODEL_TYPE_TEXT];
@@ -84,8 +84,23 @@ class action_form extends action_settings_form {
} else {
// Set the model to the selected model template.
$data->model = $data->modeltemplate;
}
// Cast settings to their intended types.
if ($data->model === 'gpt-4o' || $data->model === 'o1') {
if (isset($data->top_p)) {
$data->top_p = floatval($data->top_p);
}
if (isset($data->max_completion_tokens)) {
$data->max_completion_tokens = intval($data->max_completion_tokens);
}
if (isset($data->presence_penalty)) {
$data->presence_penalty = floatval($data->presence_penalty);
}
if (isset($data->frequency_penalty)) {
$data->frequency_penalty = floatval($data->frequency_penalty);
}
}
}
}
// Unset the model template.
unset($data->custommodel);
+4 -2
View File
@@ -82,7 +82,8 @@ class hook_listener {
if ($model == 'custom') {
$mform->addElement('header', 'modelsettingsheader', get_string('settings', 'aiprovider_openai'));
$mform->addElement('html', get_string('settings_help', 'aiprovider_openai'));
$settingshelp = \html_writer::tag('p', get_string('settings_help', 'aiprovider_openai'));
$mform->addElement('html', $settingshelp);
$mform->addElement(
'textarea',
'modelextraparams',
@@ -96,7 +97,8 @@ class hook_listener {
if ($targetmodel) {
if ($targetmodel->has_model_settings()) {
$mform->addElement('header', 'modelsettingsheader', get_string('settings', 'aiprovider_openai'));
$mform->addElement('html', get_string('settings_help', 'aiprovider_openai'));
$settingshelp = \html_writer::tag('p', get_string('settings_help', 'aiprovider_openai'));
$mform->addElement('html', $settingshelp);
$targetmodel->add_model_settings($mform);
}
}
@@ -48,7 +48,7 @@ $string['extraparams_help'] = 'Extra parameters can be configured here. We suppo
<pre>
{
"temperature": 0.5,
"max_tokens": 100
"max_completion_tokens": 100
}
</pre>';
$string['invalidjson'] = 'Invalid JSON string';
@@ -65,8 +65,8 @@ $string['settings'] = 'Settings';
$string['settings_frequency_penalty'] = 'frequency_penalty';
$string['settings_frequency_penalty_help'] = 'The frequency penalty adjusts how often words are repeated. The higher the penalty, the less repetitions in the generated text.';
$string['settings_help'] = 'Adjust the settings below to customise how requests are sent to OpenAI.';
$string['settings_max_tokens'] = 'max_tokens';
$string['settings_max_tokens_help'] = 'The maximum number of tokens to generate in the response';
$string['settings_max_completion_tokens'] = 'max_completion_tokens';
$string['settings_max_completion_tokens_help'] = 'The maximum number of tokens used in the generated text.';
$string['settings_presence_penalty'] = 'presence_penalty';
$string['settings_presence_penalty_help'] = 'The presence penalty encourages the model to use new words by increasing the likelihood of choosing words it hasn\'t used before. A higher value makes the generated text more diverse, while a lower value allows more repetition.';
$string['settings_top_p'] = 'top_p';
@@ -88,3 +88,5 @@ $string['globalratelimit_desc'] = 'The number of site-wide requests allowed per
$string['orgid_desc'] = 'Get an OpenAI organization ID from your <a href="https://platform.openai.com/account/org-settings">OpenAI Platform account</a>.';
$string['userratelimit'] = 'Maximum number of requests per user';
$string['userratelimit_desc'] = 'The number of requests allowed per hour, per user.';
$string['settings_max_tokens'] = 'max_tokens';
$string['settings_max_tokens_help'] = 'The maximum number of tokens used in the generated text.';
@@ -13,3 +13,5 @@ globalratelimit_desc,aiprovider_openai
orgid_desc,aiprovider_openai
userratelimit,aiprovider_openai
userratelimit_desc,aiprovider_openai
settings_max_tokens,aiprovider_openai
settings_max_tokens_help,aiprovider_openai
@@ -132,7 +132,7 @@ final class process_generate_image_test extends \advanced_testcase {
actionconfig: [
'model' => 'dall-e-3',
'temperature' => '0.5',
'max_tokens' => '100',
'max_completion_tokens' => '100',
],
);
$processor = new process_generate_image($this->provider, $this->action);
@@ -145,13 +145,13 @@ final class process_generate_image_test extends \advanced_testcase {
$this->assertEquals('dall-e-3', $body->model);
$this->assertEquals('0.5', $body->temperature);
$this->assertEquals('100', $body->max_tokens);
$this->assertEquals('100', $body->max_completion_tokens);
$this->provider = $this->create_provider(
actionclass: \core_ai\aiactions\generate_image::class,
actionconfig: [
'model' => 'my-custom-gpt',
'modelextraparams' => '{"temperature": 0.5,"max_tokens": 100}',
'modelextraparams' => '{"temperature": 0.5,"max_completion_tokens": 100}',
],
);
$processor = new process_generate_image($this->provider, $this->action);
@@ -164,7 +164,7 @@ final class process_generate_image_test extends \advanced_testcase {
$this->assertEquals('my-custom-gpt', $body->model);
$this->assertEquals('0.5', $body->temperature);
$this->assertEquals('100', $body->max_tokens);
$this->assertEquals('100', $body->max_completion_tokens);
}
/**
@@ -102,7 +102,7 @@ final class process_generate_text_test extends \advanced_testcase {
actionconfig: [
'systeminstruction' => get_string('action_generate_text_instruction', 'core_ai'),
'temperature' => '0.5',
'max_tokens' => '100',
'max_completion_tokens' => '100',
],
);
$processor = new process_generate_text($this->provider, $this->action);
@@ -115,14 +115,14 @@ final class process_generate_text_test extends \advanced_testcase {
$this->assertEquals('gpt-4o', $body->model);
$this->assertEquals('0.5', $body->temperature);
$this->assertEquals('100', $body->max_tokens);
$this->assertEquals('100', $body->max_completion_tokens);
$this->provider = $this->create_provider(
actionclass: \core_ai\aiactions\generate_text::class,
actionconfig: [
'model' => 'my-custom-gpt',
'systeminstruction' => get_string('action_generate_text_instruction', 'core_ai'),
'modelextraparams' => '{"temperature": 0.5,"max_tokens": 100}',
'modelextraparams' => '{"temperature": 0.5,"max_completion_tokens": 100}',
],
);
$processor = new process_generate_text($this->provider, $this->action);
@@ -135,7 +135,7 @@ final class process_generate_text_test extends \advanced_testcase {
$this->assertEquals('my-custom-gpt', $body->model);
$this->assertEquals('0.5', $body->temperature);
$this->assertEquals('100', $body->max_tokens);
$this->assertEquals('100', $body->max_completion_tokens);
}
/**
@@ -104,7 +104,7 @@ final class process_summarise_text_test extends \advanced_testcase {
actionconfig: [
'systeminstruction' => get_string('action_summarise_text_instruction', 'core_ai'),
'temperature' => '0.5',
'max_tokens' => '100',
'max_completion_tokens' => '100',
],
);
$processor = new process_summarise_text($this->provider, $this->action);
@@ -117,14 +117,14 @@ final class process_summarise_text_test extends \advanced_testcase {
$this->assertEquals('gpt-4o', $body->model);
$this->assertEquals('0.5', $body->temperature);
$this->assertEquals('100', $body->max_tokens);
$this->assertEquals('100', $body->max_completion_tokens);
$this->provider = $this->create_provider(
actionclass: \core_ai\aiactions\summarise_text::class,
actionconfig: [
'model' => 'my-custom-gpt',
'systeminstruction' => get_string('action_summarise_text_instruction', 'core_ai'),
'modelextraparams' => '{"temperature": 0.5,"max_tokens": 100}',
'modelextraparams' => '{"temperature": 0.5,"max_completion_tokens": 100}',
],
);
$processor = new process_summarise_text($this->provider, $this->action);
@@ -137,7 +137,7 @@ final class process_summarise_text_test extends \advanced_testcase {
$this->assertEquals('my-custom-gpt', $body->model);
$this->assertEquals('0.5', $body->temperature);
$this->assertEquals('100', $body->max_tokens);
$this->assertEquals('100', $body->max_completion_tokens);
}
/**
+1
View File
@@ -1925,6 +1925,7 @@ class model {
$uniqueid = $this->get_time_splitting()->append_rangeindex($dbprediction->sampleid, $dbprediction->rangeindex);
$predictionrecords[$uniqueid]->id = $dbprediction->id;
}
$dbpredictions->close();
}
return $predictionrecords;
+8
View File
@@ -1,5 +1,13 @@
# core_auth (subsystem / plugintype) Upgrade notes
## 5.0.1
### Added
- A new method called `get_additional_upgrade_token_parameters` has been added to `oauth2_client` class. This will allow custom clients to override this one and add their extra parameters for upgrade token request.
For more information see [MDL-80380](https://tracker.moodle.org/browse/MDL-80380)
## 5.0
### Removed
+3
View File
@@ -40,5 +40,8 @@ function xmldb_auth_db_upgrade($oldversion) {
// Automatically generated Moodle v4.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v5.0.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -40,5 +40,8 @@ function xmldb_auth_email_upgrade($oldversion) {
// Automatically generated Moodle v4.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v5.0.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -40,5 +40,8 @@ function xmldb_auth_ldap_upgrade($oldversion) {
// Automatically generated Moodle v4.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v5.0.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -41,5 +41,8 @@ function xmldb_auth_lti_upgrade($oldversion) {
// Automatically generated Moodle v4.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v5.0.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -40,5 +40,8 @@ function xmldb_auth_manual_upgrade($oldversion) {
// Automatically generated Moodle v4.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v5.0.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -40,5 +40,8 @@ function xmldb_auth_none_upgrade($oldversion) {
// Automatically generated Moodle v4.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v5.0.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -41,5 +41,8 @@ function xmldb_auth_oauth2_upgrade($oldversion) {
// Automatically generated Moodle v4.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v5.0.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+1 -1
View File
@@ -87,7 +87,7 @@ Please log in as before, using the link on the login page.
$string['emailpasswordchangeinfosubject'] = '{$a}: Change password information';
$string['info'] = 'External account';
$string['issuer'] = 'OAuth 2 service';
$string['issuernologin'] = 'This issuer can not be used to login';
$string['issuernologin'] = 'This issuer can not be used to log in.';
$string['key'] = 'Key';
$string['linkedlogins'] = 'Linked logins';
$string['linkedloginshelp'] = 'Help with linked logins';
+3
View File
@@ -40,5 +40,8 @@ function xmldb_auth_shibboleth_upgrade($oldversion) {
// Automatically generated Moodle v4.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v5.0.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+1 -1
View File
@@ -31,7 +31,7 @@ $string['auth_shib_contact_administrator'] = 'In case you are not associated wit
$string['auth_shibbolethdescription'] = 'Using this method users are created and authenticated using Shibboleth. For set-up details, see the <a href="{$a}">Shibboleth README</a>.';
$string['auth_shibboleth_errormsg'] = 'Please select the organization you are member of!';
$string['auth_shibboleth_login'] = 'Shibboleth login';
$string['auth_shibboleth_login_long'] = 'Login to Moodle via Shibboleth';
$string['auth_shibboleth_login_long'] = 'Log in via Shibboleth';
$string['auth_shibboleth_manual_login'] = 'Manual login';
$string['auth_shibboleth_select_member'] = 'I\'m a member of ...';
$string['auth_shibboleth_select_organization'] = 'For authentication via Shibboleth, please select your organisation from the drop-down menu:';
+5
View File
@@ -117,6 +117,11 @@ abstract class frontend {
foreach ($enabled as $plugin => $info) {
// Create plugin front-end object.
$class = '\availability_' . $plugin . '\frontend';
if (!class_exists($class)) {
continue;
}
/** @var \core_availability\frontend $frontend */
$frontend = new $class();
// Add to array of required YUI modules.
+2 -3
View File
@@ -792,11 +792,10 @@ abstract class info {
// plugin could also rely on the completion plugin.
$pluginmanager = \core_plugin_manager::instance();
$enabled = $pluginmanager->get_enabled_plugins('availability');
$componentparams = new \stdClass();
foreach ($enabled as $plugin => $info) {
// Use the static method.
/** @var \core_availability\condition $class */
$class = '\availability_' . $plugin . '\condition';
if ($class::completion_value_used($course, $cmid)) {
if (class_exists($class) && $class::completion_value_used($course, $cmid)) {
return true;
}
}
+2 -2
View File
@@ -220,9 +220,9 @@ class tree extends tree_node {
// First see if it's a condition. These have a defined type.
if (isset($child->type)) {
// Look for a plugin of this type.
/** @var \core_availability\condition $classname */
$classname = '\availability_' . $child->type . '\condition';
if (!array_key_exists($child->type, $enabled)) {
if (!array_key_exists($child->type, $enabled) || !class_exists($classname)) {
if ($lax) {
// On load of existing settings, ignore if class
// doesn't exist.
+1 -1
View File
@@ -31,6 +31,6 @@ class core_availability_renderer extends plugin_renderer_base {
*/
#[\core\attribute\deprecated(availability_info::class, since: '4.0', mdl: 'MDL-71691', final: true)]
public function render_core_availability_multiple_messages(): void {
\core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]);
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
}
}

Some files were not shown because too many files have changed in this diff Show More