$string['connectionfailure'] = 'Failed to retrieve file listing - The host moodle has either a version older than 2.0, either its Moodle Remote Repository service hasn\'t been activated';
$string['failtoretrievelist'] = 'List could not be retrieved or is empty';
$string['usernotfound'] = 'The user $a is not registered into the remote Moodle';
-$string['usercannotaccess'] = 'You ($a) cannot access to this file';
\ No newline at end of file
+$string['usercannotaccess'] = 'You ($a) cannot access to this file';
+$string['nopeer'] = '<div style=\"font-size:0.8em\">Please setup some <a href=\"http://docs.moodle.org/en/admin/mnet/peers#Peer_to_Peer_Network\">Moodle peers</a> for your Moodle site. </div>';
$peers[$host->id] = $host->name;
}
+
$mform->addElement('select', 'peer', get_string('peer', 'repository_remotemoodle'),$peers);
$mform->addRule('peer', get_string('required'), 'required', null, 'client');
+
+ if (empty($peers)) {
+ $mform->addElement('static', null, '', get_string('nopeer','repository_remotemoodle'));
+ }
}
/**