diff --git a/.upgradenotes/MDL-43938-2024070407235835.yml b/.upgradenotes/MDL-43938-2024070407235835.yml
new file mode 100644
index 0000000000000..b9ccf22c748d1
--- /dev/null
+++ b/.upgradenotes/MDL-43938-2024070407235835.yml
@@ -0,0 +1,7 @@
+issueNumber: MDL-43938
+notes:
+ core_badges:
+ - message: >-
+ The badges/newbadge.php page has been deprecated and merged with
+ badges/edit.php. Please, use badges/edit.php instead.
+ type: deprecated
diff --git a/.upgradenotes/MDL-66903-2024070501430894.yml b/.upgradenotes/MDL-66903-2024070501430894.yml
new file mode 100644
index 0000000000000..ce397c67d00ed
--- /dev/null
+++ b/.upgradenotes/MDL-66903-2024070501430894.yml
@@ -0,0 +1,11 @@
+issueNumber: MDL-66903
+notes:
+ core:
+ - message: |
+ The following classes have been renamed and now support autoloading.
+ Existing classes are currently unaffected.
+
+ | Old class name | New class name |
+ | --- | --- |
+ | `\core_component` | `\core\component` |
+ type: improved
diff --git a/.upgradenotes/MDL-66903-2024070502035383.yml b/.upgradenotes/MDL-66903-2024070502035383.yml
new file mode 100644
index 0000000000000..0c749fbef709a
--- /dev/null
+++ b/.upgradenotes/MDL-66903-2024070502035383.yml
@@ -0,0 +1,20 @@
+issueNumber: MDL-66903
+notes:
+ core:
+ - message: >
+ Added the ability for unit tests to autoload classes in the
+ `\[component]\tests\`
+
+ namespace from the `[path/to/component]/tests/classes` directory.
+ type: improved
+ - message: >
+ Added a helper to load fixtures from a components `tests/fixtures/`
+ folder:
+
+
+ ```php
+
+ advanced_testcase::load_fixture(string $component, string $fixture): void;
+
+ ```
+ type: improved
diff --git a/.upgradenotes/MDL-67554-2024071602392599.yml b/.upgradenotes/MDL-67554-2024071602392599.yml
new file mode 100644
index 0000000000000..8caa9da7f466c
--- /dev/null
+++ b/.upgradenotes/MDL-67554-2024071602392599.yml
@@ -0,0 +1,8 @@
+issueNumber: MDL-67554
+notes:
+ tool_oauth2:
+ - message: >
+ The `get_additional_login_parameters()` method now supports adding the
+ language code to the authentication request so that the OAuth2 login
+ page matches the language in Moodle.
+ type: improved
diff --git a/.upgradenotes/MDL-70854-2024071306574741.yml b/.upgradenotes/MDL-70854-2024071306574741.yml
new file mode 100644
index 0000000000000..42b111e37150e
--- /dev/null
+++ b/.upgradenotes/MDL-70854-2024071306574741.yml
@@ -0,0 +1,5 @@
+issueNumber: MDL-70854
+notes:
+ core:
+ - message: Added stored progress bars
+ type: improved
diff --git a/.upgradenotes/MDL-70983-2024062810515930.yml b/.upgradenotes/MDL-70983-2024062810515930.yml
new file mode 100644
index 0000000000000..df52839ac011b
--- /dev/null
+++ b/.upgradenotes/MDL-70983-2024062810515930.yml
@@ -0,0 +1,7 @@
+issueNumber: MDL-70983
+notes:
+ core_badges:
+ - message: Final removal of BADGE_BACKPACKAPIURL and BADGE_BACKPACKWEBURL.
+ type: removed
+ - message: OPEN_BADGES_V1 is deprecated and should not be used anymore.
+ type: deprecated
diff --git a/.upgradenotes/MDL-72424-2024062113465122.yml b/.upgradenotes/MDL-72424-2024062113465122.yml
new file mode 100644
index 0000000000000..6061a35c82ed9
--- /dev/null
+++ b/.upgradenotes/MDL-72424-2024062113465122.yml
@@ -0,0 +1,7 @@
+issueNumber: MDL-72424
+notes:
+ mod_feedback:
+ - message: >-
+ The `feedback_check_is_switchrole` method has been deprecated as it
+ didn't work
+ type: deprecated
diff --git a/.upgradenotes/MDL-73284-2024061908343534.yml b/.upgradenotes/MDL-73284-2024061908343534.yml
new file mode 100644
index 0000000000000..91c6aac556321
--- /dev/null
+++ b/.upgradenotes/MDL-73284-2024061908343534.yml
@@ -0,0 +1,5 @@
+issueNumber: MDL-73284
+notes:
+ core_message:
+ - message: Final deprecation MESSAGE_DEFAULT_LOGGEDOFF / MESSAGE_DEFAULT_LOGGEDIN.
+ type: removed
diff --git a/.upgradenotes/MDL-75025-2024062015422824.yml b/.upgradenotes/MDL-75025-2024062015422824.yml
new file mode 100644
index 0000000000000..5dffed60c5fe2
--- /dev/null
+++ b/.upgradenotes/MDL-75025-2024062015422824.yml
@@ -0,0 +1,7 @@
+issueNumber: MDL-75025
+notes:
+ core_backup:
+ - message: >-
+ Final deprecation of base_controller::get_copy(). Please use
+ restore_controller::get_copy() instead.
+ type: removed
diff --git a/.upgradenotes/MDL-75025-2024062015430029.yml b/.upgradenotes/MDL-75025-2024062015430029.yml
new file mode 100644
index 0000000000000..9736c0f2f2dab
--- /dev/null
+++ b/.upgradenotes/MDL-75025-2024062015430029.yml
@@ -0,0 +1,6 @@
+issueNumber: MDL-75025
+notes:
+ core_backup:
+ - message: 'Final deprecation of base_controller::set_copy(). Please use a restore
+ controller for storing copy information instead.'
+ type: removed
diff --git a/.upgradenotes/MDL-77167-2024062111140275.yml b/.upgradenotes/MDL-77167-2024062111140275.yml
new file mode 100644
index 0000000000000..3c59dfa89e6fb
--- /dev/null
+++ b/.upgradenotes/MDL-77167-2024062111140275.yml
@@ -0,0 +1,5 @@
+issueNumber: MDL-77167
+notes:
+ core:
+ - message: Remove deprecation layer for YUI Events. The deprecation layer was introduced with MDL-70990 and MDL-72291.
+ type: removed
diff --git a/.upgradenotes/MDL-78293-2024071102223792.yml b/.upgradenotes/MDL-78293-2024071102223792.yml
new file mode 100644
index 0000000000000..44a5deed1642c
--- /dev/null
+++ b/.upgradenotes/MDL-78293-2024071102223792.yml
@@ -0,0 +1,7 @@
+issueNumber: MDL-78293
+notes:
+ core_user:
+ - message: >
+ The visibility of the methods: check_access_for_dynamic_submission() and get_options()
+ in core_user\form\private_files has been changed from protected to public.
+ type: changed
diff --git a/.upgradenotes/MDL-80744-2024062407163290.yml b/.upgradenotes/MDL-80744-2024062407163290.yml
new file mode 100644
index 0000000000000..c92a3760e8009
--- /dev/null
+++ b/.upgradenotes/MDL-80744-2024062407163290.yml
@@ -0,0 +1,20 @@
+issueNumber: MDL-80744
+notes:
+ core_grades:
+ - message: >-
+ The behat step definition
+ behat_grade::i_confirm_in_search_within_the_gradebook_widget_exists has
+ been deprecated. Please use
+ behat_general::i_confirm_in_search_combobox_exists instead.
+ type: deprecated
+ - message: >-
+ The behat step definition
+ behat_grade::i_confirm_in_search_within_the_gradebook_widget_does_not_exist
+ has been deprecated. Please use
+ behat_general::i_confirm_in_search_combobox_does_not_exist instead.
+ type: deprecated
+ - message: >-
+ The behat step definition behat_grade::i_click_on_in_search_widget has
+ been deprecated. Please use behat_general::i_click_on_in_search_combobox
+ instead.
+ type: deprecated
diff --git a/.upgradenotes/MDL-81533-2024070307500488.yml b/.upgradenotes/MDL-81533-2024070307500488.yml
new file mode 100644
index 0000000000000..eab4262db9be8
--- /dev/null
+++ b/.upgradenotes/MDL-81533-2024070307500488.yml
@@ -0,0 +1,15 @@
+issueNumber: MDL-81533
+notes:
+ core:
+ - message: >
+ The function update_display_mode will update the eye icon (enabled/disabled) in the availability.
+ The $pluginname is represented to the plugin need to update.
+ The $displaymode is represented to the eye icon. Whether it enabled or disabled.
+
+ type: improved
+ core_admin:
+ - message: >
+ Add availability_management_table is a table which extends from plugin_management_table.
+ Create the availability_management_table can reusable the toggle button for enabled column.
+
+ type: improved
diff --git a/.upgradenotes/MDL-81699-2024071803025011.yml b/.upgradenotes/MDL-81699-2024071803025011.yml
new file mode 100644
index 0000000000000..285d972bbc834
--- /dev/null
+++ b/.upgradenotes/MDL-81699-2024071803025011.yml
@@ -0,0 +1,8 @@
+issueNumber: MDL-81699
+notes:
+ core_course:
+ - message: >
+ Webservices `core_course_get_courses_by_field` now accepts a new
+ parameter `sectionid` to be able to retrieve the course that has the
+ indicated section
+ type: improved
diff --git a/.upgradenotes/MDL-82066-2024070911064670.yml b/.upgradenotes/MDL-82066-2024070911064670.yml
new file mode 100644
index 0000000000000..1fc208b62acef
--- /dev/null
+++ b/.upgradenotes/MDL-82066-2024070911064670.yml
@@ -0,0 +1,7 @@
+issueNumber: MDL-82066
+notes:
+ core_user:
+ - message: >-
+ New `\core_user\hook\extend_default_homepage` hook added to allow
+ third-party plugins to extend the default homepage options for the site
+ type: improved
diff --git a/.upgradenotes/MDL-82066-2024070915322412.yml b/.upgradenotes/MDL-82066-2024070915322412.yml
new file mode 100644
index 0000000000000..8f3e5450fb29f
--- /dev/null
+++ b/.upgradenotes/MDL-82066-2024070915322412.yml
@@ -0,0 +1,12 @@
+issueNumber: MDL-82066
+notes:
+ core:
+ - message: >-
+ The `get_home_page()` method can now return new constant `HOMEPAGE_URL`,
+ applicable when a third-party hook has extended the default homepage
+ options for the site
+
+
+ A new method, `get_default_home_page_url()` has been added which will
+ return the correct URL when this constant is returned
+ type: changed
diff --git a/.upgradenotes/MDL-82146-2024070508361756.yml b/.upgradenotes/MDL-82146-2024070508361756.yml
new file mode 100644
index 0000000000000..4943c526397dd
--- /dev/null
+++ b/.upgradenotes/MDL-82146-2024070508361756.yml
@@ -0,0 +1,7 @@
+issueNumber: MDL-82146
+notes:
+ core_courseformat:
+ - message: >-
+ New $disabled parameter has been added to select, select_optgroup and
+ select_option html_writers to create disabled option elements.
+ type: improved
diff --git a/.upgradenotes/MDL-82146-2024071006310652.yml b/.upgradenotes/MDL-82146-2024071006310652.yml
new file mode 100644
index 0000000000000..1f6ad98bcabb1
--- /dev/null
+++ b/.upgradenotes/MDL-82146-2024071006310652.yml
@@ -0,0 +1,7 @@
+issueNumber: MDL-82146
+notes:
+ report_log:
+ - message: >-
+ get_activities_list() function returns also an array of disabled
+ elements, apart from the array of activities.
+ type: improved
diff --git a/.upgradenotes/MDL-82168-2024062815382042.yml b/.upgradenotes/MDL-82168-2024062815382042.yml
new file mode 100644
index 0000000000000..43a78574eee27
--- /dev/null
+++ b/.upgradenotes/MDL-82168-2024062815382042.yml
@@ -0,0 +1,5 @@
+issueNumber: MDL-82168
+notes:
+ core_badges:
+ - message: New webservices enable_badges and disable_badges have been added.
+ type: improved
diff --git a/.upgradenotes/MDL-82210-2024070210360255.yml b/.upgradenotes/MDL-82210-2024070210360255.yml
new file mode 100644
index 0000000000000..bb73a470dc213
--- /dev/null
+++ b/.upgradenotes/MDL-82210-2024070210360255.yml
@@ -0,0 +1,11 @@
+issueNumber: MDL-82210
+notes:
+ theme_boost:
+ - message: >-
+ Upon upgrading Font Awesome from version 4 to 6, the solid family was
+ selected by default. However, FA6 includes additional families such as
+ regular and brands. Support for these families has now been integrated,
+ allowing icons defined with icon_system::FONTAWESOME to use them.
+ Icons can add the FontAwesome family (fa-regular, fa-brands, fa-solid)
+ near the icon name to display it using this styling.
+ type: improved
diff --git a/.upgradenotes/MDL-82287-2024062501330649.yml b/.upgradenotes/MDL-82287-2024062501330649.yml
new file mode 100644
index 0000000000000..e1bfa14b87265
--- /dev/null
+++ b/.upgradenotes/MDL-82287-2024062501330649.yml
@@ -0,0 +1,40 @@
+issueNumber: MDL-82287
+notes:
+ core:
+ - message: >
+ The following methods have been formally deprecated:
+
+
+ - `get_core_subsystems`
+
+ - `get_plugin_types`
+
+ - `get_plugin_list`
+
+ - `get_plugin_list_with_class`
+
+ - `get_plugin_directory`
+
+ - `normalize_component`
+
+ - `get_component_directory`
+
+ - `get_context_instance`
+
+
+ Note: These methods have been deprecated for a long time, but previously
+ did not emit any deprecation notice.
+ type: deprecated
+ - message: >
+ The following methods have been finally deprecated and will now throw an
+ exception if called:
+
+
+ - `get_context_instance`
+
+ - `can_use_rotated_text`
+
+ - `get_system_context`
+
+ - `print_arrow`
+ type: deprecated
diff --git a/.upgradenotes/MDL-82292-2024070102564148.yml b/.upgradenotes/MDL-82292-2024070102564148.yml
new file mode 100644
index 0000000000000..ff57856474841
--- /dev/null
+++ b/.upgradenotes/MDL-82292-2024070102564148.yml
@@ -0,0 +1,6 @@
+issueNumber: MDL-82292
+notes:
+ mod_assign:
+ - message: |
+ Method assign_grading_table::col_picture has been deprecated.
+ type: deprecated
diff --git a/.upgradenotes/MDL-82466-2024071510553022.yml b/.upgradenotes/MDL-82466-2024071510553022.yml
new file mode 100644
index 0000000000000..cd219f229ed93
--- /dev/null
+++ b/.upgradenotes/MDL-82466-2024071510553022.yml
@@ -0,0 +1,7 @@
+issueNumber: MDL-82466
+notes:
+ core_reportbuilder:
+ - message: >
+ New format helper `format_time` method, for use in column callbacks that
+ represent a duration of time (e.g. "3 days 4 hours")
+ type: improved
diff --git a/.upgradenotes/MDL-82481-2024071516341176.yml b/.upgradenotes/MDL-82481-2024071516341176.yml
new file mode 100644
index 0000000000000..12afa7f87bbf1
--- /dev/null
+++ b/.upgradenotes/MDL-82481-2024071516341176.yml
@@ -0,0 +1,7 @@
+issueNumber: MDL-82481
+notes:
+ customfield_select:
+ - message: >
+ The field controller `get_options` method now returns each option
+ pre-formatted
+ type: changed
diff --git a/.upgradenotes/MDL-82510-2024071711550004.yml b/.upgradenotes/MDL-82510-2024071711550004.yml
new file mode 100644
index 0000000000000..6ab0d13868916
--- /dev/null
+++ b/.upgradenotes/MDL-82510-2024071711550004.yml
@@ -0,0 +1,9 @@
+issueNumber: MDL-82510
+notes:
+ core_courseformat:
+ - message: >-
+ New \core_courseformat\output\local\content\basecontrolmenu class
+ has been created. Existing \core_courseformat\output\local\content\cm\controlmenu
+ and \core_courseformat\output\local\content\section\controlmenu classes extend
+ the new \core_courseformat\output\local\content\basecontrolmenu class.
+ type: improved
diff --git a/.upgradenotes/MDL-82510-2024071722441237.yml b/.upgradenotes/MDL-82510-2024071722441237.yml
new file mode 100644
index 0000000000000..398baac2a3b89
--- /dev/null
+++ b/.upgradenotes/MDL-82510-2024071722441237.yml
@@ -0,0 +1,9 @@
+issueNumber: MDL-82510
+notes:
+ core_courseformat:
+ - message: >-
+ New \core_courseformat\output\local\content\cm\delegatedcontrolmenu class
+ has been created extending
+ \core_courseformat\output\local\content\basecontrolmenu class to render
+ delegated section action menu combining section and module action menu.
+ type: improved
diff --git a/.upgradenotes/MDL-82529-2024071803142477.yml b/.upgradenotes/MDL-82529-2024071803142477.yml
new file mode 100644
index 0000000000000..d8aee82025453
--- /dev/null
+++ b/.upgradenotes/MDL-82529-2024071803142477.yml
@@ -0,0 +1,9 @@
+issueNumber: MDL-82529
+notes:
+ core_reportbuilder:
+ - message: >-
+ Methods add_columns_from_entity(), add_filters_from_entity() and
+ report_element_search() have been moved from
+ \core_reportbuilder\datasource class to \core_reportbuilder\base class
+ in order to be available also for system reports
+ type: improved
diff --git a/UPGRADING.md b/UPGRADING.md
index f98a25070cc3c..2f68b79f41cf0 100644
--- a/UPGRADING.md
+++ b/UPGRADING.md
@@ -8,6 +8,29 @@ The format of this change log follows the advice given at [Keep a CHANGELOG](htt
## 4.5dev
+### core_badges
+
+#### Deprecated
+
+- The badges/newbadge.php page has been deprecated and merged with badges/edit.php. Please, use badges/edit.php instead.
+
+ For more information see [MDL-43938](https://tracker.moodle.org/browse/MDL-43938)
+- OPEN_BADGES_V1 is deprecated and should not be used anymore.
+
+ For more information see [MDL-70983](https://tracker.moodle.org/browse/MDL-70983)
+
+#### Removed
+
+- Final removal of BADGE_BACKPACKAPIURL and BADGE_BACKPACKWEBURL.
+
+ For more information see [MDL-70983](https://tracker.moodle.org/browse/MDL-70983)
+
+#### Added
+
+- New webservices enable_badges and disable_badges have been added.
+
+ For more information see [MDL-82168](https://tracker.moodle.org/browse/MDL-82168)
+
### core
#### Removed
@@ -28,22 +51,38 @@ The format of this change log follows the advice given at [Keep a CHANGELOG](htt
- Final deprecation of \core\task\manager::ensure_adhoc_task_qos()
For more information see [MDL-74843](https://tracker.moodle.org/browse/MDL-74843)
+- Remove deprecation layer for YUI Events. The deprecation layer was introduced with MDL-70990 and MDL-72291.
-#### Changed
+ For more information see [MDL-77167](https://tracker.moodle.org/browse/MDL-77167)
-- The class autoloader has been moved to an earlier point in the Moodle bootstrap.
- Autoloaded classes are now available to scripts using the `ABORT_AFTER_CONFIG` constant.
+#### Added
- For more information see [MDL-80275](https://tracker.moodle.org/browse/MDL-80275)
-- The `\core\dataformat::get_format_instance` method is now public, and can be used to retrieve a writer instance for a given dataformat
+- The following classes have been renamed and now support autoloading.
+ Existing classes are currently unaffected.
+ | Old class name | New class name |
+ | --- | --- |
+ | `\core_component` | `\core\component` |
- For more information see [MDL-81781](https://tracker.moodle.org/browse/MDL-81781)
+ For more information see [MDL-66903](https://tracker.moodle.org/browse/MDL-66903)
+- Added the ability for unit tests to autoload classes in the `\[component]\tests\`
+ namespace from the `[path/to/component]/tests/classes` directory.
-#### Added
+ For more information see [MDL-66903](https://tracker.moodle.org/browse/MDL-66903)
+- Added a helper to load fixtures from a components `tests/fixtures/` folder:
+ ```php
+ advanced_testcase::load_fixture(string $component, string $fixture): void;
+ ```
+ For more information see [MDL-66903](https://tracker.moodle.org/browse/MDL-66903)
+- Added stored progress bars
+
+ For more information see [MDL-70854](https://tracker.moodle.org/browse/MDL-70854)
- New DML constant `SQL_INT_MAX` to define the size of a large integer with cross database platform support
For more information see [MDL-81282](https://tracker.moodle.org/browse/MDL-81282)
+- The function update_display_mode will update the eye icon (enabled/disabled) in the availability. The $pluginname is represented to the plugin need to update. The $displaymode is represented to the eye icon. Whether it enabled or disabled.
+
+ For more information see [MDL-81533](https://tracker.moodle.org/browse/MDL-81533)
- Added an `exception` L2 Namespace to APIs
For more information see [MDL-81903](https://tracker.moodle.org/browse/MDL-81903)
@@ -149,6 +188,20 @@ The format of this change log follows the advice given at [Keep a CHANGELOG](htt
For more information see [MDL-82183](https://tracker.moodle.org/browse/MDL-82183)
+#### Changed
+
+- The class autoloader has been moved to an earlier point in the Moodle bootstrap.
+ Autoloaded classes are now available to scripts using the `ABORT_AFTER_CONFIG` constant.
+
+ For more information see [MDL-80275](https://tracker.moodle.org/browse/MDL-80275)
+- The `\core\dataformat::get_format_instance` method is now public, and can be used to retrieve a writer instance for a given dataformat
+
+ For more information see [MDL-81781](https://tracker.moodle.org/browse/MDL-81781)
+- The `get_home_page()` method can now return new constant `HOMEPAGE_URL`, applicable when a third-party hook has extended the default homepage options for the site
+ A new method, `get_default_home_page_url()` has been added which will return the correct URL when this constant is returned
+
+ For more information see [MDL-82066](https://tracker.moodle.org/browse/MDL-82066)
+
#### Fixed
- All the setup and tear down methods of `PHPUnit` now are required to, always, call to their parent counterparts. This is a good practice to avoid future problems, especially when updating to PHPUnit >= 10.
@@ -179,6 +232,25 @@ The format of this change log follows the advice given at [Keep a CHANGELOG](htt
- `lib/tokeniserlib.php`
For more information see [MDL-82191](https://tracker.moodle.org/browse/MDL-82191)
+- The following methods have been formally deprecated:
+ - `get_core_subsystems`
+ - `get_plugin_types`
+ - `get_plugin_list`
+ - `get_plugin_list_with_class`
+ - `get_plugin_directory`
+ - `normalize_component`
+ - `get_component_directory`
+ - `get_context_instance`
+ Note: These methods have been deprecated for a long time, but previously did not emit any deprecation notice.
+
+ For more information see [MDL-82287](https://tracker.moodle.org/browse/MDL-82287)
+- The following methods have been finally deprecated and will now throw an exception if called:
+ - `get_context_instance`
+ - `can_use_rotated_text`
+ - `get_system_context`
+ - `print_arrow`
+
+ For more information see [MDL-82287](https://tracker.moodle.org/browse/MDL-82287)
### core_reportbuilder
@@ -198,6 +270,12 @@ The format of this change log follows the advice given at [Keep a CHANGELOG](htt
- Added a new database helper method `sql_replace_parameters` to help ensure uniqueness of parameters within a SQL expression
For more information see [MDL-81434](https://tracker.moodle.org/browse/MDL-81434)
+- New format helper `format_time` method, for use in column callbacks that represent a duration of time (e.g. "3 days 4 hours")
+
+ For more information see [MDL-82466](https://tracker.moodle.org/browse/MDL-82466)
+- Methods add_columns_from_entity(), add_filters_from_entity() and report_element_search() have been moved from \core_reportbuilder\datasource class to \core_reportbuilder\base class in order to be available also for system reports
+
+ For more information see [MDL-82529](https://tracker.moodle.org/browse/MDL-82529)
#### Removed
@@ -255,6 +333,17 @@ The format of this change log follows the advice given at [Keep a CHANGELOG](htt
- The constant `ASSIGN_ATTEMPT_REOPEN_METHOD_NONE` has been deprecated, and a new default value for `attemptreopenmethod` has been set to "Automatically until pass".
For more information see [MDL-80741](https://tracker.moodle.org/browse/MDL-80741)
+- Method assign_grading_table::col_picture has been deprecated.
+
+ For more information see [MDL-82292](https://tracker.moodle.org/browse/MDL-82292)
+
+### tool_oauth2
+
+#### Added
+
+- The `get_additional_login_parameters()` method now supports adding the language code to the authentication request so that the OAuth2 login page matches the language in Moodle.
+
+ For more information see [MDL-67554](https://tracker.moodle.org/browse/MDL-67554)
### report
@@ -270,6 +359,17 @@ The format of this change log follows the advice given at [Keep a CHANGELOG](htt
For more information see [MDL-78773](https://tracker.moodle.org/browse/MDL-78773)
+### mod_feedback
+
+#### Deprecated
+
+- The `feedback_check_is_switchrole` method has been deprecated as it didn't work
+
+ For more information see [MDL-72424](https://tracker.moodle.org/browse/MDL-72424)
+- The method `mod_feedback\output\renderer::create_template_form()` has been deprecated. It is not used anymore.
+
+ For more information see [MDL-81742](https://tracker.moodle.org/browse/MDL-81742)
+
### report_eventlist
#### Deprecated
@@ -280,6 +380,26 @@ The format of this change log follows the advice given at [Keep a CHANGELOG](htt
For more information see [MDL-72786](https://tracker.moodle.org/browse/MDL-72786)
+### core_message
+
+#### Removed
+
+- Final deprecation MESSAGE_DEFAULT_LOGGEDOFF / MESSAGE_DEFAULT_LOGGEDIN.
+
+ For more information see [MDL-73284](https://tracker.moodle.org/browse/MDL-73284)
+
+#### Changed
+
+- The `\core_message\helper::togglecontact_link_params` now accepts a new optional param called `isrequested` to indicate the status of the contact request
+
+ For more information see [MDL-81428](https://tracker.moodle.org/browse/MDL-81428)
+
+#### Deprecated
+
+- The `core_message/remove_contact_button` template is deprecated and will be removed in the future version
+
+ For more information see [MDL-81428](https://tracker.moodle.org/browse/MDL-81428)
+
### theme
#### Removed
@@ -312,6 +432,15 @@ The format of this change log follows the advice given at [Keep a CHANGELOG](htt
#### Deprecated
+- The behat step definition behat_grade::i_confirm_in_search_within_the_gradebook_widget_exists has been deprecated. Please use behat_general::i_confirm_in_search_combobox_exists instead.
+
+ For more information see [MDL-80744](https://tracker.moodle.org/browse/MDL-80744)
+- The behat step definition behat_grade::i_confirm_in_search_within_the_gradebook_widget_does_not_exist has been deprecated. Please use behat_general::i_confirm_in_search_combobox_does_not_exist instead.
+
+ For more information see [MDL-80744](https://tracker.moodle.org/browse/MDL-80744)
+- The behat step definition behat_grade::i_click_on_in_search_widget has been deprecated. Please use behat_general::i_click_on_in_search_combobox instead.
+
+ For more information see [MDL-80744](https://tracker.moodle.org/browse/MDL-80744)
- The `core_grades_renderer::group_selector()` method has been deprecated. Please use `\core_course\output\actionbar\renderer` to render a `group_selector` renderable instead.
For more information see [MDL-80745](https://tracker.moodle.org/browse/MDL-80745)
@@ -323,6 +452,26 @@ The format of this change log follows the advice given at [Keep a CHANGELOG](htt
- Final deprecation and removal of core_backup\copy\copy in backup/util/ui/classes/copy.php. Please use copy_helper from backup/util/helper/copy_helper.class.php instead.
For more information see [MDL-75022](https://tracker.moodle.org/browse/MDL-75022)
+- Final deprecation of base_controller::get_copy(). Please use restore_controller::get_copy() instead.
+
+ For more information see [MDL-75025](https://tracker.moodle.org/browse/MDL-75025)
+- Final deprecation of base_controller::set_copy(). Please use a restore controller for storing copy information instead.
+
+ For more information see [MDL-75025](https://tracker.moodle.org/browse/MDL-75025)
+
+### core_user
+
+#### Changed
+
+- The visibility of the methods: check_access_for_dynamic_submission() and get_options() in core_user\form\private_files has been changed from protected to public.
+
+ For more information see [MDL-78293](https://tracker.moodle.org/browse/MDL-78293)
+
+#### Added
+
+- New `\core_user\hook\extend_default_homepage` hook added to allow third-party plugins to extend the default homepage options for the site
+
+ For more information see [MDL-82066](https://tracker.moodle.org/browse/MDL-82066)
### core_question
@@ -401,19 +550,13 @@ The format of this change log follows the advice given at [Keep a CHANGELOG](htt
For more information see [MDL-81321](https://tracker.moodle.org/browse/MDL-81321)
-### core_message
-
-#### Changed
-
-- The `\core_message\helper::togglecontact_link_params` now accepts a new optional param called `isrequested` to indicate the status of the contact request
-
- For more information see [MDL-81428](https://tracker.moodle.org/browse/MDL-81428)
+### core_admin
-#### Deprecated
+#### Added
-- The `core_message/remove_contact_button` template is deprecated and will be removed in the future version
+- Add availability_management_table is a table which extends from plugin_management_table. Create the availability_management_table can reusable the toggle button for enabled column.
- For more information see [MDL-81428](https://tracker.moodle.org/browse/MDL-81428)
+ For more information see [MDL-81533](https://tracker.moodle.org/browse/MDL-81533)
### editor_tiny
@@ -439,6 +582,15 @@ The format of this change log follows the advice given at [Keep a CHANGELOG](htt
If `istrackeduser` is pre-computed for the course module's course, it can be provided here to avoid an additional function call.
For more information see [MDL-81610](https://tracker.moodle.org/browse/MDL-81610)
+- New $disabled parameter has been added to select, select_optgroup and select_option html_writers to create disabled option elements.
+
+ For more information see [MDL-82146](https://tracker.moodle.org/browse/MDL-82146)
+- New \core_courseformat\output\local\content\basecontrolmenu class has been created. Existing \core_courseformat\output\local\content\cm\controlmenu and \core_courseformat\output\local\content\section\controlmenu classes extend the new \core_courseformat\output\local\content\basecontrolmenu class.
+
+ For more information see [MDL-82510](https://tracker.moodle.org/browse/MDL-82510)
+- New \core_courseformat\output\local\content\cm\delegatedcontrolmenu class has been created extending \core_courseformat\output\local\content\basecontrolmenu class to render delegated section action menu combining section and module action menu.
+
+ For more information see [MDL-82510](https://tracker.moodle.org/browse/MDL-82510)
### core_course
@@ -447,6 +599,9 @@ The format of this change log follows the advice given at [Keep a CHANGELOG](htt
- - New optional sectionNum parameter has been added to activitychooser AMD module initializer. - New option sectionnum parameter has been added to get_course_content_items() external function. - New optional sectionnum parameter has been added to get_content_items_for_user_in_course() function.
For more information see [MDL-81675](https://tracker.moodle.org/browse/MDL-81675)
+- Webservices `core_course_get_courses_by_field` now accepts a new parameter `sectionid` to be able to retrieve the course that has the indicated section
+
+ For more information see [MDL-81699](https://tracker.moodle.org/browse/MDL-81699)
#### Deprecated
@@ -463,14 +618,6 @@ The format of this change log follows the advice given at [Keep a CHANGELOG](htt
For more information see [MDL-81872](https://tracker.moodle.org/browse/MDL-81872)
-### mod_feedback
-
-#### Deprecated
-
-- The method `mod_feedback\output\renderer::create_template_form()` has been deprecated. It is not used anymore.
-
- For more information see [MDL-81742](https://tracker.moodle.org/browse/MDL-81742)
-
### core_completion
#### Changed
@@ -498,6 +645,12 @@ The format of this change log follows the advice given at [Keep a CHANGELOG](htt
For more information see [MDL-81818](https://tracker.moodle.org/browse/MDL-81818)
+#### Added
+
+- Upon upgrading Font Awesome from version 4 to 6, the solid family was selected by default. However, FA6 includes additional families such as regular and brands. Support for these families has now been integrated, allowing icons defined with icon_system::FONTAWESOME to use them. Icons can add the FontAwesome family (fa-regular, fa-brands, fa-solid) near the icon name to display it using this styling.
+
+ For more information see [MDL-82210](https://tracker.moodle.org/browse/MDL-82210)
+
### availability
#### Changed
@@ -505,3 +658,19 @@ The format of this change log follows the advice given at [Keep a CHANGELOG](htt
- The base class `info::get_groups` method has a `$userid` parameter to specify for which user you want to retrieve course groups (defaults to current user)
For more information see [MDL-81850](https://tracker.moodle.org/browse/MDL-81850)
+
+### report_log
+
+#### Added
+
+- get_activities_list() function returns also an array of disabled elements, apart from the array of activities.
+
+ For more information see [MDL-82146](https://tracker.moodle.org/browse/MDL-82146)
+
+### customfield_select
+
+#### Changed
+
+- The field controller `get_options` method now returns each option pre-formatted
+
+ For more information see [MDL-82481](https://tracker.moodle.org/browse/MDL-82481)
diff --git a/admin/UPGRADING.md b/admin/UPGRADING.md
new file mode 100644
index 0000000000000..8c65af633ddcc
--- /dev/null
+++ b/admin/UPGRADING.md
@@ -0,0 +1,9 @@
+# core_admin (subsystem) Upgrade notes
+
+## 4.5dev
+
+### Added
+
+- Add availability_management_table is a table which extends from plugin_management_table. Create the availability_management_table can reusable the toggle button for enabled column.
+
+ For more information see [MDL-81533](https://tracker.moodle.org/browse/MDL-81533)
diff --git a/admin/classes/reportbuilder/local/entities/task_log.php b/admin/classes/reportbuilder/local/entities/task_log.php
index 8cc6cdf2bfc20..4922822744a6f 100644
--- a/admin/classes/reportbuilder/local/entities/task_log.php
+++ b/admin/classes/reportbuilder/local/entities/task_log.php
@@ -183,15 +183,7 @@ protected function get_all_columns(): array {
->set_type(column::TYPE_FLOAT)
->add_field("{$tablealias}.timeend - {$tablealias}.timestart", 'duration')
->set_is_sortable(true)
- ->add_callback(static function(float $value): string {
- $duration = round($value, 2);
- if (empty($duration)) {
- // The format_time function returns 'now' when the difference is exactly 0.
- // Note: format_time performs concatenation in exactly this fashion so we should do this for consistency.
- return '0 ' . get_string('secs', 'moodle');
- }
- return format_time($duration);
- });
+ ->add_callback([format::class, 'format_time'], 2);
// Hostname column.
$columns[] = (new column(
@@ -211,11 +203,8 @@ protected function get_all_columns(): array {
$this->get_entity_name()
))
->add_joins($this->get_joins())
- ->set_type(column::TYPE_INTEGER)
->add_field("{$tablealias}.pid")
- ->set_is_sortable(true)
- // Although this is an integer column, it doesn't make sense to perform numeric aggregation on it.
- ->set_disabled_aggregation(['avg', 'count', 'countdistinct', 'max', 'min', 'sum']);
+ ->set_is_sortable(true);
// Database column.
$columns[] = (new column(
@@ -224,17 +213,14 @@ protected function get_all_columns(): array {
$this->get_entity_name()
))
->add_joins($this->get_joins())
- ->set_type(column::TYPE_INTEGER)
->add_fields("{$tablealias}.dbreads, {$tablealias}.dbwrites")
->set_is_sortable(true, ["{$tablealias}.dbreads", "{$tablealias}.dbwrites"])
- ->add_callback(static function(int $value, stdClass $row): string {
+ ->add_callback(static function($value, stdClass $row): string {
$output = '';
$output .= \html_writer::div(get_string('task_stats:dbreads', 'admin', $row->dbreads));
$output .= \html_writer::div(get_string('task_stats:dbwrites', 'admin', $row->dbwrites));
return $output;
- })
- // Although this is an integer column, it doesn't make sense to perform numeric aggregation on it.
- ->set_disabled_aggregation(['avg', 'count', 'countdistinct', 'max', 'min', 'sum']);
+ });
// Database reads column.
$columns[] = (new column(
diff --git a/admin/classes/table/availability_management_table.php b/admin/classes/table/availability_management_table.php
new file mode 100644
index 0000000000000..834d6c7b2aea3
--- /dev/null
+++ b/admin/classes/table/availability_management_table.php
@@ -0,0 +1,85 @@
+.
+
+namespace core_admin\table;
+
+use moodle_url;
+use stdClass;
+use html_writer;
+use get_string_manager;
+
+/**
+ * Availability admin settings.
+ *
+ * @package core_admin
+ * @copyright 2024 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+class availability_management_table extends plugin_management_table {
+
+ protected function get_table_id(): string {
+ return 'availabilityconditions_administration_table';
+ }
+
+ protected function get_plugintype(): string {
+ return 'availability';
+ }
+
+ protected function get_action_url(array $params = []): moodle_url {
+ return new moodle_url('/admin/tool/availabilityconditions/', $params);
+ }
+
+ public function guess_base_url(): void {
+ $this->define_baseurl(
+ new moodle_url('/admin/tool/availabilityconditions/')
+ );
+ }
+
+ protected function get_column_list(): array {
+ return [
+ 'name' => get_string('plugin'),
+ 'version' => get_string('version'),
+ 'enabled' => get_string('enabled', 'admin'),
+ 'defaultdisplaymode' => get_string('defaultdisplaymode', 'tool_availabilityconditions'),
+ ];
+ }
+
+ public function setup(): void {
+ $this->set_attribute('id', 'availabilityconditions_administration_table');
+ $this->set_attribute('class', 'admintable generaltable');
+ parent::setup();
+ }
+
+ protected function col_name(stdClass $row): string {
+ return html_writer::span(
+ get_string('pluginname', 'availability_' . $row->plugininfo->name)
+ );
+ }
+
+ protected function col_defaultdisplaymode(stdClass $row): string {
+ global $OUTPUT, $CFG;
+ $displaymode = get_config('availability_' . $row->plugininfo->name, 'defaultdisplaymode') ? 'show' : 'hide';
+ $paramsdisplaymode = [
+ 'sesskey' => sesskey(),
+ 'plugin' => $row->plugininfo->name,
+ 'displaymode' => $displaymode,
+ ];
+ $urldisplaymode = new moodle_url('/' . $CFG->admin . '/tool/availabilityconditions/', $paramsdisplaymode);
+
+ return html_writer::link($urldisplaymode, $OUTPUT->pix_icon('t/' . $displaymode,
+ get_string($displaymode)), ['class' => 'display-mode-' . $row->plugininfo->name]);
+ }
+}
diff --git a/admin/roles/classes/reportbuilder/local/entities/role_assignment.php b/admin/roles/classes/reportbuilder/local/entities/role_assignment.php
index fda44a9c73a5b..55eda7c9f611f 100644
--- a/admin/roles/classes/reportbuilder/local/entities/role_assignment.php
+++ b/admin/roles/classes/reportbuilder/local/entities/role_assignment.php
@@ -102,7 +102,6 @@ protected function get_all_columns(): array {
$this->get_entity_name()
))
->add_joins($this->get_joins())
- ->set_type(column::TYPE_TEXT)
->add_field("{$raalias}.component")
->set_is_sortable(true);
@@ -113,7 +112,6 @@ protected function get_all_columns(): array {
$this->get_entity_name()
))
->add_joins($this->get_joins())
- ->set_type(column::TYPE_INTEGER)
->add_field("{$raalias}.itemid")
->set_is_sortable(true);
diff --git a/admin/settings/appearance.php b/admin/settings/appearance.php
index 56b1c0724c8c5..1dce8ecc55941 100644
--- a/admin/settings/appearance.php
+++ b/admin/settings/appearance.php
@@ -152,6 +152,12 @@
}
$choices[HOMEPAGE_MYCOURSES] = new lang_string('mycourses', 'admin');
$choices[HOMEPAGE_USER] = new lang_string('userpreference', 'admin');
+
+ // Allow hook callbacks to extend options.
+ $hook = new \core_user\hook\extend_default_homepage();
+ \core\di::get(\core\hook\manager::class)->dispatch($hook);
+ $choices += $hook->get_options();
+
$temp->add(new admin_setting_configselect('defaulthomepage', new lang_string('defaulthomepage', 'admin'),
new lang_string('configdefaulthomepage', 'admin'), get_default_home_page(), $choices));
if (!isset($CFG->enabledashboard) || $CFG->enabledashboard) {
diff --git a/admin/settings/badges.php b/admin/settings/badges.php
index 997808e9e530b..e992f57c3aa47 100644
--- a/admin/settings/badges.php
+++ b/admin/settings/badges.php
@@ -87,7 +87,7 @@
$ADMIN->add('badges',
new admin_externalpage('newbadge',
new lang_string('newbadge', 'badges'),
- new moodle_url('/badges/newbadge.php', array('type' => BADGE_TYPE_SITE)),
+ new moodle_url('/badges/edit.php', ['action' => 'new']),
array('moodle/badges:createbadge'), empty($CFG->enablebadges)
)
);
diff --git a/admin/settings/plugins.php b/admin/settings/plugins.php
index 1a4761308fd9d..9604e436a5417 100644
--- a/admin/settings/plugins.php
+++ b/admin/settings/plugins.php
@@ -544,6 +544,18 @@
$settings->add(new admin_setting_configselect('question_preview/history',
get_string('responsehistory', 'question'), '', 0, $hiddenofvisible));
+ // Question editing settings.
+ $settings = new admin_settingpage('qediting',
+ get_string('questionediting', 'question'),
+ 'moodle/question:config');
+ $ADMIN->add('qtypesettings', $settings);
+
+ $settings->add(new admin_setting_heading('qediting_options',
+ '', get_string('questionediting_desc', 'question')));
+
+ $settings->add(new admin_setting_configcheckbox('questiondefaultssave',
+ get_string('questiondefaultssave', 'question'), get_string('questiondefaultssave_desc', 'question'), 1));
+
// Settings for particular question types.
$plugins = core_plugin_manager::instance()->get_plugins_of_type('qtype');
core_collator::asort_objects_by_property($plugins, 'displayname');
diff --git a/admin/settings/security.php b/admin/settings/security.php
index 081da82d56ce3..f069b6584891f 100644
--- a/admin/settings/security.php
+++ b/admin/settings/security.php
@@ -126,7 +126,7 @@
$temp->add($adminsetting);
$temp->add(new admin_setting_configcheckbox('passwordchangelogout',
new lang_string('passwordchangelogout', 'admin'),
- new lang_string('passwordchangelogout_desc', 'admin'), 0));
+ new lang_string('passwordchangelogout_desc', 'admin'), 1));
$temp->add(new admin_setting_configcheckbox('passwordchangetokendeletion',
new lang_string('passwordchangetokendeletion', 'admin'),
diff --git a/admin/tool/admin_presets/tests/behat/apply_presets.feature b/admin/tool/admin_presets/tests/behat/apply_presets.feature
index e8e933d0a4670..04c27d21a8a0b 100644
--- a/admin/tool/admin_presets/tests/behat/apply_presets.feature
+++ b/admin/tool/admin_presets/tests/behat/apply_presets.feature
@@ -14,7 +14,7 @@ Feature: I can apply presets
Given I navigate to "Plugins > Activity modules > Manage activities" in site administration
And I should see "Disable Database"
And I navigate to "Plugins > Availability restrictions > Manage restrictions" in site administration
- And "Hide" "icon" should exist in the "Restriction by grouping" "table_row"
+ And I should see "Disable Restriction by grouping"
And I navigate to "Plugins > Blocks > Manage blocks" in site administration
And I should see "Disable Logged in user"
And I navigate to "Plugins > Course formats > Manage course formats" in site administration
@@ -107,7 +107,7 @@ Feature: I can apply presets
And I navigate to "Plugins > Activity modules > Manage activities" in site administration
And I should see "Enable Database"
And I navigate to "Plugins > Availability restrictions > Manage restrictions" in site administration
- And "Hide" "icon" should not exist in the "Restriction by grouping" "table_row"
+ And I should see "Enable Restriction by grouping"
And I navigate to "Plugins > Blocks > Manage blocks" in site administration
And I should see "Enable Logged in user"
And I navigate to "Plugins > Course formats > Manage course formats" in site administration
diff --git a/admin/tool/admin_presets/tests/behat/revert_changes.feature b/admin/tool/admin_presets/tests/behat/revert_changes.feature
index 2f4a1595632ba..a3da9a4c3013f 100644
--- a/admin/tool/admin_presets/tests/behat/revert_changes.feature
+++ b/admin/tool/admin_presets/tests/behat/revert_changes.feature
@@ -21,7 +21,7 @@ Feature: I can revert changes after a load
And I navigate to "Plugins > Activity modules > Manage activities" in site administration
And I should see "Enable Database"
And I navigate to "Plugins > Availability restrictions > Manage restrictions" in site administration
- And "Hide" "icon" should not exist in the "Restriction by grouping" "table_row"
+ And I should see "Enable Restriction by grouping"
And I navigate to "Plugins > Blocks > Manage blocks" in site administration
And "Disable Logged in user" "icon" should not exist in the "Logged in user" "table_row"
And I navigate to "Plugins > Course formats > Manage course formats" in site administration
@@ -39,7 +39,7 @@ Feature: I can revert changes after a load
And I navigate to "Plugins > Activity modules > Manage activities" in site administration
And I should see "Disable Database"
And I navigate to "Plugins > Availability restrictions > Manage restrictions" in site administration
- And "Hide" "icon" should exist in the "Restriction by grouping" "table_row"
+ And I should see "Disable Restriction by grouping"
And I navigate to "Plugins > Blocks > Manage blocks" in site administration
And I should see "Disable Logged in user"
And I navigate to "Plugins > Course formats > Manage course formats" in site administration
diff --git a/admin/tool/availabilityconditions/index.php b/admin/tool/availabilityconditions/index.php
index 7ddb049f93a0c..f2acb4e880a81 100644
--- a/admin/tool/availabilityconditions/index.php
+++ b/admin/tool/availabilityconditions/index.php
@@ -31,7 +31,7 @@
admin_externalpage_setup('manageavailability');
// Get sorted list of all availability condition plugins.
-$plugins = array();
+$plugins = [];
foreach (core_component::get_plugin_list('availability') as $plugin => $plugindir) {
if (get_string_manager()->string_exists('pluginname', 'availability_' . $plugin)) {
$strpluginname = get_string('pluginname', 'availability_' . $plugin);
@@ -44,20 +44,30 @@
// Do plugin actions.
$pageurl = new moodle_url('/' . $CFG->admin . '/tool/availabilityconditions/');
+$classavailability = \core_plugin_manager::resolve_plugininfo_class('availability');
if (($plugin = optional_param('plugin', '', PARAM_PLUGIN))) {
require_sesskey();
if (!array_key_exists($plugin, $plugins)) {
throw new \moodle_exception('invalidcomponent', 'error', $pageurl);
}
- $action = required_param('action', PARAM_ALPHA);
- switch ($action) {
+ $action = optional_param('action', '', PARAM_ALPHA);
+ if ($action === 'hide' && $classavailability::enable_plugin($plugin, 0)) {
+ \core\notification::add(
+ \core\notification::SUCCESS
+ );
+ } else if ($action === 'show' && $classavailability::enable_plugin($plugin, 1)) {
+ \core\notification::add(
+ \core\notification::SUCCESS
+ );
+ }
+
+ $displaymode = optional_param('displaymode', '', PARAM_ALPHA);
+ switch ($displaymode) {
case 'hide' :
- $class = \core_plugin_manager::resolve_plugininfo_class('availability');
- $class::enable_plugin($plugin, false);
+ $classavailability::update_display_mode($plugin, false);
break;
case 'show' :
- $class = \core_plugin_manager::resolve_plugininfo_class('availability');
- $class::enable_plugin($plugin, true);
+ $classavailability::update_display_mode($plugin, true);
break;
}
@@ -68,48 +78,6 @@
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('manageplugins', 'availability'));
-// Show a table of installed availability conditions.
-$table = new flexible_table('availabilityconditions_administration_table');
-$table->define_columns(array('name', 'version', 'enable'));
-$table->define_headers(array(get_string('plugin'),
- get_string('version'), get_string('hide') . '/' . get_string('show')));
-$table->define_baseurl($PAGE->url);
-$table->set_attribute('id', 'availabilityconditions');
-$table->set_attribute('class', 'admintable generaltable');
-$table->setup();
-
-$enabledlist = core\plugininfo\availability::get_enabled_plugins();
-foreach ($plugins as $plugin => $name) {
-
- // Get version or ? if unknown.
- $version = get_config('availability_' . $plugin);
- if (!empty($version->version)) {
- $version = $version->version;
- } else {
- $version = '?';
- }
-
- // Get enabled status and use to grey out name if necessary.
- $enabled = in_array($plugin, $enabledlist);
- if ($enabled) {
- $enabledaction = 'hide';
- $enabledstr = get_string('hide');
- $class = '';
- } else {
- $enabledaction = 'show';
- $enabledstr = get_string('show');
- $class = 'dimmed_text';
- }
-
- // Make enable control. This is a POST request (using a form control rather
- // than just a link) because it makes a database change.
- $params = array('sesskey' => sesskey(), 'plugin' => $plugin, 'action' => $enabledaction);
- $url = new moodle_url('/' . $CFG->admin . '/tool/availabilityconditions/', $params);
- $enablecontrol = html_writer::link($url, $OUTPUT->pix_icon('t/' . $enabledaction, $enabledstr));
-
- $table->add_data([$name, $version, $enablecontrol], $class);
-}
-
-$table->print_html();
-
+$table = new \core_admin\table\availability_management_table();
+$table->out();
echo $OUTPUT->footer();
diff --git a/admin/tool/availabilityconditions/lang/en/tool_availabilityconditions.php b/admin/tool/availabilityconditions/lang/en/tool_availabilityconditions.php
index 651e576d38d5d..2cd0424321f75 100644
--- a/admin/tool/availabilityconditions/lang/en/tool_availabilityconditions.php
+++ b/admin/tool/availabilityconditions/lang/en/tool_availabilityconditions.php
@@ -22,6 +22,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+$string['defaultdisplaymode'] = 'Default display mode';
$string['manageplugins'] = 'Manage restrictions';
$string['pluginname'] = 'Availability condition management';
$string['privacy:metadata'] = 'The Availability condition management plugin does not store any personal data.';
diff --git a/admin/tool/availabilityconditions/tests/behat/manage_conditions.feature b/admin/tool/availabilityconditions/tests/behat/manage_conditions.feature
index cb3a459e48d33..0e1303fd6323a 100644
--- a/admin/tool/availabilityconditions/tests/behat/manage_conditions.feature
+++ b/admin/tool/availabilityconditions/tests/behat/manage_conditions.feature
@@ -44,16 +44,16 @@ Feature: Manage availability conditions
# Check the icon is there (it should be a Hide icon, meaning is currently visible).
Then "Hide" "icon" should exist in the "Restriction by date" "table_row"
- # Click the icon. It should toggle to hidden (title=Show).
- And I click on "Hide" "icon" in the "Restriction by date" "table_row"
- And "Show" "icon" should exist in the "Restriction by date" "table_row"
+ # Click the icon. It should toggle to disabled.
+ And I toggle the "Disable Restriction by date" admin switch "off"
+ And I should see "Restriction by date disabled."
# Toggle it back to visible (title=Hide).
- And I click on "Show" "icon" in the "Restriction by date" "table_row"
- And "Hide" "icon" should exist in the "Restriction by date" "table_row"
+ And I toggle the "Enable Restriction by date" admin switch "on"
+ And I should see "Restriction by date enabled."
# OK, toggling works. Set the grade one to Hide and we'll go see if it actually worked.
- And I click on "Hide" "icon" in the "Restriction by grade" "table_row"
+ And I toggle the "Disable Restriction by grade" admin switch "off"
And I am on the "P1" "page activity editing" page
And I expand all fieldsets
And I click on "Add restriction..." "button"
diff --git a/admin/tool/componentlibrary/content/library/moodle-javascript.md b/admin/tool/componentlibrary/content/library/moodle-javascript.md
index cc3f178aa7716..dae1c335b3d35 100644
--- a/admin/tool/componentlibrary/content/library/moodle-javascript.md
+++ b/admin/tool/componentlibrary/content/library/moodle-javascript.md
@@ -19,7 +19,7 @@ In order for this to work you need to use the JavaScript syntax used in core Mus
Bootstrap
11 mins ago
-