Compare commits

..

541 Commits

Author SHA1 Message Date
Sara Arjona cd6600da14 Moodle release 4.5.2 2025-02-07 12:18:23 +01:00
Sara Arjona 7984e7c547 NOBUG: Add upgrade notes 2025-02-07 12:18:22 +01:00
Sara Arjona 904dae88b9 weekly release 4.5.1+ 2025-02-06 16:21:45 +01:00
Sara Arjona f9137c531c NOBUG: Add upgrade notes 2025-02-06 16:21:45 +01:00
Jun Pataleta a1b6122ee6 Merge branch 'MDL-83794-405' of https://github.com/andrewnicols/moodle into MOODLE_405_STABLE 2025-02-06 17:09:52 +08:00
Andrew Nicols 451e14cace MDL-83794 editor_tiny: Fix typo in style name 2025-02-06 15:54:19 +08:00
Jun Pataleta a7f62cc60b Merge branch 'MDL-81829-fix-pretty-whoops-MOODLE_405_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_405_STABLE 2025-02-06 12:20:12 +08:00
Huong Nguyen 8d88b980fd Merge branch 'MDL-83757-405' of https://github.com/andrewnicols/moodle into MOODLE_405_STABLE 2025-02-06 10:52:21 +07:00
Jun Pataleta 67d78f23e6 Merge branch 'MDL-72080-405' of https://github.com/paulholden/moodle into MOODLE_405_STABLE 2025-02-06 11:36:48 +08:00
Laurent David d002c6f4f9 MDL-84271 core_course: Validate module list in search
* We need to validate the list of modules in the course search

Co-authored-by: Lars Bonczek <bonczek@math.tu-berlin.de>
2025-02-06 11:20:28 +08:00
Paul Holden 54b998482b MDL-84003 mod_glossary: capability check restoring trusted entry text. 2025-02-06 10:51:35 +08:00
Paul Holden 348f9afab6 MDL-84145 report_loglive: format event description as plain text. 2025-02-06 09:44:14 +07:00
Huong Nguyen 37b0d9fc20 Merge branch 'MDL-83635-405' of https://github.com/junpataleta/moodle into MOODLE_405_STABLE 2025-02-06 08:45:46 +07:00
Brendan Heywood 3ddf1716ee MDL-81829 core: Fix early bootstrap bug with whoops 2025-02-06 09:32:42 +11:00
Leon Stringer 1a2ca2e5ba MDL-79976 mod_feedback: Check group for response
Check the teacher's group membership if group mode is SEPARATEGROUPS
prior to showing or deleting responses.
2025-02-05 18:09:45 +01:00
Sara Arjona 6b4e0696ec Merge branch 'MDL-80848-405' of https://github.com/andrewgos/moodle into MOODLE_405_STABLE 2025-02-05 18:09:45 +01:00
Jun Pataleta 88b1458eb7 Merge branch 'MDL-83753_405_STABLE' of https://github.com/djarran/moodle into MOODLE_405_STABLE 2025-02-05 18:09:45 +01:00
Jun Pataleta de3c6685ac Merge branch 'mdl-83695_405' of https://github.com/james-cnz/moodle into MOODLE_405_STABLE 2025-02-05 18:09:45 +01:00
Sara Arjona 8a89e36712 Merge branch 'MDL-67683-405' of https://github.com/junpataleta/moodle into MOODLE_405_STABLE 2025-02-05 18:09:45 +01:00
Huong Nguyen 1d8be79382 Merge branch 'mdl-83690_405' of https://github.com/james-cnz/moodle into MOODLE_405_STABLE 2025-02-05 18:09:45 +01:00
Huong Nguyen c00d63893c Merge branch 'MDL-83650-405_fix_ods_cell' of https://github.com/Cl3mensM/moodle into MOODLE_405_STABLE 2025-02-05 18:09:45 +01:00
Jun Pataleta 807edce748 Merge branch 'MDL-83809-m405' of https://github.com/sammarshallou/moodle into MOODLE_405_STABLE 2025-02-05 18:09:45 +01:00
Andrew Nicols b85a3ce296 MDL-83757 core: Force DI to use global DB instead of scoped 2025-02-05 20:35:41 +08:00
sam marshall 60c003bf36 MDL-83809 Accessibility: Focus issues in modals
This change fixes 2 issues:

1 The focus lock for modals (e.g. within Tiny editor) did not
  correctly loop round from the end of the modal to the start.

2 After clicking 'Browse repositories' button in a Tiny editor
  modal, and closing the file picker, focus did not return to
  the button as expected.
2025-02-04 12:55:26 +00:00
james-cnz c6329d1a63 MDL-83695 backup: Add space before course Restores in progress heading 2025-02-05 00:14:42 +13:00
Paul Holden b905030978 MDL-84239 badges: correct context check when disabling badge. 2025-02-04 15:19:22 +08:00
David Woloszyn a40e5bad8f MDL-84136 filter_tex: Improve sanitization of forbidden items 2025-02-04 11:35:29 +07:00
Mark Johnson 6e13b652cc MDL-84146 question: Improve handling of JS parameters 2025-02-04 02:40:20 +00:00
meirzamoodle a78447a111 MDL-84023 lib: Update requirejs to 2.3.7 2025-02-04 02:40:20 +00:00
Marina Glancy 142012d312 MDL-83941 tags: prevent users from browsing unsearchable collections 2025-02-04 02:40:20 +00:00
Mihail Geshoski fac52f6f86 MDL-82896 qtype_ddimageortext: Clean drop zone label text
It is unnecessary to allow HTML to be added to the drop zone label text,
as this content is hidden and only accessible to screen readers.
Additionally, the content is currently not properly formatted, which
introduces a risk for potential XSS exploits. This change ensures that
only plain text (PARAM_TEXT) is allowed when adding content and that the
content is properly formatted before being output.
2025-02-04 02:40:20 +00:00
Huong Nguyen 8f316b9b7e Merge branch 'MDL-83822-MOODLE_405_STABLE' of https://github.com/PhMemmel/moodle into MOODLE_405_STABLE 2025-02-04 09:30:40 +07:00
Jun Pataleta 26d7e53400 MDL-67683 theme_boost: Update selector for calendar block styles
With the change from `aside` to `section` for blocks within the main
content region, the selector for instances of the calendar block not in
the main content region also needs to be updated to use a more generic
selector that can cover when either the blocks container containing the
calendar block is an `aside` or a `section`.

The `data-blockregion` attribute is a good selector for this purpose.
2025-02-03 15:55:23 +08:00
Jun Pataleta 20aee393ce MDL-67683 behat: Add accessibility test for the maintenance mode layout 2025-02-03 15:55:23 +08:00
Jun Pataleta 1187083f7c MDL-67683 behat: Add accessibility test for the secure layout
Also, add page title and heading to the secure test page to make
it accessible.
2025-02-03 15:55:23 +08:00
Jun Pataleta a1a39340d4 MDL-67683 output: Make block regions unique
Unique labels for the block regions:
* `side-pre` blocks - "Blocks"
* `side-post` blocks - "Supplementary blocks"
* `content` blocks - "Main content blocks"

Blocks in the main content region (div role="main") should not also be
in an <aside> as it is a top-level landmark.
2025-02-03 15:55:23 +08:00
Jun Pataleta 5d142821a3 MDL-67683 theme: Set page heading in a header landmark for secure layout 2025-02-03 15:55:22 +08:00
Jun Pataleta 829af84071 MDL-67683 auth: Test login page accessibility with axe best-practice tag 2025-02-03 15:55:22 +08:00
Jun Pataleta 96fae5a652 MDL-67683 behat: Update xpath selector for #region-main 2025-02-03 15:55:22 +08:00
Jun Pataleta 4262d0c1ec MDL-67683 blocks: Do not assign a complementary role for blocks
Blocks are contained in an <aside> which has a default ARIA role of
"complementary", a top-level landmark. So assigning a "complementary"
role for block instances is not needed. As blocks are already in a
<section> tag which has a default role of "region", there's no need
to override the ARIA role, unless specified by the block plugin.

Read more at:
https://www.w3.org/WAI/ARIA/apg/practices/landmark-regions/
2025-02-03 15:55:22 +08:00
Jun Pataleta 03adce20fc MDL-67683 theme: Do not use section for block containers
The containers for the blocks in layout templates should not be using a
<section> tag (which has a default landmark role of "region") as the
blocks are already contained in an <aside> tag that has the default
"complementary" role which should be a top-level landmark.

Read more at:
https://www.w3.org/WAI/ARIA/apg/practices/landmark-regions/
2025-02-03 15:55:22 +08:00
Jun Pataleta b44acfecd2 MDL-67683 theme: Do not use section for #region-main
The #region-main container should not be a <section> tag (which has a
default landmark role of "region") as it contains the container with
the "main" role which should be a top-level landmark.

Read more at:
https://www.w3.org/WAI/ARIA/apg/practices/landmark-regions/
2025-02-03 15:55:21 +08:00
Jun Pataleta 5217658e55 MDL-83635 tool_brickfield: Use core_text:strlen() for img alt check
Multibyte alt texts will cause this check to fail easily. We need to be
using `core_text::strlen()` when checking the image alt text's length.
2025-02-03 15:52:10 +08:00
Huong Nguyen 96adf12aa8 Merge branch 'MDL-81478-405' of https://github.com/meirzamoodle/moodle into MOODLE_405_STABLE 2025-02-03 09:32:16 +07:00
Huong Nguyen b723767972 Merge branch 'MDL-83794-405' of https://github.com/andrewnicols/moodle into MOODLE_405_STABLE 2025-02-03 09:20:33 +07:00
Sara Arjona 77ca508326 Merge branch 'mdl-82679_405_wip' of https://github.com/james-cnz/moodle into MOODLE_405_STABLE 2025-01-31 16:01:34 +01:00
Sara Arjona 0d6f6a9088 Merge branch 'MDL-84321-405-enfix' of https://github.com/mudrd8mz/moodle into MOODLE_405_STABLE 2025-01-31 15:42:44 +01:00
Jun Pataleta 9a3e960c18 Merge branch 'MDL-82542-405' of https://github.com/NashTechOpenUniversity/moodle into MOODLE_405_STABLE 2025-01-31 12:43:32 +08:00
Huong Nguyen 89e6f737cc weekly release 4.5.1+ 2025-01-31 09:20:24 +07:00
Huong Nguyen 325858c5ca NOBUG: Add upgrade notes 2025-01-31 09:20:24 +07:00
Huong Nguyen bcbde331d7 Merge branch 'install_405_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_405_STABLE 2025-01-31 09:20:10 +07:00
James C bf2577afca MDL-82679 course: Prevent collapsable sections conflicting 2025-01-30 22:33:30 +13:00
Huong Nguyen eb5d247514 Merge branch 'MDL-79281_405' of https://github.com/cwarwicker/moodle into MOODLE_405_STABLE 2025-01-30 11:13:26 +07:00
Huong Nguyen 9578db9fe6 Merge branch 'MDL-84103-405' of https://github.com/andelacruz/moodle into MOODLE_405_STABLE 2025-01-30 11:09:57 +07:00
Huong Nguyen e4967d5d18 Merge branch 'MDL-84095-405' of https://github.com/meirzamoodle/moodle into MOODLE_405_STABLE 2025-01-30 10:51:01 +07:00
Huong Nguyen c26afd96fb Merge branch 'MDL-84275-405' of https://github.com/paulholden/moodle into MOODLE_405_STABLE 2025-01-30 10:27:40 +07:00
Huong Nguyen 5afdc793f5 Merge branch 'MDL-83297-maxgradesperpage-405' of https://github.com/dragos5436/moodle into MOODLE_405_STABLE 2025-01-30 09:28:53 +07:00
Huong Nguyen aec6155835 Merge branch 'MDL-84323-405' of https://github.com/sarjona/moodle into MOODLE_405_STABLE 2025-01-30 09:20:21 +07:00
Angelia Dela Cruz c9626cabcb MDL-84103 imscc: Behat test for import IMS Cartridge to course 2025-01-30 10:14:31 +08:00
Clemens 0e3b5377e6 MDL-83650 odslib: Add variable to class MoodleODSCell 2025-01-30 00:44:45 +01:00
james-cnz ab4ee8f328 MDL-83690 course: Fix course index label links 2025-01-30 10:46:06 +13:00
Sara Arjona 238266ff98 Merge branch 'MDL-84264-405' of https://github.com/pmaneggia/moodle into MOODLE_405_STABLE 2025-01-29 16:52:59 +01:00
Sara Arjona 7548a8be9f Merge branch 'MDL-84243-405' of https://github.com/ferranrecio/moodle into MOODLE_405_STABLE 2025-01-29 16:47:40 +01:00
Sara Arjona c1700053ec Merge branch 'MDL-84242-405' of https://github.com/paulholden/moodle into MOODLE_405_STABLE 2025-01-29 15:52:09 +01:00
Sara Arjona 7c1e31a75b Merge branch 'MDL-84205-405' of https://github.com/paulholden/moodle into MOODLE_405_STABLE 2025-01-29 11:16:45 +01:00
Sara Arjona 5d3865580c Merge branch 'MDL-84320-405' of https://github.com/raortegar/moodle into MOODLE_405_STABLE 2025-01-29 08:57:24 +01:00
Sara Arjona 6d4d675f44 Merge branch 'MDL-84129-405' of https://github.com/paulholden/moodle into MOODLE_405_STABLE 2025-01-29 08:50:04 +01:00
Sara Arjona 229c6c6c07 Merge branch 'MDL-84214-405' of https://github.com/paulholden/moodle into MOODLE_405_STABLE 2025-01-29 08:39:27 +01:00
Sara Arjona eb9f01469c Merge branch 'MDL-84148-405' of https://github.com/paulholden/moodle into MOODLE_405_STABLE 2025-01-29 08:30:16 +01:00
Sara Arjona bafc8047b4 Merge branch 'MDL-79819_405' of https://github.com/jonof/moodle into MOODLE_405_STABLE 2025-01-29 08:18:35 +01:00
Sara Arjona 76f31349ac Merge branch 'MDL-84355-405' of https://github.com/andrewnicols/moodle into MOODLE_405_STABLE 2025-01-29 08:09:53 +01:00
Sara Arjona aa296d4b31 Merge branch '83617-fix-grader-report-url-405' of https://github.com/DSI-Universite-Rennes2/moodle into MOODLE_405_STABLE 2025-01-29 08:00:47 +01:00
Sara Arjona ed301a7653 Merge branch 'MDL-83152-405' of https://github.com/paulholden/moodle into MOODLE_405_STABLE 2025-01-29 07:49:27 +01:00
Andrew Nicols eb2100be30 MDL-84355 phpunit: Exclude fixtures from testsuite search 2025-01-29 11:46:22 +08:00
Andrew Nicols 7b4a6d9000 MDL-84355 phpunit: Correct test path for component configs 2025-01-29 11:29:35 +08:00
David Mudrák 82cee60e32 MDL-84321 lang: Use the fixed strings in tests, too 2025-01-28 20:45:40 +01:00
Helen Foster 2568276f44 MDL-84321 lang: Import fixed English strings (en_fix) 2025-01-28 20:45:28 +01:00
Paul Holden 830a52400b MDL-72080 javascript: explicit Content-Type in service responses.
This fixes various external methods that initialize page output
manually, e.g. `core_get_fragment`, which can mess with third party
proxies that modify data in transit because of the current default
response type header (text/html).

Co-authored-by: Mario Torres
2025-01-28 12:48:31 +00:00
Huong Nguyen b43a9d9833 Merge branch 'MDL-83079-405' of https://github.com/HuongNV13/moodle into MOODLE_405_STABLE 2025-01-28 17:04:32 +07:00
Frederik Milling Pytlick 1dc5c3f1d4 MDL-83079 core: Make signal handlers run during non CLI scripts 2025-01-28 16:50:46 +07:00
Jun Pataleta b279bf6a8e Merge branch 'MDL-81195-405' of https://github.com/martygilbert/moodle into MOODLE_405_STABLE 2025-01-28 10:53:14 +08:00
AMOS bot a80f8498fd Automatically generated installer lang files 2025-01-28 00:07:49 +00:00
ferran 90a2a8f3b4 MDL-84243 core_courseformat: fix course index completion icon 2025-01-27 17:25:26 +01:00
Sara Arjona 6b673ff711 MDL-84323 core_badges: Remove endorsement from JSON
The endorsement has been removed from the JSON because, according to
the OBv2.0specification, it must not be included in either the badge
or the assertion.
Including it results in a format error, rendering the badge invalid.
2025-01-27 10:34:52 +01:00
raortegar 7707d087fe MDL-84320 editor_tiny: Update tiny version in thirdpartylbs.xml 2025-01-24 11:43:51 +01:00
Jun Pataleta 543c247ae5 Merge branch 'MDL-83989-405' of https://github.com/clransom/moodle into MOODLE_405_STABLE 2025-01-24 15:52:29 +08:00
Marty b2eff97b64 MDL-81195 core_course: allow for daylight savings
In timezones where daylight savings time is used, courses that start
on a Monday at 00:00 would display the week headings incorrectly
during the change forward.

When the time changes backwards, courses that have a start time of
Sunday at 23:00 also have a mislabeled week.

This attempts to use the DateTime() library, along with the user's
local timezone setting to display the correct day, rather than just
subtracting 86400.
2025-01-23 14:39:42 -05:00
Sara Arjona 77692ee5ea weekly release 4.5.1+ 2025-01-23 17:34:58 +01:00
Sara Arjona 652f6caf19 Merge branch 'install_405_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_405_STABLE 2025-01-23 17:34:51 +01:00
Katie Ransom 0a6cb5f2fa MDL-83989 file upload: Filemanager breaks if you drop file outside of it 2025-01-23 16:30:05 +00:00
Huong Nguyen 0d2d28c16c Merge branch 'MDL-83751-405' of https://github.com/paulholden/moodle into MOODLE_405_STABLE 2025-01-23 10:48:30 +07:00
Huong Nguyen a964ca4470 Merge branch 'MDL-81685_matrix_homeserver_name_405' of https://github.com/mark-webster-catalyst/moodle into MOODLE_405_STABLE 2025-01-23 09:17:08 +07:00
Huong Nguyen 43c0d9b0b8 Merge branch 'MDL-84101-405' of https://github.com/lameze/moodle into MOODLE_405_STABLE 2025-01-23 09:09:15 +07:00
Huong Nguyen 1c0573332c Merge branch 'MDL-84249-405' of https://github.com/lameze/moodle into MOODLE_405_STABLE 2025-01-23 09:02:30 +07:00
Simey Lameze dde4a44ccf MDL-84101 behat: add step to save changes
Signed-off-by: Simey Lameze <simey@moodle.com>
2025-01-23 07:28:19 +08:00
Angelia Dela Cruz 5ac3f7495d MDL-84101 message: Behat test for managing notification options 2025-01-23 07:28:19 +08:00
Huong Nguyen 189e0ac8cd Merge branch 'MDL-78365-405' of https://github.com/pedrojordao/moodle into MOODLE_405_STABLE 2025-01-22 15:11:10 +07:00
Andrew Gosali c43616b1e4 MDL-80848 mod_forum: to have id as the backup sorting condition
When the first sorting condition fails (falls on the same value), it should have another sorting as a backup.
2025-01-22 13:39:18 +07:00
Andrew Nicols 89888c790b MDL-83794 editor_tiny: Add SVG support 2025-01-22 11:40:45 +08:00
Andrew Nicols 5963dda401 MDL-83794 editor_tiny: Add support for MathML 2025-01-22 11:40:44 +08:00
Paul Holden 64d6d74942 MDL-84275 factor_totp: format site fullname for authenticator setup. 2025-01-21 21:33:54 +00:00
Mark Webster 369daf04e4 MDL-81685 communication_matrix: Adds Matrix homeserver name setting
Allows setting a homeserver name for instances where
usernames do not follow the pattern @user:homeserverurl
2025-01-21 12:38:59 +00:00
dragos5436 bfcdb5100f MDL-83297 gradereport_grader: Make maxgradesperpage configurable
After deploying to our production environment, we noticed that for large gradebooks, having a max of 200,000 grades per
page was still too high and resulted in the gradebook page crashing or failing to load entirely. This commit will make
this value configurable (e.g. ->maxgradesperpage = 70000) rather than a constant so that other institutions can tune it.

Co-authored-by: Leon Stringer <leon.stringer@ucl.ac.uk>
2025-01-21 12:32:33 +00:00
Huong Nguyen 1a9cebf136 Merge branch 'MDL-84111-405' of https://github.com/lucaboesch/moodle into MOODLE_405_STABLE 2025-01-21 09:32:33 +07:00
Huong Nguyen 587f006439 Merge branch 'MDL-82722_405' of https://github.com/cwarwicker/moodle into MOODLE_405_STABLE 2025-01-21 09:05:28 +07:00
Huong Nguyen 293d075b40 Merge branch 'MDL-82237_405_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_405_STABLE 2025-01-21 08:58:00 +07:00
Paola Maneggia ecdf8eea49 MDL-84264 backup: encode and decode urls for the new course section page 2025-01-20 19:02:57 +01:00
Sara Arjona 928d7f6ea1 Merge branch 'MDL-81043-405' of https://github.com/HuongNV13/moodle into MOODLE_405_STABLE 2025-01-20 16:03:28 +01:00
Conn Warwicker a313b9d862 MDL-79281 core_question: Remove 'deleteall' param from edit page.
This removes the setting of the 'deleteall' param to every link
on the question edit page and inserts it into the url based
on if we actually want to delete all versions or not.
2025-01-20 14:21:02 +00:00
Mark Johnson 7c085e8389 MDL-82237 mod_quiz: Include all filters in "See questions" link
The "See questions" link for random questions was still using the old
format the filter conditions, so was only applying the category filter
on the list of questions displayed. This means that if a tag filter (or
any other filter) was set on the random question set, it was not applied
when viewing the list of questions.

This change takes all the filter conditions applied in random question's
slot and passes them to the question bank in the "See questions" link.
2025-01-20 12:47:40 +00:00
Julien Boulen 12090ec2e0 MDL-83617 gradereport_grader: Fix URL encoding
When changing the number of grades per page, the redirect url was encoded twice.
2025-01-20 10:45:32 +01:00
Simey Lameze fc836a4dfd MDL-84249 behat: remove unnecessary javascript tag
This commit also make the repeated scenario names unique.
2025-01-20 13:59:55 +08:00
Jun Pataleta ae29a9a148 Merge branch 'MDL-83750-405' of https://github.com/raortegar/moodle into MOODLE_405_STABLE 2025-01-20 10:24:13 +08:00
Jun Pataleta 8d0a1ccd81 Merge branch 'MDL-84202-405' of https://github.com/paulholden/moodle into MOODLE_405_STABLE 2025-01-20 10:02:09 +08:00
Jun Pataleta 4930c4c7e1 Merge branch 'MDL-83814-405' of https://github.com/andrewnicols/moodle into MOODLE_405_STABLE 2025-01-20 09:58:07 +08:00
Jonathon Fowler 1e9626a730 MDL-79819 assignfeedback_editpdf: safely handle bad jpg->pdf conversion 2025-01-20 08:43:03 +10:00
Paul Holden e0722bdc08 MDL-84242 badges: consistent report capability checks to enable badge.
These now match the corresponding external service methods which are
subsequently called via AJAX (814753e5).
2025-01-17 15:10:00 +00:00
Paul Holden 9619f59803 MDL-84214 mod_bigbluebuttonbn: fix default presentation file serving. 2025-01-17 12:28:58 +00:00
Paul Holden 07845198da MDL-83152 mod_glossary: fix chronological sorting of pending entries. 2025-01-17 10:26:05 +00:00
Jun Pataleta eb81c2890d Merge branch 'MDL-83341-405' of https://github.com/HuongNV13/moodle into MOODLE_405_STABLE 2025-01-17 17:01:06 +08:00
Huong Nguyen 83d9bb6ffb MDL-81043 gradereport_grader: Improve gradereport_grader/collapse
- This will helps `nodesUpdate` handle asynchronous updates better
 - This also helps to fix Random Behat failure
2025-01-17 15:13:48 +07:00
Luca Bösch 7a57da7970 MDL-84111 qtype_ddimageortext: keep item type, file and text together. 2025-01-17 08:53:40 +01:00
AMOS bot b967ee6ec4 Automatically generated installer lang files 2025-01-17 00:07:56 +00:00
Paul Holden 3054fcdf10 MDL-83751 check: remove non-functional result class method. 2025-01-16 17:40:06 +00:00
Huong Nguyen e6c92dc291 weekly release 4.5.1+ 2025-01-16 23:46:34 +07:00
Huong Nguyen dc17e7802f NOBUG: Add upgrade notes 2025-01-16 23:46:34 +07:00
Huong Nguyen 830942431b Merge branch 'install_405_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_405_STABLE 2025-01-16 23:46:21 +07:00
Jun Pataleta 47b0005d74 Merge branch 'MDL-80468-factorpage-45' of https://github.com/bwalkerl/moodle into MOODLE_405_STABLE 2025-01-16 12:25:48 +08:00
Jun Pataleta 4c0b46de32 Merge branch 'MDL-83826-405' of https://github.com/lameze/moodle into MOODLE_405_STABLE 2025-01-16 10:22:02 +08:00
Conn Warwicker c5aac1bb0a MDL-82772 mod_quiz: Update context when random question is updated. 2025-01-15 13:16:20 +00:00
Jun Pataleta 6c934c5a80 Merge branch 'MDL-83172-405-test' of https://github.com/meirzamoodle/moodle into MOODLE_405_STABLE 2025-01-15 17:02:15 +08:00
Sara Arjona c65250bbf2 Merge branch 'MDL-83995-405' of https://github.com/paulholden/moodle into MOODLE_405_STABLE 2025-01-15 08:29:05 +01:00
Angelia Dela Cruz 0ee76b5e61 MDL-83826 core_admin: Behat coverage for plugins overview for admins 2025-01-15 14:02:33 +08:00
Paul Holden 3e229be7ea MDL-84205 mod_assign: allow automatic reopen method to admin defaults.
This option was added in b7e6a176 to the module form, but without the
ability for the admin to set as the default value.
2025-01-14 14:04:07 +00:00
Sara Arjona 9850eeb84a Merge branch 'MDL-84072-405' of https://github.com/paulholden/moodle into MOODLE_405_STABLE 2025-01-14 14:44:20 +01:00
Sara Arjona d80f7924d7 Merge branch 'MDL-83630-405' of https://github.com/paulholden/moodle into MOODLE_405_STABLE 2025-01-14 11:53:33 +01:00
Paul Holden 9d8cc0da84 MDL-84202 customfield_number: add number instance to report testing. 2025-01-14 10:20:18 +00:00
Sara Arjona 697c49f289 Merge branch 'MDL-83183-405' of https://github.com/paulholden/moodle into MOODLE_405_STABLE 2025-01-14 10:59:16 +01:00
meirzamoodle ee886074f3 MDL-83172 environment: Fix undefined array key error 2025-01-14 16:11:31 +07:00
meirzamoodle b763993d9e MDL-83172 environment: Remove Oracle from LMS 2025-01-14 16:09:14 +07:00
Jun Pataleta 9ed5fcd1f8 Merge branch 'MDL-84124-405' of https://github.com/andrewnicols/moodle into MOODLE_405_STABLE 2025-01-14 11:12:24 +08:00
Huong Nguyen 948aeee28c Merge branch 'MDL-83831-405' of https://github.com/NashTechOpenUniversity/moodle into MOODLE_405_STABLE 2025-01-14 09:01:09 +07:00
AMOS bot 5585fc8bfe Automatically generated installer lang files 2025-01-14 00:07:42 +00:00
Paul Holden d9ea363e48 MDL-84129 reportbuilder: improve handling of alternate name fields.
It's possible the first returned field contains a null value, while
subsequent fields may be non-null - in this case we should still
populate the fullname in column callback.
2025-01-13 16:04:53 +00:00
Pedro Jordao df61405d05 MDL-78365 libraries: Truncate ChartJs labels to avoid display issues
If the chart label is too large, it is breaking the display, so we will
add ellipsis to the label and display the full text in the tooltip.
2025-01-13 11:36:34 -03:00
raortegar 9535c1d318 MDL-83750 core_form: Fix deprecated preg_replace in form 2025-01-13 15:05:17 +01:00
Jun Pataleta 61cc6ebce7 Merge branch 'MDL-83832-405' of https://github.com/NashTechOpenUniversity/moodle into MOODLE_405_STABLE 2025-01-13 15:50:42 +08:00
Jun Pataleta ea56ece9e4 Merge branch 'MDL-83968-405' of https://github.com/andrewnicols/moodle into MOODLE_405_STABLE 2025-01-13 15:29:34 +08:00
Andrew Nicols d400c265a9 MDL-83814 core: Bump Node to latest LTS 2025-01-13 09:07:06 +08:00
AMOS bot 142b278272 Automatically generated installer lang files 2025-01-13 00:07:49 +00:00
Benjamin Walker ab12805184 MDL-80468 tool_mfa: Allow loading factor defined externalpages correctly 2025-01-10 21:14:52 +10:00
Andrew Nicols b9791b7617 MDL-83968 core: Update uses of router test classes 2025-01-10 15:56:57 +08:00
Andrew Nicols 5bd4fb8e3a MDL-83968 core: Move router test classes to correct locations 2025-01-10 15:56:57 +08:00
Andrew Nicols fc8a385290 MDL-84152 tests: Remove extraneous / in external file URL generation 2025-01-10 14:48:10 +08:00
Paul Holden 6ef8966625 MDL-84148 tool_lp: clarify the primary save action of scales dialogue. 2025-01-09 18:28:11 +00:00
Sara Arjona 71f5b521e9 weekly release 4.5.1+ 2025-01-09 15:21:49 +01:00
Sara Arjona f85fa813e1 NOBUG: Add upgrade notes 2025-01-09 15:21:49 +01:00
Sara Arjona 55840b3b63 Merge branch 'install_405_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_405_STABLE 2025-01-09 15:21:37 +01:00
meirzamoodle 011ccd1636 MDL-84095 tiny_recordrtc: Shows error toast for failures 2025-01-09 15:14:48 +07:00
Huong Nguyen 4433432675 Merge branch 'MDL-77185-diskfreespace-405' of https://github.com/leonstr/moodle into MOODLE_405_STABLE 2025-01-09 10:13:09 +07:00
hieuvu ce7ca4817b MDL-82542 qbank_managecategories: Add new user preferences
Keep the checkbox to show questions from subcategories as a user preference.
2025-01-09 09:42:03 +07:00
Jun Pataleta f664fd9b6e Merge branch 'MDL-82769_405' of https://github.com/cwarwicker/moodle into MOODLE_405_STABLE 2025-01-09 10:16:26 +08:00
AMOS bot d3f009362d Automatically generated installer lang files 2025-01-09 00:10:03 +00:00
Andrew Nicols 00f0ec3ccf MDL-84124 cache: Purge Redis cache between tests 2025-01-09 08:00:31 +08:00
Paul Holden 60f37890fb MDL-83995 mod_glossary: support export/import of entry trusted text. 2025-01-08 13:44:19 +00:00
Huong Nguyen df13123c81 Merge branch 'MDL-83506-405' of https://github.com/andrewnicols/moodle into MOODLE_405_STABLE 2025-01-08 15:42:13 +07:00
Jun Pataleta 7ec4cb0f6d Merge branch 'MDL-84079-kill-all-MOODLE_405_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_405_STABLE 2025-01-08 14:36:42 +08:00
Khoa Nguyen d7b0927a83 MDL-83831 core_question: Reset columns on history page causes confusion 2025-01-08 13:34:39 +07:00
sarjona b2a29a4402 Merge branch 'MDL-83917-405' of https://github.com/pedrojordao/moodle into MOODLE_405_STABLE 2025-01-08 07:16:29 +01:00
meirzamoodle b2403bad15 MDL-81478 atto_recordrtc: Add webm audio support as a fallback
Co-authored-by: Djarran Cotleanu <djarrancotleanu@catalyst-au.net>
2025-01-08 12:54:39 +07:00
meirzamoodle a79727f18e MDL-81478 tiny_recordrtc: Add webm audio support as a fallback
Co-authored-by: Djarran Cotleanu <djarrancotleanu@catalyst-au.net>
2025-01-08 11:41:12 +07:00
Huong Nguyen dc7c6d1535 Merge branch 'MDL-84042-405' of https://github.com/HuongNV13/moodle into MOODLE_405_STABLE 2025-01-08 09:45:07 +07:00
Huong Nguyen 10ce5fef12 Merge branch 'MDL-84008-405' of https://github.com/lucaboesch/moodle into MOODLE_405_STABLE 2025-01-08 09:41:12 +07:00
Huong Nguyen 8ab6ae5a8a Merge branch 'MDL-79122_405' of https://github.com/cwarwicker/moodle into MOODLE_405_STABLE 2025-01-08 09:26:24 +07:00
Huong Nguyen 59679f6daf MDL-84042 mod_assign: Notification helper tests cleanup 2025-01-08 09:20:06 +07:00
David Woloszyn fcab82c2dd MDL-84042 mod_assign: Fixed notification helper submission check
mod_assign_generator now accepts a status when creating a submission.
2025-01-08 09:20:06 +07:00
Pedro Jordao 31a28b72bb MDL-83917 core_completion: Create function count_modules_completed
The function returns the number of modules completed by a user and
executes a COUNT aggregate function to avoid running many queries
to obtain this information, aiming to optimize performance.

