mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
mnet is not going to bork my sites with disabled mnet, sorry - preventing loading of mnet setting stuff into settings tree when it is disabled
This commit is contained in:
parent
dd6af534e4
commit
536fc0b535
1 changed files with 11 additions and 9 deletions
|
@ -4,8 +4,6 @@
|
|||
|
||||
if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
|
||||
|
||||
require_once($CFG->dirroot.'/mnet/lib.php');
|
||||
|
||||
$ADMIN->add('mnet', new admin_externalpage('net', get_string('settings', 'mnet'),
|
||||
"$CFG->wwwroot/$CFG->admin/mnet/index.php",
|
||||
'moodle/site:config'));
|
||||
|
@ -20,6 +18,8 @@ $ADMIN->add('mnet', new admin_externalpage('mnetpeers', get_string('managemnetpe
|
|||
$ADMIN->add('mnet', new admin_category('mnetpeercat', get_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) {
|
||||
$ADMIN->add('mnetpeercat',
|
||||
|
@ -42,6 +42,8 @@ $ADMIN->add('mnet', new admin_externalpage('mnetenrol', get_string('mnetenrol',
|
|||
$ADMIN->add('mnet', new admin_externalpage('trustedhosts', get_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', get_string('profilefields', 'mnet'),
|
||||
'moodle/site:config');
|
||||
$ADMIN->add('mnet', $profilefields);
|
||||
|
@ -51,7 +53,7 @@ $forced = implode(', ', $fields['forced']);
|
|||
|
||||
$profilefields->add(new admin_setting_configmultiselect('mnetprofileexportfields', get_string('profileexportfields', 'mnet'), get_string('profilefielddesc', 'mnet', $forced), $fields['legacy'], $fields['optional']));
|
||||
$profilefields->add(new admin_setting_configmultiselect('mnetprofileimportfields', get_string('profileimportfields', 'mnet'), get_string('profilefielddesc', 'mnet', $forced), $fields['legacy'], $fields['optional']));
|
||||
|
||||
}
|
||||
|
||||
|
||||
} // end of speedup
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue