Commit graph

117139 commits

Author SHA1 Message Date
Andrew Nicols
ee24c55435
MDL-84355 phpunit: Correct test path for component configs 2025-01-29 11:29:03 +08:00
Sara Arjona
54ed733f98
Merge branch 'MDL-73700_remove-all-the-old-php-version-checks-from-core' of https://github.com/ziegenberg/moodle 2025-01-28 19:43:36 +01:00
Daniel Ziegenberg
50ac1b5d44
MDL-73700 lti: remove old PHP version check
As MDL-73016 set the minimum supported PHP version for Moodle 4.4 and up
to PHP 8.1 we can now safely remove this check. It was introduced with
MDL-73523 because of deprecated openssl_x509_free(), openssl_pkey_free()
and openssl_free_key() functions.

Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
2025-01-28 18:58:08 +01:00
Daniel Ziegenberg
1b8b1505e5
MDL-73700 backup: remove old PHP version check
As MDL-73016 set the minimum supported PHP version for Moodle 4.4 and up
to PHP 8.1 we can now safely remove this check.

Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
2025-01-28 18:58:07 +01:00
Daniel Ziegenberg
723cfca487
MDL-73700 environment: Remove the deprecated igbinary322_version check
As MDL-73016 set the minimum supported PHP version for Moodle 4.4 and up
to PHP 8.1 we can now remove the check PHP version 7.2 in combination
with the igbinary extension version.

Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
2025-01-28 18:58:04 +01:00
Daniel Ziegenberg
161cf71a48
MDL-73700 backup: remove old PHP version check
As MDL-73016 set the minimum supported PHP version for Moodle 4.4 and up
to PHP 8.1 we can now safely switch to php_serialize as the serialize
handler.

Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
2025-01-28 18:58:01 +01:00
Daniel Ziegenberg
bcce1851f1
MDL-73700 mlbackend: remove old PHP version check
As MDL-73016 set the minimum supported PHP version for Moodle 4.4 and up
to PHP 8.1 we can now safely remove this check. As the lang string
`errorphp7required` is particular to mlbackend php plugin we are going
for direct deletion instead of regular deprecation.

Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
2025-01-28 18:58:00 +01:00
Daniel Ziegenberg
5d99a0cbef
MDL-73700 core: remove testing code for old PHP version
Because of PHP bug #70322 two different behaviours were tested (see
MDL-51863). Since those 10 year old PHP versions are way outdated there
is no reason to test for them any longer.

Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
2025-01-28 18:57:58 +01:00
Daniel Ziegenberg
39fda04cdc
MDL-73700 core: remove unused functions and strings from installer
While searching for no longer needed PHP 5.x & 7.0 checks, the
`phpversionhelp` lang string and, subsequently, the `memorylimithelp`
lang string and the `install_helpbutton()` and
`install_print_help_page()` functions were discovered. According to
comments on MDL-2787 and MDL-64482 they are no longer in use since
Moodle 1.x (approximately), neither reachable since some good versions
ago. With MDL-17458 (commit 3b09331066),
the function `print_compatibility_row()` was gone, and it seems like it
was the only place calling `install_helpbutton()`. And
`install_helpbutton()` was the only place where a link to the help mode
(e.g.  `install.php?help=$helpfield`) ever surfaced.  As both lang
strings and functions are particular to the installer and never could
have been used outside of it, we are going for direct deletion instead
of regular deprecation.

Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
2025-01-28 18:57:57 +01:00
Daniel Ziegenberg
85304ca150
MDL-73700 fileconverter_googledrive: remove old PHP version workaround
As MDL-73016 set the minimum supported PHP version for Moodle 4.4 and up
to PHP 8.1 we can now safely write this as a one-liner.

Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
2025-01-28 18:57:55 +01:00
Daniel Ziegenberg
da3b7722ae
MDL-73700 lib: remove old PHP version check
As MDL-73016 set the minimum supported PHP version for Moodle 4.4 and up
to PHP 8.1 we can now safely remove this check.

