Loading CHANGELOG.md +2 −0 Original line number Diff line number Diff line Loading @@ -7,6 +7,8 @@ Journal des modifications - Le manque de justificatifs de soutenances n'est plus bloquant il s'agit plus que d'un warning - [FIX] Retrait de l'appel à un css inexistant - Filtrage des soutenances sans date dans la vue des soutenances pour les structures. - Ajout des mentions Co-encadrant/Co-encadrante sur la page de couverture - Complétion des données pour la page de couverture depuis le dossier de soutenance en cas de manque 3.0.7 ----- Loading module/Application/src/Application/Entity/Db/Acteur.php +7 −7 Original line number Diff line number Diff line Loading @@ -92,21 +92,21 @@ class Acteur implements HistoriqueAwareInterface, ResourceInterface, IndividuAwa * * @return bool */ public function estDirecteur() public function estDirecteur() : bool { return in_array($this->getRole()->getCode(), [ Role::CODE_DIRECTEUR_THESE, ] ); } public function estCodirecteur() public function estCodirecteur() : bool { return in_array($this->getRole()->getCode(), [ Role::CODE_CODIRECTEUR_THESE, ] ); } public function estCoEncadrant() public function estCoEncadrant() : bool { return in_array($this->getRole()->getCode(), [ Role::CODE_CO_ENCADRANT, Loading @@ -119,7 +119,7 @@ class Acteur implements HistoriqueAwareInterface, ResourceInterface, IndividuAwa * * @return bool */ public function estRapporteur() public function estRapporteur() : bool { return $this->getRole()->getCode() === Role::CODE_RAPPORTEUR_JURY; } Loading @@ -129,7 +129,7 @@ class Acteur implements HistoriqueAwareInterface, ResourceInterface, IndividuAwa * * @return bool */ public function estRapporteurAbsent() public function estRapporteurAbsent() : bool { return $this->getRole()->getCode() === Role::CODE_RAPPORTEUR_ABSENT; } Loading @@ -139,7 +139,7 @@ class Acteur implements HistoriqueAwareInterface, ResourceInterface, IndividuAwa * * @return bool */ public function estPresidentJury() public function estPresidentJury() : bool { return ($this->getRole()->getCode() === Role::CODE_PRESIDENT_JURY); } Loading @@ -149,7 +149,7 @@ class Acteur implements HistoriqueAwareInterface, ResourceInterface, IndividuAwa * * @return bool */ public function estMembreDuJury() public function estMembreDuJury() : bool { return $this->getRole()->getCode() === Role::CODE_MEMBRE_JURY; } Loading module/Application/src/Application/Service/These/Factory/TheseServiceFactory.php +4 −0 Original line number Diff line number Diff line Loading @@ -13,6 +13,7 @@ use Application\Service\Utilisateur\UtilisateurService; use Application\Service\Validation\ValidationService; use Application\Service\Variable\VariableService; use Interop\Container\ContainerInterface; use Soutenance\Service\Membre\MembreService; use UnicaenAuth\Service\AuthorizeService; use UnicaenAuth\Service\User as UserService; use Webmozart\Assert\Assert; Loading @@ -30,6 +31,7 @@ class TheseServiceFactory /** * @var ActeurService $acteurService * @var ValidationService $validationService * @var MembreService $membreService * @var NotifierService $notifierService * @var FichierTheseService $fichierTheseService * @var VariableService $variableService Loading @@ -40,6 +42,7 @@ class TheseServiceFactory */ $acteurService = $container->get(ActeurService::class); $validationService = $container->get('ValidationService'); $membreService = $container->get(MembreService::class); $notifierService = $container->get(NotifierService::class); $fichierTheseService = $container->get('FichierTheseService'); $variableService = $container->get('VariableService'); Loading @@ -57,6 +60,7 @@ class TheseServiceFactory $service = new TheseService(); $service->setActeurService($acteurService); $service->setValidationService($validationService); $service->setMembreService($membreService); $service->setNotifierService($notifierService); $service->setFichierTheseService($fichierTheseService); $service->setVariableService($variableService); Loading module/Application/src/Application/Service/These/TheseService.php +30 −9 Original line number Diff line number Diff line Loading @@ -36,7 +36,7 @@ use Doctrine\DBAL\DBALException; use Doctrine\ORM\OptimisticLockException; use Doctrine\ORM\ORMException; use Soutenance\Entity\Proposition; use Soutenance\Service\Proposition\PropositionServiceAwareTrait; use Soutenance\Service\Membre\MembreServiceAwareTrait; use UnicaenApp\Exception\LogicException; use UnicaenApp\Exception\RuntimeException; use UnicaenApp\Traits\MessageAwareInterface; Loading @@ -61,7 +61,7 @@ class TheseService extends BaseService implements ListenerAggregateInterface use FileServiceAwareTrait; use AuthorizeServiceAwareTrait; use ActeurServiceAwareTrait; use PropositionServiceAwareTrait; use MembreServiceAwareTrait; /** * Resaisir l'autorisation de diffusion ? Sinon celle saisie au 1er dépôt est reprise/dupliquée. Loading Loading @@ -123,7 +123,7 @@ class TheseService extends BaseService implements ListenerAggregateInterface /** * @return TheseRepository */ public function getRepository() public function getRepository() : TheseRepository { /** @var TheseRepository $repo */ $repo = $this->entityManager->getRepository(These::class); Loading Loading @@ -461,7 +461,7 @@ class TheseService extends BaseService implements ListenerAggregateInterface * @param These $these * @return PdcData */ public function fetchInformationsPageDeCouverture(These $these) public function fetchInformationsPageDeCouverture(These $these) : PdcData { $pdcData = new PdcData(); $propositions = $these->getPropositions()->toArray(); Loading @@ -472,7 +472,6 @@ class TheseService extends BaseService implements ListenerAggregateInterface $mois = (int) $these->getDateSoutenance()->format('m'); $annee = (int) $these->getDateSoutenance()->format('Y'); $anneeUniversitaire = null; if ($mois > 9) $anneeUniversitaire = $annee . "/" . ($annee + 1); else $anneeUniversitaire = ($annee - 1) . "/" . $annee; $pdcData->setAnneeUniversitaire($anneeUniversitaire); Loading Loading @@ -545,9 +544,6 @@ class TheseService extends BaseService implements ListenerAggregateInterface /** @var Acteur $directeur */ foreach (array_merge($directeurs, $codirecteurs) as $directeur) { if ($directeur->getEtablissement()) { // if (!$directeur->getEtablissement()) { // throw new RuntimeException("Anomalie: le directeur de thèse '{$directeur}' n'a pas d'établissement."); // } if ($directeur->getEtablissement()->estAssocie()) { $pdcData->setAssocie(true); $pdcData->setLogoAssocie($this->fileService->computeLogoFilePathForStructure($directeur->getEtablissement())); Loading @@ -562,12 +558,17 @@ class TheseService extends BaseService implements ListenerAggregateInterface /** @var Acteur $acteur */ foreach ($acteursEnCouverture as $acteur) { $individu = $acteur->getIndividu(); $acteursLies = array_filter($these->getActeurs()->toArray(), function (Acteur $a) use ($individu) { return $a->getIndividu() === $individu;}); $acteurData = new MembreData(); $acteurData->setDenomination(strtoupper($acteur->getIndividu()->getNomComplet(true, false, false, true, true))); $acteurData->setQualite($acteur->getQualite()); $estMembre = !empty(array_filter($jury, function (Acteur $a) use ($acteur) {return $a->getIndividu() === $acteur->getIndividu();})); /** GESTION DES RÔLES SPÉCIAUX ****************************************************************************/ if (!$acteur->estPresidentJury()) { $acteurData->setRole($acteur->getRole()->getLibelle()); Loading @@ -578,7 +579,27 @@ class TheseService extends BaseService implements ListenerAggregateInterface } else { $acteurData->setRole(Role::LIBELLE_PRESIDENT); } if ($acteur->getEtablissement()) $acteurData->setEtablissement($acteur->getEtablissement()->getStructure()->getLibelle()); foreach ($acteursLies as $acteurLie) { if ($acteurLie->estCoEncadrant()) { if ($acteur->getIndividu()->estUneFemme()) $acteurData->setRole($acteurData->getRole() . "<br/> Co-encadrante"); else $acteurData->setRole($acteurData->getRole() . "<br/> Co-encadrant"); break; } } /** GESTION DES ETABLISSEMENTS ****************************************************************************/ if ($acteur->getEtablissement()) { $acteurData->setEtablissement($acteur->getEtablissement()->getStructure()->getLibelle()); } else { foreach ($acteursLies as $acteurLie) { $membre = $this->getMembreService()->getMembreByActeur($acteurLie); if ($membre) { $acteurData->setEtablissement($membre->getEtablissement()); break; } } } if ($estMembre) $pdcData->addActeurEnCouverture($acteurData); } Loading module/Soutenance/src/Soutenance/Controller/PresoutenanceController.php +4 −0 Original line number Diff line number Diff line Loading @@ -177,6 +177,7 @@ class PresoutenanceController extends AbstractController * - qu'un Membre du jury est Membre du jury. */ $acteurs = $this->getActeurService()->getRepository()->findActeurByThese($these); $acteurs = array_filter($acteurs, function (Acteur $a) { return $a->estNonHistorise();}); switch ($membre->getRole()) { case Membre::RAPPORTEUR_JURY : case Membre::RAPPORTEUR_VISIO : Loading Loading @@ -228,6 +229,8 @@ class PresoutenanceController extends AbstractController $membre->setActeur($acteur); $this->getMembreService()->update($membre); //creation de l'utilisateur if ($membre->estRapporteur()) { $utilisateurs = $this->utilisateurService->getRepository()->findByIndividu($individu); $user = null; if (empty($utilisateurs)) { Loading @@ -251,6 +254,7 @@ class PresoutenanceController extends AbstractController $url = $this->url()->fromRoute('zfcuser/login', ['type' => 'token'], ['query' => ['token' => $token->getToken(), 'redirect' => $url_rapporteur, 'role' => $acteur->getRole()->getRoleId()], 'force_canonical' => true], true); $this->getNotifierSoutenanceService()->triggerConnexionRapporteur($proposition, $user, $url); } } return new ViewModel([ 'title' => "Association de " . $membre->getDenomination() . " à un acteur " . $this->appInfos()->getNom(), Loading Loading
CHANGELOG.md +2 −0 Original line number Diff line number Diff line Loading @@ -7,6 +7,8 @@ Journal des modifications - Le manque de justificatifs de soutenances n'est plus bloquant il s'agit plus que d'un warning - [FIX] Retrait de l'appel à un css inexistant - Filtrage des soutenances sans date dans la vue des soutenances pour les structures. - Ajout des mentions Co-encadrant/Co-encadrante sur la page de couverture - Complétion des données pour la page de couverture depuis le dossier de soutenance en cas de manque 3.0.7 ----- Loading
module/Application/src/Application/Entity/Db/Acteur.php +7 −7 Original line number Diff line number Diff line Loading @@ -92,21 +92,21 @@ class Acteur implements HistoriqueAwareInterface, ResourceInterface, IndividuAwa * * @return bool */ public function estDirecteur() public function estDirecteur() : bool { return in_array($this->getRole()->getCode(), [ Role::CODE_DIRECTEUR_THESE, ] ); } public function estCodirecteur() public function estCodirecteur() : bool { return in_array($this->getRole()->getCode(), [ Role::CODE_CODIRECTEUR_THESE, ] ); } public function estCoEncadrant() public function estCoEncadrant() : bool { return in_array($this->getRole()->getCode(), [ Role::CODE_CO_ENCADRANT, Loading @@ -119,7 +119,7 @@ class Acteur implements HistoriqueAwareInterface, ResourceInterface, IndividuAwa * * @return bool */ public function estRapporteur() public function estRapporteur() : bool { return $this->getRole()->getCode() === Role::CODE_RAPPORTEUR_JURY; } Loading @@ -129,7 +129,7 @@ class Acteur implements HistoriqueAwareInterface, ResourceInterface, IndividuAwa * * @return bool */ public function estRapporteurAbsent() public function estRapporteurAbsent() : bool { return $this->getRole()->getCode() === Role::CODE_RAPPORTEUR_ABSENT; } Loading @@ -139,7 +139,7 @@ class Acteur implements HistoriqueAwareInterface, ResourceInterface, IndividuAwa * * @return bool */ public function estPresidentJury() public function estPresidentJury() : bool { return ($this->getRole()->getCode() === Role::CODE_PRESIDENT_JURY); } Loading @@ -149,7 +149,7 @@ class Acteur implements HistoriqueAwareInterface, ResourceInterface, IndividuAwa * * @return bool */ public function estMembreDuJury() public function estMembreDuJury() : bool { return $this->getRole()->getCode() === Role::CODE_MEMBRE_JURY; } Loading
module/Application/src/Application/Service/These/Factory/TheseServiceFactory.php +4 −0 Original line number Diff line number Diff line Loading @@ -13,6 +13,7 @@ use Application\Service\Utilisateur\UtilisateurService; use Application\Service\Validation\ValidationService; use Application\Service\Variable\VariableService; use Interop\Container\ContainerInterface; use Soutenance\Service\Membre\MembreService; use UnicaenAuth\Service\AuthorizeService; use UnicaenAuth\Service\User as UserService; use Webmozart\Assert\Assert; Loading @@ -30,6 +31,7 @@ class TheseServiceFactory /** * @var ActeurService $acteurService * @var ValidationService $validationService * @var MembreService $membreService * @var NotifierService $notifierService * @var FichierTheseService $fichierTheseService * @var VariableService $variableService Loading @@ -40,6 +42,7 @@ class TheseServiceFactory */ $acteurService = $container->get(ActeurService::class); $validationService = $container->get('ValidationService'); $membreService = $container->get(MembreService::class); $notifierService = $container->get(NotifierService::class); $fichierTheseService = $container->get('FichierTheseService'); $variableService = $container->get('VariableService'); Loading @@ -57,6 +60,7 @@ class TheseServiceFactory $service = new TheseService(); $service->setActeurService($acteurService); $service->setValidationService($validationService); $service->setMembreService($membreService); $service->setNotifierService($notifierService); $service->setFichierTheseService($fichierTheseService); $service->setVariableService($variableService); Loading
module/Application/src/Application/Service/These/TheseService.php +30 −9 Original line number Diff line number Diff line Loading @@ -36,7 +36,7 @@ use Doctrine\DBAL\DBALException; use Doctrine\ORM\OptimisticLockException; use Doctrine\ORM\ORMException; use Soutenance\Entity\Proposition; use Soutenance\Service\Proposition\PropositionServiceAwareTrait; use Soutenance\Service\Membre\MembreServiceAwareTrait; use UnicaenApp\Exception\LogicException; use UnicaenApp\Exception\RuntimeException; use UnicaenApp\Traits\MessageAwareInterface; Loading @@ -61,7 +61,7 @@ class TheseService extends BaseService implements ListenerAggregateInterface use FileServiceAwareTrait; use AuthorizeServiceAwareTrait; use ActeurServiceAwareTrait; use PropositionServiceAwareTrait; use MembreServiceAwareTrait; /** * Resaisir l'autorisation de diffusion ? Sinon celle saisie au 1er dépôt est reprise/dupliquée. Loading Loading @@ -123,7 +123,7 @@ class TheseService extends BaseService implements ListenerAggregateInterface /** * @return TheseRepository */ public function getRepository() public function getRepository() : TheseRepository { /** @var TheseRepository $repo */ $repo = $this->entityManager->getRepository(These::class); Loading Loading @@ -461,7 +461,7 @@ class TheseService extends BaseService implements ListenerAggregateInterface * @param These $these * @return PdcData */ public function fetchInformationsPageDeCouverture(These $these) public function fetchInformationsPageDeCouverture(These $these) : PdcData { $pdcData = new PdcData(); $propositions = $these->getPropositions()->toArray(); Loading @@ -472,7 +472,6 @@ class TheseService extends BaseService implements ListenerAggregateInterface $mois = (int) $these->getDateSoutenance()->format('m'); $annee = (int) $these->getDateSoutenance()->format('Y'); $anneeUniversitaire = null; if ($mois > 9) $anneeUniversitaire = $annee . "/" . ($annee + 1); else $anneeUniversitaire = ($annee - 1) . "/" . $annee; $pdcData->setAnneeUniversitaire($anneeUniversitaire); Loading Loading @@ -545,9 +544,6 @@ class TheseService extends BaseService implements ListenerAggregateInterface /** @var Acteur $directeur */ foreach (array_merge($directeurs, $codirecteurs) as $directeur) { if ($directeur->getEtablissement()) { // if (!$directeur->getEtablissement()) { // throw new RuntimeException("Anomalie: le directeur de thèse '{$directeur}' n'a pas d'établissement."); // } if ($directeur->getEtablissement()->estAssocie()) { $pdcData->setAssocie(true); $pdcData->setLogoAssocie($this->fileService->computeLogoFilePathForStructure($directeur->getEtablissement())); Loading @@ -562,12 +558,17 @@ class TheseService extends BaseService implements ListenerAggregateInterface /** @var Acteur $acteur */ foreach ($acteursEnCouverture as $acteur) { $individu = $acteur->getIndividu(); $acteursLies = array_filter($these->getActeurs()->toArray(), function (Acteur $a) use ($individu) { return $a->getIndividu() === $individu;}); $acteurData = new MembreData(); $acteurData->setDenomination(strtoupper($acteur->getIndividu()->getNomComplet(true, false, false, true, true))); $acteurData->setQualite($acteur->getQualite()); $estMembre = !empty(array_filter($jury, function (Acteur $a) use ($acteur) {return $a->getIndividu() === $acteur->getIndividu();})); /** GESTION DES RÔLES SPÉCIAUX ****************************************************************************/ if (!$acteur->estPresidentJury()) { $acteurData->setRole($acteur->getRole()->getLibelle()); Loading @@ -578,7 +579,27 @@ class TheseService extends BaseService implements ListenerAggregateInterface } else { $acteurData->setRole(Role::LIBELLE_PRESIDENT); } if ($acteur->getEtablissement()) $acteurData->setEtablissement($acteur->getEtablissement()->getStructure()->getLibelle()); foreach ($acteursLies as $acteurLie) { if ($acteurLie->estCoEncadrant()) { if ($acteur->getIndividu()->estUneFemme()) $acteurData->setRole($acteurData->getRole() . "<br/> Co-encadrante"); else $acteurData->setRole($acteurData->getRole() . "<br/> Co-encadrant"); break; } } /** GESTION DES ETABLISSEMENTS ****************************************************************************/ if ($acteur->getEtablissement()) { $acteurData->setEtablissement($acteur->getEtablissement()->getStructure()->getLibelle()); } else { foreach ($acteursLies as $acteurLie) { $membre = $this->getMembreService()->getMembreByActeur($acteurLie); if ($membre) { $acteurData->setEtablissement($membre->getEtablissement()); break; } } } if ($estMembre) $pdcData->addActeurEnCouverture($acteurData); } Loading
module/Soutenance/src/Soutenance/Controller/PresoutenanceController.php +4 −0 Original line number Diff line number Diff line Loading @@ -177,6 +177,7 @@ class PresoutenanceController extends AbstractController * - qu'un Membre du jury est Membre du jury. */ $acteurs = $this->getActeurService()->getRepository()->findActeurByThese($these); $acteurs = array_filter($acteurs, function (Acteur $a) { return $a->estNonHistorise();}); switch ($membre->getRole()) { case Membre::RAPPORTEUR_JURY : case Membre::RAPPORTEUR_VISIO : Loading Loading @@ -228,6 +229,8 @@ class PresoutenanceController extends AbstractController $membre->setActeur($acteur); $this->getMembreService()->update($membre); //creation de l'utilisateur if ($membre->estRapporteur()) { $utilisateurs = $this->utilisateurService->getRepository()->findByIndividu($individu); $user = null; if (empty($utilisateurs)) { Loading @@ -251,6 +254,7 @@ class PresoutenanceController extends AbstractController $url = $this->url()->fromRoute('zfcuser/login', ['type' => 'token'], ['query' => ['token' => $token->getToken(), 'redirect' => $url_rapporteur, 'role' => $acteur->getRole()->getRoleId()], 'force_canonical' => true], true); $this->getNotifierSoutenanceService()->triggerConnexionRapporteur($proposition, $user, $url); } } return new ViewModel([ 'title' => "Association de " . $membre->getDenomination() . " à un acteur " . $this->appInfos()->getNom(), Loading