621d75dbce
This partially reverts MDL-73270, where some useful environmental
checks and notifications in the admin UI were added to inform
about different parts of Moodle relying on the "unsupported"
php-xmlrpc extension.
Since then, some changes have happened in core, only available
for Moodle 4.1 and up (see the MDL-70889 mini-epic). Namely:
- MNet (SSO, roaming, auth, enrol and Mahara portfolio) are not
using the php-xmlrpc extension anymore, but a pure php library.
- The xmlrpc webservices protocol, has been move from core to
the plugins directory, although it continues using the php-xmlrpc
extension.
Because of that here we are removing all the checks and notifications
related with MNet (not using the extension anymore), but keeping the
webservice plugin ones (still using the extension). Surely if some day the
protocol stops using the extension, we'll be able to remove the
corresponding checks too. But that's future.
Note the associated lang strings have been also removed (not deprecated)
because they were highly specific and hardly reusable:
- xmlrpcmaharaenabled
- xmlrpcmnetauthenticationenabled
- xmlrpcmnetenabled
And very same applies, because MNet doesn't contain anything deprecated
or not supported anymore, hence, straight deletion, to the function:
- mnet_get_deprecation_notice()
Also, related tests using any of the removed stuff above have been deleted.
In the other side, the "check_xmlrpc_usage" continues existing and
being used both by environment checks and admin notifications but,
as commented above, now it only looks for the xmlrpc webservice
protocol now.
63 lines
3.0 KiB
PHP
63 lines
3.0 KiB
PHP
<?php
|
|
|
|
// This file defines settingpages and externalpages under the "mnet" category
|
|
|
|
if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
|
|
|
|
$ADMIN->add('mnet', new admin_externalpage('net', new lang_string('settings', 'mnet'),
|
|
"$CFG->wwwroot/$CFG->admin/mnet/index.php",
|
|
'moodle/site:config'));
|
|
|
|
|
|
|
|
$ADMIN->add('mnet', new admin_externalpage('mnetpeers', new lang_string('managemnetpeers', 'mnet'),
|
|
"$CFG->wwwroot/$CFG->admin/mnet/peers.php",
|
|
'moodle/site:config'));
|
|
|
|
|
|
$ADMIN->add('mnet', new admin_category('mnetpeercat', new lang_string('mnetpeers', 'mnet')));
|
|
|
|
if (isset($CFG->mnet_dispatcher_mode) and $CFG->mnet_dispatcher_mode !== 'off') {
|
|
require_once($CFG->dirroot.'/mnet/lib.php');
|
|
|
|
$hosts = mnet_get_hosts();
|
|
foreach ($hosts as $host) {
|
|
if ($host->id == $CFG->mnet_all_hosts_id) {
|
|
$host->name = new lang_string('allhosts', 'core_mnet');
|
|
}
|
|
$ADMIN->add('mnetpeercat',
|
|
new admin_externalpage(
|
|
'mnetpeer' . $host->id,
|
|
$host->name,
|
|
$CFG->wwwroot . '/'.$CFG->admin.'/mnet/peers.php?step=update&hostid=' . $host->id,
|
|
'moodle/site:config'
|
|
)
|
|
);
|
|
}
|
|
}
|
|
|
|
$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'));
|
|
|
|
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');
|
|
$ADMIN->add('mnet', $profilefields);
|
|
|
|
$fields = mnet_profile_field_options();
|
|
$forced = implode(', ', $fields['forced']);
|
|
|
|
$profilefields->add(new admin_setting_configmultiselect('mnetprofileexportfields', new lang_string('profileexportfields', 'mnet'), new lang_string('profilefielddesc', 'mnet', $forced), $fields['legacy'], $fields['optional']));
|
|
$profilefields->add(new admin_setting_configmultiselect('mnetprofileimportfields', new lang_string('profileimportfields', 'mnet'), new lang_string('profilefielddesc', 'mnet', $forced), $fields['legacy'], $fields['optional']));
|
|
}
|
|
|
|
|
|
} // end of speedup
|