// if ($course_role->shortname == "teacher" || $course_role->shortname == "editingteacher") {
// $role = "admin";
// break;
// }
// }
// foreach ($maharaUsers->users as $muser) {
// if ($member->email == $muser->email){
// array_push($usersTab,array(
// 'id' => $muser->id,
// 'username' => $muser->username,
// 'role' => $role,
// ));
// break;
// }
// }
$usersTab=array();
// Subscribe only the teacher to the mahara group because of lake of efficiency with too big mahara user database (>1000)
// get mahara user by mail (teacher)
...
...
@@ -87,8 +67,6 @@ if (count($students) == 0) {
die;
}
}
if(count($usersTab)==0){
continue;
}
...
...
@@ -109,10 +87,8 @@ if (count($students) == 0) {
));
}
// var_dump($name_groups);
// die;
if(count($mahara_groups)==0){
echo"<div class=\"alert alert-warning\" role=\"alert\"><p><strong>Erreur : tous les groupes du cours sont vides. </strong></p><p>Pour utiliser cette fonctionnalité, il faut au préalable créer des groupes dans le cours et y ajouter des étudiants ou des enseignants. prout</p></div>";
echo"<div class=\"alert alert-warning\" role=\"alert\"><p><strong>Erreur : vous devez faire partie d'au moins un groupe de ce cours. Inscrivez-vous dans un groupe puis recommencez.</p></div>";