Co-authored-by: Carlos Castillo <carlos.castillo@moodle.com>
2025-01-07 22:20:35 -03:00
AMOS bot 1df7118320 Automatically generated installer lang files 2025-01-08 00:07:46 +00:00
sarjona e0d33cdf64 Merge branch 'MDL-83746-405' of https://github.com/srobotta/moodle into MOODLE_405_STABLE 2025-01-07 14:50:06 +01:00
Paul Holden 7a42c2e37a MDL-84072 output: correct progress bar component percentage parameter.
Avoid mixing float/string types, where the decimal separator could
vary according to current locale (as per previous fix 5a1aef5a, which
was subsequently re-broken by b92886ad).
2025-01-07 13:17:52 +00:00
sarjona 269d66470f Merge branch 'MDL-82788-405' of https://github.com/meirzamoodle/moodle into MOODLE_405_STABLE 2025-01-07 14:14:56 +01:00
Conn Warwicker 47a2a2dc53 MDL-79122 question: Correct capability check for question comments link.
This makes the rendering of the question comments count additionally
check the core moodle/comment:post capability, since this capability
is required to make comments. Previously, this was not being checked
so users could open the modal to make a comment, which was causing
a javascript error due to expected elements being missing.
2025-01-07 12:23:21 +00:00
Jun Pataleta 212dbbade5 Merge branch 'MDL-83668-405' of https://github.com/srobotta/moodle into MOODLE_405_STABLE 2025-01-07 13:56:42 +08:00
Huong Nguyen 8a0b122c5f Merge branch 'MDL-82895-405' of https://github.com/lucaboesch/moodle into MOODLE_405_STABLE 2025-01-07 09:19:53 +07:00
Conn Warwicker a5785e2cc1 MDL-82769 question: Update legacy filters on random questions.
- Adds the "cat" field to the converted legacy filter, which was
  missing.
- Does the conversion on the editrandom.php page as this was
  throwing a warning.
2025-01-06 14:15:24 +00:00
meirzamoodle fc34c352d7 MDL-82788 theme_boost: Obtain the correct Tiny and Atto editor elements 2025-01-06 20:27:12 +07:00
Luca Bösch 2e6502f5bc MDL-84008 qtype_match: keep question and answer together. 2025-01-06 13:37:13 +01:00
Luca Bösch 55db72df9f MDL-84008 qtype_calculated: glue formula, tolerance, display, feedback. 2025-01-06 13:37:13 +01:00
Luca Bösch 35fa93da9f MDL-84008 qtype_multichoice: keep choice, grade and feedback together. 2025-01-06 13:37:13 +01:00
Stephan Robotta c93964407e MDL-83746 navigation: check host and path for active flag in custom menu 2025-01-06 08:32:09 +01:00
Stephan Robotta 60fb52e209 MDL-83668 tiny: customize allowed HTML tags and attributes 2025-01-06 08:32:00 +01:00
Jun Pataleta 61f9725107 Merge branch 'MDL-83835-405' of https://github.com/raortegar/moodle into MOODLE_405_STABLE 2025-01-06 13:14:52 +08:00
Luca Bösch bcf2d4d224 MDL-82895 qbank_managecategories: Correct dnd hover text encoding 2025-01-03 08:50:08 +01:00
Huong Nguyen c58bc49a07 weekly release 4.5.1+ 2025-01-03 13:54:01 +07:00
Huong Nguyen fd5d2048f1 NOBUG: Add upgrade notes 2025-01-03 13:54:01 +07:00
Huong Nguyen 33758429af Merge branch 'install_405_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_405_STABLE 2025-01-03 13:53:48 +07:00
Khoa Nguyen f10a1dba9f MDL-83832 core_question: Links to question history may show blank page 2025-01-03 13:47:33 +07:00
Huong Nguyen 432db3fc41 Merge branch 'MDL-83959-405' of https://github.com/paulholden/moodle into MOODLE_405_STABLE 2025-01-03 00:00:56 +07:00
Brendan Heywood c5858e948e MDL-84079 cli: Fix deprecation warning 2025-01-02 15:07:32 +11:00
AMOS bot a22374386d Automatically generated installer lang files 2025-01-01 00:07:57 +00:00
Leon Stringer c2c8375863 MDL-77185 session: Fix undefined disk_free_space
Fix PHP fatal error "Call to undefined function
core\session\disk_free_space()" when disable_functions=disk_free_space.
Prior to PHP 8.0 this error was suppressed by '@'.

Co-authored-by: Federico Alvarez <32086536+fedealvz@users.noreply.github.com>
2024-12-31 15:34:10 +00:00
Huong Nguyen e64b77077a Merge branch 'MDL-66129-405' of https://github.com/rhell4/moodle into MOODLE_405_STABLE 2024-12-30 09:40:56 +07:00
AMOS bot 289bdbaae1 Automatically generated installer lang files 2024-12-25 00:27:29 +00:00
Huong Nguyen fcd60bd8ef Merge branch 'MDL-83159-405' of https://github.com/lucaboesch/moodle into MOODLE_405_STABLE 2024-12-24 09:42:23 +07:00
Huong Nguyen 8652ec36e5 Merge branch 'MDL-83988-405' of https://github.com/andrewnicols/moodle into MOODLE_405_STABLE 2024-12-24 09:29:36 +07:00
Shamim Rezaie e1e874e622 Merge branch 'MDL-83005-405' of https://github.com/davewoloszyn/moodle into MOODLE_405_STABLE 2024-12-23 06:02:44 +11:00
AMOS bot 1c1f85fde4 Automatically generated installer lang files 2024-12-22 00:08:09 +00:00
AMOS bot 0e85adb8d6 Automatically generated installer lang files 2024-12-21 00:07:40 +00:00
Luca Bösch 78517d9570 MDL-83159 mod_quiz: Use format_string for course and quiz name. 2024-12-20 10:23:49 +01:00
AMOS bot 1d79aa088d Automatically generated installer lang files 2024-12-20 00:07:47 +00:00
Jun Pataleta 04cb4312bc weekly release 4.5.1+ 2024-12-19 20:08:09 +08:00
Jun Pataleta 9d2bb14dd3 NOBUG: Add upgrade notes 2024-12-19 20:08:09 +08:00
Jun Pataleta b2ae39d595 Merge branch 'install_405_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_405_STABLE 2024-12-19 20:07:54 +08:00
djarrancotleanu f8b903596a MDL-83753 cachestore_redis: Allow for configurable connection timeout 2024-12-19 14:21:59 +10:00
djarrancotleanu 2a28dbdf78 MDL-83753 redis: Allow for configurable max retries setting 2024-12-19 14:21:53 +10:00
Huong Nguyen 0e85649699 Merge branch 'MDL-83940-405' of https://github.com/paulholden/moodle into MOODLE_405_STABLE 2024-12-19 10:40:30 +07:00
Huong Nguyen e9cece4b1c Merge branch 'MDL-82697-405' of https://github.com/paulholden/moodle into MOODLE_405_STABLE 2024-12-19 10:21:21 +07:00
Huong Nguyen 351a65a924 Merge branch 'MDL-83956-405' of https://github.com/paulholden/moodle into MOODLE_405_STABLE 2024-12-19 10:07:52 +07:00
Andrew Nicols 0c589780bb Merge branch 'MDL-63802-405' of https://github.com/lucaboesch/moodle into MOODLE_405_STABLE 2024-12-19 09:19:49 +08:00
djarrancotleanu 90fcb571e5 MDL-83753 redis: Set connection and read timeouts to configurable value 2024-12-19 11:07:15 +10:00
Jun Pataleta a71c98f540 MDL-83691 core: Version and upgrade fixes
* Version bump should be incremented from the latest weekly release.
* Upgrade step should be after the 4.5.0 release line comment.
2024-12-18 13:50:59 +08:00
Jun Pataleta 81eb2ce13b Merge branch 'MDL-83691-405' of https://github.com/meirzamoodle/moodle into MOODLE_405_STABLE 2024-12-18 13:46:56 +08:00
Jun Pataleta b7640d3047 Merge branch 'MDL-84026-405' of https://github.com/andrewnicols/moodle into MOODLE_405_STABLE 2024-12-18 13:24:22 +08:00
Jun Pataleta b2046b8b67 Merge branch '79121-normalize-proxy-bypass-405' of https://github.com/DSI-Universite-Rennes2/moodle into MOODLE_405_STABLE 2024-12-18 10:56:04 +08:00
Andrew Nicols 28e9774815 MDL-84026 core: Update GitHub Funding to point to fund.moodle.org 2024-12-18 10:45:48 +08:00
Huong Nguyen 0a3c54bff4 Merge branch 'MDL-84000-405' of https://github.com/paulholden/moodle into MOODLE_405_STABLE 2024-12-18 09:04:48 +07:00
Sara Arjona 077363e342 Merge branch 'MDL-83807-405' of https://github.com/clransom/moodle into MOODLE_405_STABLE 2024-12-17 17:06:27 +01:00
Sara Arjona 1f435633bd Merge branch 'MDL-81952-405' of https://github.com/srobotta/moodle into MOODLE_405_STABLE 2024-12-17 13:01:24 +01:00
Jun Pataleta 1384b051c9 Merge branch 'MDL-83377-405' of https://github.com/sh-csg/moodle into MOODLE_405_STABLE 2024-12-17 19:54:06 +08:00
Jun Pataleta 840bbadf64 Merge branch 'MDL-83593_405' of https://github.com/lostrogit/moodle into MOODLE_405_STABLE 2024-12-17 19:32:54 +08:00
Carlos Castillo 5b3776ceb4 MDL-83593 theme_boost: Fix navbar site logo link 2024-12-17 11:20:49 +01:00
Sara Arjona 583f508538 Merge branch 'MDL-83696-405' of https://github.com/andelacruz/moodle into MOODLE_405_STABLE 2024-12-17 07:41:51 +01:00
Angelia Dela Cruz 2e49bf766a MDL-83696 core_tag: Added behat for book chapter and glossary entry tags 2024-12-17 10:07:48 +08:00
Paul Holden 98c2b5ee67 MDL-83183 mod_bigbluebuttonbn: consistent order in activity index. 2024-12-16 21:02:24 +00:00
hieuvu 984867f4a8 MDL-82273 core_question: Fix behat failed 2024-12-16 18:50:30 +01:00
Julien Boulen d11f65c29b MDL-79121 lib: Improve the dataset for is_proxybypass_provider() 2024-12-16 15:55:58 +01:00
Julien Boulen b390286ed9 MDL-79121 lib: Normalize proxybypass value
This changes prevent the admin to define an incorrect proxybypass value.

Dropped out formats in MDL-74289 are now fixed automatically.
e.g.: "192.168." becomes "192.168.0.0/16" and ".domain.tld" becomes "*.domain.tld".
2024-12-16 15:54:52 +01:00
Huong Nguyen f9fedf6cac Merge branch 'MDL-79268-405' of https://github.com/danghieu1407/moodle into MOODLE_405_STABLE 2024-12-16 10:55:50 +07:00
Huong Nguyen 4776a21a45 Merge branch 'MDL-82273-405' of https://github.com/NashTechOpenUniversity/moodle into MOODLE_405_STABLE 2024-12-16 10:02:03 +07:00
Huong Nguyen 7947b4dded Merge branch 'MDL-75075-405' of https://github.com/NashTechOpenUniversity/moodle into MOODLE_405_STABLE 2024-12-16 09:51:17 +07:00
Huong Nguyen 03d184d1d3 Merge branch 'MDL-83493-405' of https://github.com/roland04/moodle into MOODLE_405_STABLE 2024-12-16 09:00:00 +07:00
AMOS bot 85350a2959 Automatically generated installer lang files 2024-12-15 00:08:25 +00:00
Stephan Robotta ba1165af63 MDL-81952 questions: Fix warning in export of multitype 2024-12-14 13:19:57 +01:00
Paul Holden fab65d14c9 MDL-84000 reportbuilder: move testcase helper to autoloaded namespace.
Clean up some class imports while we're at it.
2024-12-13 09:25:27 +00:00
Stefan Hanauska 34ee47e8a9 MDL-83377 repository_local: Missing options for searching 2024-12-13 07:46:52 +01:00
danghieu1407 2b916ec563 MDL-79268 questions: Show version numbers in delete confirmation 2024-12-13 13:34:38 +07:00
meirzamoodle cc77d48e7c MDL-83691 core_sms: Avoid saving unnecessary data in the database 2024-12-13 10:16:33 +07:00
Huong Nguyen aa55f38820 weekly release 4.5.1+ 2024-12-13 08:58:16 +07:00
Huong Nguyen 09bb7c6e60 NOBUG: Add upgrade notes 2024-12-13 08:58:16 +07:00
Huong Nguyen 1c88fb8e69 Merge branch 'install_405_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_405_STABLE 2024-12-13 08:58:01 +07:00
hieuvu 90882b0ae5 MDL-82273 core_question: get correct category for question bank view 2024-12-12 13:23:33 +07:00
Paul Holden 86d52532ff MDL-82697 courseformat: fix exception arguments for section limit.
Co-authored-by: James C <5689414+james-cnz@users.noreply.github.com>
2024-12-11 17:46:56 +00:00
Andrew Nicols c0c89726ff MDL-83988 core: Hide common machine-read files 2024-12-11 23:35:35 +08:00
Katie Ransom 95d655295f MDL-83807 files: Make file_get_all_files_in_draftarea return zip files 2024-12-11 14:17:21 +00:00
Amaia Anabitarte 77efe4c929 MDL-83807 h5p: Return a default valid H5P 2024-12-11 14:17:21 +00:00
Jun Pataleta a01724d0ab Merge branch 'MDL-81520-405' of https://github.com/andrewnicols/moodle into MOODLE_405_STABLE 2024-12-11 13:41:20 +08:00
Andrew Nicols 3555770591 MDL-81520 mod_assign: Update tests to not extend assign_provider test 2024-12-11 12:30:21 +08:00
Andrew Nicols 7bb9f136d2 MDL-81520 core: Fix test finality 2024-12-11 12:30:21 +08:00
AMOS bot 5525bddcc0 Automatically generated installer lang files 2024-12-11 00:07:48 +00:00
Khoa Nguyen 104e8851c5 MDL-75075 quiz: Show question tags as non-links to avoid errors 2024-12-10 13:46:44 +07:00
Khoa Nguyen 33d29d0d61 MDL-75075 core_tag: Add an option to render tag lists without links 2024-12-10 13:46:21 +07:00
Huong Nguyen 3cc69df4fb Merge branch 'MDL-81115_405' of https://github.com/cwarwicker/moodle into MOODLE_405_STABLE 2024-12-10 09:18:14 +07:00
AMOS bot 8dd52ab507 Automatically generated installer lang files 2024-12-10 00:07:50 +00:00
Paul Holden d0cd29b798 MDL-83959 webservice: relax retrieval of token external service info.
The report performs a `LEFT JOIN` on the external service table/entity
so we need to account for that in column callbacks and actions.

Also the shortname field is nullable, so account for that too.
2024-12-09 16:51:46 +00:00
Sara Arjona 6e650af798 Merge branch 'MDL-83783-405' of https://github.com/aanabit/moodle into MOODLE_405_STABLE 2024-12-09 16:20:37 +01:00
Sara Arjona c556b31910 Merge branch 'MDL-75750-405' of https://github.com/aanabit/moodle into MOODLE_405_STABLE 2024-12-09 16:18:46 +01:00
Sara Arjona c171c880c0 Merge branch 'MDL-81841-405' of https://github.com/laurentdavid/moodle into MOODLE_405_STABLE 2024-12-09 16:16:30 +01:00
Sara Arjona 60df835524 Merge branch 'MDL-83456-405' of https://github.com/roland04/moodle into MOODLE_405_STABLE 2024-12-09 16:10:19 +01:00
Paul Holden 0b82fba271 MDL-83956 course: update spacer icon for category management tree.
Prior to fd676913 the manage course categories tree element used
the 'i/empty' icon as a fixed width spacer (fa-fw). However this
icon is now shown as a square, which looks out of place here.

Change to a different icon that maps to the same fixed width spacer
in order to restore the previous behaviour.
2024-12-09 08:56:11 +00:00
Laurent David 4d0a2b47fe MDL-81841 mod_data: Add spacing bottom of preset page
* The action menu is going under the sticky footer on
the preset page. Adding more space helps to display the
entire menu instead of cutting it off.
2024-12-09 08:14:15 +01:00
Huong Nguyen 03ed804abe MDL-83341 repository_onedrive: Fix download and create controlled link
Onedrive direct download URL does not accept authorization headers,
it will just return the `unauthenticated` content with 401 HTTP Code

We switched to a safer way. We fetch the item information and use
a new curl instance (without authorization headers)
to fetch the content via direct download URL
2024-12-09 09:30:07 +07:00
AMOS bot 3c70be709b Automatically generated installer lang files 2024-12-08 00:08:06 +00:00
Conn Warwicker c686fee654 MDL-81115 question: Question bank tag filter to use all available tags.
This makes the tags which are available to the user on the question
bank tag filter, use tags from all available contexts, not just
that course. This means they can filter by tags assigned to system
questions as well, for example.
2024-12-06 14:16:26 +00:00
Paul Holden e302f2dec8 MDL-83940 comment: fix collapse/loading icons in comment container. 2024-12-06 10:53:33 +00:00
Huong Nguyen 4bd3217ce8 Moodle release 4.5.1 2024-12-06 13:13:03 +07:00
Huong Nguyen 3a71764572 NOBUG: Add upgrade notes 2024-12-06 13:13:03 +07:00
Luca Bösch ec6e2c892b MDL-63802 theme_classic: ARIA label in nav for secure layout 2024-12-05 18:21:17 +01:00
Huong Nguyen 15d05e6d76 weekly release 4.5+ 2024-12-05 22:32:49 +07:00
Huong Nguyen 96579b1904 NOBUG: Add upgrade notes 2024-12-05 22:32:48 +07:00
Mikel Martín cea21c1db0 MDL-83456 mod_scorm: Revert FA6 updated status icons 2024-12-05 14:40:04 +01:00
Huong Nguyen b5600c2b56 MDL-83921 competency: Update unit tests with latest changes 2024-12-05 18:36:58 +08:00
Huong Nguyen 5b374f607a MDL-82379 core_user: Move email change token to user private access key 2024-12-05 13:38:11 +08:00
Huong Nguyen f0f81cbddf Merge branch 'MDL-83606-405' of https://github.com/NashTechOpenUniversity/moodle into MOODLE_405_STABLE 2024-12-05 12:09:52 +07:00
Huong Nguyen 9141121f01 Merge branch 'MDL-83836-405' of https://github.com/davewoloszyn/moodle into MOODLE_405_STABLE 2024-12-05 11:44:12 +07:00
Jun Pataleta 588f9efe8c Merge branch 'MDL-83727-405' of https://github.com/NashTechOpenUniversity/moodle into MOODLE_405_STABLE 2024-12-05 12:35:56 +08:00
Huong Nguyen 6e9de0d56b Merge branch 'MDL-83641-405' of https://github.com/paulholden/moodle into MOODLE_405_STABLE 2024-12-05 11:29:17 +07:00
Huong Nguyen 5f96398a90 MDL-83921 competency: Bump version 2024-12-05 11:20:51 +07:00
Michael Hawkins ea3bba0ac8 MDL-83921 competency: Match web service capability check with page check 2024-12-05 11:20:29 +07:00
Jun Pataleta fd1b952e3e Merge branch 'MDL-83823-405-enfix' of https://github.com/mudrd8mz/moodle into MOODLE_405_STABLE 2024-12-05 11:48:36 +08:00
Huong Nguyen 00253d140c Merge branch 'MDL-83584-m405' of https://github.com/sammarshallou/moodle into MOODLE_405_STABLE 2024-12-05 10:12:46 +07:00
Huong Nguyen ade9ea1b64 Merge branch 'MDL-83223-405' of https://github.com/meirzamoodle/moodle into MOODLE_405_STABLE 2024-12-05 10:08:45 +07:00
Huong Nguyen 175e553143 MDL-82963 Tag: Improve validation for users tagged with sepecified tag 2024-12-05 11:03:03 +08:00
Jun Pataleta ccaa6daf95 Merge branch 'MDL-83844-405' of https://github.com/paulholden/moodle into MOODLE_405_STABLE 2024-12-05 10:35:31 +08:00
Jun Pataleta f3a96eb019 Merge branch 'MDL-83710-405' of https://github.com/paulholden/moodle into MOODLE_405_STABLE 2024-12-05 09:55:07 +08:00
David Woloszyn 2ef48e488b MDL-83005 tool_usertours: Fixed animating scroll on Boost tours 2024-12-04 16:14:05 +11:00
David Woloszyn 7809800e0c MDL-83005 tool_usertours: Correct user tour highlighting bugs
This way of highlighting user tour content removes the need to
juggle z-index. It also resolves the problem of cloning the target
element into a separate container and breaking styling.
2024-12-04 16:14:05 +11:00
meirzamoodle f68fc730f4 MDL-83223 core: Use capture with addEventListener to intercept events
The issue is that Bootstrap’s dropdown component likely stops
event propagation after the first click to manage its own
dropdown behavior. This prevents your click event handler from
running on subsequent clicks.

To fix this, we can handle the event before Bootstrap’s code stops
the propagation by using capture option with addEventListener.
2024-12-04 10:36:54 +07:00
Laurent David c44cd5ce91 MDL-82757 mod_data: Improve group access handling
* Improved handling of group access to ensure correct visibility of records.
2024-12-04 02:50:20 +00:00
Jun Pataleta 65acecced1 MDL-61316 core: Fix session gc unit tests 2024-12-04 02:50:19 +00:00
meirzamoodle 3f8502225e MDL-61316 core: Removed 5x multiplier from guest session expiration 2024-12-04 02:50:19 +00:00
Mark Johnson a7f0516ae9 MDL-83357 question: Fix filter cleaning in page links 2024-12-04 02:50:19 +00:00
Mark Johnson 10fef0df99 MDL-83357 question: Additional cleaning of filter params 2024-12-04 02:50:19 +00:00
Huong Nguyen f6f8ec2291 Merge branch 'MDL-82946-405' of https://github.com/lameze/moodle into MOODLE_405_STABLE 2024-12-04 09:39:30 +07:00
David Mudrák 065fdf4b2d MDL-83823 lang: Use the fixed strings in tests, too. 2024-12-03 20:14:25 +01:00
Helen Foster 1ab447455b MDL-83823 lang: Import fixed English strings (en_fix) 2024-12-03 20:13:50 +01:00
Angelia Dela Cruz bf301a5e81 MDL-82946 qbank: Behat coverage for questions bulk actions 2024-12-03 10:32:24 +08:00
Huong Nguyen bbd8a07f68 Merge branch 'MDL-83128-405' of https://github.com/paulholden/moodle into MOODLE_405_STABLE 2024-12-03 09:32:13 +07:00
Sara Arjona 8b2638fd56 Merge branch 'MDL-83686-405' of https://github.com/paulholden/moodle into MOODLE_405_STABLE 2024-12-02 13:52:27 +01:00
raortegar cd7fb950de MDL-83835 lib: PEAR - passing null to str functions is deprecated 2024-12-02 13:13:07 +01:00
Sara Arjona 97414ca1cb Merge branch 'MDL-82949-405' of https://github.com/lucaboesch/moodle into MOODLE_405_STABLE 2024-12-02 12:01:27 +01:00
Paul Holden a11e396945 MDL-83641 cohort: allow 'includes' option be specified in form element. 2024-12-02 10:58:47 +00:00
Paul Holden c13aac05cc MDL-83844 mod_scorm: avoid SQL reserved words retrieving SCO timing. 2024-12-02 10:47:39 +00:00
Jun Pataleta a4e26132e0 Merge branch 'MDL-83648_405' of https://github.com/timhunt/moodle into MOODLE_405_STABLE 2024-12-02 17:24:28 +08:00
Huong Nguyen 1b6873b44a Merge branch 'MDL-82947-405' of https://github.com/lucaboesch/moodle into MOODLE_405_STABLE 2024-12-02 14:32:17 +07:00
Huong Nguyen 9b0645fc15 Merge branch 'MDL-83711-405' of https://github.com/lucaboesch/moodle into MOODLE_405_STABLE 2024-12-02 14:19:33 +07:00
Shamim Rezaie 2db344ac25 Merge branch 'MDL-75610_405_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_405_STABLE 2024-12-02 15:24:18 +11:00
Huong Nguyen 3be068cc72 Merge branch 'MDL-83778-405' of https://github.com/NashTechOpenUniversity/moodle into MOODLE_405_STABLE 2024-12-02 10:44:22 +07:00
Huong Nguyen e33213647c Merge branch 'MDL-83670-m405' of https://github.com/sammarshallou/moodle into MOODLE_405_STABLE 2024-12-02 10:30:51 +07:00
Huong Nguyen 289056c576 Merge branch 'MDL-82657_405_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_405_STABLE 2024-12-02 10:17:36 +07:00
Tim Hunt 1e6e11d8d3 MDL-83648 javascript dialogues: fix responsive behaviour
visibilityChanged in the dialogue base class does important things.
Therefore if ajaxException and exception also want to do something
else in response to the visibleChange event, it should use a
different method name, rather than a name that collides with the
base class method.
2024-11-29 17:05:29 +00:00
Luca Bösch 94a7dbf7f4 MDL-82949 qbank_managecategories: better vertical distinction of title. 2024-11-29 15:53:05 +01:00
Luca Bösch 70d07c5947 MDL-82947 qbank_managecategories: Hover color for category management. 2024-11-29 15:51:08 +01:00
Luca Bösch 8a31a02cce MDL-83711 quiz: Quiz navigation profile pic not linking in secure mode 2024-11-29 14:25:46 +01:00
Sara Arjona a8b2acd35c weekly release 4.5+ 2024-11-29 12:36:57 +01:00
Khoa Nguyen cd2a074cc2 MDL-83727 question: Core question privacy provider misuses lazy-loading 2024-11-29 10:54:51 +07:00
Khoa Nguyen 660d38be15 MDL-83778 quiz: prevent page caching for quiz view page 2024-11-28 16:41:29 +07:00
Jun Pataleta a87bb9848f MDL-83470 environment: Put back Oracle support for now
Even though Oracle support is planned to be dropped for 5.0, the
actual issue that drops it (MDL-83172) has not yet landed. So, it's
better to keep this in environment.xml for now and defer its removal
from environment.xml in MDL-83172.
2024-11-28 16:05:19 +07:00
Jun Pataleta 376411566a Merge branch 'MDL-82475-405' of https://github.com/paulholden/moodle into MOODLE_405_STABLE 2024-11-28 13:19:02 +08:00
David Woloszyn 85f4603014 MDL-83836 aiplacement_courseassist: Fixed JS selectors 2024-11-28 16:03:02 +11:00
Huong Nguyen 1ae32381c5 Merge branch 'MDL-83776-405' of https://github.com/paulholden/moodle into MOODLE_405_STABLE 2024-11-28 12:00:17 +07:00
Jun Pataleta 966ac4af8f Merge branch 'MDL-83614-405' of https://github.com/paulholden/moodle into MOODLE_405_STABLE 2024-11-28 12:55:30 +08:00
Jun Pataleta 9a20fcd261 Merge branch 'MDL-83759-405' of https://github.com/roland04/moodle into MOODLE_405_STABLE 2024-11-28 12:28:49 +08:00
Huong Nguyen d0931fd7d4 Merge branch 'MDL-83811-405' of https://github.com/junpataleta/moodle into MOODLE_405_STABLE 2024-11-28 11:15:22 +07:00
Jun Pataleta d3f2f141a5 Merge branch 'MDL-83412-405' of https://github.com/junpataleta/moodle into MOODLE_405_STABLE 2024-11-28 12:12:02 +08:00
Huong Nguyen 6f59fe694b Merge branch 'MDL-83470-405' of https://github.com/junpataleta/moodle into MOODLE_405_STABLE 2024-11-28 11:03:42 +07:00
Jun Pataleta 2cc40431cb MDL-83412 core: Coding style fixes 2024-11-28 11:55:15 +08:00
Andrew Nicols cdbc789fd8 MDL-83412 calendartype_gregorian: Use core_date
Update timestamp_to_date_string to use core_date.
2024-11-28 11:55:15 +08:00
Andrew Nicols 3e45d0801e MDL-83412 core: Use LLL/LLLL for standalone Month names
We currently use MMM and MMMM which mean 'month in year', however in
some locales this is context-specific and should only be used in
conjunction with a day, for example "10 October 2024".