As it was decided that we will not upgrade this library from upstream
any more (see MDL-52465) we can probably safely remove this. This change
is one of a long series of earlier changes. See readme_moodle.txt.

Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
2025-01-28 18:57:53 +01:00
Daniel Ziegenberg
224a7d2aac
MDL-73700 core: remove old PHP version check
As MDL-73016 set the minimum supported PHP version for Moodle 4.4 and up
to PHP 8.1 we can now safely remove this check. It was introduced with
MDL-75945  because a new signature was introduced to ImagePolygon
functions from PHP 8.1 with the previous signature deprecated in 8.1.

Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
2025-01-28 18:57:52 +01:00
Daniel Ziegenberg
4355a5ac0a
MDL-73700 repository: remove old PHP version check
As MDL-73016 set the minimum supported PHP version for Moodle 4.4 and up
to PHP 8.1 we can now safely remove this check. It was introduced with
MDL-73523 because of deprecated openssl_x509_free(), openssl_pkey_free()
and openssl_free_key() functions.

Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
2025-01-28 18:57:50 +01:00
Daniel Ziegenberg
b59725693c
MDL-73700 mnet: remove old PHP version check
As MDL-73016 set the minimum supported PHP version for Moodle 4.4 and up
to PHP 8.1 we can now safely remove this check. It was introduced with
MDL-73523 because of deprecated openssl_x509_free(), openssl_pkey_free()
and openssl_free_key() functions.

Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
2025-01-28 18:23:20 +01:00
Daniel Ziegenberg
0371d3c7da
MDL-73700 enrol_lti: remove old PHP version check
As MDL-73016 set the minimum supported PHP version for Moodle 4.4 and up
to PHP 8.1 we can now safely remove this check. It was introduced with
MDL-73523 because of deprecated openssl_x509_free(), openssl_pkey_free()
and openssl_free_key() functions.

Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
2025-01-28 18:23:18 +01:00
Paul Holden
2fd885cd85
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:45:22 +00:00
Julien Boulen
f267881c15 MDL-84348 h5pactivity: Hide preview mode warning for guest users 2025-01-28 12:00:05 +01:00
Amaia Anabitarte
89850267ff MDL-79214 mod_folder: Final removal of htmllize_tree() 2025-01-28 11:33:27 +01:00
Huong Nguyen
474231d1a4
Merge branch 'MDL-83079-main' of https://github.com/HuongNV13/moodle 2025-01-28 17:04:08 +07:00
Frederik Milling Pytlick
d8f1d2aa95
MDL-83079 core: Make signal handlers run during non CLI scripts 2025-01-28 16:45:59 +07:00
Huong Nguyen
d8cbf21f59
Merge branch 'MDL-84333-main' of https://github.com/ferranrecio/moodle 2025-01-28 16:28:09 +07:00
Andrew Nicols
695d146f1f
Merge branch 'MDL-79843-main-2-squashed' of https://github.com/snake/moodle 2025-01-28 14:47:10 +08:00
Jake Dallimore
26fcb89fd2
MDL-79843 core: test covering hook events for deprecated plugins
Verifies that listeners are excluded if they are from a deprecated
plugin type.
2025-01-28 14:42:20 +08:00
Jake Dallimore
44b16855e6
MDL-79843 core_access: test covering capabilities for deprecated plugins
Access APIs still support the deprecated plugin during deprecation.
2025-01-28 14:42:20 +08:00
Jake Dallimore
36ab70c64a
MDL-79843 core_external: test covering services for deprecated plugins
This just asserts that web services provided by deprecated plugins can
still be used (similar to how their APIs can still be used during the
deprecation period).
2025-01-28 14:42:20 +08:00
Jake Dallimore
995c5489b7
MDL-79843 core_adminpresets: skip deprecated plugin types during apply
Presets are stored in the DB and may contain config for plugins which
have since been deprecated. This just makes sure these are skipped when
trying to apply the preset.
2025-01-28 14:42:19 +08:00
Jake Dallimore
17eb4af339
MDL-79843 core_task: changes to support deprecated plugin types
This ensures:
- existing adhoc tasks will run and be cleared from the queue
- new adhoc tasks cannot be scheduled
- scheduled tasks cannot be listed or fetched via scheduling
Given the nature of the task API, since all tasks are just objects,
a manually created task can still be run via its ::execute() method.
2025-01-28 14:42:19 +08:00
Jake Dallimore
d6e5a34703
MDL-79843 core_event: test covering events for deprecated plugin types 2025-01-28 14:42:19 +08:00
Jake Dallimore
d6f0443308
MDL-79843 core: prevent callback use for deprecated plugins 2025-01-28 14:42:19 +08:00
Jake Dallimore
2a0e5c9ec4
MDL-79843 core: install/upgrade/admin supporting plugintype deprecation
This change:
- reports deprecated plugins during upgrade (informational only)
- reports deprecated plugins via site admin, permitting uninstall
- adds env check to block site install/upgrade when phase 2 deprecated
(deleted) plugins are detected. They must be uninstalled to continue.
2025-01-28 14:42:19 +08:00
Jake Dallimore
9a3e8f265c
MDL-79843 core: add plugin_manager tests for plugintype deprecation
This change also includes a small extension to testable_plugin_manager,
allowing it to load a fixture plugininfo class for mock plugintypes from
the respective mock type directory root instead of requiring the
plugininfo be located in lib/classes/plugininfo. This prevents debugging
calls during mock use in tests.
2025-01-28 14:42:19 +08:00
Jake Dallimore
6031b7cb60
MDL-79843 core: support deprecated plugin types in plugin_manager APIs
This change:
- Adds param to plugin_manager::get_plugins() to permit return of
plugininfo for deprecated/deleted plugins, defaulting to false for
b/c.
- ensures plugininfo represents the deprecation state, via:
-- base::is_deprecated() and
-- base::is_deleted()
- ensures plugin_manager supports deprecated/deleted plugins in the
following APIs:
-- plugin_manager::get_present_plugins()
-- plugin_manager::get_installed_plugins()
-- plugin_manager::get_plugin_info()
-- plugin_manager::get_plugintype_root()
-- plugin_manager::can_uninstall_plugin()
-- plugin_manager::get_uninstall_url()

