From 7747395a79ab71aa3af109b8bd0216c710de5113 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Wed, 30 Dec 2015 17:39:24 +0100 Subject: [PATCH] =?UTF-8?q?Correction=20erreur=20mineure=20lors=20de=20la?= =?UTF-8?q?=20selection=20auto=20de=20la=20premi=C3=A8re=20"formation"=20s?= =?UTF-8?q?ur=20la=20page=20"admin@tous=5Fles=5Fgroupes"=20alors=20qu'aucu?= =?UTF-8?q?ne=20formation=20n'existe?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- page/groups.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/page/groups.php b/page/groups.php index 968015b..f3d2808 100755 --- a/page/groups.php +++ b/page/groups.php @@ -395,8 +395,8 @@ if( permission('admin') || permission('master') ){ // si l'utilisateur est conne array_push($verificationUIDFormations, $groupe['id_formation']); $moveStudentsFormationOpt = $formationOpt; - // si la formation optionnelle n'est pas définie ou incohérente, on le fait (première valeur trouvée) - if( $moveStudentsFormationOpt == null || !in_array($moveStudentsFormationOpt, $verificationUIDFormations) ) + // si la formation optionnelle n'est pas définie ou incohérente et si au moins 1 choix, on le fait (première valeur trouvée) + if( ($moveStudentsFormationOpt == null || !in_array($moveStudentsFormationOpt, $verificationUIDFormations)) && count($verificationUIDFormations) > 0 ) $moveStudentsFormationOpt = $verificationUIDFormations[0];