$string['remoterep_name'] = 'Remote Moodle Repository';
$string['remoterep_description'] = 'Allow the service to be discovered<br><br>';
$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';
\ No newline at end of file
+$string['failtoretrievelist'] = 'List could not be retrieved or is empty';
+$string['usernotfound'] = 'The user $a is not registered into the remote Moodle';
\ No newline at end of file
$client->add_param($USER->username);
$client->add_param($search);
- $client->send($mnet_peer);
+ if (!$client->send($mnet_peer)) {
+ $message =" ";
+ foreach ($client->error as $errormessage) {
+ $message .= "ERROR: $errormessage . ";
+ }
+ echo json_encode(array('e'=>$message));
+ exit;
+ }
$services = $client->response;