diff --git a/backup/cc/restore_cc.php b/backup/cc/restore_cc.php index 94625fb4ee0..845d9e2e791 100644 --- a/backup/cc/restore_cc.php +++ b/backup/cc/restore_cc.php @@ -39,11 +39,6 @@ function cc_convert ($dir) { $detected_requirements = detect_requirements(); - if (!$detected_requirements["php5"]) { - echo $OUTPUT->notification(get_string('cc_import_req_php5', 'imscc')); - return false; - } - if (!$detected_requirements["dom"]) { echo $OUTPUT->notification(get_string('cc_import_req_dom', 'imscc')); return false; @@ -98,12 +93,6 @@ function cc_convert ($dir) { function detect_requirements () { - if (floor(phpversion()) >= 5) { - $detected["php5"] = true; - } else { - $detected["php5"] = false; - } - $detected["xsl"] = extension_loaded('xsl'); $detected['dom'] = extension_loaded('dom'); $detected['libxml'] = extension_loaded('libxml'); diff --git a/lang/en/deprecated.txt b/lang/en/deprecated.txt index c365a69e2c7..278e0593e34 100644 --- a/lang/en/deprecated.txt +++ b/lang/en/deprecated.txt @@ -180,3 +180,4 @@ globalratelimit_desc,aiprovider_openai orgid_desc,aiprovider_openai userratelimit,aiprovider_openai userratelimit_desc,aiprovider_openai +cc_import_req_php5,core_imscc diff --git a/lang/en/imscc.php b/lang/en/imscc.php index 20ef87f6cc2..bfa5fd6465f 100644 --- a/lang/en/imscc.php +++ b/lang/en/imscc.php @@ -26,7 +26,6 @@ $string['cc_import_req_dom'] = 'ERROR: The Common Cartridge import requires DOM extension.'; $string['cc_import_req_libxml'] = 'ERROR: The Common Cartridge import requires LIBXML extension.'; $string['cc_import_req_libxmlminversion'] = 'ERROR: The Common Cartridge import requires LIBXML version 2.6.30 or newer.'; -$string['cc_import_req_php5'] = 'ERROR: The Common Cartridge import requires PHP 5 or higher.'; $string['cc_import_req_xsl'] = 'ERROR: The Common Cartridge import requires XSL.'; $string['cc2moodle_checking_schema'] = 'CC format! Checking schema...'; $string['cc2moodle_invalid_schema'] = 'The schema is not valid.'; @@ -36,3 +35,6 @@ $string['cc2moodle_valid_schema'] = 'Schema valid!'; $string['enable_cc_import'] = 'Enable CC import'; $string['enable_cc_import_description'] = 'This setting enables the import of Common Cartridge (IMS-CC) packages using the standard restore functionality. Note it requires PHP5, DOM, XSL and LIBXML (2.6.30 or newer) extensions to be installed in the server.'; $string['checkingforimscc'] = 'Checking for IMS-CC...'; + +// Deprecated since Moodle 5.0. +$string['cc_import_req_php5'] = 'ERROR: The Common Cartridge import requires PHP 5 or higher.';