Loading module/Application/src/Application/Entity/Db/Acteur.php +12 −0 Original line number Diff line number Diff line Loading @@ -121,6 +121,16 @@ class Acteur implements HistoriqueAwareInterface, ResourceInterface return ($this->getRole()->getCode() === Role::CODE_PRESIDENT_JURY || $this->getLibelleRoleComplement() === Role::LIBELLE_PRESIDENT); } /** * Prédicat testant cet un acteur est un membre du jury de thèse. * * @return bool */ public function estMembreDuJury() { return $this->getRole()->getCode() === Role::CODE_MEMBRE_JURY; } /** * @return string */ Loading Loading @@ -295,4 +305,6 @@ class Acteur implements HistoriqueAwareInterface, ResourceInterface { return 'Acteur'; } } module/Application/src/Application/Service/These/TheseService.php +13 −0 Original line number Diff line number Diff line Loading @@ -290,8 +290,15 @@ class TheseService extends BaseService if ($these->getLibellePaysCotutelle()) $pdcData->setCotutuellePays($these->getLibellePaysCotutelle()); } /** Jury de thèses */ $acteurs = $these->getActeurs()->toArray(); $jury = array_filter($acteurs, function (Acteur $a) { return $a->estMembreDuJury(); }); $rapporteurs = array_filter($acteurs, function (Acteur $a) { return $a->estRapporteur(); }); Loading Loading @@ -337,6 +344,12 @@ class TheseService extends BaseService if (!$acteur->estPresidentJury()) { $acteurData->setRole($acteur->getRole()->getLibelle()); //patch rapporteur non membre ... $estMembre = !empty(array_filter($jury, function (Acteur $a) use ($acteur) {return $a->getIndividu() === $acteur->getIndividu();})); if ($acteur->getRole()->getCode() === Role::CODE_RAPPORTEUR_JURY && !$estMembre) { $acteurData->setRole("Rapporteur non membre du jury"); } } else { $acteurData->setRole(Role::LIBELLE_PRESIDENT); } Loading Loading
module/Application/src/Application/Entity/Db/Acteur.php +12 −0 Original line number Diff line number Diff line Loading @@ -121,6 +121,16 @@ class Acteur implements HistoriqueAwareInterface, ResourceInterface return ($this->getRole()->getCode() === Role::CODE_PRESIDENT_JURY || $this->getLibelleRoleComplement() === Role::LIBELLE_PRESIDENT); } /** * Prédicat testant cet un acteur est un membre du jury de thèse. * * @return bool */ public function estMembreDuJury() { return $this->getRole()->getCode() === Role::CODE_MEMBRE_JURY; } /** * @return string */ Loading Loading @@ -295,4 +305,6 @@ class Acteur implements HistoriqueAwareInterface, ResourceInterface { return 'Acteur'; } }
module/Application/src/Application/Service/These/TheseService.php +13 −0 Original line number Diff line number Diff line Loading @@ -290,8 +290,15 @@ class TheseService extends BaseService if ($these->getLibellePaysCotutelle()) $pdcData->setCotutuellePays($these->getLibellePaysCotutelle()); } /** Jury de thèses */ $acteurs = $these->getActeurs()->toArray(); $jury = array_filter($acteurs, function (Acteur $a) { return $a->estMembreDuJury(); }); $rapporteurs = array_filter($acteurs, function (Acteur $a) { return $a->estRapporteur(); }); Loading Loading @@ -337,6 +344,12 @@ class TheseService extends BaseService if (!$acteur->estPresidentJury()) { $acteurData->setRole($acteur->getRole()->getLibelle()); //patch rapporteur non membre ... $estMembre = !empty(array_filter($jury, function (Acteur $a) use ($acteur) {return $a->getIndividu() === $acteur->getIndividu();})); if ($acteur->getRole()->getCode() === Role::CODE_RAPPORTEUR_JURY && !$estMembre) { $acteurData->setRole("Rapporteur non membre du jury"); } } else { $acteurData->setRole(Role::LIBELLE_PRESIDENT); } Loading