mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-15352: add warning message when no peer are set
This commit is contained in:
parent
e3ca0f3a04
commit
d8a560c64e
2 changed files with 7 additions and 1 deletions
|
@ -12,3 +12,4 @@ $string['connectionfailure'] = 'Failed to retrieve file listing - The host moodl
|
|||
$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';
|
||||
$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>';
|
||||
|
|
|
@ -300,8 +300,13 @@ class repository_remotemoodle extends repository {
|
|||
$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'));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue