registration MDL-19314 do not display Moodle.org into the hub selector form
This commit is contained in:
@@ -53,6 +53,13 @@ class hub_selector_form extends moodleform {
|
||||
$xmlrpcclient = new webservice_xmlrpc_client();
|
||||
$hubs = $xmlrpcclient->call($serverurl, 'publichubdirectory', $function, $params);
|
||||
|
||||
//remove moodle.org from the hub list
|
||||
foreach ($hubs as $key => $hub) {
|
||||
if ($hub['url'] == MOODLEORGHUBURL) {
|
||||
unset($hubs[$key]);
|
||||
}
|
||||
}
|
||||
|
||||
//Public hub list
|
||||
$options = array();
|
||||
foreach ($hubs as $hub) {
|
||||
|
||||
@@ -51,11 +51,9 @@ class community_hub_search_form extends moodleform {
|
||||
|
||||
//sort hubs by trusted/prioritize
|
||||
|
||||
//add moodle.org hub
|
||||
$mform->addElement('radio','huburl',get_string('selecthub', 'hub'),' Moodle.org', MOODLEORGHUBURL);
|
||||
|
||||
//Public hub list
|
||||
$options = array();
|
||||
$mform->addElement('static','huburlstring',get_string('selecthub', 'hub').':');
|
||||
foreach ($hubs as $hub) {
|
||||
$mform->addElement('radio','huburl',null,' '.$hub['name'], $hub['url']);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user