diff --git a/admin/mnet/access_control.php b/admin/mnet/access_control.php index c93dc069d7d..68552aec04b 100644 --- a/admin/mnet/access_control.php +++ b/admin/mnet/access_control.php @@ -117,7 +117,6 @@ if ($form = data_submitted() and confirm_sesskey()) { } echo $OUTPUT->header(); -echo $OUTPUT->render(mnet_get_deprecation_notice()); // Explain echo $OUTPUT->box(get_string('ssoacldescr','mnet')); diff --git a/admin/mnet/index.php b/admin/mnet/index.php index 11a9967c41c..ed4ff7df8a9 100644 --- a/admin/mnet/index.php +++ b/admin/mnet/index.php @@ -81,7 +81,6 @@ $hosts = $DB->get_records_select('mnet_host', "id <> ? AND deleted = 0", array($CFG->mnet_localhost_id), 'wwwroot ASC'); echo $OUTPUT->header(); - echo $OUTPUT->render(mnet_get_deprecation_notice()); ?>
diff --git a/admin/mnet/peers.php b/admin/mnet/peers.php index 29919893f60..1cd70b184f9 100644 --- a/admin/mnet/peers.php +++ b/admin/mnet/peers.php @@ -51,8 +51,6 @@ if ($hostid && $DB->get_field('mnet_host', 'deleted', array('id' => $hostid)) != $PAGE->set_url('/admin/mnet/peers.php'); admin_externalpage_setup($adminsection); -$deprecatenotify = mnet_get_deprecation_notice(); - if (!extension_loaded('openssl')) { throw new \moodle_exception('requiresopenssl', 'mnet'); } @@ -88,7 +86,6 @@ if ($formdata = $simpleform->get_data()) { $formdata->oldpublickey = $mnet_peer->public_key; // set this so we can confirm on form post without having to recreate the mnet_peer object $reviewform->set_data($mnet_peer); echo $OUTPUT->header(); - echo $OUTPUT->render($deprecatenotify); echo $OUTPUT->box_start(); $reviewform->display(); echo $OUTPUT->box_end(); @@ -176,7 +173,6 @@ if ($formdata = $reviewform->get_data()) { } } else if ($reviewform->is_submitted()) { // submitted, but errors echo $OUTPUT->header(); - echo $OUTPUT->render($deprecatenotify); echo $OUTPUT->box_start(); $reviewform->display(); echo $OUTPUT->box_end(); @@ -187,7 +183,6 @@ if ($formdata = $reviewform->get_data()) { // normal flow - just display all hosts with links echo $OUTPUT->header(); -echo $OUTPUT->render($deprecatenotify); $hosts = mnet_get_hosts(true); // print the table to display the register all hosts setting diff --git a/admin/mnet/tabs.php b/admin/mnet/tabs.php index bf0c8ff3e3a..0107d758285 100644 --- a/admin/mnet/tabs.php +++ b/admin/mnet/tabs.php @@ -44,5 +44,4 @@ if (isset($mnet_peer->id) && $mnet_peer->id > 0) { } else { $tabs[] = new tabobject('mnetdetails', '#', $strmnetedithost, $strmnetedithost, false); } -echo $OUTPUT->render(mnet_get_deprecation_notice()); print_tabs(array($tabs), $currenttab); diff --git a/admin/mnet/trustedhosts.html b/admin/mnet/trustedhosts.html index 951e8b91852..e48a3d3b542 100644 --- a/admin/mnet/trustedhosts.html +++ b/admin/mnet/trustedhosts.html @@ -1,6 +1,5 @@ header(); -echo $OUTPUT->render(mnet_get_deprecation_notice()); ?>
diff --git a/admin/settings/mnet.php b/admin/settings/mnet.php index f853938c50a..9bb5b15dd4a 100644 --- a/admin/settings/mnet.php +++ b/admin/settings/mnet.php @@ -49,8 +49,6 @@ $ADMIN->add('mnet', new admin_externalpage('trustedhosts', new lang_string('trus if (isset($CFG->mnet_dispatcher_mode) and $CFG->mnet_dispatcher_mode !== 'off') { $profilefields = new admin_settingpage('mnetprofilefields', new lang_string('profilefields', 'mnet'), 'moodle/site:config'); - $profilefields->add(new admin_setting_heading('mnetprofilefields/xmlrpcmnet', '', - $OUTPUT->render(mnet_get_deprecation_notice()))); $ADMIN->add('mnet', $profilefields); $fields = mnet_profile_field_options(); diff --git a/auth/mnet/settings.php b/auth/mnet/settings.php index fae2ab9f4c4..b7aa4a4b59a 100644 --- a/auth/mnet/settings.php +++ b/auth/mnet/settings.php @@ -27,11 +27,6 @@ defined('MOODLE_INTERNAL') || die; if ($ADMIN->fulltree) { require_once($CFG->dirroot.'/lib/outputlib.php'); - $notify = new \core\output\notification(get_string('xmlrpcmnetauthenticationenabled', 'admin'), - \core\output\notification::NOTIFY_WARNING); - $settings->add(new admin_setting_heading('auth_mnet/xmlrpcmnet', '', - $OUTPUT->render($notify))); - // Introductory explanation. $settings->add(new admin_setting_heading('auth_mnet/pluginname', '', new lang_string('auth_mnetdescription', 'auth_mnet'))); diff --git a/lang/en/admin.php b/lang/en/admin.php index 0dd5135af83..ec2c1aea0f0 100644 --- a/lang/en/admin.php +++ b/lang/en/admin.php @@ -1544,9 +1544,6 @@ $string['warningiconvbuggy'] = 'Your version of the iconv library does not suppo $string['webproxy'] = 'Web proxy'; $string['webproxyinfo'] = 'Fill in the following options if your Moodle server cannot access the internet directly. Internet access is required for the download of environment data, language packs, RSS feeds, timezones, etc.
The PHP cURL extension is highly recommended.'; $string['xmlrpcrecommended'] = 'The XMLRPC extension is useful for web services and Moodle networking.'; -$string['xmlrpcmaharaenabled'] = 'It has been detected that the Mahara ePortfolio is enabled on your site. This feature relies on the PHP XML-RPC extension which is no longer maintained by PHP.'; -$string['xmlrpcmnetauthenticationenabled'] = 'It has been detected that the MNet authentication is enabled on your site. This feature relies on the PHP XML-RPC extension which is no longer maintained by PHP.'; -$string['xmlrpcmnetenabled'] = 'It has been detected that the Moodle Networking is enabled on your site. This feature relies on the PHP XML-RPC extension which is no longer maintained by PHP.'; $string['xmlrpcwebserviceenabled'] = 'It has been detected that the XML-RPC Web Service protocol is enabled on your site. This feature relies on the PHP XML-RPC extension which is no longer maintained by PHP.'; $string['yuicomboloading'] = 'YUI combo loading'; $string['ziprequired'] = 'The Zip PHP extension is now required by Moodle, info-ZIP binaries or PclZip library are not used anymore.'; diff --git a/lib/adminlib.php b/lib/adminlib.php index 72c3906431e..052a0d47f2f 100644 --- a/lib/adminlib.php +++ b/lib/adminlib.php @@ -7140,11 +7140,6 @@ class admin_setting_manageauths extends admin_setting { } $return = $OUTPUT->heading(get_string('actauthhdr', 'auth'), 3, 'main'); - if (in_array('mnet', $authsenabled)) { - $notify = new \core\output\notification(get_string('xmlrpcmnetauthenticationenabled', 'admin'), - \core\output\notification::NOTIFY_WARNING); - $return .= $OUTPUT->render($notify); - } $return .= $OUTPUT->box_start('generalbox authsui'); $table = new html_table(); diff --git a/lib/tests/upgradelib_test.php b/lib/tests/upgradelib_test.php index 8044cc701fd..6a04c476ceb 100644 --- a/lib/tests/upgradelib_test.php +++ b/lib/tests/upgradelib_test.php @@ -1354,64 +1354,6 @@ class upgradelib_test extends advanced_testcase { $this->assertFalse($result->getStatus()); } - /** - * Test the check_xmlrpc_usage check when the MNet is turned on but no host was set up. - * - * @return void - */ - public function test_check_xmlrpc_mnet_host_is_not_set(): void { - global $CFG; - - $this->resetAfterTest(); - $CFG->mnet_dispatcher_mode = 'strict'; - - $result = new environment_results('custom_checks'); - $this->assertNull(check_xmlrpc_usage($result)); - } - - /** - * Test the check_xmlrpc_usage check when the MNet is turned on and the host was set up. - * - * @return void - */ - public function test_check_xmlrpc_mnet_host_is_set(): void { - global $CFG, $DB; - - $this->resetAfterTest(); - $CFG->mnet_dispatcher_mode = 'strict'; - - // Add a mnet host. - $mnethost = new stdClass(); - $mnethost->name = 'A mnet host'; - $mnethost->public_key = 'A random public key!'; - $mnethost->id = $DB->insert_record('mnet_host', $mnethost); - - $result = new environment_results('custom_checks'); - $this->assertInstanceOf(environment_results::class, check_xmlrpc_usage($result)); - $this->assertEquals('xmlrpc_mnet_usage', $result->getInfo()); - $this->assertFalse($result->getStatus()); - } - - /** - * Test the check_xmlrpc_usage check when the MNet is turned on and the Mahara portfolios was set up. - * - * @return void - */ - public function test_check_xmlrpc_mahara_portfolios_is_set(): void { - global $CFG; - - $this->resetAfterTest(); - $CFG->mnet_dispatcher_mode = 'strict'; - - // Enable the Mahara portfolios. - \core\plugininfo\portfolio::enable_plugin('mahara', 1); - - $result = new environment_results('custom_checks'); - $this->assertInstanceOf(environment_results::class, check_xmlrpc_usage($result)); - $this->assertEquals('xmlrpc_mahara_usage', $result->getInfo()); - $this->assertFalse($result->getStatus()); - } - /** * Data provider of usermenu items. * diff --git a/lib/upgradelib.php b/lib/upgradelib.php index 304d712cfb0..55444107dc8 100644 --- a/lib/upgradelib.php +++ b/lib/upgradelib.php @@ -2782,31 +2782,5 @@ function check_xmlrpc_usage(environment_results $result): ?environment_results { } } - if (isset($CFG->mnet_dispatcher_mode) && $CFG->mnet_dispatcher_mode == 'strict') { - // Checking Mnet hosts. - $mnethosts = mnet_get_hosts(); - if ($mnethosts) { - $actualhost = 0; - foreach ($mnethosts as $mnethost) { - if ($mnethost->id != $CFG->mnet_all_hosts_id) { - $actualhost++; - } - } - if ($actualhost > 0) { - $result->setInfo('xmlrpc_mnet_usage'); - $result->setFeedbackStr('xmlrpcmnetenabled'); - return $result; - } - } - - // Checking Mahara. - $portfolios = \core\plugininfo\portfolio::get_enabled_plugins(); - if (array_key_exists('mahara', $portfolios)) { - $result->setInfo('xmlrpc_mahara_usage'); - $result->setFeedbackStr('xmlrpcmaharaenabled'); - return $result; - } - } - return null; } diff --git a/mnet/environment.php b/mnet/environment.php index 2f3bbb2ecec..fccedb7b975 100644 --- a/mnet/environment.php +++ b/mnet/environment.php @@ -142,10 +142,7 @@ class mnet_environment { set_config('openssl', implode('@@@@@@@@', $this->keypair), 'mnet'); $DB->update_record('mnet_host', $this); - if (!PHPUNIT_TEST) { - // We don't want to output this log for PHPUnit since it will make the test to fail as risky. - error_log('New public key has been generated. It expires ' . date('Y/m/d h:i:s', $this->public_key_expires)); - } + error_log('New public key has been generated. It expires ' . date('Y/m/d h:i:s', $this->public_key_expires)); } function get_private_key() { diff --git a/mnet/lib.php b/mnet/lib.php index fb8a2728476..20a14a59c36 100644 --- a/mnet/lib.php +++ b/mnet/lib.php @@ -935,15 +935,3 @@ function mnet_strip_user($user, $fields) { } return $user; } - -/** - * Return the deprecation notice of the Mnet. - * - * @return \core\output\notification - */ -function mnet_get_deprecation_notice(): \core\output\notification { - $notice = new \core\output\notification(get_string('xmlrpcmnetenabled', 'admin'), - \core\output\notification::NOTIFY_WARNING); - - return $notice; -} diff --git a/mnet/service/enrol/index.php b/mnet/service/enrol/index.php index 1938c6c6e7d..daa30ecc5b5 100644 --- a/mnet/service/enrol/index.php +++ b/mnet/service/enrol/index.php @@ -32,7 +32,6 @@ admin_externalpage_setup('mnetenrol'); $service = mnetservice_enrol::get_instance(); echo $OUTPUT->header(); -echo $OUTPUT->render(mnet_get_deprecation_notice()); echo $OUTPUT->heading_with_help(get_string('clientname', 'mnetservice_enrol'), 'clientname', 'mnetservice_enrol'); if (!$service->is_available()) {