mirror of
https://github.com/moodle/moodle.git
synced 2025-02-13 20:36:42 +01:00
This commit introduces new plugin type called mnetservice. Once the MNet framework is redesigned, this plugin will define the service itself, the strings for it and the the client tools for administrator. The server side is implemented mainly in enrol_mnet plugin which publishes xml-rpc methods. AMOS BEGIN MOV [remoteenrolhosts_desc,core_mnet],[clientname_help,mnetservice_enrol] AMOS END
60 lines
2.8 KiB
PHP
60 lines
2.8 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', get_string('settings', 'mnet'),
|
|
"$CFG->wwwroot/$CFG->admin/mnet/index.php",
|
|
'moodle/site:config'));
|
|
|
|
|
|
|
|
$ADMIN->add('mnet', new admin_externalpage('mnetpeers', get_string('managemnetpeers', 'mnet'),
|
|
"$CFG->wwwroot/$CFG->admin/mnet/peers.php",
|
|
'moodle/site:config'));
|
|
|
|
|
|
$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',
|
|
new admin_externalpage(
|
|
'mnetpeer' . $host->id,
|
|
$host->name,
|
|
$CFG->wwwroot . '/admin/mnet/peers.php?step=update&hostid=' . $host->id,
|
|
'moodle/site:config'
|
|
)
|
|
);
|
|
}
|
|
}
|
|
|
|
$ADMIN->add('mnet', new admin_externalpage('ssoaccesscontrol', get_string('ssoaccesscontrol', 'mnet'),
|
|
"$CFG->wwwroot/$CFG->admin/mnet/access_control.php",
|
|
'moodle/site:config'));
|
|
$ADMIN->add('mnet', new admin_externalpage('mnetenrol', get_string('clientname', 'mnetservice_enrol'),
|
|
"$CFG->wwwroot/mnet/service/enrol/index.php",
|
|
'moodle/site:config'));
|
|
$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);
|
|
|
|
$fields = mnet_profile_field_options();
|
|
$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
|