LLL and LLLL are for "stand-alone on the in year" and should be used
when a month is used without a day.
2024-11-28 11:55:15 +08:00
Huong Nguyen 348c37c98d Merge branch 'MDL-63264-405' of https://github.com/paulholden/moodle into MOODLE_405_STABLE 2024-11-28 10:46:17 +07:00
Huong Nguyen 57b5c36320 Merge branch 'MDL-83653_405' of https://github.com/timhunt/moodle into MOODLE_405_STABLE 2024-11-28 10:21:20 +07:00
Huong Nguyen cd0b2c6624 Merge branch 'MDL-82931-MOODLE_405_STABLE' of https://github.com/PhMemmel/moodle into MOODLE_405_STABLE 2024-11-28 09:44:11 +07:00
Huong Nguyen 2ba08bbda2 Merge branch 'MDL-83661-405' of https://github.com/ferranrecio/moodle into MOODLE_405_STABLE 2024-11-28 09:39:02 +07:00
Huong Nguyen e7e806e5f9 Merge branch 'MDL-82932-MOODLE_405_STABLE' of https://github.com/PhMemmel/moodle into MOODLE_405_STABLE 2024-11-28 09:28:14 +07:00
Huong Nguyen 9aa4e03b03 Merge branch 'MDL-83643-405' of https://github.com/lameze/moodle into MOODLE_405_STABLE 2024-11-28 09:20:39 +07:00
Jun Pataleta e8e20f996d Merge branch 'MDL-83211-m405' of https://github.com/sammarshallou/moodle into MOODLE_405_STABLE 2024-11-27 23:28:41 +08:00
Jun Pataleta 46861f51b7 Merge branch 'MDL-83788-405' of https://github.com/andrewnicols/moodle into MOODLE_405_STABLE 2024-11-27 16:19:25 +08:00
Huong Nguyen 6e98de58b4 Merge branch 'MDL-83658-MOODLE_405_STABLE' of https://github.com/praxisdigital/moodle into MOODLE_405_STABLE 2024-11-27 09:51:09 +07:00
Andrew Nicols 445f79f464 MDL-83788 mod_glossary: Correct assertions for assertArrayHasKey 2024-11-27 13:26:01 +11:00
Philipp Memmel 359b36db98 MDL-83822 core_session: Init redis connection in get_session_by_sid 2024-11-26 17:25:15 +01:00
Mark Johnson 491356530e MDL-82657 qbank_managecategories: Check "includesubcategories" on reload
The "includesubcategories" parameter is passed in the URL as lowercase,
but the Javascript was looking for "includeSubcategories" in camel case.
This meant it was always being set as false (unchecked) even when the
URL said it was true.

This fixes the casing in the Javascript, and adds a behat test to
confirm the fix.
2024-11-26 13:27:12 +00:00
Shamim Rezaie 943ad5a1fc Merge branch 'MDL-77957-405-test2' of https://github.com/rezaies/moodle into MOODLE_405_STABLE 2024-11-26 20:59:15 +11:00
Bastian Schmidt-Kuhl 88763543f8 MDL-77957 theme_boost: Fix drawer not closing on mobile if it has focus 2024-11-26 20:52:06 +11:00
Huong Nguyen 47e3c9ad06 Merge branch 'mdl-82762_405_wip' of https://github.com/james-cnz/moodle into MOODLE_405_STABLE 2024-11-26 12:10:36 +07:00
Khoa Nguyen 5ac62e7763 MDL-83606 Question bank: Delete questions to fit one page causes errors. 2024-11-26 11:16:50 +07:00
Jun Pataleta 7eba1d5996 MDL-83811 gha: Replace redis-64 with redis 5.0 2024-11-26 10:24:30 +08:00
Amaia Anabitarte 7541e7282a MDL-83783 core_course: Make activity chooser button ids unique 2024-11-25 14:39:06 +01:00
Mikel Martín 5c1dd89dd3 MDL-83759 theme_boost: Fix user navigation items height 2024-11-25 12:07:39 +01:00
Paul Holden 518a161c66 MDL-83630 theme_boost: vertically align submenu navigation icon. 2024-11-25 09:49:32 +00:00
Huong Nguyen fa5a4b9612 Merge branch 'MDL-83704-405' of https://github.com/andrewnicols/moodle into MOODLE_405_STABLE 2024-11-25 10:15:37 +07:00
Paul Holden 2da1a26439 MDL-83128 blocks: consistently style/align block list icons. 2024-11-22 16:20:20 +00:00
Paul Holden 88ef13a747 MDL-63264 enrol: retrieve additional welcome message contact data.
The `maildisplay` field is required to determine from whom to send
the welcome message.

Co-authored-by: Zak Risha <zjrisha@gmail.com>
2024-11-22 16:17:44 +00:00
Paul Holden ab60333d45 MDL-83614 javascript: apply icon class to legacy lightbox spinner. 2024-11-22 16:13:29 +00:00
Jun Pataleta 485130d7c5 weekly release 4.5+ 2024-11-22 22:26:45 +08:00
Jun Pataleta f83ab42515 NOBUG: Add upgrade notes 2024-11-22 22:26:45 +08:00
Paul Holden eb19752b9a MDL-83776 customfield_text: correct link field URL encoding. 2024-11-21 09:53:41 +00:00
Jun Pataleta 3bb4b79a15 MDL-83470 core: Define environment requirements for Moodle 5.0 2024-11-21 17:35:11 +08:00
Andrew Nicols 671514c6c2 Merge branch 'MDL-83551-405' of https://github.com/lameze/moodle into MOODLE_405_STABLE 2024-11-21 12:25:52 +08:00
Huong Nguyen 1113c4c5b1 Merge branch 'MDL-83529-m405' of https://github.com/sammarshallou/moodle into MOODLE_405_STABLE 2024-11-21 11:21:45 +07:00
Huong Nguyen 2b50abb97b Merge branch 'MDL-83747-405' of https://github.com/junpataleta/moodle into MOODLE_405_STABLE 2024-11-21 11:08:40 +07:00
Huong Nguyen 4a844708e6 Merge branch 'MDL-83048_405' of https://github.com/timhunt/moodle into MOODLE_405_STABLE 2024-11-21 11:01:32 +07:00
Andrew Nicols 36f946b5db Merge branch 'MDL-83501-url-encode-nginx-paths-MOODLE_405_STABLE' of https://github.com/rajandangi/moodle into MOODLE_405_STABLE 2024-11-21 11:48:15 +08:00
Jun Pataleta 39def1c571 Merge branch 'MDL-83290-405' of https://github.com/meirzamoodle/moodle into MOODLE_405_STABLE 2024-11-21 11:46:10 +08:00
Andrew Nicols df4c1d94f0 Merge branch 'MDL-83226-405' of https://github.com/paulholden/moodle into MOODLE_405_STABLE 2024-11-21 11:44:49 +08:00
Philipp Memmel 1f60d5198d MDL-82931 mod_data: Harden parsing of content format 2024-11-20 21:23:02 +01:00
Amaia Anabitarte c85daf2e2f MDL-75750 theme: Round login frame in small viewport 2024-11-20 16:25:44 +01:00
Paul Holden a93ceeef99 Merge branch 'MDL-83570-405-fix' of https://github.com/junpataleta/moodle into MOODLE_405_STABLE 2024-11-20 12:25:05 +00:00
Jun Pataleta 1be54667d6 MDL-83570 tiny_recordrtc: Use the correct upgrade_plugin_savepoint()
And move the release upgrade line comment before the upgrade step.
2024-11-20 18:12:18 +08:00
Huong Nguyen 5ae0bf0a12 Merge branch 'MDL-83570-405' of https://github.com/meirzamoodle/moodle into MOODLE_405_STABLE 2024-11-20 16:11:22 +07:00
Frederik Milling Pytlick 8dd0ea96e5 MDL-83658 core: Fix reactive debug tool logging
Fixed issue where the reactive debug panel does not log a transaction,
if the events fired are exactly the same as the previous ones.
2024-11-20 08:15:18 +01:00
meirzamoodle 42b0a371bf MDL-83570 tiny_recordrtc: Turn the audio bitrate input to Select field
The current code may have a bug. If users set the audio bit rate to
a non-supported value, such as 1000,
Firefox will display an error in the console,
while Chrome will create the recorded audio file successfully,
but it will have no sound. I tested this on Ubuntu 24.04.

The minimum bit rate threshold varies depending on the audio format.
During my tests with Firefox version 131.0.3, which uses
the audio/Ogg format, I found that the minimum supported value
is 24000. In Chrome 129.0.6668.70, which uses the audio/MP4 format,
the minimum supported value is 2400.

Due to these differences, I decided to change the input from
a text field to a select field, offering options that support both
Ogg and MP4 audio formats.

The database conversion for the old value has been provided in
the lib/db/upgrade.php. The script will find the closest match to
the current data and update it accordingly.
2024-11-20 10:02:53 +07:00
Mikel Martín c63f883dbf MDL-83493 theme_boost: Fix popover triggering
Popovers were not being closed when clicking elsewhere resulting in
multiple popovers open at the same time that cannot be closed. That
was happening because the trigger for popovers was set to "focus" and
"click" at the same time. This patch removes the "click" as trigger.
Also, adds the click event listener to show the popover and avoid the
problem described in MDL-82570, that caused this regression.
2024-11-19 15:25:23 +01:00
Jun Pataleta 796dd551f7 Merge branch 'MDL-81521-405' of https://github.com/andrewnicols/moodle into MOODLE_405_STABLE 2024-11-19 15:15:20 +08:00
Huong Nguyen 8d8b9b7268 Merge branch 'MDL-83610-405' of https://github.com/marinaglancy/moodle into MOODLE_405_STABLE 2024-11-19 09:28:22 +07:00
Jun Pataleta cb041849a3 MDL-83747 mod_data: Add accessible name for delcheck checkboxes 2024-11-18 19:39:04 +08:00
Marina Glancy e764df0dbb MDL-83610 behat: allow to set date fields in groups 2024-11-18 10:37:03 +00:00
meirzamoodle a817a54e90 MDL-83290 dml: Remove "ORDER BY" from the $sort 2024-11-18 16:08:26 +07:00
Jun Pataleta 176558d2ce Merge branch 'MDL-83502-405' of https://github.com/ferranrecio/moodle into MOODLE_405_STABLE 2024-11-18 14:37:01 +08:00
sam marshall f7931a5580 MDL-83529 Analytics: Upgrade can break if core module is deleted 2024-11-15 09:34:05 +00:00
sam marshall d12989b797 MDL-83211 core_search: Indexing can miss items due to race condition
Changes search indexing so that (except for test scripts) each indexing
run indexes only items up to 5 seconds ago, and the following indexing
will start from the same point. This ensures all items are indexed,
even if an item is written to the database one or two seconds after its
timecreated value.
2024-11-15 09:33:43 +00:00
Mark Johnson 1262e4539e MDL-75610 theme: Allow the activity title in Boost theme's secure layout 2024-11-15 08:32:28 +00:00
Mark Johnson eb7e4a9b65 MDL-75610 output: Fix title display logic in activity header
The display logic for including the title in the activity header was
such that the title would only display if both the theme default and the
layout option for 'notitle' were undefined or false. It was not possible
to a theme to have 'notitle' default to true, but have a layout override
that as false to display the title.

This change re-writes the is_title_allowed method to encapsulte the new
logic, first checking if the current layout has the option set and using
that, and if not falling back to the theme default if that is set. If
neither is set, the title is displayed.

This also tweaks moodle_page::magic_get_layout_options to ensure the
theme is initialised before trying to return the layout options.
2024-11-15 08:32:27 +00:00
Jun Pataleta 26e68178a8 Merge branch 'MDL-82877-405' of https://github.com/paulholden/moodle into MOODLE_405_STABLE 2024-11-15 13:31:26 +08:00
Andrew Nicols b1d7ea12cd MDL-81521 mod_quiz: Fix attempt walkthrough tests 2024-11-15 12:50:44 +08:00
Andrew Nicols c370c0cc5e MDL-81521 core: Update all possibly data providers to be static
Note: Some data providers could not be automatically be converted to
being static. These will be handled in a separate issue.
2024-11-15 12:50:44 +08:00
Huong Nguyen e1d05182a6 weekly release 4.5+ 2024-11-15 09:21:27 +07:00
Huong Nguyen 2b6424c59d NOBUG: Add upgrade notes 2024-11-15 09:21:27 +07:00
Jun Pataleta 8270af1bf0 Merge branch 'MDL-80926-405' of https://github.com/lameze/moodle into MOODLE_405_STABLE 2024-11-14 12:05:12 +08:00
Jun Pataleta 88e82bb634 Merge branch 'MDL-74836_405_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_405_STABLE 2024-11-14 10:46:03 +08:00
Paul Holden 5a189106ad MDL-83710 report_questioninstances: fix missing type query params. 2024-11-13 21:16:00 +00:00
James C 6a107256e3 MDL-82762 course: Prevent "undefined" being added to course index 2024-11-14 10:14:43 +13:00
Wiktor Wandachowicz 521a83352d MDL-83048 mod_quiz: Fixed use of grade_out_of and plugin renderer 2024-11-13 17:12:52 +00:00
Huong Nguyen 66183e5320 Merge branch 'MDL-83185-405' of https://github.com/laurentdavid/moodle into MOODLE_405_STABLE 2024-11-13 14:26:02 +07:00
Huong Nguyen 5ebabad505 Merge branch 'MDL-80689_405' of https://github.com/timhunt/moodle into MOODLE_405_STABLE 2024-11-13 14:00:47 +07:00
Andrew Nicols 9fe9652c16 MDL-83704 core: Stop loading subplugins files to uninstall
The list of subplugin types was loaded from the json/php subplugins
file, but then the actual list of subplugins was loaded from the cache
in the component, rendering any benefit of using the source json/php as
pointless.
2024-11-13 10:25:06 +08:00
Andrew Nicols e5b715291d MDL-83704 core: Stop loading subplugins files to fetch caps
This information is heavily cached in the component class. This should
be used wherever possible rather than checking on disk.
2024-11-13 10:25:06 +08:00
Simey Lameze 50a7bad23e MDL-83643 behat: make manual completion scenario names unique 2024-11-13 07:17:51 +08:00
Simey Lameze cfcfa4b1cd MDL-83551 behat: make duplicated scenario names unique 2024-11-13 06:50:47 +08:00
Paul Holden 5ec8651d54 MDL-83686 task: restore behaviour for custom report task name column.
The linked task name column was only required for the system report
and broke aggregation/grouping when used within a custom report, so
fix that.
2024-11-11 16:10:06 +00:00
Nexterday ff08b12ce1 MDL-74836 theme: Display activity header on secure layouts 2024-11-11 15:17:28 +00:00
Philipp Memmel 762681f5c4 MDL-82932 mod_data: Fix export with userdata of deleted users 2024-11-11 13:00:14 +01:00
Tim Hunt 4d40958181 MDL-83653 file manager: report ajax errors
This is for things like when you click on a file, and then click on
the delete button, and an error happens then. Previously that was
ignored.
2024-11-08 17:13:55 +00:00
Andrew Nicols c5846d06df MDL-83506 editor_tiny: Disable default iframe sandboxing 2024-11-08 22:37:05 +08:00
sam marshall 7f3f962c3f MDL-83670 availability_group: With hidden groups, can throw warning 2024-11-08 11:57:48 +00:00
ferran aab9e18b6d MDL-83661 core_courseformat: fix drop file modal
When the user drags and drops a file into a course section that can
create more than one type of activity (for example a zip file) the modal
had repeated form elements ids. Now every radio option has its own id.
2024-11-08 11:46:05 +01:00
Rossco Hellmans a3e629c7e8 MDL-66129 course_module: include lib.php before calling _refresh_events
Before checking for and calling the module _refresh_events function in
course_module_calendar_event_update_process, the module lib.php file
needs to be included if it has not been already.
2024-11-08 18:47:33 +10:00
Huong Nguyen cd5c991ede weekly release 4.5+ 2024-11-08 13:56:33 +07:00
Huong Nguyen 1c70185782 MDL-82335 qbank_columnsortorder: Fix upgrade code coding style 2024-11-08 09:03:21 +07:00
sam marshall cf431667e9 MDL-83584 report_log: Group filter can get list of all users in system 2024-11-07 09:39:15 +00:00
Huong Nguyen 598b4743cc MDL-82335 qbank_columnsortorder: Cleanup upgrade code 2024-11-07 13:37:37 +07:00
Huong Nguyen a35b341ce7 Merge branch 'MDL-83619-405' of https://github.com/lameze/moodle into MOODLE_405_STABLE 2024-11-07 11:05:27 +07:00
Huong Nguyen 66f4852bff Merge branch 'MDL-83611-405' of https://github.com/lameze/moodle into MOODLE_405_STABLE 2024-11-07 11:02:21 +07:00
Huong Nguyen aeace8ee75 Merge branch 'MDL-82335_405' of https://github.com/AnupamaSarjoshi/moodle into MOODLE_405_STABLE 2024-11-07 09:31:45 +07:00
Huong Nguyen 38f99a1e60 Merge branch 'MDL-83316-405' of https://github.com/lameze/moodle into MOODLE_405_STABLE 2024-11-07 09:26:50 +07:00
Simey Lameze 7547dec095 MDL-83316 behat: remove duplicated Then from new test 2024-11-07 07:46:02 +08:00
sam marshall d4564b876e MDL-83316 Behat: New step allows system clock change 2024-11-07 07:46:02 +08:00
Jun Pataleta 0f5cb9dbd5 Merge branch 'mdl-83497_405' of https://github.com/james-cnz/moodle into MOODLE_405_STABLE 2024-11-06 22:38:40 +08:00
Anupama Sarjoshi 1ecc215b3a MDL-82335 qbank_columnsortorder: Fix upgrading issue
When upgraded to Moodle 4.4 or higher, for qbank_columnsortorder
the colsize values in the config_plugins were getting incorrectly set,
resulting in errors accessing the question bank. Changes done to fix
this code and to remove the corrupted colsize value from
config_plugins table.
2024-11-06 13:17:58 +00:00
Jun Pataleta ecc8edd917 Merge branch 'MDL-76563-405' of https://github.com/roland04/moodle into MOODLE_405_STABLE 2024-11-06 17:29:29 +08:00
Simey Lameze 8bcec8ba5f MDL-80926 behat: fix random and improve h5p completion test 2024-11-06 13:36:58 +08:00
Jun Pataleta b26192f62f Merge branch 'MDL-83602-405' of https://github.com/ilyatregubov/moodle into MOODLE_405_STABLE 2024-11-06 13:30:44 +08:00
Simey Lameze 82c915dbc3 MDL-83611 behat: increase window size to avoid randoms 2024-11-05 13:21:23 +08:00
Simey Lameze 50ab3f94d5 MDL-83619 behat: enable bbb module early in the test 2024-11-05 10:23:24 +08:00
Paul Holden 5b282947d7 MDL-82877 customfield: pass correct instanceid for restore structure. 2024-11-04 15:32:09 +00:00
Paul Holden 24dc478086 MDL-83226 customfield: set backup/restore configuration defaults. 2024-11-04 15:29:11 +00:00
Laurent David 2562bbfd1b MDL-83185 core_courseformat: Refresh cache on group change
* When we add users to a group (or remove them), we should refresh
the course index cache so it stays in sync with what the user
can actually see.
2024-11-04 06:14:06 +01:00
ferran 1716e2f2cd MDL-83185 core_courseformat: Allow global state cache invalidation 2024-11-04 06:14:06 +01:00
Huong Nguyen acff633e39 weekly release 4.5+ 2024-11-01 14:29:15 +07:00
Huong Nguyen 65ceca6092 NOBUG: Add upgrade notes 2024-11-01 14:29:15 +07:00
Huong Nguyen c21b1143a4 Merge branch 'install_405_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_405_STABLE 2024-11-01 14:29:01 +07:00
Tim Hunt 0cd7aaebcd MDL-80689 filepicker: better reporting of incorrect file type
Before this change, file type errors were reported like system errors. Now,
they are reported in a plain dialoue, which is more like how it works for
drag-drop upload.

Also, before this, after an upload errors, you were left with a blank
filepicker dialogue. Now, the upload form is redisplayed.
2024-10-31 11:38:28 +00:00
Tim Hunt 2e8b980985 MDL-80689 behat: add a transformation to get dirroot 2024-10-31 11:38:27 +00:00
Tim Hunt 01aa6fa7d2 MDL-80689 form behat: move fixture file to the expected place 2024-10-31 11:38:27 +00:00
Ilya Tregubov 6290196cde MDL-83602 customfield_number: Add help text for fieldtype. 2024-10-31 16:17:49 +08:00
Huong Nguyen ffa8c930f0 Merge branch 'MDL-82911-405-fix' of https://github.com/lameze/moodle into MOODLE_405_STABLE 2024-10-31 14:14:28 +07:00
Simey Lameze 8679f4afdf MDL-82911 behat: change future times example to minutes 2024-10-31 14:15:41 +08:00
Huong Nguyen 1afeadb4f4 Merge branch 'MDL-82911-405' of https://github.com/andelacruz/moodle into MOODLE_405_STABLE 2024-10-31 11:22:27 +07:00
Huong Nguyen 3fc2111a4b Merge branch 'MDL-83414-405' of https://github.com/lameze/moodle into MOODLE_405_STABLE 2024-10-31 11:22:27 +07:00
Huong Nguyen d731f7e01e Merge branch 'MDL-83514-405' of https://github.com/marinaglancy/moodle into MOODLE_405_STABLE 2024-10-31 11:22:27 +07:00
Huong Nguyen 49fbe6d614 Merge branch 'MDL-82989-405' of https://github.com/meirzamoodle/moodle into MOODLE_405_STABLE 2024-10-31 11:22:26 +07:00
Jun Pataleta 9ece615f6c Merge branch 'MDL-82809-405' of https://github.com/paulholden/moodle into MOODLE_405_STABLE 2024-10-31 11:22:26 +07:00
Huong Nguyen 42052386d1 Merge branch 'MDL-82988-405' of https://github.com/meirzamoodle/moodle into MOODLE_405_STABLE 2024-10-31 11:22:26 +07:00
Angelia Dela Cruz 0d02ded10f MDL-83414 core_grades: Behat to test custom scale display 2024-10-31 09:46:29 +08:00
Marina Glancy aaf5c3f8b7 MDL-83514 customfield_number: add missing event observers 2024-10-29 19:44:12 +00:00
Angelia Dela Cruz 11c941f404 MDL-82911 mod_bigbluebuttonbn: Behat for BBB open and close date time 2024-10-29 11:45:51 +08:00
AMOS bot 87d0aae1fb Automatically generated installer lang files 2024-10-29 00:07:54 +00:00
meirzamoodle 3e0c2a45fb MDL-82989 communication_matrix: Apply helper to mock http_client 2024-10-27 15:56:39 +07:00
meirzamoodle a3b84f77c7 MDL-82988 general: Apply helper to get path to fixture 2024-10-27 15:38:50 +07:00
Huong Nguyen 149a477903 weekly release 4.5+ 2024-10-25 08:35:54 +07:00
Huong Nguyen 47cd445f67 NOBUG: Add upgrade notes 2024-10-25 08:35:53 +07:00
Huong Nguyen 5524686f71 Merge branch 'install_405_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_405_STABLE 2024-10-25 08:35:39 +07:00
Mikel Martín 20d4962c33 MDL-76563 theme: Change SCSS variable value
Change the value of the $pink SCSS colour variable so it is
colour contrast accessible on white backgrounds.
2024-10-24 13:27:49 +02:00
Jun Pataleta 1b93c2781e Merge branch 'MDL-82548-main' of https://github.com/roland04/moodle into MOODLE_405_STABLE 2024-10-24 12:18:34 +08:00
Jun Pataleta 39658c5b3a Merge branch 'MDL-83423-405' of https://github.com/snake/moodle into MOODLE_405_STABLE 2024-10-24 12:13:23 +08:00
Huong Nguyen e271f67942 Merge branch 'MDL-83432-405' of https://github.com/paulholden/moodle into MOODLE_405_STABLE 2024-10-24 10:13:12 +07:00
Huong Nguyen 1aef5337bd Merge branch 'MDL-83504-405' of https://github.com/marinaglancy/moodle into MOODLE_405_STABLE 2024-10-24 09:44:51 +07:00
AMOS bot 3ef3a9b1bc Automatically generated installer lang files 2024-10-24 00:08:18 +00:00
Jun Pataleta 80c7a3a847 Merge branch 'MDL-81308-405' of https://github.com/junpataleta/moodle into MOODLE_405_STABLE 2024-10-23 18:15:24 +08:00
Jun Pataleta c5b16d9afb Merge branch 'MDL-83430-405' of https://github.com/marinaglancy/moodle into MOODLE_405_STABLE 2024-10-23 16:09:37 +08:00
Jun Pataleta 4fb2a4dd60 Merge branch 'MDL-83463-405' of https://github.com/paulholden/moodle into MOODLE_405_STABLE 2024-10-23 14:35:35 +08:00
Andrew Nicols 5ab2997d89 MDL-81308 core: Use a helper for consecutive invocation counts 2024-10-23 14:19:26 +08:00
Andrew Nicols 16efbcaa01 MDL-81308 core: Update tests to not use withConsecutive 2024-10-23 14:19:25 +08:00
Jun Pataleta 3f020e662d Merge branch 'MDL-83376-405' of https://github.com/meirzamoodle/moodle into MOODLE_405_STABLE 2024-10-22 17:18:31 +08:00
Jun Pataleta ef01def984 Merge branch 'MDL-83472-405' of https://github.com/paulholden/moodle into MOODLE_405_STABLE 2024-10-22 15:55:54 +08:00
Marina Glancy ce1ef8bda0 MDL-83504 user: reset preference cache in unittests 2024-10-21 17:59:08 +01:00
ferran 8adf0918ce MDL-83502 course: fix chrome file dropping in course page 2024-10-21 11:48:36 +02:00
rajandangi 86e830eac4 MDL-83501 core: URL encode paths for Nginx X-Accel-Redirect 2024-10-21 19:37:45 +10:30
meirzamoodle 60fb2c1232 MDL-83376 AI: Add is_request_allowed() to the base provider 2024-10-21 13:32:12 +07:00
James C 605a610702 MDL-83497 course: Preserve move section dialogue info HTML 2024-10-19 16:21:46 +13:00
Paul Holden 55e6c1b588 MDL-83432 enrol: fix arguments to enrolment test generator. 2024-10-18 15:12:44 +01:00
Paul Holden e792dbbe0b MDL-83432 enrol_manual: reference correct role in welcome message. 2024-10-18 15:12:44 +01:00
Shamim Rezaie 09880d7d78 weekly release 4.5+ 2024-10-18 23:28:49 +11:00
Shamim Rezaie 426e34af13 Merge branch 'install_405_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_405_STABLE 2024-10-18 23:28:37 +11:00
Jun Pataleta 161d14cd92 Merge branch 'MDL-83457-405' of https://github.com/roland04/moodle into MOODLE_405_STABLE 2024-10-17 12:23:19 +08:00
Jun Pataleta 204da574bd Merge branch 'MDL-83443-405' of https://github.com/paulholden/moodle into MOODLE_405_STABLE 2024-10-17 12:17:33 +08:00
Jun Pataleta a7f0f4af47 Merge branch 'MDL-83442-405' of https://github.com/davewoloszyn/moodle into MOODLE_405_STABLE 2024-10-17 12:13:29 +08:00
Jun Pataleta cec04e64a1 Merge branch 'MDL-83367-405' of https://github.com/dravek/moodle into MOODLE_405_STABLE 2024-10-17 12:08:48 +08:00
Jun Pataleta 371c836be1 Merge branch 'MDL-81450-MOODLE_405_STABLE' of https://github.com/PhMemmel/moodle into MOODLE_405_STABLE 2024-10-17 12:05:06 +08:00
Huong Nguyen 97f35300f7 Merge branch 'MDL-82580-405' of https://github.com/paulholden/moodle into MOODLE_405_STABLE 2024-10-17 10:49:15 +07:00
Jun Pataleta 2870ea8556 Merge branch 'MDL-83143-405' of https://github.com/safatshahin/moodle into MOODLE_405_STABLE 2024-10-17 11:47:11 +08:00
Jun Pataleta 1c2e8c3abb Merge branch 'MDL-82838-main' of https://github.com/justusdieckmann/moodle into MOODLE_405_STABLE 2024-10-17 10:55:17 +08:00
Huong Nguyen 125ff0d462 Merge branch 'MDL-75724-405_toolbrickfield_tableheadercheck' of https://github.com/brickfield/moodle into MOODLE_405_STABLE 2024-10-17 09:44:24 +07:00
Jun Pataleta 23bde28300 Merge branch 'MDL-83002' of https://github.com/marinaglancy/moodle into MOODLE_405_STABLE 2024-10-16 20:33:38 +08:00
Paul Holden f5aa88ec02 MDL-83472 phpunit: add void return type to test methods.
See also 01148a0816 from MDL-81522.
2024-10-16 13:03:50 +01:00
Paul Holden 9f9fa01a91 MDL-83472 phpunit: call parent setUp unit test method.
See also 674497a12c from MDL-81523.
2024-10-16 13:03:21 +01:00
Paul Holden 5bf6da6331 MDL-82809 reportbuilder: always apply conditions to custom report.
Including those that are otherwise unavailable to the current user,
ensuring that they are always applied when viewing report output.
2024-10-16 10:51:42 +01:00
Philipp Memmel 69751fcd69 MDL-81450 mod_forum: Reduce size of file icon in HTML mails
@Co-authored-by: Mateusz Walczak
2024-10-16 11:32:45 +02:00
Paul Holden 5c969d2370 MDL-82475 reportbuilder: account for duplicate profile field names.
Long-term, it would be better to not allow this scenario to happen
at all but until then we'll have to work around it (see MDL-73461).
2024-10-16 09:33:16 +01:00
Paul Holden 7c959f479b MDL-82809 reportbuilder: load custom/profile fields consistently.
Ensure that provided columns and filters for each use appropriate
checks to determine their availability (based on user permissions,
etc), rather than conditionally adding them to the entity.
2024-10-16 08:51:00 +01:00
David Woloszyn d43cec5bb3 MDL-83442 aiprovider_azureai: Correct help string URL 2024-10-16 17:55:09 +11:00
Huong Nguyen a47729dc17 Merge branch 'MDL-83390-405' of https://github.com/roland04/moodle into MOODLE_405_STABLE 2024-10-16 11:09:57 +07:00
Huong Nguyen 8ffd4c4bb1 Merge branch 'MDL-82793-MOODLE_405_STABLE' of https://github.com/phmemmel/moodle into MOODLE_405_STABLE 2024-10-16 09:26:36 +07:00
Philipp Memmel a3ab626df1 MDL-82793 core: Make modal execute JS from template
Co-authored-by: Huong Nguyen <huongnv13@gmail.com>
2024-10-15 20:52:23 +02:00
Paul Holden fd103caa83 MDL-83463 backup: ensure defaults for course file inclusion are read. 2024-10-15 12:27:07 +01:00
Jun Pataleta 12d87a9b65 Merge branch 'MDL-83070_405' of https://github.com/timhunt/moodle into MOODLE_405_STABLE 2024-10-15 19:09:10 +08:00
david adamson cd54f46df1 MDL-82429 tool_brickfield: Process calculated fontsizes 2024-10-15 16:25:54 +07:00
Mikel Martín 49e66dfc5d MDL-83457 mod_feedback: Fix get_incomplete_users early return type
Fix 'feedback_get_incomplete_users' early return when there are no users with
the 'mod/feedback:complete' capability from 'false' to an empty array. That
will follow the function signature.
2024-10-15 09:51:23 +02:00
Mikel Martín c36c98448d MDL-83390 message: Fix category collapse icon
- Replace incorrect 't/collapsedcaret' with 't/collapsed' icon
- Add RTL icon for accessibility
2024-10-15 09:24:11 +02:00
Jun Pataleta 5e7d431426 Merge branch 'MDL-83253-main' of https://github.com/andrewnicols/moodle into MOODLE_405_STABLE 2024-10-15 11:45:43 +08:00
Andrew Nicols 3b4b95d431 MDL-83257 editor_tiny: Disable Alt+F12 keyboard shortcut
This was introduced in Tiny 7.1 to focus notifications, but it conflicts
with the German keyboard layout which uses Alt+F12 to access the open
curly brace.