The above changes facilitate listing/reporting on deprecated or deleted
plugins in install, upgrade or site admin views.
2025-01-28 14:42:19 +08:00
Jake Dallimore
16690e3c88
MDL-79843 core: add component tests covering plugintype deprecation
Note: these tests impact \core\component caches and must be run in a
separate process to prevent impact on other tests.
2025-01-28 14:42:19 +08:00
Jake Dallimore
3f544be4ab
MDL-79843 core: add test fixtures supporting plugin deprecation tests
This change adds the following fake plugintype+plugins for testing
\core\component:
- mock plugintype 'fake'
- mock plugin 'fake_fullfeatured'
- mock subplugintype for the 'fake' plugintype, 'fullsubtype'
- mock subplugintype for the 'fake' plugintype, 'fulldeprecatedsubtype'
- mock subplugintype for the 'fake' plugintype, 'fulldeletedsubtype'
- various mock implementations for APIs like access, events,
web services, hooks, legacy callbacks and class callbacks.
2025-01-28 14:42:19 +08:00
Jake Dallimore
a644d26c5e
MDL-79843 core: support mocking of deprecated plugins and subplugins
This adds support to the existing, shallow fakeplugin mocks provided by:
- advanced_testcase::add_mocked_plugintype() and
- advanced_testcase::add_mocked_plugin()
and adds new methods for deep mocking fakeplugins:
- advanced_testcase::add_full_mocked_plugintype()
- advanced_testcase::deprecate_full_mocked_plugintype()
- advanced_testcase::delete_full_mock_plugintype()
Deep mocking is required to test \core\component itself.
2025-01-28 14:42:19 +08:00
Jake Dallimore
6b1a63189b
MDL-79843 core: add plugintype deprecation support to core component
By default, for backward-compatibility, these plugin types and plugins
are not returned from existing APIs.
2025-01-28 14:42:19 +08:00
Jun Pataleta
ddf51fac59
Merge branch 'MDL-81195-main' of https://github.com/martygilbert/moodle 2025-01-28 10:53:10 +08:00
Safat
31b8a4e1cb MDL-81015 core_sms: Add support for async SMS sending 2025-01-28 13:40:55 +11:00
AMOS bot
7f7e874ed4 Automatically generated installer lang files 2025-01-28 00:07:51 +00:00
David Mudrák
3f38b28079 MDL-84321 lang: Use the fixed strings in tests, too 2025-01-27 23:11:59 +01:00
Helen Foster
cb4070a2b7 MDL-84321 lang: Import fixed English strings (en_fix) 2025-01-27 23:01:17 +01:00
Paul Holden
127a0f03cc
MDL-84339 ai: move deprecated component lang strings to correct place. 2025-01-27 16:41:22 +00:00
ferran
f6810e5427 MDL-84243 core_courseformat: fix course index completion icon 2025-01-27 17:20:20 +01:00
Mark Johnson
bc57ced4f2
MDL-83862 question: Improve documentation of $qbank parameters 2025-01-27 11:24:54 +00:00
ferran
daa3fff377 MDL-84333 core_courseformat: fix page selector init 2025-01-27 12:10:32 +01:00
Mark Johnson
5b0f5d4c0c
MDL-83862 qbank_viewcreator: Add timemodified filter
This adds a new filter for the timemodified, displayed
in the "Modified by" column. It uses the new core
datetime filter for the UI.
2025-01-27 10:48:24 +00:00
Mark Johnson
bf4107159c
MDL-83862 core: Add validation support for datafilters
This allows filter fields to use client-side form validation attributes to check for valid values,
and adds a validation() method for filters to implement custom validation conditions.

In the event of a validation failure, the invalid filters will not be applied, and the URL will
not be updated to avoid user sharing a URL that will generate an error. Filter conditions should
still implement server-side validation and throw exceptions to avoid erroneous values being
manually inserted into the URL.
2025-01-27 10:48:24 +00:00
Mark Johnson
2d56d31054
MDL-83862 question: Add timemodified support to question generator.
Previously it was not possible to manually specify the modified time for
a question in the test generator. This extends to the mechanism allowing
the modifying user to be specified (rather than using the current user)
to also allow the timemodified to be specified.
2025-01-27 10:48:24 +00:00
Mark Johnson
8629645d34
MDL-83862 core: Add datetime datafilter
This adds a new datafilter Javascript class for a
datetime filter. This supports filtering by dates before,
after or between the selected value(s).

The fields for selecting datetimes in the filter use
<input type="datetime-local">, so this commit also adds
support for filling reading and writing those fields in
behat tests.
2025-01-27 10:48:23 +00:00
Sara Arjona
da2d0571ab
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:26 +01:00