registration MDL-19314 do not display Moodle.org into the hub selector form

This commit is contained in:
jerome mouneyrac
2010-05-05 09:22:06 +00:00
parent 6a176a74a8
commit a33cc71fe6
2 changed files with 8 additions and 3 deletions
+7
View File
@@ -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) {
+1 -3
View File
@@ -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']);
}