This is an upstream problem with TinyMCE and should be fixed in a future
release.

The recommended workaround is to disable the shortcut.
2024-10-15 10:33:23 +08:00
Jake Dallimore 42079bb48d MDL-83423 mod_lti: fix JWK decoding when multiple keys missing alg
Related to MDL-77077, but was a case missed there. Now, any unusable
keys (i.e. can't be used during the JWT decode), are dropped from the
keyset if they don't have the 'alg' prop, preventing a 'missing alg'
exception during keyset parsing. Since these cannot be used during
decode, these aren't needed anyway.
2024-10-15 09:11:21 +08:00
AMOS bot c294a22dae Automatically generated installer lang files 2024-10-15 00:09:36 +00:00
Michael Pound bde5487a56 MDL-75724 tool_brickfield: Ensuring correct table headers pass checks. 2024-10-14 16:55:07 +00:00
Marina Glancy c0b2343245 MDL-83430 customfield_number: call display method from provider earlier 2024-10-14 11:39:56 +01:00
Marina Glancy ae500b5728 MDL-83430 customfield_number: fix storing activities number when 0 2024-10-14 11:39:51 +01:00
Huong Nguyen b311baf0bd Merge branch 'MDL-83381-405' of https://github.com/davewoloszyn/moodle into MOODLE_405_STABLE 2024-10-14 11:08:59 +07:00
AMOS bot d1c223071a Automatically generated installer lang files 2024-10-13 00:07:55 +00:00
Paul Holden 14f9c08355 MDL-83443 enrol: use defined role name in welcome message. 2024-10-11 14:35:22 +01:00
Jake Dallimore 9ec7e01527 weekly release 4.5+ 2024-10-11 10:55:02 +08:00
Jake Dallimore ce20b2f255 Merge branch 'install_405_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_405_STABLE 2024-10-11 10:54:54 +08:00
Safat 85bd222b2f MDL-83143 core_communication: Behat coverage for default to course name 2024-10-11 11:02:19 +11:00
Safat cf3d932d74 MDL-83143 core_course: Add course name as default for empty room name 2024-10-11 11:02:19 +11:00
Safat 0b47dfec7c MDL-83143: core_communication: Fix variable name typos 2024-10-11 11:02:19 +11:00
Jun Pataleta 8036733091 Merge branch 'MDL-82813-405' of https://github.com/paulholden/moodle into MOODLE_405_STABLE 2024-10-10 12:04:10 +08:00
vietlx426 a74e15c66b MDL-82570 themes: Help boxes not accessible if selected consecutively 2024-10-10 10:52:33 +07:00
Tobias Garske b7e1d77184 MDL-83255 core_course: Fix activitychooser recommended tab navigation 2024-10-10 10:12:28 +07:00
Jun Pataleta 5379d34827 Merge branch 'MDL-82912-405' of https://github.com/andelacruz/moodle into MOODLE_405_STABLE 2024-10-10 10:35:02 +08:00
Jun Pataleta 50e813478a Merge branch 'MDL-82812_405_toolbrickfieldfaicons' of https://github.com/brickfield/moodle into MOODLE_405_STABLE 2024-10-10 10:13:40 +08:00
Mikel Martín 4f699801b9 MDL-83283 mod_subsection: Fix subsection completion button margin 2024-10-10 09:08:16 +07:00
David Woloszyn 7beb6d7e82 MDL-83381 AI: Fix OpenAI provider config 2024-10-10 11:53:55 +11:00
Angelia Dela Cruz 1f1406d68c MDL-82912 mod_workshop: Behat to view assessment after workshop close 2024-10-09 16:26:56 +08:00
Huong Nguyen 17924add45 Merge branch 'MDL-83331_405' of https://github.com/timhunt/moodle into MOODLE_405_STABLE 2024-10-09 14:47:00 +07:00
AMOS bot 56293e0de4 Automatically generated installer lang files 2024-10-09 00:09:26 +00:00
Max Larkin 653c0937c6 MDL-82812 tool_brickfield: Ignore fa icons 2024-10-08 13:04:26 +01:00
Bas Brands 9fcb0eca01 MDL-70180 theme_boost: Allow form autoselect modal overflow
Co-authored-by: Mikel Martín <mikel@moodle.com>
2024-10-08 09:36:11 +07:00
AMOS bot ff87bb5101 Automatically generated installer lang files 2024-10-08 00:07:49 +00:00
Paul Holden a271d9efc9 MDL-82580 report_log: preserve filter by individual user. 2024-10-07 20:15:35 +01:00
Paul Holden 3e18e85dce MDL-82813 group: correctly format group description property. 2024-10-07 17:58:34 +01:00
Tim Hunt 92fdfe834f MDL-83331 behat: enable navigation direct to mod/.../index.php 2024-10-07 12:05:09 +01:00
Tim Hunt f7c18e4e4b MDL-83070 question restore: recode links in hints 2024-10-07 11:54:20 +01:00
David Carrillo 2698647bcd MDL-83367 tasks: Apply trim() to pathtophp setting
- It fixes the problem that when "pathtophp" setting is stored with
whitespaces, the "Run now" button will still show up in the tasks list,
but the task will never run
2024-10-07 08:18:13 +02:00
Jun Pataleta 803c3d8977 MDL-83374 upgrade: add the 4.5.0 separation line to all upgrade scripts 2024-10-07 09:34:51 +07:00
8015 changed files with 388323 additions and 293314 deletions
+1
View File
@@ -1,5 +1,6 @@
**/yui/build/** -diff
**/amd/build/** -diff
lib/dml/oci_native_moodle_package.sql text eol=lf
**.js.map -diff
**-min.js -diff
**.min.js -diff
+1 -1
View File
@@ -45,7 +45,7 @@ $CFG->admin = 'admin';
$CFG->directorypermissions = 0777;
// Debug options - possible to be controlled by flag in future.
$CFG->debug = (E_ALL); // DEBUG_DEVELOPER.
$CFG->debug = (E_ALL | E_STRICT); // DEBUG_DEVELOPER.
$CFG->debugdisplay = 1;
$CFG->debugstringids = 1; // Add strings=1 to url to get string ids.
$CFG->perfdebug = 15;
+2 -2
View File
@@ -85,7 +85,7 @@ jobs:
- name: Setting up DB pgsql
uses: m4nu56/postgresql-action@v1
with:
postgresql version: 14
postgresql version: 13
postgresql db: test
postgresql user: test
postgresql password: test
@@ -93,7 +93,7 @@ jobs:
- name: Setting up PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.4
php-version: 8.3
ini-values: max_input_vars=5000
coverage: none
+5 -5
View File
@@ -15,7 +15,7 @@ on:
default: ''
env:
php: 8.4
php: 8.3
jobs:
Grunt:
@@ -62,12 +62,12 @@ jobs:
include:
# MySQL builds always run with the lowest PHP supported version.
- os: ubuntu-22.04
php: 8.2
php: 8.1
extensions:
db: mysqli
# PostgreSQL builds always run with the highest PHP supported version.
- os: ubuntu-22.04
php: 8.4
php: 8.3
db: pgsql
steps:
@@ -76,7 +76,7 @@ jobs:
uses: moodlehq/mysql-action@v1
with:
collation server: utf8mb4_bin
mysql version: 8.4
mysql version: 8.0
mysql database: test
mysql user: test
mysql password: test
@@ -88,7 +88,7 @@ jobs:
if: ${{ matrix.db == 'pgsql' }}
uses: m4nu56/postgresql-action@v1
with:
postgresql version: 14
postgresql version: 13
postgresql db: test
postgresql user: test
postgresql password: test
+1 -1
View File
@@ -10,7 +10,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
php: [8.2, 8.4]
php: [8.1, 8.3]
steps:
- name: Construct repository URL
run: echo "REPOSITORY_URL=${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}" >> $GITHUB_ENV
+5 -5
View File
@@ -8,7 +8,7 @@ on:
required: false
default: ''
env:
php: 8.4
php: 8.3
jobs:
Grunt:
@@ -51,7 +51,7 @@ jobs:
matrix:
include:
- os: windows-latest
php: 8.4
php: 8.3
# Ideally we should use mysql/mariadb, but they are 4x slower without tweaks and configuration
# so let's run only postgres (1.5h vs 6h) only, If some day we want to improve the mysql runs,
# this is the place to enable them.
@@ -59,16 +59,16 @@ jobs:
db: pgsql
extensions: exif, fileinfo, gd, intl, pgsql, mysql, redis, soap, sodium, zip
- os: windows-latest
php: 8.2
php: 8.1
db: pgsql
extensions: exif, fileinfo, gd, intl, pgsql, mysql, redis, soap, sodium, zip
extensions: exif, fileinfo, gd, intl, pgsql, mysql, redis, soap, sodium
steps:
- name: Setting up DB mysql
if: ${{ matrix.db == 'mysqli' }}
uses: shogo82148/actions-setup-mysql@v1
with:
mysql-version: 8.4
mysql-version: 8.0
user: test
password: test
-1
View File
@@ -59,4 +59,3 @@ moodle-plugin-ci.phar
phpcs.xml
jsconfig.json
UPGRADING-CURRENT.md
.phpunit.cache
+9 -22
View File
@@ -69,17 +69,6 @@ const fetchComponentData = () => {
// The list of components includes the list of subsystems.
componentData.components = {...componentData.subsystems};
const subpluginAdder = (subpluginType, subpluginTypePath) => {
glob.sync(`${subpluginTypePath}/*/version.php`).forEach(versionPath => {
const componentPath = fs.realpathSync(path.dirname(versionPath));
const componentName = path.basename(componentPath);
const frankenstyleName = `${subpluginType}_${componentName}`;
componentData.components[`${subpluginTypePath}/${componentName}`] = frankenstyleName;
componentData.pathList.push(componentPath);
});
};
// Go through each of the plugintypes.
Object.entries(components.plugintypes).forEach(([pluginType, pluginTypePath]) => {
// We don't allow any code in this place..?
@@ -95,18 +84,16 @@ const fetchComponentData = () => {
if (fs.existsSync(subPluginConfigurationFile)) {
const subpluginList = JSON.parse(fs.readFileSync(fs.realpathSync(subPluginConfigurationFile)));
if (subpluginList.subplugintypes) {
Object.entries(subpluginList.subplugintypes).forEach(([subpluginType, subpluginTypePath]) => {
subpluginAdder(
subpluginType,
`${pluginTypePath}/${componentName}/${subpluginTypePath}`
);
Object.entries(subpluginList.plugintypes).forEach(([subpluginType, subpluginTypePath]) => {
glob.sync(`${subpluginTypePath}/*/version.php`).forEach(versionPath => {
const componentPath = fs.realpathSync(path.dirname(versionPath));
const componentName = path.basename(componentPath);
const frankenstyleName = `${subpluginType}_${componentName}`;
componentData.components[`${subpluginTypePath}/${componentName}`] = frankenstyleName;
componentData.pathList.push(componentPath);
});
} else if (subpluginList.plugintypes) {
Object.entries(subpluginList.plugintypes).forEach(([subpluginType, subpluginTypePath]) => {
subpluginAdder(subpluginType, subpluginTypePath);
});
}
});
}
});
});
+60 -1222
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -7,6 +7,6 @@ define("core_admin/expand_hash",["exports"],(function(_exports){Object.definePro
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @since 4.5
*/
const SELECTORS_COLLAPSE_ELEMENTS='[data-bs-toggle="collapse"]',SELECTORS_FOCUSTHENEXPAND_ELEMENTS=".focus-expand";_exports.init=()=>{const focusexpand=document.querySelector(SELECTORS_FOCUSTHENEXPAND_ELEMENTS);null==focusexpand||focusexpand.addEventListener("click",(()=>{expandSection("".concat(focusexpand.getAttribute("href")))}))};const expandSection=hash=>{const container=document.querySelector(hash),targetContainer=null==container?void 0:container.querySelector(SELECTORS_COLLAPSE_ELEMENTS);if("false"===(null==targetContainer?void 0:targetContainer.getAttribute("aria-expanded"))){const collapseId=targetContainer.getAttribute("aria-controls"),collapseContainer=document.getElementById(collapseId);collapseContainer.classList.remove("collapse"),collapseContainer.classList.add("show"),targetContainer.setAttribute("aria-expanded","true"),targetContainer.classList.remove("collapsed");const collapseElement=document.querySelector(".collapseexpand.collapsemenu");collapseElement.setAttribute("aria-expanded","true"),collapseElement.classList.remove("collapsed")}};_exports.expandSection=expandSection}));
const SELECTORS_COLLAPSE_ELEMENTS='[data-toggle="collapse"]',SELECTORS_FOCUSTHENEXPAND_ELEMENTS=".focus-expand";_exports.init=()=>{const focusexpand=document.querySelector(SELECTORS_FOCUSTHENEXPAND_ELEMENTS);null==focusexpand||focusexpand.addEventListener("click",(()=>{expandSection("".concat(focusexpand.getAttribute("href")))}))};const expandSection=hash=>{const container=document.querySelector(hash),targetContainer=null==container?void 0:container.querySelector(SELECTORS_COLLAPSE_ELEMENTS);if("false"===(null==targetContainer?void 0:targetContainer.getAttribute("aria-expanded"))){const collapseId=targetContainer.getAttribute("aria-controls"),collapseContainer=document.getElementById(collapseId);collapseContainer.classList.remove("collapse"),collapseContainer.classList.add("show"),targetContainer.setAttribute("aria-expanded","true"),targetContainer.classList.remove("collapsed");const collapseElement=document.querySelector(".collapseexpand.collapsemenu");collapseElement.setAttribute("aria-expanded","true"),collapseElement.classList.remove("collapsed")}};_exports.expandSection=expandSection}));
//# sourceMappingURL=expand_hash.min.js.map
+1 -1
View File
@@ -1 +1 @@
{"version":3,"file":"expand_hash.min.js","sources":["../src/expand_hash.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 * Expand the collapse section element.\n *\n * @module core_admin/expand_hash\n * @copyright Meirza <meirza.arson@moodle.com>\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n * @since 4.5\n */\n\nconst SELECTORS = {\n COLLAPSE_ELEMENTS: '[data-bs-toggle=\"collapse\"]',\n FOCUSTHENEXPAND_ELEMENTS: '.focus-expand',\n};\n\n/**\n * Initializes the focus and expand functionality.\n */\nexport const init = () => {\n // Select all collapsible elements only.\n const focusexpand = document.querySelector(SELECTORS.FOCUSTHENEXPAND_ELEMENTS);\n\n // Add click event listener to the anchor element\n focusexpand?.addEventListener('click', () => {\n expandSection(`${focusexpand.getAttribute('href')}`);\n });\n};\n\n/**\n * Expands a section based on the provided URL hash.\n *\n * This function takes a hash string, finds the corresponding element in the DOM,\n * and expands it if it is currently collapsed. It updates the necessary ARIA\n * attributes and classes to reflect the expanded state.\n *\n * @param {string} hash - The hash (e.g., '#elementId') of the element to expand.\n */\nexport const expandSection = (hash) => {\n const container = document.querySelector(hash);\n const targetContainer = container?.querySelector(SELECTORS.COLLAPSE_ELEMENTS);\n\n if (targetContainer?.getAttribute('aria-expanded') === 'false') {\n const collapseId = targetContainer.getAttribute('aria-controls');\n const collapseContainer = document.getElementById(collapseId);\n\n // Show the content.\n collapseContainer.classList.remove('collapse');\n collapseContainer.classList.add('show');\n\n // Update aria-expanded attribute to reflect the new state.\n targetContainer.setAttribute('aria-expanded', 'true');\n targetContainer.classList.remove('collapsed');\n\n // Get collapse expand menu element.\n const collapseElement = document.querySelector('.collapseexpand.collapsemenu');\n // Ensure it gets noticed to make it work.\n collapseElement.setAttribute('aria-expanded', 'true');\n collapseElement.classList.remove('collapsed');\n }\n};\n"],"names":["SELECTORS","focusexpand","document","querySelector","addEventListener","expandSection","getAttribute","hash","container","targetContainer","collapseId","collapseContainer","getElementById","classList","remove","add","setAttribute","collapseElement"],"mappings":";;;;;;;;;MAwBMA,4BACiB,8BADjBA,mCAEwB,8BAMV,WAEVC,YAAcC,SAASC,cAAcH,oCAG3CC,MAAAA,aAAAA,YAAaG,iBAAiB,SAAS,KACnCC,wBAAiBJ,YAAYK,aAAa,oBAarCD,cAAiBE,aACpBC,UAAYN,SAASC,cAAcI,MACnCE,gBAAkBD,MAAAA,iBAAAA,UAAWL,cAAcH,gCAEM,WAAnDS,MAAAA,uBAAAA,gBAAiBH,aAAa,kBAA8B,OACtDI,WAAaD,gBAAgBH,aAAa,iBAC1CK,kBAAoBT,SAASU,eAAeF,YAGlDC,kBAAkBE,UAAUC,OAAO,YACnCH,kBAAkBE,UAAUE,IAAI,QAGhCN,gBAAgBO,aAAa,gBAAiB,QAC9CP,gBAAgBI,UAAUC,OAAO,mBAG3BG,gBAAkBf,SAASC,cAAc,gCAE/Cc,gBAAgBD,aAAa,gBAAiB,QAC9CC,gBAAgBJ,UAAUC,OAAO"}
{"version":3,"file":"expand_hash.min.js","sources":["../src/expand_hash.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 * Expand the collapse section element.\n *\n * @module core_admin/expand_hash\n * @copyright Meirza <meirza.arson@moodle.com>\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n * @since 4.5\n */\n\nconst SELECTORS = {\n COLLAPSE_ELEMENTS: '[data-toggle=\"collapse\"]',\n FOCUSTHENEXPAND_ELEMENTS: '.focus-expand',\n};\n\n/**\n * Initializes the focus and expand functionality.\n */\nexport const init = () => {\n // Select all collapsible elements only.\n const focusexpand = document.querySelector(SELECTORS.FOCUSTHENEXPAND_ELEMENTS);\n\n // Add click event listener to the anchor element\n focusexpand?.addEventListener('click', () => {\n expandSection(`${focusexpand.getAttribute('href')}`);\n });\n};\n\n/**\n * Expands a section based on the provided URL hash.\n *\n * This function takes a hash string, finds the corresponding element in the DOM,\n * and expands it if it is currently collapsed. It updates the necessary ARIA\n * attributes and classes to reflect the expanded state.\n *\n * @param {string} hash - The hash (e.g., '#elementId') of the element to expand.\n */\nexport const expandSection = (hash) => {\n const container = document.querySelector(hash);\n const targetContainer = container?.querySelector(SELECTORS.COLLAPSE_ELEMENTS);\n\n if (targetContainer?.getAttribute('aria-expanded') === 'false') {\n const collapseId = targetContainer.getAttribute('aria-controls');\n const collapseContainer = document.getElementById(collapseId);\n\n // Show the content.\n collapseContainer.classList.remove('collapse');\n collapseContainer.classList.add('show');\n\n // Update aria-expanded attribute to reflect the new state.\n targetContainer.setAttribute('aria-expanded', 'true');\n targetContainer.classList.remove('collapsed');\n\n // Get collapse expand menu element.\n const collapseElement = document.querySelector('.collapseexpand.collapsemenu');\n // Ensure it gets noticed to make it work.\n collapseElement.setAttribute('aria-expanded', 'true');\n collapseElement.classList.remove('collapsed');\n }\n};\n"],"names":["SELECTORS","focusexpand","document","querySelector","addEventListener","expandSection","getAttribute","hash","container","targetContainer","collapseId","collapseContainer","getElementById","classList","remove","add","setAttribute","collapseElement"],"mappings":";;;;;;;;;MAwBMA,4BACiB,2BADjBA,mCAEwB,8BAMV,WAEVC,YAAcC,SAASC,cAAcH,oCAG3CC,MAAAA,aAAAA,YAAaG,iBAAiB,SAAS,KACnCC,wBAAiBJ,YAAYK,aAAa,oBAarCD,cAAiBE,aACpBC,UAAYN,SAASC,cAAcI,MACnCE,gBAAkBD,MAAAA,iBAAAA,UAAWL,cAAcH,gCAEM,WAAnDS,MAAAA,uBAAAA,gBAAiBH,aAAa,kBAA8B,OACtDI,WAAaD,gBAAgBH,aAAa,iBAC1CK,kBAAoBT,SAASU,eAAeF,YAGlDC,kBAAkBE,UAAUC,OAAO,YACnCH,kBAAkBE,UAAUE,IAAI,QAGhCN,gBAAgBO,aAAa,gBAAiB,QAC9CP,gBAAgBI,UAAUC,OAAO,mBAG3BG,gBAAkBf,SAASC,cAAc,gCAE/Cc,gBAAgBD,aAAa,gBAAiB,QAC9CC,gBAAgBJ,UAAUC,OAAO"}
+1 -1
View File
@@ -23,7 +23,7 @@
*/
const SELECTORS = {
COLLAPSE_ELEMENTS: '[data-bs-toggle="collapse"]',
COLLAPSE_ELEMENTS: '[data-toggle="collapse"]',
FOCUSTHENEXPAND_ELEMENTS: '.focus-expand',
};
-4
View File
@@ -118,10 +118,6 @@ 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,73 +0,0 @@
<?php
// This file is part of Moodle - http://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 <http://www.gnu.org/licenses/>.
namespace core_admin\admin;
use admin_setting;
/**
* Render a template as part of other admin settings.
* Use for rendering additional html in settings.
*
* @package core_admin
* @subpackage admin
* @copyright 2024 Matt Porritt <matt.porritt@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class admin_setting_template_render extends admin_setting {
/**
* Constructor.
*
* @param string $name The name of the setting.
* @param string $templatename The name of the template to render.
* @param array|\stdClass $context The context to pass to the template.
*/
public function __construct(
string $name,
/** @var string The name of the template to render. */
protected string $templatename,
/** @var array|\stdClass The context to pass to the template. */
protected array|\stdClass $context
) {
$this->nosave = true;
parent::__construct($name, $templatename, '', '');
}
#[\Override]
public function get_setting(): bool {
return true;
}
#[\Override]
public function get_defaultsetting(): bool {
return true;
}
#[\Override]
// phpcs:disable VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
public function write_setting($data): string {
// Do not write any setting.
return '';
}
#[\Override]
public function output_html($data, $query = ''): string {
global $OUTPUT;
return $OUTPUT->render_from_template($this->templatename, $this->context);
}
}
-1
View File
@@ -48,7 +48,6 @@ class purge_caches extends \moodleform {
$mform->addElement('header', 'purgecacheheader', get_string('purgeselectedcaches', 'admin'));
$checkboxes = [
$mform->createElement('advcheckbox', 'theme', '', get_string('purgethemecache', 'admin')),
$mform->createElement('advcheckbox', 'courses', '', get_string('purgecoursecache', 'admin')),
$mform->createElement('advcheckbox', 'lang', '', get_string('purgelangcache', 'admin')),
$mform->createElement('advcheckbox', 'js', '', get_string('purgejscache', 'admin')),
$mform->createElement('advcheckbox', 'template', '', get_string('purgetemplates', 'admin')),
@@ -271,6 +271,8 @@ class task_log extends base {
* @return filter[]
*/
protected function get_all_filters(): array {
global $DB;
$tablealias = $this->get_table_alias('task_log');
// Name filter (Filter by classname).
@@ -328,7 +330,7 @@ class task_log extends base {
'output',
new lang_string('task_logoutput', 'admin'),
$this->get_entity_name(),
"{$tablealias}.output"
$DB->sql_cast_to_char("{$tablealias}.output")
))
->add_joins($this->get_joins());
@@ -159,11 +159,11 @@ class users extends system_report {
->add_callback(static function(string $fullname, \stdClass $row): string {
if ($row->suspended) {
$fullname .= ' ' . \html_writer::tag('span', get_string('suspended', 'moodle'),
['class' => 'badge text-bg-secondary ms-1']);
['class' => 'badge badge-secondary ms-1']);
}
if (!$row->confirmed) {
$fullname .= ' ' . \html_writer::tag('span', get_string('confirmationpending', 'admin'),
['class' => 'badge text-bg-danger ms-1']);
['class' => 'badge badge-danger ms-1']);
}
return $fullname;
});
+1 -1
View File
@@ -232,7 +232,7 @@ class hook_list_table extends flexible_table {
}
if ($tooltip) {
$attributes['data-bs-toggle'] = 'tooltip';
$attributes['data-toggle'] = 'tooltip';
$attributes['title'] = $tooltip;
}
return html_writer::span($tag, "badge badge-{$type}", $attributes);
@@ -322,7 +322,7 @@ abstract class plugin_management_table extends flexible_table implements dynamic
],
'title' => $labelstr,
'label' => $labelstr,
'labelclasses' => 'visually-hidden',
'labelclasses' => 'sr-only',
];
return $OUTPUT->render_from_template('core_admin/setting_configtoggle', $params);
+1 -1
View File
@@ -71,7 +71,7 @@ Example:
exit(0);
}
error_reporting(E_ALL);
error_reporting(E_ALL | E_STRICT);
ini_set('display_errors', 1);
$content = core_component::get_cache_content();
+3 -2
View File
@@ -30,7 +30,6 @@
*/
define('CLI_SCRIPT', true);
define('NO_DEBUG_DISPLAY', false);
// extra execution prevention - we can not just require config.php here
if (isset($_SERVER['REMOTE_ADDR'])) {
@@ -166,7 +165,7 @@ $CFG->running_installer = true;
$CFG->early_install_lang = true;
$CFG->ostype = (stristr(PHP_OS, 'win') && !stristr(PHP_OS, 'darwin')) ? 'WINDOWS' : 'UNIX';
$CFG->dboptions = array();
$CFG->debug = (E_ALL);
$CFG->debug = (E_ALL | E_STRICT);
$CFG->debugdisplay = true;
$CFG->debugdeveloper = true;
@@ -217,6 +216,7 @@ $databases = array('mysqli' => moodle_database::get_driver_instance('mysqli', 'n
'auroramysql' => moodle_database::get_driver_instance('auroramysql', 'native'),
'mariadb'=> moodle_database::get_driver_instance('mariadb', 'native'),
'pgsql' => moodle_database::get_driver_instance('pgsql', 'native'),
'oci' => moodle_database::get_driver_instance('oci', 'native'),
'sqlsrv' => moodle_database::get_driver_instance('sqlsrv', 'native'), // MS SQL*Server PHP driver
);
foreach ($databases as $type=>$database) {
@@ -560,6 +560,7 @@ do {
if ($interactive) {
cli_separator();
cli_heading(get_string('dbprefix', 'install'));
//TODO: solve somehow the prefix trouble for oci.
if ($options['prefix'] !== '') {
$prompt = get_string('clitypevaluedefault', 'admin', $options['prefix']);
} else {
+16 -39
View File
@@ -55,14 +55,13 @@ If courseid is set, course module/s will be added into the course.
Options:
-f, --file=STRING Path to the backup file.
-c, --categoryid=INT ID of the course category to restore to. This option is ignored when restoring an activity and courseid is set.
-C, --courseid=INT ID of the course to restore to. This option is ignored when restoring a course and the categoryid is set.
-c, --categoryid=INT ID of the course category to restore to.
-C, --courseid=INT ID of the course to restore to. This option is ignored if categoryid is set.
-s, --showdebugging Show developer level debugging information
-h, --help Print out this help.
Example:
\$sudo -u www-data /usr/bin/php admin/cli/restore_backup.php --file=/path/to/backup/coursebackup.mbz --categoryid=1\n
\$sudo -u www-data /usr/bin/php admin/cli/restore_backup.php --file=/path/to/backup/activitybackup.mbz --courseid=1\n
\$sudo -u www-data /usr/bin/php admin/cli/restore_backup.php --file=/path/to/backup/file.mbz --categoryid=1\n
EOL;
echo $help;
@@ -85,15 +84,11 @@ if ($options['categoryid']) {
if (!$category = $DB->get_record('course_categories', ['id' => $options['categoryid']], 'id')) {
throw new \moodle_exception('invalidcategoryid');
}
}
if ($options['courseid']) {
} else if ($options['courseid']) {
if (!$course = $DB->get_record('course', ['id' => $options['courseid']], 'id')) {
throw new \moodle_exception('invalidcourseid');
}
}
if (empty($category) && empty($course)) {
} else {
throw new \moodle_exception('invalidoption');
}
@@ -105,46 +100,28 @@ $fp = get_file_packer('application/vnd.moodle.backup');
$fp->extract_to_pathname($options['file'], $path);
cli_heading(get_string('preprocessingbackupfile'));
try {
// Create a temporary restore controller to determine the restore type.
$tmprc = new restore_controller($backupdir, SITEID, backup::INTERACTIVE_NO,
backup::MODE_GENERAL, $admin->id, backup::TARGET_EXISTING_ADDING);
// Restore the backup into a new course if:
// - It is a course backup and the category is set.
// - It is an activity backup and the course is not set.
$restoreasnewcourse = ($tmprc->get_type() === backup::TYPE_1COURSE && !empty($category)) ||
($tmprc->get_type() !== backup::TYPE_1COURSE && empty($course));
// Make sure to clean up the temporary restore controller.
$tmprc->destroy();
list($fullname, $shortname) = restore_dbops::calculate_course_names(0, get_string('restoringcourse', 'backup'),
get_string('restoringcourseshortname', 'backup'));
if ($restoreasnewcourse) {
list($fullname, $shortname) = restore_dbops::calculate_course_names(0, get_string('restoringcourse', 'backup'),
get_string('restoringcourseshortname', 'backup'));
$courseid = restore_dbops::create_new_course($fullname, $shortname, $category->id);
$rc = new restore_controller($backupdir, $courseid, backup::INTERACTIVE_NO,
backup::MODE_GENERAL, $admin->id, backup::TARGET_NEW_COURSE);
} else {
if (!empty($course)) {
$courseid = $course->id;
$rc = new restore_controller($backupdir, $courseid, backup::INTERACTIVE_NO,
backup::MODE_GENERAL, $admin->id, backup::TARGET_EXISTING_ADDING);
} else {
$courseid = restore_dbops::create_new_course($fullname, $shortname, $category->id);
$rc = new restore_controller($backupdir, $courseid, backup::INTERACTIVE_NO,
backup::MODE_GENERAL, $admin->id, backup::TARGET_NEW_COURSE);
}
$rc->execute_precheck();
$rc->execute_plan();
$rc->destroy();
// Rename the course's full and short names with the backup file's original names if the backup file is an activity backup
// that is restored to a new course.
if ($restoreasnewcourse && $rc->get_type() !== backup::TYPE_1COURSE) {
// Rename course name if the backup is from course module and restore to category.
if (empty($course)) {
$course = get_course($courseid);
$backupinfo = $rc->get_info();
$tmpfullname = $backupinfo->original_course_fullname ?? get_string('restoretonewcourse', 'backup');
$tmpshortname = $backupinfo->original_course_shortname ?? get_string('newcourse');
list($fullname, $shortname) = restore_dbops::calculate_course_names(
courseid: 0,
fullname: $tmpfullname,
shortname: $tmpshortname,
);
list($fullname, $shortname) = restore_dbops::calculate_course_names(0, get_string('restoretonewcourse', 'backup'),
get_string('newcourse'));
$course->fullname = $fullname;
$course->shortname = $shortname;
$course->visible = 1;
-199
View File
@@ -4327,7 +4327,6 @@
<VENDOR name="oracle" version="19" />
</DATABASE>
<PHP version="8.1.0" level="required">
<RESTRICT function="restrict_php_version_84" message="unsupportedphpversion84" />
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
@@ -4523,7 +4522,6 @@
<VENDOR name="oracle" version="19" />
</DATABASE>
<PHP version="8.1.0" level="required">
<RESTRICT function="restrict_php_version_84" message="unsupportedphpversion84" />
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
@@ -4897,201 +4895,4 @@
</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="14" />
<VENDOR name="mssql" version="14.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_CHECKS>
</MOODLE>
</COMPATIBILITY_MATRIX>
+69 -1
View File
@@ -43,6 +43,61 @@ $providers = get_message_providers();
$preferences = get_message_output_default_preferences();
if (($form = data_submitted()) && confirm_sesskey()) {
$newpreferences = array();
// Prepare default message outputs settings.
foreach ($providers as $provider) {
$componentproviderbase = $provider->component.'_'.$provider->name;
$disableprovidersetting = $componentproviderbase.'_disable';
if (!isset($form->$disableprovidersetting)) {
$newpreferences[$disableprovidersetting] = 1;
} else {
$newpreferences[$disableprovidersetting] = 0;
}
$componentprovidersetting = $componentproviderbase.'_locked';
foreach ($processors as $processor) {
$value = 0;
if (isset($form->{$componentprovidersetting}[$processor->name])) {
$value = $form->{$componentprovidersetting}[$processor->name];
if ($value == 'on') {
$value = 1;
}
}
// Record the site preference.
$newpreferences[$processor->name.'_provider_'.$componentprovidersetting] = $value;
}
$componentprovidersetting = $componentproviderbase.'_enabled';
$newsettings = [];
if (isset($form->$componentprovidersetting)) {
// Store defined comma-separated processors as setting value.
// Using array_filter eliminates elements set to 0 above.
$newsettings = array_keys(array_filter($form->{$componentprovidersetting}));
}
// Let's join existing setting values for disabled processors.
$property = 'message_provider_'.$componentprovidersetting;
if (property_exists($preferences, $property)) {
$existingsetting = $preferences->$property;
foreach ($disabledprocessors as $disable) {
if (strpos($existingsetting, $disable->name) > -1) {
$newsettings[] = $disable->name;
}
}
}
$value = join(',', $newsettings);
if (empty($value)) {
$value = null;
}
// Record the site preference.
$newpreferences['message_provider_'.$componentprovidersetting] = $value;
}
// Update database.
$transaction = $DB->start_delegated_transaction();
// Save processors enabled/disabled status.
foreach ($allprocessors as $processor) {
@@ -51,11 +106,24 @@ if (($form = data_submitted()) && confirm_sesskey()) {
$class::enable_plugin($processor->name, $enabled);
}
foreach ($newpreferences as $name => $value) {
$old = isset($preferences->$name) ? $preferences->$name : '';
if ($old != $value) {
add_to_config_log($name, $old, $value, 'core');
}
set_config($name, $value, 'message');
}
$transaction->allow_commit();
core_plugin_manager::reset_caches();
$url = new moodle_url('message.php');
redirect($url);
}
// Page settings.
// Page settings
$PAGE->set_context(context_system::instance());
$renderer = $PAGE->get_renderer('core', 'message');
+1 -2
View File
@@ -91,8 +91,7 @@ if (!empty($hostid) && array_key_exists($hostid, $hosts)) {
// this query is horrible and has to be remapped afterwards, because of the non-uniqueness
// of the remoterep service (it has two plugins so far that use it)
// it's possible to get a unique list back using a subquery with LIMIT but that would break oracle
// so it's best to just do this small query and then remap the results afterwards.
// TODO: Optimise the query, as Oracle-specific constraints no longer apply.
// so it's best to just do this small query and then remap the results afterwards
$sql = '
SELECT DISTINCT
' . $DB->sql_concat('r.plugintype', "'_'", 'r.pluginname', "'_'", 's.name') . ' AS uniqueid,
-12
View File
@@ -1,12 +0,0 @@
# core_adminpresets (subsystem) Upgrade notes
## 5.0
### Removed
- Remove chat and survey from Adminpresets.
For more information see [MDL-82457](https://tracker.moodle.org/browse/MDL-82457)
- Removed block_mnet_hosts from admin presets
For more information see [MDL-84309](https://tracker.moodle.org/browse/MDL-84309)
+8 -4
View File
@@ -193,12 +193,14 @@ class helper {
// Set Activity chooser tabs to "Starred, Recommended, All".
static::add_item($presetid, 'activitychoosertabmode', '4');
// Modules: Hide database, external tool (lti), IMS content package (imscp), lesson, SCORM, wiki, workshop.
// Modules: Hide chat, database, external tool (lti), IMS content package (imscp), lesson, SCORM, survey, wiki, workshop.
static::add_plugin($presetid, 'mod', 'chat', false);
static::add_plugin($presetid, 'mod', 'data', false);
static::add_plugin($presetid, 'mod', 'lti', false);
static::add_plugin($presetid, 'mod', 'imscp', false);
static::add_plugin($presetid, 'mod', 'lesson', false);
static::add_plugin($presetid, 'mod', 'scorm', false);
static::add_plugin($presetid, 'mod', 'survey', false);
static::add_plugin($presetid, 'mod', 'wiki', false);
static::add_plugin($presetid, 'mod', 'workshop', false);
@@ -207,7 +209,7 @@ class helper {
static::add_plugin($presetid, 'availability', 'profile', false);
// Blocks: Hide Activities, Blog menu, Blog tags, Comments, Course completion status, Courses, Flickr,
// Global search, Latest badges, Learning plans, Logged in user, Login, Main menu, Mentees, Online users,
// Global search, Latest badges, Learning plans, Logged in user, Login, Main menu, Mentees, Network servers, Online users,
// Private files, Recent blog entries, Recently accessed courses, Search forums, Section links, Social activities,
// Starred courses, Tags, YouTube.
// Hidden by default: Course/site summary, RSS feeds, Self completion, Feedback.
@@ -226,6 +228,7 @@ class helper {
static::add_plugin($presetid, 'block', 'login', false);
static::add_plugin($presetid, 'block', 'site_main_menu', false);
static::add_plugin($presetid, 'block', 'mentees', false);
static::add_plugin($presetid, 'block', 'mnet_hosts', false);
static::add_plugin($presetid, 'block', 'private_files', false);
static::add_plugin($presetid, 'block', 'blog_recent', false);
static::add_plugin($presetid, 'block', 'rss_client', false);
@@ -289,7 +292,7 @@ class helper {
static::add_item($presetid, 'enablenotes', '1');
static::add_item($presetid, 'enableblogs', '1');
static::add_item($presetid, 'enablebadges', '1');
static::add_item($presetid, 'enableanalytics', '0');
static::add_item($presetid, 'enableanalytics', '1');
static::add_item($presetid, 'enabled', '1', 'core_competency');
static::add_item($presetid, 'pushcourseratingstouserplans', '1', 'core_competency');
static::add_item($presetid, 'showdataretentionsummary', '1', 'tool_dataprivacy');
@@ -312,7 +315,7 @@ class helper {
static::add_plugin($presetid, 'availability', 'profile', true);
// Blocks: Enable Activities, Blog menu, Blog tags, Comments, Course completion status, Courses, Flickr,
// Global search, Latest badges, Learning plans, Logged in user, Login, Main menu, Mentees, Online users,
// Global search, Latest badges, Learning plans, Logged in user, Login, Main menu, Mentees, Network servers, Online users,
// Private files, Recent blog entries, Recently accessed courses, Search forums, Section links, Social activities,
// Starred courses, Tags, YouTube.
// Hidden by default: Course/site summary, RSS feeds, Self completion, Feedback.
@@ -330,6 +333,7 @@ class helper {
static::add_plugin($presetid, 'block', 'login', true);
static::add_plugin($presetid, 'block', 'site_main_menu', true);
static::add_plugin($presetid, 'block', 'mentees', true);
static::add_plugin($presetid, 'block', 'mnet_hosts', true);
static::add_plugin($presetid, 'block', 'private_files', true);
static::add_plugin($presetid, 'block', 'blog_recent', true);
static::add_plugin($presetid, 'block', 'search_forums', true);
-5
View File
@@ -1133,11 +1133,6 @@ class manager {
'visiblevalue' => $visiblevalue,
];
if ($plugininfo && $plugininfo->is_deprecated()) {
$skipped[] = $data;
continue;
}
if ($pluginclass == '\core\plugininfo\orphaned') {
$skipped[] = $data;
continue;
+2 -2
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<PRESET>
<NAME>Imported preset</NAME>
<COMMENTS>&lt;p dir="ltr" style="text-align:left;"&gt;Porfolios enabled, Emojipicker enabled, Lesson media width set to 900 and maxanswers set to 2 and disabled advanced. Plugins: disabled block_html, mod_database and mod_page plugins and enabled atto_html, block_activity_modules and mod_lesson.&lt;/p&gt;</COMMENTS>
<COMMENTS>&lt;p dir="ltr" style="text-align:left;"&gt;Porfolios enabled, Emojipicker enabled, Lesson media width set to 900 and maxanswers set to 2 and disabled advanced. Plugins: disabled block_html, mod_database and mod_chat plugins and enabled atto_html, block_activity_modules and mod_lesson.&lt;/p&gt;</COMMENTS>
<PRESET_DATE>1631615985</PRESET_DATE>
<SITE_URL>http://demo.moodle</SITE_URL>
<AUTHOR>Ada Lovelace</AUTHOR>
@@ -30,7 +30,7 @@
<ACTIVITY_MODULES>1</ACTIVITY_MODULES>
</BLOCK>
<MOD>
<PAGE>0</PAGE>
<CHAT>0</CHAT>
<DATA>0</DATA>
<LESSON>1</LESSON>
</MOD>
+2 -2
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<PRESET>
<NAME>Starter</NAME>
<COMMENTS>&lt;p dir="ltr" style="text-align:left;"&gt;Badges disabled, Emojipicker enabled, Lesson media width set to 900 and maxanswers set to 2 and disabled advanced. Plugins: disabled block_html, mod_database and mod_page plugins and enabled atto_html and block_activity_modules.&lt;/p&gt;</COMMENTS>
<COMMENTS>&lt;p dir="ltr" style="text-align:left;"&gt;Badges disabled, Emojipicker enabled, Lesson media width set to 900 and maxanswers set to 2 and disabled advanced. Plugins: disabled block_html, mod_database and mod_chat plugins and enabled atto_html and block_activity_modules.&lt;/p&gt;</COMMENTS>
<PRESET_DATE>1631615985</PRESET_DATE>
<SITE_URL>http://demo.moodle</SITE_URL>
<AUTHOR>Ada Lovelace</AUTHOR>
@@ -30,7 +30,7 @@
<ACTIVITY_MODULES>1</ACTIVITY_MODULES>
</BLOCK>
<MOD>
<PAGE>0</PAGE>
<CHAT>0</CHAT>
<DATA>0</DATA>
<LESSON>1</LESSON>
</MOD>
+3 -6
View File
@@ -285,15 +285,12 @@ final class helper_test extends \advanced_testcase {
// We need to change some of the default values; otherwise, the full preset won't be applied, because all the settings
// and plugins are the same.
set_config('enableanalytics', '1');
set_config('enableanalytics', '0');
$generator = $this->getDataGenerator()->get_plugin_generator('core_adminpresets');
$generator->create_preset(['name' => 'Preset 1']);
$invokable = self::get_invokable();
set_error_handler($invokable, E_WARNING);
$presetid = helper::change_default_preset($preset);
restore_error_handler();
if (empty($settings) && empty($plugins)) {
// The preset hasn't been applied.
@@ -334,7 +331,7 @@ final class helper_test extends \advanced_testcase {
],
'plugins' => [
'assign' => 1,
'wiki' => 0,
'chat' => 0,
'data' => 0,
'lesson' => 0,
],
@@ -374,7 +371,7 @@ final class helper_test extends \advanced_testcase {
],
'plugins' => [
'assign' => 1,
'page' => 0,
'chat' => 0,
'data' => 0,
'lesson' => 1,
],
@@ -75,15 +75,15 @@ final class adminpresets_admin_setting_bloglevel_test extends \advanced_testcase
public static function save_value_provider(): array {
return [
'Save the bloglevel and set blog_menu block visibility to true' => [
'settingvalue' => BLOG_USER_LEVEL,
'setttingvalue' => BLOG_USER_LEVEL,
'expectedsaved' => true,
],
'Same value to bloglevel, so it will not be saved' => [
'settingvalue' => BLOG_SITE_LEVEL,
'setttingvalue' => BLOG_SITE_LEVEL,
'expectedsaved' => false,
],
'Save the bloglevel and set blog_menu block visibility to false' => [
'settingvalue' => 0,
'setttingvalue' => 0,
'expectedsaved' => true,
],
];
@@ -70,22 +70,22 @@ final class adminpresets_admin_setting_sitesettext_test extends \advanced_testca
return [
'Fullname: different value' => [
'settingname' => 'fullname',
'settingvalue' => 'New site fullname',
'setttingvalue' => 'New site fullname',
'expectedsaved' => true,
],
'Fullname: same value' => [
'settingname' => 'fullname',
'settingvalue' => 'PHPUnit test site',
'setttingvalue' => 'PHPUnit test site',
'expectedsaved' => false,
],
'Summary: different value' => [
'settingname' => 'summary',
'settingvalue' => 'This is a new site summary.',
'setttingvalue' => 'This is a new site summary.',
'expectedsaved' => true,
],
'Summary: same value' => [
'settingname' => 'summary',
'settingvalue' => '',
'setttingvalue' => '',
'expectedsaved' => false,
],
];
@@ -83,28 +83,28 @@ final class adminpresets_setting_test extends \advanced_testcase {
'category' => 'optionalsubsystems',
'settingplugin' => 'core',
'settingname' => 'enablebadges',
'settingvalue' => '1',
'setttingvalue' => '1',
'expectedsaved' => false,
],
'Core setting with a different value is saved' => [
'category' => 'optionalsubsystems',
'settingplugin' => 'core',
'settingname' => 'enablebadges',
'settingvalue' => '0',
'setttingvalue' => '0',
'expectedsaved' => true,
],
'Plugin setting with the same value is not saved' => [
'category' => 'modsettinglesson',
'settingplugin' => 'mod_lesson',
'settingname' => 'mediawidth',
'settingvalue' => '640',
'setttingvalue' => '640',
'expectedsaved' => false,
],
'Plugin setting with different value is saved' => [
'category' => 'modsettinglesson',
'settingplugin' => 'mod_lesson',
'settingname' => 'mediawidth',
'settingvalue' => '900',
'setttingvalue' => '900',
'expectedsaved' => true,
],
];
@@ -174,7 +174,7 @@ final class adminpresets_setting_test extends \advanced_testcase {
'settingplugin' => 'mod_lesson',
'settingname' => 'maxanswers',
'advsettingname' => 'maxanswers_adv',
'advsettingvalue' => '1',
'advsetttingvalue' => '1',
'expectedsaved' => false,
],
'Plugin setting with different value is saved' => [
@@ -182,7 +182,7 @@ final class adminpresets_setting_test extends \advanced_testcase {
'settingplugin' => 'mod_lesson',
'settingname' => 'maxanswers',
'advsettingname' => 'maxanswers_adv',
'advsettingvalue' => '0',
'advsetttingvalue' => '0',
'expectedsaved' => true,
],
'Plugin setting without advanced attributes are not saved' => [
@@ -190,7 +190,7 @@ final class adminpresets_setting_test extends \advanced_testcase {
'settingplugin' => 'mod_lesson',
'settingname' => 'maxanswers',
'advsettingname' => null,
'advsettingvalue' => '0',
'advsetttingvalue' => '0',
'expectedsaved' => false,
],
];
+1 -41
View File
@@ -438,10 +438,7 @@ final class manager_test extends \advanced_testcase {
// Call the method to be tested.
$manager = new manager();
try {
$invokable = self::get_invokable();
set_error_handler($invokable, E_WARNING);
list($xml, $preset, $settingsfound, $pluginsfound) = $manager->import_preset($filecontents);
restore_error_handler();
} catch (\exception $e) {
if ($expectedexception) {
$this->assertInstanceOf($expectedexception, $e);
@@ -509,7 +506,7 @@ final class manager_test extends \advanced_testcase {
'activity_modules' => 1,
],
'mod' => [
'page' => 0,
'chat' => 0,
'data' => 0,
'lesson' => 1,
],
@@ -812,41 +809,4 @@ final class manager_test extends \advanced_testcase {
$enabledplugins = \core\plugininfo\qtype::get_enabled_plugins();
$this->assertArrayHasKey('truefalse', $enabledplugins);
}
/**
* Test apply_preset for a deprecated plugin type.
*
* @runInSeparateProcess
*
* @covers ::apply_preset
* @return void
*/
public function test_apply_preset_deprecated_plugintype(): void {
global $CFG;
$this->resetAfterTest();
// Create a preset.
$generator = $this->getDataGenerator()->get_plugin_generator('core_adminpresets');
$presetid = $generator->create_preset();
// Add a mock plugin into the preset. This plugin will be mocked and deprecated below.
helper::add_plugin($presetid, 'fake', 'fullfeatured', true);
// Inject the mock plugin type + plugin, and deprecate it.
$this->add_mocked_plugintype('fake', "$CFG->libdir/tests/fixtures/fakeplugins/fake", true);
$this->add_mocked_plugin('fake', 'fullfeatured', $CFG->libdir . '/tests/fixtures/fakeplugins/fake/fullfeatured');
// Pre-flight check to ensure that the plugin is deprecated.
$pluginman = \core\plugin_manager::instance();
$plugininfo = $pluginman->get_plugin_info('fake_fullfeatured');
// Expected, unit-test-only debugging, since \core\plugin_manager isn't aware of the mock plugininfo class for this type.
$this->assertDebuggingCalled();
$this->assertTrue($plugininfo->is_deprecated());
// Finally, check apply_preset method, verifying the deprecated plugin is skipped.
$manager = new manager();
[$applied, $skipped] = $manager->apply_preset($presetid);
$this->assertdebuggingcalledcount(2); // Expected unit-test-only debugging, as above.
$this->assertContains('fake', array_column($skipped, 'plugin'));
}
}
+80
View File
@@ -0,0 +1,80 @@
#!/usr/bin/php -f
<?php
//error_reporting(0);
//ini_set('display_errors',0);
require_once(__DIR__ . '/../config.php');
$tmp = explode('@',$_ENV['RECIPIENT']);
$address = $tmp[0];
// BOUNCE EMAILS TO NOREPLY
if ($_ENV['RECIPIENT'] == $CFG->noreplyaddress) {
$user = new stdClass();
$user->email = $_ENV['SENDER'];
if (!validate_email($user->email)) {
die();
}
$site = get_site();
$subject = get_string('noreplybouncesubject','moodle',format_string($site->fullname));
$body = get_string('noreplybouncemessage','moodle',format_string($site->fullname))."\n\n";
$fd = fopen('php://stdin','r');
if ($fd) {
while(!feof($fd)) {
$body .= fgets($fd);
}
fclose($fd);
}
$user->id = 0; // to prevent anything annoying happening
$from->firstname = null;
$from->lastname = null;
$from->email = '<>';
$from->maildisplay = true;
email_to_user($user,$from,$subject,$body);
die ();
}
/// ALL OTHER PROCESSING
// we need to split up the address
$prefix = substr($address,0,4);
$mod = substr($address,4,2);
$modargs = substr($address,6,-16);
$hash = substr($address,-16);
if (substr(md5($prefix.$mod.$modargs.$CFG->siteidentifier),0,16) != $hash) {
die("HASH DIDN'T MATCH!\n");
}
list(,$modid) = unpack('C',base64_decode($mod.'=='));
if ($modid == '0') { // special
$modname = 'moodle';
}
else {
$modname = $DB->get_field("modules", "name", array("id"=>$modid));
include_once('mod/'.$modname.'/lib.php');
}
$function = $modname.'_process_email';
if (!function_exists($function)) {
die();
}
$fd = fopen('php://stdin','r');
if (!$fd) {
exit();
}
while(!feof($fd)) {
$body .= fgets($fd);
}
$function($modargs,$body);
fclose($fd);
+1 -5
View File
@@ -42,11 +42,7 @@ if ($data = $form->get_data()) {
purge_caches();
$message = get_string('purgecachesfinished', 'admin');
} else {
// When passing selected options, ensure each is cast to boolean for strict comparison.
purge_caches(array_map(
fn($option) => (bool) $option,
$data->purgeselectedoptions,
));
purge_caches($data->purgeselectedoptions);
$message = get_string('purgeselectedcachesfinished', 'admin');
}
+5 -7
View File
@@ -34,10 +34,8 @@ 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 && $siteisregistered) {
if ($unregistration && \core\hub\registration::is_registered()) {
if ($confirm) {
require_sesskey();
\core\hub\registration::unregister(false, false);
@@ -62,7 +60,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(null, ['registered' => $siteisregistered]);
$siteregistrationform = new \core\hub\site_registration_form();
$siteregistrationform->set_data(['returnurl' => $returnurl]);
if ($fromform = $siteregistrationform->get_data()) {
@@ -88,7 +86,7 @@ echo $OUTPUT->header();
// Current status of registration.
$notificationtype = \core\output\notification::NOTIFY_ERROR;
if ($siteisregistered) {
if (\core\hub\registration::is_registered()) {
$lastupdated = \core\hub\registration::get_last_updated();
if ($lastupdated == 0) {
$registrationmessage = get_string('pleaserefreshregistrationunknown', 'admin');
@@ -106,7 +104,7 @@ if ($siteisregistered) {
}
// Heading.
if ($siteisregistered) {
if (\core\hub\registration::is_registered()) {
echo $OUTPUT->heading(get_string('registerwithmoodleorgupdate', 'core_hub'));
} else if ($isinitialregistration) {
echo $OUTPUT->heading(get_string('registerwithmoodleorgcomplete', 'core_hub'));
@@ -119,7 +117,7 @@ echo $renderer->moodleorg_registration_message();
$siteregistrationform->display();
if ($siteisregistered) {
if (\core\hub\registration::is_registered()) {
// 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');
+37 -96
View File
@@ -295,6 +295,7 @@ class core_admin_renderer extends plugin_renderer_base {
$output .= $this->header();
$output .= $this->output->heading(get_string('notifications', 'admin'));
$output .= $this->upgrade_news_message();
$output .= $this->maturity_info($maturity);
$output .= empty($CFG->disableupdatenotifications) ? $this->available_updates($availableupdates, $availableupdatesfetch) : '';
$output .= $this->insecure_dataroot_warning($insecuredataroot);
@@ -754,6 +755,22 @@ class core_admin_renderer extends plugin_renderer_base {
return $this->box($copyrighttext, 'copyright');
}
/**
* Display a transient notification for important upgrades messages for
* specific releases.
*
* @return string HTML to output.
*/
protected function upgrade_news_message() {
return $this->notification(
get_string('importantupdates_content', 'admin'),
'info',
false,
get_string('importantupdates_title', 'admin'),
'i/circleinfo, core'
);
}
/**
* Display a warning about installing development code if necesary.
* @param int $maturity
@@ -1024,7 +1041,7 @@ class core_admin_renderer extends plugin_renderer_base {
*/
public function plugins_check_table(core_plugin_manager $pluginman, $version, array $options = array()) {
global $CFG;
$plugininfo = $pluginman->get_plugins(true);
$plugininfo = $pluginman->get_plugins();
if (empty($plugininfo)) {
return '';
@@ -1059,20 +1076,6 @@ class core_admin_renderer extends plugin_renderer_base {
$upgradeabortable = $pluginman->list_restorable_archives();
foreach ($plugininfo as $type => $plugins) {
// Skip deleted plugin types.
if (\core_component::is_deleted_plugin_type($type)) {
continue;
}
// Skip deprecated plugintypes having no installed plugins, in which case there is nothing to report.
if (\core_component::is_deprecated_plugin_type($type)) {
$reportableplugins = array_filter($plugins, function($plugininfo) {
return $plugininfo->versiondb != null;
});
if (empty($reportableplugins)) {
continue;
}
}
$header = new html_table_cell($pluginman->plugintype_name_plural($type));
$header->header = true;
@@ -1121,7 +1124,7 @@ class core_admin_renderer extends plugin_renderer_base {
);
$versiondb = new html_table_cell($plugin->versiondb);
$versiondisk = $plugin->is_deprecated() ? new html_table_cell() : new html_table_cell($plugin->versiondisk);
$versiondisk = new html_table_cell($plugin->versiondisk);
if ($isstandard = $plugin->is_standard()) {
$row->attributes['class'] .= ' standard';
@@ -1140,9 +1143,6 @@ class core_admin_renderer extends plugin_renderer_base {
$statuscode = $plugin->get_status();
$row->attributes['class'] .= ' status-' . $statuscode;
if ($plugin->is_deprecated()) {
$row->attributes['class'] .= ' deprecatedtype';
}
$statusclass = 'statustext badge ';
switch ($statuscode) {
case core_plugin_manager::PLUGIN_STATUS_NEW:
@@ -1163,18 +1163,6 @@ class core_admin_renderer extends plugin_renderer_base {
}
$status = html_writer::span(get_string('status_' . $statuscode, 'core_plugin'), $statusclass);
$deprecatedstatus = '';
if ($plugin->is_deprecated()) {
// During upgrade, omit the status for deprecated plugin types, unless it's 'missing from disk'.
// Deprecated plugins cannot be installed, upgraded, downgraded, and won't be automatically deleted.
$status = in_array($statuscode,
[core_plugin_manager::PLUGIN_STATUS_MISSING, core_plugin_manager::PLUGIN_STATUS_DELETE]) ? $status : '';
$deprecatedstatus = html_writer::span(
get_string('deprecated_type', 'core_plugin'),
'statustext badge bg-danger text-white'
);
}
if (!empty($installabortable[$plugin->component])) {
$status .= $this->output->single_button(
new moodle_url($this->page->url, array('abortinstall' => $plugin->component, 'confirmplugincheck' => 0)),
@@ -1200,7 +1188,7 @@ class core_admin_renderer extends plugin_renderer_base {
}
}
$status = new html_table_cell($sourcelabel.' '.$status.' '.$deprecatedstatus);
$status = new html_table_cell($sourcelabel.' '.$status);
if ($plugin->pluginsupported != null) {
$requires = new html_table_cell($this->required_column($plugin, $pluginman, $version, $CFG->branch));
} else {
@@ -1208,8 +1196,7 @@ class core_admin_renderer extends plugin_renderer_base {
}
$statusisboring = in_array($statuscode, array(
core_plugin_manager::PLUGIN_STATUS_NODB, core_plugin_manager::PLUGIN_STATUS_UPTODATE))
&& !$plugin->is_deprecated();
core_plugin_manager::PLUGIN_STATUS_NODB, core_plugin_manager::PLUGIN_STATUS_UPTODATE));
if ($options['xdep']) {
// we want to see only plugins with failed dependencies
@@ -1685,26 +1672,12 @@ class core_admin_renderer extends plugin_renderer_base {
*/
public function plugins_overview_panel(core_plugin_manager $pluginman, array $options = array()) {
$plugininfo = $pluginman->get_plugins(true);
$plugininfo = $pluginman->get_plugins();
$this->page->requires->js_call_amd('core_admin/plugins_overview', 'init');
$numtotal = $numextension = $numupdatable = $numinstallable = $nummissing = $numnew = 0;
foreach ($plugininfo as $type => $plugins) {
if (\core_component::is_deleted_plugin_type($type)) {
continue;
}
// Skip deprecated plugintypes having no installed plugins, in which case there is nothing to report.
if (\core_component::is_deprecated_plugin_type($type)) {
$reportableplugins = array_filter($plugins, function($plugininfo) {
return $plugininfo->versiondb != null;
});
if (empty($reportableplugins)) {
continue;
}
}
foreach ($plugins as $name => $plugin) {
if ($res = $plugin->available_updates()) {
$numupdatable++;
@@ -1733,13 +1706,13 @@ class core_admin_renderer extends plugin_renderer_base {
$this->page->url,
get_string('overviewall', 'core_plugin'),
['title' => get_string('filterall', 'core_plugin'), 'data-filterby' => 'all', 'class' => 'active']
).' '.html_writer::span($numtotal, 'badge text-dark number number-all');
).' '.html_writer::span($numtotal, 'badge number number-all');
$infoext = html_writer::link(
new moodle_url($this->page->url, [], 'additional'),
get_string('overviewext', 'core_plugin'),
['title' => get_string('filtercontribonly', 'core_plugin'), 'data-filterby' => 'additional']
).' '.html_writer::span($numextension, 'badge text-dark number number-additional');
).' '.html_writer::span($numextension, 'badge number number-additional');
if ($numupdatable) {
$infoupdatable = html_writer::link(
@@ -1805,7 +1778,7 @@ class core_admin_renderer extends plugin_renderer_base {
*/
public function plugins_control_panel(core_plugin_manager $pluginman, array $options = array()) {
$plugininfo = $pluginman->get_plugins(true);
$plugininfo = $pluginman->get_plugins();
$table = new html_table();
$table->id = 'plugins-control-panel';
@@ -1822,20 +1795,6 @@ class core_admin_renderer extends plugin_renderer_base {
);
foreach ($plugininfo as $type => $plugins) {
if (\core_component::is_deleted_plugin_type($type)) {
continue;
}
// Skip deprecated plugintypes having no installed plugins, in which case there is nothing to report.
if (\core_component::is_deprecated_plugin_type($type)) {
$reportableplugins = array_filter($plugins, function($plugininfo) {
return $plugininfo->versiondb != null;
});
if (empty($reportableplugins)) {
continue;
}
}
$heading = $pluginman->plugintype_name_plural($type);
$pluginclass = core_plugin_manager::resolve_plugininfo_class($type);
if ($manageurl = $pluginclass::get_manage_url()) {
@@ -1878,9 +1837,6 @@ class core_admin_renderer extends plugin_renderer_base {
}
$status = $plugin->get_status();
$row->attributes['class'] .= ' status-'.$status;
if ($plugin->is_deprecated()) {
$row->attributes['class'] .= ' deprecatedtype';
}
$pluginname = html_writer::tag('div', $icon.$plugin->displayname, array('class' => 'displayname')).
html_writer::tag('div', $plugin->component, array('class' => 'componentname'));
$pluginname = new html_table_cell($pluginname);
@@ -1922,29 +1878,19 @@ class core_admin_renderer extends plugin_renderer_base {
$source = '';
} else {
$row->attributes['class'] .= ' additional';
$source = html_writer::div(get_string('sourceext', 'core_plugin'), 'source badge me-1 text-bg-info');
$source = html_writer::div(get_string('sourceext', 'core_plugin'), 'source badge mr-1 bg-info text-white');
}
if ($status === core_plugin_manager::PLUGIN_STATUS_MISSING) {
$row->attributes['class'] .= ' missing';
$msg = html_writer::div(get_string('status_missing', 'core_plugin'), 'statusmsg badge text-bg-danger');
$msg = html_writer::div(get_string('status_missing', 'core_plugin'), 'statusmsg badge bg-danger text-white');
} else if ($status === core_plugin_manager::PLUGIN_STATUS_NEW) {
$row->attributes['class'] .= ' newplugin';
$msg = html_writer::div(get_string('status_new', 'core_plugin'), 'statusmsg badge text-bg-success');
$msg = html_writer::div(get_string('status_new', 'core_plugin'), 'statusmsg badge bg-success text-white');
} else {
$msg = '';
}
$deprecatedmsg = '';
if ($plugin->is_deprecated()) {
// Omit the status for deprecated plugin types, unless it's 'missing from disk'.
$msg = $status == core_plugin_manager::PLUGIN_STATUS_MISSING ? $msg : '';
$deprecatedmsg = html_writer::div(
get_string('deprecated_type', 'core_plugin'),
'statusmsg badge bg-danger text-white'
);
}
$requriedby = $pluginman->other_plugins_that_require($plugin->component);
if ($requriedby) {
$requiredby = html_writer::tag('div', get_string('requiredby', 'core_plugin', implode(', ', $requriedby)),
@@ -1961,7 +1907,7 @@ class core_admin_renderer extends plugin_renderer_base {
}
}
$notes = new html_table_cell($source.' '.$msg.' '.$deprecatedmsg.$requiredby.$updateinfo);
$notes = new html_table_cell($source.$msg.$requiredby.$updateinfo);
$row->cells = array(
$pluginname, $version, $availability, $settings, $uninstall, $notes
@@ -2063,7 +2009,7 @@ class core_admin_renderer extends plugin_renderer_base {
get_string('status'),
);
$servertable->colclasses = array('centeralign name', 'centeralign info', 'leftalign report', 'leftalign plugin', 'centeralign status');
$servertable->attributes['class'] = 'table table-striped admintable environmenttable generaltable table-sm';
$servertable->attributes['class'] = 'admintable environmenttable generaltable table-sm';
$servertable->id = 'serverstatus';
$serverdata = array('ok'=>array(), 'warn'=>array(), 'error'=>array());
@@ -2076,7 +2022,7 @@ class core_admin_renderer extends plugin_renderer_base {
get_string('status'),
);
$othertable->colclasses = array('aligncenter info', 'alignleft report', 'alignleft plugin', 'aligncenter status');
$othertable->attributes['class'] = 'table table-striped admintable environmenttable generaltable table-sm';
$othertable->attributes['class'] = 'admintable environmenttable generaltable table-sm';
$othertable->id = 'otherserverstatus';
$otherdata = array('ok'=>array(), 'warn'=>array(), 'error'=>array());
@@ -2177,33 +2123,29 @@ class core_admin_renderer extends plugin_renderer_base {
} else {
$report = $this->doc_link(join('/', $linkparts), get_string($stringtouse, 'admin', $rec), true);
}
// Enclose report text in div so feedback text will be displayed underneath it.
$report = html_writer::div($report);
// Format error or warning line
if ($errorline) {
$messagetype = 'error';
$statusclass = 'bg-danger text-white';
$feedbackclass = 'alert-danger';
} else if ($warningline) {
$messagetype = 'warn';
$statusclass = 'bg-warning text-dark';
$feedbackclass = 'alert-warning';
} else {
$messagetype = 'ok';
$statusclass = 'bg-success text-white';
$feedbackclass = 'alert-success';
}
$status = html_writer::span($status, 'badge ' . $statusclass);
// Here we'll store all the feedback found
$feedbacktext = '';
// Append the feedback if there is some
$feedbacktext .= $environment_result->strToReport($environment_result->getFeedbackStr(),
"alert {$feedbackclass} px-2 py-1 m-1");
$feedbacktext .= $environment_result->strToReport($environment_result->getFeedbackStr(), $messagetype);
//Append the bypass if there is some
$feedbacktext .= $environment_result->strToReport($environment_result->getBypassStr(),
'alert alert-warning px-2 py-1 m-1');
$feedbacktext .= $environment_result->strToReport($environment_result->getBypassStr(), 'warn');
//Append the restrict if there is some
$feedbacktext .= $environment_result->strToReport($environment_result->getRestrictStr(),
'alert alert-danger px-2 py-1 m-1');
$feedbacktext .= $environment_result->strToReport($environment_result->getRestrictStr(), 'error');
$report .= $feedbacktext;
@@ -2247,11 +2189,10 @@ class core_admin_renderer extends plugin_renderer_base {
$output = '';
$output .= $this->header();
$output .= $this->container_start('upgradekeyreq');
$output .= $this->heading(get_string('upgradekeyreq', 'core_admin'));
$output .= $this->container_start('upgradekeyreq w-25');
$output .= html_writer::start_tag('form', array('method' => 'POST', 'action' => $url));
$output .= html_writer::empty_tag('input', [
'id' => 'upgradekey',
'name' => 'upgradekey',
'type' => 'password',
'class' => 'form-control w-auto',
@@ -544,7 +544,7 @@ class core_role_define_role_table_advanced extends core_role_capability_table_wi
$options[$type] = get_string('archetype'.$type, 'role');
}
return html_writer::select($options, 'archetype', $this->role->archetype, false,
['class' => 'form-select']);
array('class' => 'custom-select'));
}
protected function get_assignable_levels_control() {
@@ -83,6 +83,8 @@ class role extends base {
* @return column[]
*/
protected function get_all_columns(): array {
global $DB;
$contextalias = $this->get_table_alias('context');
$rolealias = $this->get_table_alias('role');
@@ -95,9 +97,9 @@ class role extends base {
->add_joins($this->get_joins())
->add_fields("{$rolealias}.name, {$rolealias}.shortname, {$rolealias}.id, {$contextalias}.id AS contextid")
->add_fields(context_helper::get_preload_record_columns_sql($contextalias))
// The sorting is on name, unless empty then we use shortname.
// The sorting is on name, unless empty (determined by single space - thanks Oracle) then we use shortname.
->set_is_sortable(true, [
"CASE WHEN COALESCE({$rolealias}.name, '') = ''
"CASE WHEN " . $DB->sql_concat("{$rolealias}.name", "' '") . " = ' '
THEN {$rolealias}.shortname
ELSE {$rolealias}.name
END",
@@ -121,9 +123,9 @@ class role extends base {
))
->add_joins($this->get_joins())
->add_fields("{$rolealias}.name, {$rolealias}.shortname")
// The sorting is on name, unless empty then we use shortname.
// The sorting is on name, unless empty (determined by single space - thanks Oracle) then we use shortname.
->set_is_sortable(true, [
"CASE WHEN COALESCE({$rolealias}.name, '') = ''
"CASE WHEN " . $DB->sql_concat("{$rolealias}.name", "' '") . " = ' '
THEN {$rolealias}.shortname
ELSE {$rolealias}.name
END",
@@ -159,6 +161,10 @@ class role extends base {
->set_is_sortable(true);
// Description column.
$descriptionfieldsql = "{$rolealias}.description";
if ($DB->get_dbfamily() === 'oracle') {
$descriptionfieldsql = $DB->sql_order_by_text($descriptionfieldsql, 1024);
}
$columns[] = (new column(
'description',
new lang_string('description'),
@@ -166,8 +172,8 @@ class role extends base {
))
->add_joins($this->get_joins())
->set_type(column::TYPE_LONGTEXT)
->add_fields("{$rolealias}.description, {$rolealias}.shortname")
->set_is_sortable(true)
->add_field($descriptionfieldsql, 'description')
->add_field("{$rolealias}.shortname")
->add_callback(fn(?string $description, stdClass $role) => match ($description) {
null => '',
default => role_get_description($role),
+8 -8
View File
@@ -77,7 +77,7 @@ final class provider_test extends provider_testcase {
$course = $this->getDataGenerator()->create_course();
$course2 = $this->getDataGenerator()->create_course();
$coursecat = $this->getDataGenerator()->create_category();
$cm = $this->getDataGenerator()->create_module('assign', ['course' => $course->id]);
$cm = $this->getDataGenerator()->create_module('chat', ['course' => $course->id]);
$cmcontext = \context_module::instance($cm->cmid);
$page = $this->getDataGenerator()->create_module('page', array('course' => $course->id));
$cmcontext2 = \context_module::instance($page->cmid);
@@ -125,7 +125,7 @@ final class provider_test extends provider_testcase {
$course = $this->getDataGenerator()->create_course();
$course2 = $this->getDataGenerator()->create_course();
$coursecat = $this->getDataGenerator()->create_category();
$cm = $this->getDataGenerator()->create_module('assign', ['course' => $course->id]);
$cm = $this->getDataGenerator()->create_module('chat', ['course' => $course->id]);
$cmcontext = \context_module::instance($cm->cmid);
$page = $this->getDataGenerator()->create_module('page', array('course' => $course->id));
$cmcontext2 = \context_module::instance($page->cmid);
@@ -257,7 +257,7 @@ final class provider_test extends provider_testcase {
$coursecat = $this->getDataGenerator()->create_category();
$coursecatcontext = \context_coursecat::instance($coursecat->id);
$systemcontext = \context_system::instance();
$cm = $this->getDataGenerator()->create_module('assign', ['course' => $course->id]);
$cm = $this->getDataGenerator()->create_module('chat', ['course' => $course->id]);
$cmcontext = \context_module::instance($cm->cmid);
$student = $DB->get_record('role', array('shortname' => 'student'), '*', MUST_EXIST);
$manager = $DB->get_record('role', array('shortname' => 'manager'), '*', MUST_EXIST);
@@ -348,7 +348,7 @@ final class provider_test extends provider_testcase {
$coursecat = $this->getDataGenerator()->create_category();
$coursecatcontext = \context_coursecat::instance($coursecat->id);
$systemcontext = \context_system::instance();
$cm = $this->getDataGenerator()->create_module('assign', ['course' => $course->id]);
$cm = $this->getDataGenerator()->create_module('chat', ['course' => $course->id]);
$cmcontext = \context_module::instance($cm->cmid);
$student = $DB->get_record('role', array('shortname' => 'student'), '*', MUST_EXIST);
$manager = $DB->get_record('role', array('shortname' => 'manager'), '*', MUST_EXIST);
@@ -499,8 +499,8 @@ final class provider_test extends provider_testcase {
// Create course category.
$coursecat = $this->getDataGenerator()->create_category();
$coursecatcontext = \context_coursecat::instance($coursecat->id);
// Create assignment module.
$cm = $this->getDataGenerator()->create_module('assign', ['course' => $course1->id]);
// Create chat module.
$cm = $this->getDataGenerator()->create_module('chat', ['course' => $course1->id]);
$cmcontext = \context_module::instance($cm->cmid);
$systemcontext = \context_system::instance();
@@ -619,8 +619,8 @@ final class provider_test extends provider_testcase {
// Create course category.
$coursecat = $this->getDataGenerator()->create_category();
$coursecatcontext = \context_coursecat::instance($coursecat->id);
// Create assignment module.
$cm = $this->getDataGenerator()->create_module('assign', ['course' => $course1->id]);
// Create chat module.
$cm = $this->getDataGenerator()->create_module('chat', ['course' => $course1->id]);
$cmcontext = \context_module::instance($cm->cmid);
$systemcontext = \context_system::instance();
@@ -149,7 +149,7 @@ final class roles_test extends core_reportbuilder_testcase {
], true],
'Filter role name (no match)' => ['role:name', [
'role:name_operator' => select::EQUAL_TO,
'role:name_value' => $DB->get_field('role', 'id', ['shortname' => 'teacher']),
'role:name_value' => -1,
], false],
'Filter role archetype' => ['role:archetype', [
'role:archetype_operator' => select::EQUAL_TO,
+10 -29
View File
@@ -30,16 +30,9 @@ if ($hassiteconfig) {
// Add settings page for AI provider settings.
$providers = new admin_settingpage('aiprovider', new lang_string('aiproviders', 'ai'));
$providers->add(new admin_setting_heading('availableproviders',
get_string('availableproviders', 'core_ai'),
get_string('availableproviders_desc', 'core_ai')));
// Add call to action to add a new provider.
$providers->add(new \core_admin\admin\admin_setting_template_render(
name: 'addnewprovider',
templatename: 'core_ai/admin_add_provider',
context: ['addnewproviderurl' => new moodle_url('/ai/configure.php')]
));
$providers->add(new \core_ai\admin\admin_setting_provider_manager(
get_string('availableproviders', 'core_ai'),
get_string('availableproviders_desc', 'core_ai')));
$providers->add(new \core_admin\admin\admin_setting_plugin_manager(
'aiprovider',
\core_ai\table\aiprovider_management_table::class,
'manageaiproviders',
@@ -47,6 +40,13 @@ if ($hassiteconfig) {
));
$ADMIN->add('ai', $providers);
// Load settings for all AI providers.
$plugins = core_plugin_manager::instance()->get_plugins_of_type('aiprovider');
foreach ($plugins as $plugin) {
/** @var \core\plugininfo\aiprovider $plugin */
$plugin->load_settings($ADMIN, 'ai', $hassiteconfig);
}
// Add settings page for AI placement settings.
$placements = new admin_settingpage('aiplacement', new lang_string('aiplacements', 'ai'));
$placements->add(new admin_setting_heading('availableplacements',
@@ -67,22 +67,3 @@ if ($hassiteconfig) {
$plugin->load_settings($ADMIN, 'ai', $hassiteconfig);
}
}
// AI reports category.
$ADMIN->add('reports', new admin_category('aireports', get_string('aireports', 'core_ai')));
// Add AI policy acceptance report.
$aipolicyacceptance = new admin_externalpage(
'aipolicyacceptancereport',
get_string('aipolicyacceptance', 'core_ai'),
new moodle_url('/ai/policy_acceptance_report.php'),
'moodle/ai:viewaipolicyacceptancereport'
);
$ADMIN->add('aireports', $aipolicyacceptance);
// Add AI usage report.
$aiusage = new admin_externalpage(
'aiusagereport',
get_string('aiusage', 'core_ai'),
new moodle_url('/ai/usage_report.php'),
'moodle/ai:viewaiusagereport',
);
$ADMIN->add('aireports', $aiusage);
+1 -6
View File
@@ -2,8 +2,6 @@
// This file defines settingpages and externalpages under the "appearance" category
$ADMIN->add('appearance', new admin_category('themes', new lang_string('themesettingscustom', 'admin')));
$capabilities = array(
'moodle/my:configsyspages',
'moodle/tag:manage'
@@ -332,10 +330,6 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) { // sp
$temp->add(new admin_setting_configcheckbox('logininfoinsecurelayout',
new lang_string('logininfoinsecurelayout', 'admin'),
new lang_string('logininfoinsecurelayout_desc', 'admin'), 0));
// Process primary navigation (custom menu) through Moodle filters.
$temp->add(new admin_setting_configcheckbox('navfilter',
new lang_string('navfilter', 'admin'),
new lang_string('navfilter_desc', 'admin'), 0));
$temp->add(new admin_setting_configtextarea('custommenuitems', new lang_string('custommenuitems', 'admin'),
new lang_string('configcustommenuitems', 'admin'), '', PARAM_RAW, '50', '10'));
$defaultsettingcustomusermenuitems = [
@@ -361,6 +355,7 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) { // sp
new lang_string('themeselector', 'admin'), $CFG->wwwroot . '/admin/themeselector.php'));
// Settings page for each theme.
$ADMIN->add('appearance', new admin_category('themes', new lang_string('themesettingscustom', 'admin')));
foreach (core_component::get_plugin_list('theme') as $theme => $themedir) {
$settingspath = "$themedir/settings.php";
if (file_exists($settingspath)) {
+13 -21
View File
@@ -28,22 +28,13 @@ require_once($CFG->libdir . '/pdflib.php');
use core_admin\local\settings\filesize;
$ADMIN->add('courses', new admin_category('coursedefaultsettings', new lang_string('defaultsettingscategory', 'course')));
$ADMIN->add('courses', new admin_category('groups', new lang_string('groups')));
$ADMIN->add('courses', new admin_category('activitychooser', new lang_string('activitychoosercategory', 'course')));
$ADMIN->add('courses', new admin_category('backups', new lang_string('backups', 'admin')));
$capabilities = [
$capabilities = array(
'moodle/backup:backupcourse',
'moodle/category:manage',
'moodle/course:create',
'moodle/site:approvecourse',
'moodle/restore:restorecourse',
'moodle/course:manageactivities',
'moodle/course:configurecustomfields',
'moodle/group:configurecustomfields',
'moodle/course:recommendactivity',
];
'moodle/restore:restorecourse'
);
if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) {
// Speedup for non-admins, add all caps used on this page.
$ADMIN->add('courses',
@@ -113,6 +104,7 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) {
}
// Add a category for the course Default settings.
$ADMIN->add('courses', new admin_category('coursedefaultsettings', new lang_string('defaultsettingscategory', 'course')));
// Course Default Settings Page.
// NOTE: these settings must be applied after all other settings because they depend on them.
@@ -306,7 +298,8 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) {
)
);
// Add to the 'Groups' category.
// Add a category for the Groups.
$ADMIN->add('courses', new admin_category('groups', new lang_string('groups')));
$ADMIN->add(
'groups',
new admin_externalpage(
@@ -326,7 +319,8 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) {
)
);
// Add to the 'Activity Chooser' category.
// Add a category for the Activity Chooser.
$ADMIN->add('courses', new admin_category('activitychooser', new lang_string('activitychoosercategory', 'course')));
$temp = new admin_settingpage('activitychoosersettings', new lang_string('activitychoosersettings', 'course'));
// Tab mode for the activity chooser.
$temp->add(
@@ -378,7 +372,8 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) {
)
);
// Add to the 'Backups' category.
// Add a category for backups.
$ADMIN->add('courses', new admin_category('backups', new lang_string('backups','admin')));
// Create a page for general backups configuration and defaults.
$temp = new admin_settingpage('backupgeneralsettings', new lang_string('generalbackdefaults', 'backup'), 'moodle/backup:backupcourse');
@@ -420,6 +415,7 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) {
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_general_userscompletion', new lang_string('generaluserscompletion','backup'), new lang_string('configgeneraluserscompletion','backup'), array('value'=>1, 'locked'=>0)));
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_general_logs', new lang_string('generallogs','backup'), new lang_string('configgenerallogs','backup'), array('value'=>0, 'locked'=>0)));
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_general_histories', new lang_string('generalhistories','backup'), new lang_string('configgeneralhistories','backup'), array('value'=>0, 'locked'=>0)));
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_general_questionbank', new lang_string('generalquestionbank','backup'), new lang_string('configgeneralquestionbank','backup'), array('value'=>1, 'locked'=>0)));
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_general_groups',
new lang_string('generalgroups', 'backup'), new lang_string('configgeneralgroups', 'backup'),
array('value' => 1, 'locked' => 0)));
@@ -463,13 +459,8 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) {
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_import_activities', new lang_string('generalactivities','backup'), new lang_string('configgeneralactivities','backup'), array('value'=>1, 'locked'=>0)));
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_import_blocks', new lang_string('generalblocks','backup'), new lang_string('configgeneralblocks','backup'), array('value'=>1, 'locked'=>0)));
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_import_filters', new lang_string('generalfilters','backup'), new lang_string('configgeneralfilters','backup'), array('value'=>1, 'locked'=>0)));
$temp->add(new admin_setting_configcheckbox_with_lock(
'backup/backup_import_badges',
new lang_string('generalbadges', 'backup'),
new lang_string('configgeneralbadges', 'backup'),
['value' => 0, 'locked' => 0],
));
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_import_calendarevents', new lang_string('generalcalendarevents','backup'), new lang_string('configgeneralcalendarevents','backup'), array('value'=>1, 'locked'=>0)));
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_import_questionbank', new lang_string('generalquestionbank','backup'), new lang_string('configgeneralquestionbank','backup'), array('value'=>1, 'locked'=>0)));
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_import_groups',
new lang_string('generalgroups', 'backup'), new lang_string('configgeneralgroups', 'backup'),
array('value' => 1, 'locked' => 0)));
@@ -605,6 +596,7 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) {
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_userscompletion', new lang_string('generaluserscompletion','backup'), new lang_string('configgeneraluserscompletion','backup'), 1));
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_logs', new lang_string('generallogs', 'backup'), new lang_string('configgenerallogs', 'backup'), 0));
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_histories', new lang_string('generalhistories','backup'), new lang_string('configgeneralhistories','backup'), 0));
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_questionbank', new lang_string('generalquestionbank','backup'), new lang_string('configgeneralquestionbank','backup'), 1));
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_groups', new lang_string('generalgroups', 'backup'),
new lang_string('configgeneralgroups', 'backup'), 1));
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_competencies', new lang_string('generalcompetencies','backup'), new lang_string('configgeneralcompetencies','backup'), 1));
+3 -3
View File
@@ -2,10 +2,10 @@
// * Miscellaneous settings
// Experimental settings page.
$ADMIN->add('development', new admin_category('experimental', new lang_string('experimental', 'admin')));
if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
if ($hassiteconfig) { // Speedup for non-admins, add all caps used on this page.
// Experimental settings page
$ADMIN->add('development', new admin_category('experimental', new lang_string('experimental','admin')));
$temp = new admin_settingpage('experimentalsettings', new lang_string('experimentalsettings', 'admin'));
//TODO: Re-enable cc-import once re-implemented in 2.0.x
+3 -3
View File
@@ -24,10 +24,10 @@
defined('MOODLE_INTERNAL') || die();
if (!$ADMIN->locate('file_redactor')) {
$ADMIN->add('server', new admin_category('file_redactor', get_string('redactor', 'core_files')));
}
if ($hassiteconfig) {
if (!$ADMIN->locate('file_redactor')) {
$ADMIN->add('server', new admin_category('file_redactor', get_string('redactor', 'core_files')));
}
$manager = \core\di::get(\core_files\redactor\manager::class);
+5 -46
View File
@@ -2,13 +2,6 @@
// This file defines settingpages and externalpages under the "grades" section
use core\plugininfo\gradepenalty;
$ADMIN->add('grades', new admin_category('gradereports', new lang_string('reportsettings', 'grades')));
$ADMIN->add('grades', new admin_category('gradeimports', new lang_string('importsettings', 'grades')));
$ADMIN->add('grades', new admin_category('gradeexports', new lang_string('exportsettings', 'grades')));
$ADMIN->add('grades', new admin_category('gradepenalty', new lang_string('gradepenalty', 'grades')));
if (has_capability('moodle/grade:manage', $systemcontext)
or has_capability('moodle/grade:manageletters', $systemcontext)) { // speedup for non-admins, add all caps used on this page
@@ -98,7 +91,7 @@ if (has_capability('moodle/grade:manage', $systemcontext)
$temp->add(new admin_setting_my_grades_report());
$temp->add(new admin_setting_configtext('gradereport_mygradeurl', new lang_string('externalurl', 'grades'),
new lang_string('externalurl_desc', 'grades'), ''));
new lang_string('externalurl_desc', 'grades'), ''));
}
$ADMIN->add('grades', $temp);
@@ -188,6 +181,7 @@ if (has_capability('moodle/grade:manage', $systemcontext)
// The plugins must implement a settings.php file that adds their admin settings to the $settings object
// Reports
$ADMIN->add('grades', new admin_category('gradereports', new lang_string('reportsettings', 'grades')));
foreach (core_component::get_plugin_list('gradereport') as $plugin => $plugindir) {
// Include all the settings commands for this plugin if there are any
if (file_exists($plugindir.'/settings.php')) {
@@ -200,6 +194,7 @@ if (has_capability('moodle/grade:manage', $systemcontext)
}
// Imports
$ADMIN->add('grades', new admin_category('gradeimports', new lang_string('importsettings', 'grades')));
foreach (core_component::get_plugin_list('gradeimport') as $plugin => $plugindir) {
// Include all the settings commands for this plugin if there are any
@@ -214,6 +209,7 @@ if (has_capability('moodle/grade:manage', $systemcontext)
// Exports
$ADMIN->add('grades', new admin_category('gradeexports', new lang_string('exportsettings', 'grades')));
foreach (core_component::get_plugin_list('gradeexport') as $plugin => $plugindir) {
// Include all the settings commands for this plugin if there are any
if (file_exists($plugindir.'/settings.php')) {
@@ -225,42 +221,5 @@ if (has_capability('moodle/grade:manage', $systemcontext)
}
}
// Penalty.
// Supported modules.
$modules = core_grades\penalty_manager::get_supported_modules();
if (!empty($modules)) {
$temp = new admin_settingpage('supportedplugins', new lang_string('gradepenalty_supportedplugins', 'grades'),
'moodle/grade:manage');
$options = [];
foreach ($modules as $module) {
$options[$module] = new lang_string('modulename', $module);
}
$temp->add(new admin_setting_configmultiselect('gradepenalty_enabledmodules',
new lang_string('gradepenalty_enabledmodules', 'grades'),
new lang_string('gradepenalty_enabledmodules_help', 'grades'), [], $options));
$ADMIN->add('gradepenalty', $temp);
}
// External page to manage the penalty plugins.
$temp = new admin_externalpage(
'managepenaltyplugins',
get_string('managepenaltyplugins', 'grades'),
new moodle_url('/grade/penalty/manage_penalty_plugins.php'),
'moodle/grade:manage'
);
$ADMIN->add('gradepenalty', $temp);
// Settings from each penalty plugin.
foreach (core_component::get_plugin_list('gradepenalty') as $plugin => $plugindir) {
// Check if the plugin is enabled.
if (gradepenalty::is_plugin_enabled($plugin)) {
// Include all the settings commands for this plugin if there are any.
if (file_exists($plugindir . '/settings.php')) {
include($plugindir . '/settings.php');
}
}
}
} // end of speedup
+3
View File
@@ -39,6 +39,9 @@ if (isset($CFG->mnet_dispatcher_mode) and $CFG->mnet_dispatcher_mode !== 'off')
$ADMIN->add('mnet', new admin_externalpage('ssoaccesscontrol', new lang_string('ssoaccesscontrol', 'mnet'),
"$CFG->wwwroot/$CFG->admin/mnet/access_control.php",
'moodle/site:config'));
$ADMIN->add('mnet', new admin_externalpage('mnetenrol', new lang_string('clientname', 'mnetservice_enrol'),
"$CFG->wwwroot/mnet/service/enrol/index.php",
'moodle/site:config'));
$ADMIN->add('mnet', new admin_externalpage('trustedhosts', new lang_string('trustedhosts', 'mnet'),
"$CFG->wwwroot/$CFG->admin/mnet/trustedhosts.php",
'moodle/site:config'));
+42 -34
View File
@@ -24,40 +24,6 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$ADMIN->add('modules', new admin_category('modsettings', new lang_string('activitymodules')));
$ADMIN->add('modules', new admin_category('formatsettings', new lang_string('courseformats')));
$ADMIN->add('modules', new admin_category('customfieldsettings', new lang_string('customfields', 'core_customfield')));
$ADMIN->add('modules', new admin_category('blocksettings', new lang_string('blocks')));
$ADMIN->add('modules', new admin_category('authsettings', new lang_string('authentication', 'admin')));
$ADMIN->add('modules', new admin_category('enrolments', new lang_string('enrolments', 'enrol')));
$ADMIN->add('modules', new admin_category('editorsettings', new lang_string('editors', 'editor')));
$ADMIN->add('modules', new admin_category('antivirussettings', new lang_string('antiviruses', 'antivirus')));
$ADMIN->add('modules', new admin_category('mlbackendsettings', new lang_string('mlbackendsettings', 'admin')));
$ADMIN->add('modules', new admin_category('filtersettings', new lang_string('managefilters')));
$ADMIN->add('modules', new admin_category('mediaplayers', new lang_string('type_media_plural', 'plugin')));
$ADMIN->add('modules', new admin_category('fileconverterplugins', new lang_string('type_fileconverter_plural', 'plugin')));
$ADMIN->add('modules', new admin_category('paymentgateways', new lang_string('type_paygw_plural', 'plugin')));
$ADMIN->add('modules', new admin_category('dataformatsettings', new lang_string('dataformats')));
$ADMIN->add('modules', new admin_category('portfoliosettings', new lang_string('portfolios', 'portfolio'),
empty($CFG->enableportfolios)));
$ADMIN->add('modules', new admin_category('repositorysettings', new lang_string('repositories', 'repository')));
$ADMIN->add('modules', new admin_category('qbanksettings', new lang_string('type_qbank_plural', 'plugin')));
$ADMIN->add('modules', new admin_category('qbehavioursettings', new lang_string('questionbehaviours', 'admin')));
$ADMIN->add('modules', new admin_category('qtypesettings', new lang_string('questiontypes', 'admin')));
$ADMIN->add('modules', new admin_category('plagiarism', new lang_string('plagiarism', 'plagiarism')));
$ADMIN->add('modules', new admin_category('coursereports', new lang_string('coursereports')));
$ADMIN->add('modules', new admin_category('reportplugins', new lang_string('reports')));
$ADMIN->add('modules', new admin_category('searchplugins', new lang_string('search', 'admin')));
$ADMIN->add('modules', new admin_category('tools', new lang_string('tools', 'admin')));
$ADMIN->add('modules', new admin_category('cache', new lang_string('caching', 'cache')));
$ADMIN->add('cache', new admin_category('cachestores', new lang_string('cachestores', 'cache')));
$ADMIN->add('modules', new admin_category('calendartype', new lang_string('calendartypes', 'calendar')));
$ADMIN->add('modules', new admin_category('communicationsettings', new lang_string('communication', 'core_communication')));
$ADMIN->add('modules', new admin_category('sms', new lang_string('sms', 'core_sms')));
$ADMIN->add('modules', new admin_category('contentbanksettings', new lang_string('contentbank')));
$ADMIN->add('modules', new admin_category('localplugins', new lang_string('localplugins')));
if ($hassiteconfig) {
/* @var admin_root $ADMIN */
$ADMIN->locate('modules')->set_sorting(true);
@@ -65,6 +31,7 @@ if ($hassiteconfig) {
$ADMIN->add('modules', new admin_page_pluginsoverview());
// activity modules
$ADMIN->add('modules', new admin_category('modsettings', new lang_string('activitymodules')));
$ADMIN->add('modsettings', new admin_page_managemods());
@@ -81,6 +48,7 @@ if ($hassiteconfig) {
}
// course formats
$ADMIN->add('modules', new admin_category('formatsettings', new lang_string('courseformats')));
$temp = new admin_settingpage('manageformats', new lang_string('manageformats', 'core_admin'));
$temp->add(new admin_setting_manageformats());
$ADMIN->add('formatsettings', $temp);
@@ -92,6 +60,7 @@ if ($hassiteconfig) {
}
// Custom fields.
$ADMIN->add('modules', new admin_category('customfieldsettings', new lang_string('customfields', 'core_customfield')));
$temp = new admin_settingpage('managecustomfields', new lang_string('managecustomfields', 'core_admin'));
$temp->add(new admin_setting_managecustomfields());
$ADMIN->add('customfieldsettings', $temp);
@@ -103,6 +72,7 @@ if ($hassiteconfig) {
}
// blocks
$ADMIN->add('modules', new admin_category('blocksettings', new lang_string('blocks')));
$ADMIN->add('blocksettings', new admin_page_manageblocks());
$plugins = core_plugin_manager::instance()->get_plugins_of_type('block');
core_collator::asort_objects_by_property($plugins, 'displayname');
@@ -112,6 +82,8 @@ if ($hassiteconfig) {
}
// authentication plugins
$ADMIN->add('modules', new admin_category('authsettings', new lang_string('authentication', 'admin')));
$temp = new admin_settingpage('manageauths', new lang_string('authsettings', 'admin'));
$temp->add(new admin_setting_manageauths());
$temp->add(new admin_setting_heading('manageauthscommonheading', new lang_string('commonsettings', 'admin'), ''));
@@ -188,6 +160,7 @@ if ($hassiteconfig) {
}
// Enrolment plugins
$ADMIN->add('modules', new admin_category('enrolments', new lang_string('enrolments', 'enrol')));
$temp = new admin_settingpage('manageenrols', new lang_string('manageenrols', 'enrol'));
$temp->add(new admin_setting_manageenrols());
$ADMIN->add('enrolments', $temp);
@@ -204,6 +177,7 @@ if ($hassiteconfig) {
/// Editor plugins
$ADMIN->add('modules', new admin_category('editorsettings', new lang_string('editors', 'editor')));
$temp = new admin_settingpage('manageeditors', new lang_string('editorsettings', 'editor'));
$temp->add(new \core_admin\admin\admin_setting_plugin_manager(
'editor',
@@ -220,6 +194,7 @@ if ($hassiteconfig) {
}
// Antivirus plugins.
$ADMIN->add('modules', new admin_category('antivirussettings', new lang_string('antiviruses', 'antivirus')));
$temp = new admin_settingpage('manageantiviruses', new lang_string('antivirussettings', 'antivirus'));
$temp->add(new admin_setting_manageantiviruses());
@@ -291,12 +266,14 @@ if ($hassiteconfig) {
}
// Machine learning backend plugins.
$ADMIN->add('modules', new admin_category('mlbackendsettings', new lang_string('mlbackendsettings', 'admin')));
$plugins = core_plugin_manager::instance()->get_plugins_of_type('mlbackend');
foreach ($plugins as $plugin) {
$plugin->load_settings($ADMIN, 'mlbackendsettings', $hassiteconfig);
}
/// Filter plugins
$ADMIN->add('modules', new admin_category('filtersettings', new lang_string('managefilters')));
$ADMIN->add('filtersettings', new admin_page_managefilters());
@@ -326,6 +303,7 @@ if ($hassiteconfig) {
}
// Media players.
$ADMIN->add('modules', new admin_category('mediaplayers', new lang_string('type_media_plural', 'plugin')));
$temp = new admin_settingpage('managemediaplayers', new lang_string('managemediaplayers', 'media'));
$temp->add(new admin_setting_heading('mediaformats', get_string('mediaformats', 'core_media'),
format_text(get_string('mediaformats_desc', 'core_media'), FORMAT_MARKDOWN)));
@@ -345,6 +323,7 @@ if ($hassiteconfig) {
$ADMIN->add('mediaplayers', $temp);
// Convert plugins.
$ADMIN->add('modules', new admin_category('fileconverterplugins', new lang_string('type_fileconverter_plural', 'plugin')));
$temp = new admin_settingpage('managefileconverterplugins', new lang_string('type_fileconvertermanage', 'plugin'));
$temp->add(new admin_setting_manage_fileconverter_plugins());
$ADMIN->add('fileconverterplugins', $temp);
@@ -364,6 +343,7 @@ if ($hassiteconfig) {
}
// Payment gateway plugins.
$ADMIN->add('modules', new admin_category('paymentgateways', new lang_string('type_paygw_plural', 'plugin')));
$temp = new admin_settingpage('managepaymentgateways', new lang_string('type_paygwmanage', 'plugin'));
$temp->add(new \core_admin\local\settings\manage_payment_gateway_plugins());
$temp->add(new admin_setting_description(
@@ -382,6 +362,7 @@ if ($hassiteconfig) {
}
// Data format settings.
$ADMIN->add('modules', new admin_category('dataformatsettings', new lang_string('dataformats')));
$temp = new admin_settingpage('managedataformats', new lang_string('managedataformats'));
$temp->add(new admin_setting_managedataformats());
$ADMIN->add('dataformatsettings', $temp);
@@ -395,9 +376,12 @@ if ($hassiteconfig) {
//== Portfolio settings ==
require_once($CFG->libdir. '/portfoliolib.php');
$catname = new lang_string('portfolios', 'portfolio');
$manage = new lang_string('manageportfolios', 'portfolio');
$url = "$CFG->wwwroot/$CFG->admin/portfolio.php";
$ADMIN->add('modules', new admin_category('portfoliosettings', $catname, empty($CFG->enableportfolios)));
// Add manage page (with table)
$temp = new admin_page_manageportfolios();
$ADMIN->add('portfoliosettings', $temp);
@@ -451,8 +435,10 @@ if ($hassiteconfig) {
// repository setting
require_once("$CFG->dirroot/repository/lib.php");
$catname =new lang_string('repositories', 'repository');
$managerepo = new lang_string('manage', 'repository');
$url = $CFG->wwwroot.'/'.$CFG->admin.'/repository.php';
$ADMIN->add('modules', new admin_category('repositorysettings', $catname));
// Add main page (with table)
$temp = new admin_page_managerepositories();
@@ -488,6 +474,8 @@ if ($hassiteconfig) {
// Question bank settings.
if ($hassiteconfig || has_capability('moodle/question:config', $systemcontext)) {
$ADMIN->add('modules', new admin_category('qbanksettings',
new lang_string('type_qbank_plural', 'plugin')));
$temp = new admin_settingpage('manageqbanks', new lang_string('manageqbanks', 'admin'));
$temp->add(new \core_question\admin\manage_qbank_plugins_page());
$ADMIN->add('qbanksettings', $temp);
@@ -503,9 +491,11 @@ if ($hassiteconfig || has_capability('moodle/question:config', $systemcontext))
if ($hassiteconfig || has_capability('moodle/question:config', $systemcontext)) {
// Question behaviour settings.
$ADMIN->add('modules', new admin_category('qbehavioursettings', new lang_string('questionbehaviours', 'admin')));
$ADMIN->add('qbehavioursettings', new admin_page_manageqbehaviours());
// Question type settings.
$ADMIN->add('modules', new admin_category('qtypesettings', new lang_string('questiontypes', 'admin')));
$ADMIN->add('qtypesettings', new admin_page_manageqtypes());
// Question preview defaults.
@@ -577,6 +567,7 @@ if ($hassiteconfig || has_capability('moodle/question:config', $systemcontext))
// Plagiarism plugin settings
if ($hassiteconfig && !empty($CFG->enableplagiarism)) {
$ADMIN->add('modules', new admin_category('plagiarism', new lang_string('plagiarism', 'plagiarism')));
$ADMIN->add('plagiarism', new admin_externalpage('manageplagiarismplugins', new lang_string('manageplagiarism', 'plagiarism'),
$CFG->wwwroot . '/' . $CFG->admin . '/plagiarism.php'));
@@ -608,6 +599,7 @@ if ($hassiteconfig) {
}
}
if (!empty($pages)) {
$ADMIN->add('modules', new admin_category('coursereports', new lang_string('coursereports')));
core_collator::asort_objects_by_property($pages, 'visiblename');
foreach ($pages as $page) {
$ADMIN->add('coursereports', $page);
@@ -629,6 +621,7 @@ foreach (core_component::get_plugin_list('report') as $report => $plugindir) {
}
}
}
$ADMIN->add('modules', new admin_category('reportplugins', new lang_string('reports')));
$ADMIN->add('reportplugins', new admin_externalpage('managereports', new lang_string('reportsmanage', 'admin'),
$CFG->wwwroot . '/' . $CFG->admin . '/reports.php'));
core_collator::asort_objects_by_property($pages, 'visiblename');
@@ -638,6 +631,7 @@ foreach ($pages as $page) {
if ($hassiteconfig) {
// Global Search engine plugins.
$ADMIN->add('modules', new admin_category('searchplugins', new lang_string('search', 'admin')));
$temp = new admin_settingpage('manageglobalsearch', new lang_string('globalsearchmanage', 'admin'));
$pages = array();
@@ -779,6 +773,7 @@ if ($hassiteconfig) {
/// Add all admin tools
if ($hassiteconfig) {
$ADMIN->add('modules', new admin_category('tools', new lang_string('tools', 'admin')));
$settingspage = new admin_settingpage('toolsmanagement', new lang_string('toolsmanage', 'admin'));
$ADMIN->add('tools', $settingspage);
$settingspage->add(new \core_admin\admin\admin_setting_plugin_manager(
@@ -799,10 +794,12 @@ foreach ($plugins as $plugin) {
// Now add the Cache plugins
if ($hassiteconfig) {
$ADMIN->add('modules', new admin_category('cache', new lang_string('caching', 'cache')));
$ADMIN->add('cache', new admin_externalpage('cacheconfig', new lang_string('cacheconfig', 'cache'), $CFG->wwwroot .'/cache/admin.php'));
$ADMIN->add('cache', new admin_externalpage('cachetestperformance', new lang_string('testperformance', 'cache'), $CFG->wwwroot . '/cache/testperformance.php'));
$ADMIN->add('cache', new admin_externalpage('cacheusage',
new lang_string('cacheusage', 'cache'), $CFG->wwwroot . '/cache/usage.php'));
$ADMIN->add('cache', new admin_category('cachestores', new lang_string('cachestores', 'cache')));
$ADMIN->locate('cachestores')->set_sorting(true);
foreach (core_component::get_plugin_list('cachestore') as $plugin => $path) {
$settingspath = $path.'/settings.php';
@@ -816,6 +813,7 @@ if ($hassiteconfig) {
// Add Calendar type settings.
if ($hassiteconfig) {
$ADMIN->add('modules', new admin_category('calendartype', new lang_string('calendartypes', 'calendar')));
$plugins = core_plugin_manager::instance()->get_plugins_of_type('calendartype');
core_collator::asort_objects_by_property($plugins, 'displayname');
foreach ($plugins as $plugin) {
@@ -826,6 +824,7 @@ if ($hassiteconfig) {
// Communication plugins.
if ($hassiteconfig && core_communication\api::is_available()) {
$ADMIN->add('modules', new admin_category('communicationsettings', new lang_string('communication', 'core_communication')));
$temp = new admin_settingpage('managecommunicationproviders',
new lang_string('managecommunicationproviders', 'core_communication'));
$temp->add(new \core_communication\admin\manage_communication_providers_page());
@@ -839,6 +838,13 @@ if ($hassiteconfig && core_communication\api::is_available()) {
// SMS plugins.
if ($hassiteconfig) {
$ADMIN->add(
'modules',
new admin_category(
'sms',
new lang_string('sms', 'core_sms'),
),
);
$ADMIN->add(
'sms',
new admin_externalpage(
@@ -863,6 +869,7 @@ if ($hassiteconfig) {
// Content bank content types.
if ($hassiteconfig) {
$ADMIN->add('modules', new admin_category('contentbanksettings', new lang_string('contentbank')));
$temp = new admin_settingpage('managecontentbanktypes', new lang_string('managecontentbanktypes'));
$temp->add(new admin_setting_managecontentbankcontenttypes());
$ADMIN->add('contentbanksettings', $temp);
@@ -881,6 +888,7 @@ if ($hassiteconfig) {
/// Add all local plugins - must be always last!
if ($hassiteconfig) {
$ADMIN->add('modules', new admin_category('localplugins', new lang_string('localplugins')));
$ADMIN->add('localplugins', new admin_externalpage('managelocalplugins', new lang_string('localpluginsmanage'),
$CFG->wwwroot . '/' . $CFG->admin . '/localplugins.php'));
}
-12
View File
@@ -64,15 +64,3 @@ $settings->add(new admin_setting_configcheckbox(
new lang_string('customreportsliveediting_desc', 'core_reportbuilder'), 1));
$ADMIN->add('reportbuilder', $settings);
$ADMIN->add(
'reportbuilder', new accesscallback(
'reportbuildercustomfields',
get_string('reportbuildercustomfields', 'core_reportbuilder'),
(new moodle_url('/reportbuilder/customfield.php'))->out(),
static function(): bool {
return has_capability('moodle/reportbuilder:configurecustomfields', context_system::instance());
},
empty($CFG->enablecustomreports)
)
);
+1 -1
View File
@@ -147,7 +147,7 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
$sensiblesettingsdefault .= 'secretphrase@@url, cronremotepassword@@none, smtpuser@@none, ';
$sensiblesettingsdefault .= 'smtppass@@none, proxypassword@@none, quizpassword@@quiz, allowedip@@none, blockedip@@none, ';
$sensiblesettingsdefault .= 'dbpass@@logstore_database, messageinbound_hostpass@@none, ';
$sensiblesettingsdefault .= 'pass@@auth_db, bind_pw@@auth_ldap, ';
$sensiblesettingsdefault .= 'bind_pw@@auth_cas, pass@@auth_db, bind_pw@@auth_ldap, ';
$sensiblesettingsdefault .= 'dbpass@@enrol_database, bind_pw@@enrol_ldap, ';
$sensiblesettingsdefault .= 'server_password@@search_solr, ssl_keypassword@@search_solr, ';
$sensiblesettingsdefault .= 'alternateserver_password@@search_solr, alternatessl_keypassword@@search_solr, ';
+3 -4
View File
@@ -25,10 +25,6 @@
defined('MOODLE_INTERNAL') || die();
$ADMIN->add('server', new admin_category('taskconfig', new lang_string('taskadmintitle', 'admin')));
$ADMIN->add('server', new admin_category('email', new lang_string('categoryemail', 'admin')));
$ADMIN->add('server', new admin_category('webservicesettings', new lang_string('webservices', 'webservice')));
if ($hassiteconfig) {
// System paths.
$temp = new admin_settingpage('systempaths', new lang_string('systempaths', 'admin'));
@@ -337,6 +333,7 @@ if ($hassiteconfig) {
$ADMIN->add('server', $temp);
// Tasks.
$ADMIN->add('server', new admin_category('taskconfig', new lang_string('taskadmintitle', 'admin')));
// Task processing.
$temp = new admin_settingpage('taskprocessing', new lang_string('taskprocessing', 'admin'));
@@ -470,6 +467,7 @@ if ($hassiteconfig) {
}
// Email.
$ADMIN->add('server', new admin_category('email', new lang_string('categoryemail', 'admin')));
// Outgoing mail configuration.
$temp = new admin_settingpage('outgoingmailconfig', new lang_string('outgoingmailconfig', 'admin'));
@@ -641,6 +639,7 @@ if ($hassiteconfig) {
}
// Web services.
$ADMIN->add('server', new admin_category('webservicesettings', new lang_string('webservices', 'webservice')));
// Web services > Overview.
$temp = new admin_settingpage('webservicesoverview', new lang_string('webservicesoverview', 'webservice'));
+2 -2
View File
@@ -46,9 +46,9 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
$optionalsubsystems->add(new admin_setting_configcheckbox('allowstealth', new lang_string('allowstealthmodules'),
new lang_string('allowstealthmodules_help'), 0, 1, 0));
// TODO: Analytics is now disable on new installs until MDL-84481 overcomes the config of mlbackend_python.
$optionalsubsystems->add(new admin_setting_configcheckbox('enableanalytics', new lang_string('enableanalytics', 'admin'),
new lang_string('configenableanalytics', 'admin'), 0, 1, 0));
new lang_string('configenableanalytics', 'admin'), 1, 1, 0));
$optionalsubsystems->add(new admin_setting_configcheckbox('core_competency/enabled',
new lang_string('enablecompetencies', 'core_competency'),
+8 -14
View File
@@ -6,20 +6,14 @@ $ADMIN->add('users', new admin_category('accounts', new lang_string('accounts',
$ADMIN->add('users', new admin_category('roles', new lang_string('permissions', 'role')));
$ADMIN->add('users', new admin_category('privacy', new lang_string('privacyandpolicies', 'admin')));
$capabilities = [
'moodle/user:create',
'moodle/user:update',
'moodle/user:delete',
'moodle/role:manage',
'moodle/role:assign',
'moodle/cohort:manage',
'moodle/cohort:view',
'moodle/cohort:configurecustomfields',
'moodle/role:safeoverride',
'moodle/role:override',
];
if ($hassiteconfig || has_any_capability($capabilities, $systemcontext)) { // Speedup for non-admins, all caps used on this page.
if ($hassiteconfig
or has_capability('moodle/user:create', $systemcontext)
or has_capability('moodle/user:update', $systemcontext)
or has_capability('moodle/user:delete', $systemcontext)
or has_capability('moodle/role:manage', $systemcontext)
or has_capability('moodle/role:assign', $systemcontext)
or has_capability('moodle/cohort:manage', $systemcontext)
or has_capability('moodle/cohort:view', $systemcontext)) { // Speedup for non-admins, add all caps used on this page.
// Stuff under the "accounts" subcategory.
+9 -7
View File
@@ -28,6 +28,9 @@
<div class="simplesearchform d-flex justify-content-end">
<form autocomplete="off" action="{{action}}" method="get" accept-charset="utf-8" class="mform d-flex flex-wrap align-items-center simplesearchform">
<div class="input-group">
<label for="searchinput-{{uniqid}}">
<span class="sr-only">{{#str}} search, core {{/str}}</span>
</label>
<input type="text"
id="searchinput-{{uniqid}}"
class="form-control"
@@ -38,13 +41,12 @@
autocomplete="off"
{{#query}}value="{{.}}"{{/query}}
>
<label for="searchinput-{{uniqid}}">
<span class="visually-hidden">{{#str}} search, core {{/str}}</span>
</label>
<button type="submit" class="btn btn-primary search-icon">
{{#pix}} a/search, core {{/pix}}
<span class="visually-hidden">{{#str}} search, core {{/str}}</span>
</button>
<div class="input-group-append">
<button type="submit" class="btn btn-primary search-icon">
{{#pix}} a/search, core {{/pix}}
<span class="sr-only">{{#str}} search, core {{/str}}</span>
</button>
</div>
</div>
</form>
</div>
@@ -59,9 +59,9 @@
Setting autocomplete.
}}
<div class="defaultsnext">
<div class="form-select defaultsnext">
<input type="hidden" name="{{name}}[xxxxx]" value="_qf__force_multiselect_submission">
<select class="form-select" name="{{name}}[]"
<select class="custom-select" name="{{name}}[]"
id="{{id}}"
{{#multiple}}multiple{{/multiple}}>
{{#options}}
+1 -1
View File
@@ -81,7 +81,7 @@
{{#default}}
<div class="form-defaultinfo text-muted {{#forceltr}}text-ltr{{/forceltr}}">{{{default}}}</div>
{{/default}}
<div class="form-text mt-2">{{{description}}}</div>
<div class="form-description mt-3">{{{description}}}</div>
{{#dependenton}}<div class="form-dependenton mb-4 text-muted">{{{.}}}</div>{{/dependenton}}
</div>
</div>
@@ -41,8 +41,8 @@
<div class="form-duration defaultsnext">
<div class="d-flex flex-wrap align-items-center">
<input type="text" size="5" id="{{id}}v" name="{{name}}[v]" value="{{value}}" class="form-control text-ltr" {{#readonly}}disabled{{/readonly}}>
<label class="visually-hidden" for="{{id}}u">{{#str}}durationunits, admin{{/str}}</label>
<select id="{{id}}u" name="{{name}}[u]" class="form-control form-select" {{#readonly}}disabled{{/readonly}}>
<label class="sr-only" for="{{id}}u">{{#str}}durationunits, admin{{/str}}</label>
<select id="{{id}}u" name="{{name}}[u]" class="form-control custom-select" {{#readonly}}disabled{{/readonly}}>
{{#options}}
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
{{/options}}
@@ -41,8 +41,8 @@
<div class="form-filesize defaultsnext">
<div class="d-flex flex-wrap align-items-center">
<input type="text" size="5" id="{{id}}v" name="{{name}}[v]" value="{{value}}" class="form-control text-ltr" {{#readonly}}disabled{{/readonly}}>
<label class="visually-hidden" for="{{id}}u">{{#str}}filesizeunits, admin{{/str}}</label>
<select id="{{id}}u" name="{{name}}[u]" class="form-control form-select" {{#readonly}}disabled{{/readonly}}>
<label class="sr-only" for="{{id}}u">{{#str}}filesizeunits, admin{{/str}}</label>
<select id="{{id}}u" name="{{name}}[u]" class="form-control custom-select" {{#readonly}}disabled{{/readonly}}>
{{#options}}
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
{{/options}}
@@ -39,7 +39,7 @@
{{!
Setting configmultiselect.
}}
<div>
<div class="form-select">
{{^readonly}}<input type="hidden" name="{{name}}[xxxxx]" value="1">{{/readonly}}
<select {{#readonly}}disabled{{/readonly}} id="{{id}}" name="{{name}}[]" size="{{size}}" class="form-control" multiple>
{{#options}}
@@ -58,7 +58,7 @@
{{!
Setting configmultiselect with optgroup support.
}}
<div>
<div class="form-select">
{{^readonly}}<input type="hidden" name="{{name}}[xxxxx]" value="1">{{/readonly}}
<select {{#readonly}}disabled{{/readonly}} id="{{id}}" name="{{name}}[]" size="{{size}}" class="form-control" multiple>
{{#options}}
@@ -39,8 +39,8 @@
{{!
Setting configselect.
}}
<div class="defaultsnext">
<select {{#readonly}}disabled{{/readonly}} id="{{id}}" name="{{name}}" class="form-select">
<div class="form-select defaultsnext">
<select {{#readonly}}disabled{{/readonly}} id="{{id}}" name="{{name}}" class="custom-select">
{{#options}}
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
{{/options}}
@@ -56,8 +56,8 @@
{{!
Setting configselect with optgroup support.
}}
<div class="defaultsnext">
<select {{#readonly}}disabled{{/readonly}} id="{{id}}" name="{{name}}" class="form-select">
<div class="form-select defaultsnext">
<select {{#readonly}}disabled{{/readonly}} id="{{id}}" name="{{name}}" class="custom-select">
{{#options}}
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
{{/options}}
+4 -4
View File
@@ -46,14 +46,14 @@
}}
<div class="form-time defaultsnext">
<div class="d-flex flex-wrap align-items-center text-ltr">
<label class="visually-hidden" for="{{id}}h">{{#str}}hours{{/str}}</label>
<select id="{{id}}h" name="{{name}}[h]" class="form-select" {{#readonly}}disabled{{/readonly}}>
<label class="sr-only" for="{{id}}h">{{#str}}hours{{/str}}</label>
<select id="{{id}}h" name="{{name}}[h]" class="custom-select" {{#readonly}}disabled{{/readonly}}>
{{#hours}}
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
{{/hours}}
</select>:
<label class="visually-hidden" for="{{id}}m">{{#str}}minutes{{/str}}</label>
<select id="{{id}}m" name="{{name}}[m]" class="form-select" {{#readonly}}disabled{{/readonly}}>
<label class="sr-only" for="{{id}}m">{{#str}}minutes{{/str}}</label>
<select id="{{id}}m" name="{{name}}[m]" class="custom-select" {{#readonly}}disabled{{/readonly}}>
{{#minutes}}
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
{{/minutes}}
@@ -29,7 +29,7 @@
* state - state of the toggle
* title - title of the toggle tooltip
* label - label of the toggle
* labelclasses - classes for the label (visually-hidden for screen readers)
* labelclasses - classes for the label (sr-only for screen readers)
Example context (json):
{
@@ -44,7 +44,7 @@
}],
"title": "Title example",
"label": "Enable/disable reality",
"labelclasses": "visually-hidden"
"labelclasses": "sr-only"
}
}}
<div id="container-{{id}}"
@@ -42,7 +42,7 @@
}}
<div class="mb-3">
{{#selects}}
<select id="{{id}}{{key}}" name="{{name}}[]" class="form-select mb-1">
<select id="{{id}}{{key}}" name="{{name}}[]" class="custom-select mb-1">
{{#options}}
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
{{/options}}
+1 -1
View File
@@ -41,6 +41,6 @@
</label>
</div>
<div class="form-setting col-sm-9">
<div class="form-text">{{{description}}}</div>
<div class="form-description">{{{description}}}</div>
</div>
</div>
@@ -39,7 +39,7 @@
Setting configselect.
}}
<div class="mb-3">
<select id="{{id}}" name="{{name}}[value]" class="form-select">
<select id="{{id}}" name="{{name}}[value]" class="form-select custom-select">
{{#options}}
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
{{/options}}
@@ -52,7 +52,7 @@
data-choose="{{choose}}"
data-sesskey="{{sesskey}}">
<i class="icon fa fa-info-circle m-0" aria-hidden="true"></i>
<span class="visually-hidden">{{#str}}previewthemename, moodle, {{name}}{{/str}}</span>
<span class="sr-only">{{#str}}previewthemename, moodle, {{name}}{{/str}}</span>
</button>
{{#reporturl}}
<a
@@ -61,7 +61,7 @@
class="btn btn-link p-0 ms-2"
title="{{#str}}themeusagereportname, admin, {{name}}{{/str}}">
<i class="icon fa fa-area-chart m-0" aria-hidden="true"></i>
<span class="visually-hidden">{{#str}}themeusagereportname, admin, {{name}}{{/str}}</span>
<span class="sr-only">{{#str}}themeusagereportname, admin, {{name}}{{/str}}</span>
</a>
{{/reporturl}}
{{#settingsurl}}
@@ -71,7 +71,7 @@
class="btn btn-link p-0 ms-2"
title="{{#str}}themeeditsettingsname, admin, {{name}}{{/str}}">
<i class="icon fa fa-cog m-0" aria-hidden="true"></i>
<span class="visually-hidden">{{#str}}themeeditsettingsname, admin, {{name}}{{/str}}</span>
<span class="sr-only">{{#str}}themeeditsettingsname, admin, {{name}}{{/str}}</span>
</a>
{{/settingsurl}}
</div>
@@ -91,7 +91,7 @@
<input type="hidden" name="choose" value="{{choose}}">
<button type="submit" class="btn btn-primary">
<span aria-hidden="true">{{#str}}selecttheme, moodle{{/str}}</span>
<span class="visually-hidden">{{#str}}selectthemename, moodle, {{name}}{{/str}}</span>
<span class="sr-only">{{#str}}selectthemename, moodle, {{name}}{{/str}}</span>
</button>
</form>
{{/actionurl}}
-2
View File
@@ -81,8 +81,6 @@ class behat_admin extends behat_base {
$this->execute('behat_forms::i_set_the_field_with_xpath_to', [$fieldxpath, $value]);
$this->execute("behat_general::i_click_on", [get_string('savechanges'), 'button']);
// Wait for the page to be redirected.
$this->execute("behat_general::i_wait_to_be_redirected");
}
}
+5 -2
View File
@@ -171,7 +171,9 @@ Feature: An administrator can browse user accounts
| User Two | two@example.com |
| User Three | three@example.com |
And I click on "Filters" "button"
And I set the field "System role value" in the "System role" "core_reportbuilder > Filter" to "Course creator"
And I set the following fields in the "System role" "core_reportbuilder > Filter" to these values:
| System role operator | Is equal to |
| System role value | Course creator |
And I click on "Apply" "button" in the "[data-region='report-filters']" "css_element"
And I click on "Filters" "button"
And I should see "User One" in the "reportbuilder-table" "table"
@@ -179,7 +181,8 @@ Feature: An administrator can browse user accounts
And I should not see "User Three" in the "reportbuilder-table" "table"
And I click on "Filters" "button"
And I click on "Reset all" "button" in the "[data-region='report-filters']" "css_element"
And I set the field "Role name" in the "Course role" "core_reportbuilder > Filter" to "Teacher"
And I set the following fields in the "Course role" "core_reportbuilder > Filter" to these values:
| Role name | Teacher |
And I click on "Apply" "button" in the "[data-region='report-filters']" "css_element"
And I click on "Filters" "button"
And I should not see "User One" in the "reportbuilder-table" "table"
+12 -32
View File
@@ -86,69 +86,49 @@ final class set_plugin_order_test extends \externallib_advanced_testcase {
return [
[
'initialstate' => 'textarea,tiny',
'plugin' => 'editor_textarea',
'pluginname' => 'editor_textarea',
'direction' => 1, // DOWN.
'neworder' => $getorder([
'expected' => $getorder([
'tiny',
'textarea',
]),
'newstate' => 'tiny,textarea',
'newtexteditors' => 'tiny,textarea',
],
[
'initialstate' => 'textarea,tiny',
'plugin' => 'editor_textarea',
'pluginname' => 'editor_textarea',
'direction' => -1, // UP.
'neworder' => $getorder([
'expected' => $getorder([
'textarea',
'tiny',
]),
'newstate' => 'textarea,tiny',
'newtexteditors' => 'textarea,tiny',
],
[
'initialstate' => 'textarea,tiny',
'plugin' => 'editor_tiny',
'pluginname' => 'editor_tiny',
'direction' => 1, // DOWN.
// Tiny is already at the bottom of the list of enabled plugins.
'neworder' => $getorder([
'expected' => $getorder([
'textarea',
'tiny',
]),
'newstate' => 'textarea,tiny',
'newtexteditors' => 'textarea,tiny',
],
[
'initialstate' => 'textarea,tiny',
'plugin' => 'editor_atto',
'pluginname' => 'editor_atto',
'direction' => 1, // DOWN.
// Atto is not enabled. Disabled editors are listed lexically after enabled editors.
'neworder' => $getorder([
'expected' => $getorder([
'textarea',
'tiny',
]),
'newstate' => 'textarea,tiny',
'newtexteditors' => 'textarea,tiny',
],
];
}
/**
* Test re-ordering plugins where one plugin is not enabled.
*
* Media plugins are ordered by rank, with enabled plugins first.
* This is similar to the editors test but covers a scenario that cannot be covered by the editors test due to
* not having enough plugins.
*/
public function test_execute_media_including_disabled(): void {
global $CFG;
$this->resetAfterTest();
$this->setAdminUser();
$CFG->media_plugins_sortorder = 'videojs,vimeo,html5video';
set_plugin_order::execute('youtube', -1);
$this->assertSame('videojs,vimeo,html5video', $CFG->media_plugins_sortorder);
}
/**
* Text execute method for plugins which do not support ordering.
*
@@ -20,7 +20,7 @@ namespace core_admin\reportbuilder\datasource;
use core\task\database_logger;
use core_reportbuilder_generator;
use core_reportbuilder\local\filters\{date, duration, number, select, text};
use core_reportbuilder\local\filters\{boolean_select, date, duration, number, select, text};
use core_reportbuilder\task\send_schedules;
use core_reportbuilder\tests\core_reportbuilder_testcase;
@@ -136,12 +136,10 @@ final class task_logs_test extends core_reportbuilder_testcase {
'task_log:output_operator' => text::IS_EMPTY,
], false],
'Filter result' => ['task_log:result', [
'task_log:result_operator' => select::EQUAL_TO,
'task_log:result_value' => 0,
'task_log:result_operator' => boolean_select::CHECKED,
], true],
'Filter result (no match)' => ['task_log:result', [
'task_log:result_operator' => select::EQUAL_TO,
'task_log:result_value' => 1,
'task_log:result_operator' => boolean_select::NOT_CHECKED,
], false],
'Filter time start' => ['task_log:timestart', [
'task_log:timestart_operator' => date::DATE_RANGE,
-9
View File
@@ -1,9 +0,0 @@
# tool_admin_presets Upgrade notes
## 5.0
### Deprecated
- behat_admin_presets::following_in_the_should_download_between_and_bytes is deprecated. Use: the following element should download a file that:
For more information see [MDL-83035](https://tracker.moodle.org/browse/MDL-83035)
@@ -81,6 +81,7 @@ class admin_preset extends base {
* @return column[]
*/
protected function get_all_columns(): array {
global $DB;
$apalias = $this->get_table_alias('adminpresets');
// Name.
@@ -105,6 +106,10 @@ class admin_preset extends base {
});
// Description.
$descriptionfieldsql = "{$apalias}.comments";
if ($DB->get_dbfamily() === 'oracle') {
$descriptionfieldsql = $DB->sql_order_by_text($descriptionfieldsql, 1024);
}
$columns[] = (new column(
'description',
new lang_string('description'),
@@ -112,9 +117,9 @@ class admin_preset extends base {
))
->add_joins($this->get_joins())
->set_type(column::TYPE_LONGTEXT)
->add_field("{$apalias}.comments")
->add_field($descriptionfieldsql, 'description')
->set_is_sortable(true)
->set_callback(static function(?string $description): string {
->set_callback(static function(?string $description, \stdClass $row): string {
return format_text($description, FORMAT_HTML, ['context' => \context_system::instance()]);
});
@@ -45,7 +45,7 @@
{{#skippedchanges.show}}
{{#skippedchanges.heading}}
<h3>
<a data-bs-toggle="collapse" href="#collapseSkippedChanges" role="button" aria-expanded="false" aria-controls="collapseSkippedChanges">
<a data-toggle="collapse" href="#collapseSkippedChanges" role="button" aria-expanded="false" aria-controls="collapseSkippedChanges">
{{{.}}}
</a>
</h3>
@@ -30,6 +30,7 @@ Feature: I can apply presets
And I should see "Activities" in the "Setting changes" "table"
And I should see "Activity chooser tabs" in the "Setting changes" "table"
And I should see "Adaptive mode (no penalties)" in the "Setting changes" "table"
And I should see "Analytics" in the "Setting changes" "table"
And I should see "Blog menu" in the "Setting changes" "table"
And I should see "Blog tags" in the "Setting changes" "table"
And I should see "Calculated" in the "Setting changes" "table"
@@ -72,6 +73,7 @@ Feature: I can apply presets
And "Maximum number of attachments" row "Current value" column of "Setting changes" table should contain "9"
And "Maximum number of attachments" row "New value" column of "Setting changes" table should contain "3"
And I should see "Mentees" in the "Setting changes" "table"
And I should see "Network servers" in the "Setting changes" "table"
And I should see "Numerical" in the "Setting changes" "table"
And I should see "Online users" in the "Setting changes" "table"
And I should see "Private files" in the "Setting changes" "table"
@@ -0,0 +1,130 @@
<?php
// This file is part of Moodle - http://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 <http://www.gnu.org/licenses/>.
/**
* Steps definitions related with admin presets.
*
* @package tool_admin_presets
* @category test
* @copyright 2021 Pimenko <support@pimenko.com><pimenko.com>
* @author Sylvain Revenu | Pimenko
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
// NOTE: no MOODLE_INTERNAL test here, this file may be required by behat before including /config.php.
require_once(__DIR__ . '/../../../../../lib/behat/behat_base.php');
require_once(__DIR__ . '/../../../../../lib/behat/behat_field_manager.php');
use Behat\Mink\Exception\ExpectationException as ExpectationException;
/**
* Steps definitions related with admin presets.
*
* @package tool_admin_presets
* @category test
* @copyright 2021 Pimenko <support@pimenko.com><pimenko.com>
* @author Sylvain Revenu | Pimenko
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class behat_admin_presets extends behat_base {
/**
* Downloads the file from a specific link on the page and checks the size is in a given range.
*
* Only works if the link has an href attribute. Javascript downloads are
* not supported. Currently, the href must be an absolute URL.
*
* The range includes the endpoints. That is, a 10 byte file in considered to
* be between "5" and "10" bytes, and between "10" and "20" bytes.
*
* @Then /^following "(?P<link_string>[^"]*)" "(?P<selector_string>[^"]*)" in the "(?P<element_container_string>(?:[^"]|\\")*)" "(?P<text_selector_string>[^"]*)" should download between "(?P<min_bytes>\d+)" and "(?P<max_bytes>\d+)" bytes$/
* @param string $link the text of the link.
* @param string $selectortype The type of what we look for
* @param string $nodeelement Element we look in
* @param string $nodeselectortype The type of selector where we look in
* @param int $minexpectedsize the minimum expected file size in bytes.
* @param int $maxexpectedsize the maximum expected file size in bytes.
* @return void
* @throws ExpectationException
*/
final public function following_in_the_should_download_between_and_bytes(string $link, string $selectortype,
string $nodeelement, string $nodeselectortype, int $minexpectedsize, int $maxexpectedsize): void {
// If the minimum is greater than the maximum then swap the values.
if ((int) $minexpectedsize > (int) $maxexpectedsize) {
list($minexpectedsize, $maxexpectedsize) = [$maxexpectedsize, $minexpectedsize];
}
$exception = new ExpectationException('Error while downloading data from ' . $link, $this->getSession());
// It will stop spinning once file is downloaded or time out.
$result = $this->spin(
function($context, $args) {
return $this->download_file_from_link_within_node($args['selectortype'], $args['link'],
$args['nodeselectortype'], $args['nodeelement']);
},
[
'selectortype' => $selectortype,
'link' => $link,
'nodeselectortype' => $nodeselectortype,
'nodeelement' => $nodeelement
],
behat_base::get_extended_timeout(),
$exception
);
// Check download size.
$actualsize = (int) strlen($result);
if ($actualsize < $minexpectedsize || $actualsize > $maxexpectedsize) {
throw new ExpectationException('Downloaded data was ' . $actualsize .
' bytes, expecting between ' . $minexpectedsize . ' and ' .
$maxexpectedsize, $this->getSession());
}
}
/**
* Given the text of a link, download the linked file and return the contents.
*
* This is a helper method used by {@see following_in_the_should_download_between_and_bytes()}
*
* @param string $selectortype The type of what we look for
* @param string $link the text of the link.
* @param string $nodeselectortype The type of selector where we look in
* @param string $nodeelement Element we look in
* @return string the content of the downloaded file.
*/
final public function download_file_from_link_within_node(string $selectortype, string $link,
string $nodeselectortype, string $nodeelement): string {
// Find the link from ur specific node.
$linknode = $this->get_node_in_container($selectortype, $link, $nodeselectortype, $nodeelement);
$this->ensure_node_is_visible($linknode);
// Get the href and check it.
$url = $linknode->getAttribute('href');
if (!$url) {
throw new ExpectationException('Download link does not have href attribute',
$this->getSession());
}
if (!preg_match('~^https?://~', $url)) {
throw new ExpectationException('Download link not an absolute URL: ' . $url,
$this->getSession());
}
// Download the URL and check the size.
$session = $this->getSession()->getCookie('MoodleSession');
return download_file_content($url, ['Cookie' => 'MoodleSession=' . $session]);
}
}
@@ -1,138 +0,0 @@
<?php
// This file is part of Moodle - http://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 <http://www.gnu.org/licenses/>.
/**
* Steps definitions related with admin presets.
*
* @package tool_admin_presets
* @category test
* @copyright 2021 Pimenko <support@pimenko.com><pimenko.com>
* @author Sylvain Revenu | Pimenko
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
// NOTE: no MOODLE_INTERNAL test here, this file may be required by behat before including /config.php.
require_once(__DIR__ . '/../../../../../lib/behat/behat_deprecated_base.php');
require_once(__DIR__ . '/../../../../../lib/behat/behat_field_manager.php');
use Behat\Mink\Exception\ExpectationException as ExpectationException;
/**
* Steps definitions that are now deprecated and will be removed in the next releases.
*
* @package tool_admin_presets
* @category test
* @copyright 2021 Pimenko <support@pimenko.com><pimenko.com>
* @author Sylvain Revenu | Pimenko
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @todo MDL-78077 This will be deleted in Moodle 6.0.
*/
class behat_admin_presets_deprecated extends behat_deprecated_base {
/**
* Downloads the file from a specific link on the page and checks the size is in a given range.
*
* Only works if the link has an href attribute. Javascript downloads are
* not supported. Currently, the href must be an absolute URL.
*
* The range includes the endpoints. That is, a 10 byte file in considered to
* be between "5" and "10" bytes, and between "10" and "20" bytes.
*
* @deprecated since 5.0
*
* @Then /^following "(?P<link_string>[^"]*)" "(?P<selector_string>[^"]*)" in the "(?P<element_container_string>(?:[^"]|\\")*)" "(?P<text_selector_string>[^"]*)" should download between "(?P<min_bytes>\d+)" and "(?P<max_bytes>\d+)" bytes$/
* @param string $link the text of the link.
* @param string $selectortype The type of what we look for
* @param string $nodeelement Element we look in
* @param string $nodeselectortype The type of selector where we look in
* @param int $minexpectedsize the minimum expected file size in bytes.
* @param int $maxexpectedsize the maximum expected file size in bytes.
* @return void
* @throws ExpectationException
*/
#[\core\attribute\deprecated('behat_admin_presets::following_in_the_should_download_between_and_bytes', since: '5.0')]
final public function following_in_the_should_download_between_and_bytes(string $link, string $selectortype,
string $nodeelement, string $nodeselectortype, int $minexpectedsize, int $maxexpectedsize): void {
$this->deprecated_message("behat_admin_presets::following_in_the_should_download_between_and_bytes
is deprecated. Use: the following element should download a file that:");
// If the minimum is greater than the maximum then swap the values.
if ((int) $minexpectedsize > (int) $maxexpectedsize) {
list($minexpectedsize, $maxexpectedsize) = [$maxexpectedsize, $minexpectedsize];
}
$exception = new ExpectationException('Error while downloading data from ' . $link, $this->getSession());
// It will stop spinning once file is downloaded or time out.
$result = $this->spin(
function($context, $args) {
return $this->download_file_from_link_within_node($args['selectortype'], $args['link'],
$args['nodeselectortype'], $args['nodeelement']);
},
[
'selectortype' => $selectortype,
'link' => $link,
'nodeselectortype' => $nodeselectortype,
'nodeelement' => $nodeelement
],
behat_base::get_extended_timeout(),
$exception
);
// Check download size.
$actualsize = (int) strlen($result);
if ($actualsize < $minexpectedsize || $actualsize > $maxexpectedsize) {
throw new ExpectationException('Downloaded data was ' . $actualsize .
' bytes, expecting between ' . $minexpectedsize . ' and ' .
$maxexpectedsize, $this->getSession());
}
}
/**
* Given the text of a link, download the linked file and return the contents.
*
* This is a helper method used by {@see following_in_the_should_download_between_and_bytes()}
*
* @param string $selectortype The type of what we look for
* @param string $link the text of the link.
* @param string $nodeselectortype The type of selector where we look in
* @param string $nodeelement Element we look in
* @return string the content of the downloaded file.
*/
final public function download_file_from_link_within_node(string $selectortype, string $link,
string $nodeselectortype, string $nodeelement): string {
// Find the link from ur specific node.
$linknode = $this->get_node_in_container($selectortype, $link, $nodeselectortype, $nodeelement);
$this->ensure_node_is_visible($linknode);
// Get the href and check it.
$url = $linknode->getAttribute('href');
if (!$url) {
throw new ExpectationException('Download link does not have href attribute',
$this->getSession());
}
if (!preg_match('~^https?://~', $url)) {
throw new ExpectationException('Download link not an absolute URL: ' . $url,
$this->getSession());
}
// Download the URL and check the size.
$session = $this->getSession()->getCookie('MoodleSession');
return download_file_content($url, ['Cookie' => 'MoodleSession=' . $session]);
}
}
@@ -81,9 +81,6 @@ final class import_test extends \advanced_testcase {
$action = new import();
$sink = $this->redirectEvents();
try {
// Suppress warnings and load XML.
$invokable = self::get_invokable();
set_error_handler($invokable, E_WARNING);
$action->execute();
} catch (\exception $e) {
// If import action was successfull, redirect should be called so we will encounter an
@@ -93,7 +90,6 @@ final class import_test extends \advanced_testcase {
} else {
$this->assertInstanceOf(\moodle_exception::class, $e);
}
restore_error_handler();
} finally {
if ($expecteddebugging) {
$this->assertDebuggingCalled();
@@ -158,7 +154,7 @@ final class import_test extends \advanced_testcase {
'activity_modules' => 1,
],
'mod' => [
'page' => 0,
'chat' => 0,
'data' => 0,
'lesson' => 1,
],
+2 -2
View File
@@ -26,5 +26,5 @@
defined('MOODLE_INTERNAL') || die();
$plugin->component = 'tool_admin_presets';
$plugin->version = 2025041400;
$plugin->requires = 2025040800;
$plugin->version = 2024100700;
$plugin->requires = 2024100100;
@@ -45,14 +45,14 @@
{{#trainedexternally}}
<div class="box mb-4">{{#str}} evaluationmodeinfo, tool_analytics {{/str}}</div>
<div class="form-check">
<input class="form-check-input" type="radio" name="evaluationmode" id="id-mode-trainedmodel" value="trainedmodel" checked>
<label class="form-check-label" for="id-mode-trainedmodel">{{#str}} evaluationmodetrainedmodel, tool_analytics {{/str}}</label>
<div class="custom-control custom-radio">
<input class="custom-control-input" type="radio" name="evaluationmode" id="id-mode-trainedmodel" value="trainedmodel" checked>
<label class="custom-control-label" for="id-mode-trainedmodel">{{#str}} evaluationmodetrainedmodel, tool_analytics {{/str}}</label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" name="evaluationmode" id="id-mode-configuration" value="configuration">
<label class="form-check-label" for="id-mode-configuration">{{#str}} evaluationmodeconfiguration, tool_analytics {{/str}}</label>
<div class="custom-control custom-radio">
<input class="custom-control-input" type="radio" name="evaluationmode" id="id-mode-configuration" value="configuration">
<label class="custom-control-label" for="id-mode-configuration">{{#str}} evaluationmodeconfiguration, tool_analytics {{/str}}</label>
</div>
{{/trainedexternally}}
@@ -60,7 +60,7 @@
<div id="id-evaluation-timesplitting-container" class="mt-3 {{#trainedexternally}}hidden{{/trainedexternally}}">
{{#str}} selecttimesplittingforevaluation, tool_analytics {{/str}}
<div>
<select id="id-evaluation-timesplitting" name="timesplitting" class="form-select mt-3">
<select id="id-evaluation-timesplitting" name="timesplitting" class="custom-select mt-3">
{{#timesplittingmethods}}
<option value="{{id}}">{{text}}</option>
{{/timesplittingmethods}}
@@ -31,17 +31,17 @@
{
}
}}
<div class="form-check">
<input class="form-check-input" type="radio" name="exportoption" id="id-mode-exportdata" value="exportdata">
<label class="form-check-label" for="id-mode-exportdata">{{#str}} exporttrainingdata, tool_analytics {{/str}}</label>
<div class="custom-control custom-radio">
<input class="custom-control-input" type="radio" name="exportoption" id="id-mode-exportdata" value="exportdata">
<label class="custom-control-label" for="id-mode-exportdata">{{#str}} exporttrainingdata, tool_analytics {{/str}}</label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" name="exportoption" id="id-mode-exportmodel" value="exportmodel" checked>
<label class="form-check-label" for="id-mode-exportmodel">{{#str}} exportmodel, tool_analytics {{/str}}</label>
<div class="custom-control custom-radio">
<input class="custom-control-input" type="radio" name="exportoption" id="id-mode-exportmodel" value="exportmodel" checked>
<label class="custom-control-label" for="id-mode-exportmodel">{{#str}} exportmodel, tool_analytics {{/str}}</label>
</div>
<div class="form-check ms-5" id="id-includeweights-container">
<input class="form-check-input" type="checkbox" id="id-includeweights" value="1" checked>
<label class="form-check-label" for="id-includeweights">{{#str}} exportincludeweights, tool_analytics {{/str}}</label>
<div class="custom-control custom-checkbox ms-5" id="id-includeweights-container">
<input class="custom-control-input" type="checkbox" id="id-includeweights" value="1" checked>
<label class="custom-control-label" for="id-includeweights">{{#str}} exportincludeweights, tool_analytics {{/str}}</label>
</div>
{{#js}}
@@ -1,82 +0,0 @@
@tool @tool_analytics
Feature: Manager can obtain prediction models insights
In order to view prediction models insights
As a manager
I should be able to obtain the prediction models insights
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| s1 | Student | One | s1@example.com |
| m1 | Manager | One | m1@example.com |
| m2 | Manager | Two | m2@example.com |
| t1 | Teacher | One | t1@example.com |
And the following "role assigns" exist:
| user | role | contextlevel | reference |
| m1 | manager | System | |
| m2 | manager | System | |
# To ensure that course start date is in the future, set course start date to "tomorrow".
And the following "courses" exist:
| fullname | shortname | startdate |
| Course 1 | C1 | ##tomorrow## |
| Course 2 | C2 | ##tomorrow## |
| Course 3 | C3 | ##tomorrow## |
And the following "course enrolments" exist:
| user | course | role |
| s1 | C1 | student |
| s1 | C2 | student |
| s1 | C3 | student |
| t1 | C3 | editingteacher |
# Disable "Analytics processes execution via command line only".
And the following config values are set as admin:
| onlycli | 0 | analytics |
| enableanalytics | 1 | |
And a Python Machine Learning backend server is configured
And I change the Python Machine Learning backend to use external server
@javascript
Scenario: Manager can obtain prediction models insights
Given I log in as "m1"
And I navigate to "Analytics > Analytics models" in site administration
And I click on "Actions" "link" in the "Courses at risk of not starting" "table_row"
And I click on "Execute scheduled analysis" "link" in the "Courses at risk of not starting" "table_row"
And I press "Continue"
When I select "All predictions" from the "contextid" singleselect
# Confirm that only courses without teachers, Course 1 and Course 2, are listed.
Then "Course 1" "text" should exist
And "Course 2" "text" should exist
And "Course 3" "text" should not exist
And I click on "Select Course 1 for bulk action" "checkbox"
And I press "Not applicable"
And I press "Confirm"
# After m1 marks Course 1 as Not applicable, only Course 2 should be listed in the predictions for manager 1.
And "Course 1" "text" should not exist
And "Course 2" "text" should exist
And I log in as "m2"
And I click on ".popover-region-notifications" "css_element"
# Notification of new insight exists.
And "Upcoming courses have no teachers or students" "text" should exist
And I click on "View full notification" "link" in the ".popover-region-notifications" "css_element"
And I click on "View insight" "link"
# Course 1, previously marked as Not applicable by manager 1, is still listed for manager 2.
And "Course 1" "text" should exist
And I click on "View details" "link" in the "Course 1" "table_row"
# Prediction details and indicators are displayed for the selected course.
And the following should exist in the "insights-list" table:
| Description |
| Course 1 |
And the following should exist in the "prediction-calculations" table:
| -1- | -2- |
| Teacher availability | No |
| Student enrolments | Yes |
# Date of prediction analysis execution.
And "##today##%A, %d %B %Y##" "text" should exist in the "Time predicted" "table_row"
And I click on "Select Course 1 for bulk action" "checkbox"
And I press "Accept"
And I press "Confirm"
# Verify that you end up on the page listing predictions for 'No teaching'.
And "Courses at risk of not starting" "text" should exist
And "The following courses due to start in the upcoming days are at risk of not starting because they don't have teachers or students enrolled." "text" should exist
And the following should not exist in the "insights-list" table:
| Description |
| Course 1 |
@@ -11,10 +11,6 @@ Feature: Restoring default models
And the following "role assigns" exist:
| user | role | contextlevel | reference |
| manager | manager | System | |
And the following config values are set as admin:
| enableanalytics | 1 |
And a Python Machine Learning backend server is configured
And I change the Python Machine Learning backend to use external server
Scenario: Restore a single deleted default model
Given I log in as "manager"
@@ -6,10 +6,6 @@ Feature: Verify the breadcrumbs in analytics site administration pages
Background:
Given I log in as "admin"
And the following config values are set as admin:
| enableanalytics | 1 |
And a Python Machine Learning backend server is configured
And I change the Python Machine Learning backend to use external server
Scenario: Verify the breadcrumbs in analytics models page by visiting the create model, import model, restore model and edit page
Given I navigate to "Analytics > Analytics models" in site administration
+2 -2
View File
@@ -24,6 +24,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2025041400; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2025040800; // Requires this Moodle version.
$plugin->version = 2024100700; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2024100100; // Requires this Moodle version.
$plugin->component = 'tool_analytics'; // Full name of the plugin (used for diagnostics).
@@ -24,6 +24,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2025041400;
$plugin->requires = 2025040800;
$plugin->version = 2024100700;
$plugin->requires = 2024100100;
$plugin->component = 'tool_availabilityconditions';
+1 -1
View File
@@ -1,6 +1,6 @@
# tool_behat Upgrade notes
## 5.0
## 4.5.2
### Added
-4
View File
@@ -36,10 +36,6 @@ 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');
+1 -5
View File
@@ -31,17 +31,13 @@ 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');
require_once(__DIR__.'/../../../../lib/behat/classes/behat_command.php');
require_once(__DIR__.'/../../../../lib/behat/classes/behat_config_manager.php');
error_reporting(E_ALL);
error_reporting(E_ALL | E_STRICT);
ini_set('display_errors', '1');
ini_set('log_errors', '1');
+2 -6
View File
@@ -39,10 +39,6 @@ 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.
@@ -125,7 +121,7 @@ require_once(__DIR__ . '/../../../../lib/behat/classes/behat_command.php');
require_once(__DIR__ . '/../../../../lib/behat/classes/behat_config_manager.php');
// Remove error handling overrides done in config.php. This is consistent with admin/tool/behat/cli/util_single_run.php.
$CFG->debug = (E_ALL);
$CFG->debug = (E_ALL | E_STRICT);
$CFG->debugdisplay = 1;
error_reporting($CFG->debug);
ini_set('display_errors', '1');
@@ -155,7 +151,7 @@ if (empty($options['parallel'])) {
$processes = cli_execute_parallel(array($cmd), __DIR__);
$status = print_sequential_output($processes, false);
chdir($cwd);
exit((int) $status);
exit($status);
}
// Default torun is maximum parallel runs.
+2 -6
View File
@@ -33,10 +33,6 @@ 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');
@@ -121,7 +117,7 @@ define('ABORT_AFTER_CONFIG', true);
require_once(__DIR__ . '/../../../../config.php');
// Remove error handling overrides done in config.php.
$CFG->debug = (E_ALL);
$CFG->debug = (E_ALL | E_STRICT);
$CFG->debugdisplay = 1;
error_reporting($CFG->debug);
ini_set('display_errors', '1');
@@ -268,7 +264,7 @@ exit(0);
* @param string $featurestepfile feature step file in which steps will be saved.
* @return int exitcode.
*/
function print_update_step_output($process, $featurestepfile): int {
function print_update_step_output($process, $featurestepfile) {
$printedlength = 0;
echo "Updating steps feature file for parallel behat runs" . PHP_EOL;
@@ -150,10 +150,13 @@ Feature: Set up contextual data for tests
Given the following "courses" exist:
| fullname | shortname |
| Course 1 | C1 |
And I enable "chat" "mod" plugin
And I enable "survey" "mod" plugin
And the following "activities" exist:
| activity | name | intro | course | idnumber |
| assign | Test assignment name | Test assignment description | C1 | assign1 |
| book | Test book name | Test book description | C1 | book1 |
| chat | Test chat name | Test chat description | C1 | chat1 |
| choice | Test choice name | Test choice description | C1 | choice1 |
| data | Test database name | Test database description | C1 | data1 |
| feedback | Test feedback name | Test feedback description | C1 | feedback1 |
@@ -168,6 +171,7 @@ Feature: Set up contextual data for tests
| quiz | Test quiz name | Test quiz description | C1 | quiz1 |
| resource | Test resource name | Test resource description | C1 | resource1 |
| scorm | Test scorm name | Test scorm description | C1 | scorm1 |
| survey | Test survey name | Test survey description | C1 | survey1 |
| url | Test url name | Test url description | C1 | url1 |
| wiki | Test wiki name | Test wiki description | C1 | wiki1 |
| workshop | Test workshop name | Test workshop description | C1 | workshop1 |
@@ -182,6 +186,7 @@ Feature: Set up contextual data for tests
# Assignment 2.2 module type is disabled by default
# And I should see "Test assignment22 name"
And I should see "Test book name"
And I should see "Test chat name"
And I should see "Test choice name"
And I should see "Test database name"
# Feedback module type is disabled by default
@@ -198,6 +203,7 @@ Feature: Set up contextual data for tests
And I should see "Test quiz name"
And I should see "Test resource name"
And I should see "Test scorm name"
And I should see "Test survey name"
And I should see "Test url name"
And I should see "Test wiki name"
And I should see "Test workshop name"
@@ -25,13 +25,13 @@ Feature: Edit capabilities
And I click on "Edit Teacher role" "link"
And I fill the capabilities form with the following permissions:
| capability | permission |
| block/online_users:myaddinstance | Allow |
| block/mnet_hosts:myaddinstance | Allow |
| moodle/site:messageanyuser | Inherit |
| moodle/grade:managesharedforms | Prevent |
| moodle/course:request | Prohibit |
And I press "Save changes"
When I follow "Edit Teacher role"
Then "block/online_users:myaddinstance" capability has "Allow" permission
Then "block/mnet_hosts:myaddinstance" capability has "Allow" permission
And "moodle/site:messageanyuser" capability has "Not set" permission
And "moodle/grade:managesharedforms" capability has "Prevent" permission
And "moodle/course:request" capability has "Prohibit" permission
+1 -1
View File
@@ -468,7 +468,7 @@ final class manager_util_test extends \advanced_testcase {
$CFG->dirroot = $oldroot;
}
public static function clean_features_path_list() {
public function clean_features_path_list() {
return array(
['/home/test/this/that/test/behat/mod_assign.feature', 'mod_assign_behat_test_that_this_test', '/home/test/this/that/test/behat/mod_assign.feature'],
['/home/this/that/test/behat/mod_assign.feature', 'mod_assign_behat_test_that_this_home', '/home/this/that/test/behat/mod_assign.feature'],
+2 -2
View File
@@ -24,6 +24,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2025041400; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2025040800; // Requires this Moodle version.
$plugin->version = 2024100700; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2024100100; // Requires this Moodle version.
$plugin->component = 'tool_behat'; // Full name of the plugin (used for diagnostics)
-22
View File
@@ -1,22 +0,0 @@
# tool_brickfield Upgrade notes
## 5.0
### Deprecated
- tool_brickfield\local\areas\core_question\answerbase::find_system_areas
No replacement. System context no longer a valid context to assign a question category
For more information see [MDL-71378](https://tracker.moodle.org/browse/MDL-71378)
- tool_brickfield\local\areas\core_question\base::find_system_areas
No replacement. System context no longer a valid context to assign a question category
For more information see [MDL-71378](https://tracker.moodle.org/browse/MDL-71378)
### Removed
- Remove chat and survey support from tool_brickfield.
For more information see [MDL-82457](https://tracker.moodle.org/browse/MDL-82457)

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