Voici une proposition pour empêcher une recherche hors des contacts et hors des cours où l'utilisateur est inscrit.
Merci de vérifier...
Supprimer les les lignes 100 à 107 (vers la fin) du fichier en annexe :
moodle/message/classes/output/messagearea/user_search_results.php
// Check if there are any non-contacts.
if (!empty($this->noncontacts)) {
$data->hasnoncontacts = true;
foreach ($this->noncontacts as $noncontact) {
$noncontact = new contact($noncontact);
$data->noncontacts[] = $noncontact->export_for_template($output);
}
}
Christian