Loading module/Formation/src/Formation/Controller/FormationController.php +5 −5 Changes for module/Formation/src/Formation/Controller/FormationController.php: 5 added lines, 5 removed lines. Original line number Diff line number Diff line Loading @@ -49,7 +49,7 @@ class FormationController extends AbstractController public function afficherAction() { /** @var Formation|null $formation */ $formation = $this->getEntityManager()->getRepository(Formation::class)->getRequestedModule($this); $formation = $this->getEntityManager()->getRepository(Formation::class)->getRequestedFormation($this); return new ViewModel([ 'formation' => $formation, Loading Loading @@ -87,7 +87,7 @@ class FormationController extends AbstractController public function modifierAction() { /** @var Formation|null $formation */ $formation = $this->getEntityManager()->getRepository(Formation::class)->getRequestedModule($this); $formation = $this->getEntityManager()->getRepository(Formation::class)->getRequestedFormation($this); $form = $this->getFormationForm(); $form->setAttribute('action', $this->url()->fromRoute('formation/formation/modifier', [], [], true)); Loading @@ -113,7 +113,7 @@ class FormationController extends AbstractController public function historiserAction() { /** @var Formation|null $formation */ $formation = $this->getEntityManager()->getRepository(Formation::class)->getRequestedModule($this); $formation = $this->getEntityManager()->getRepository(Formation::class)->getRequestedFormation($this); $this->getFormationService()->historise($formation); Loading @@ -128,7 +128,7 @@ class FormationController extends AbstractController public function restaurerAction() { /** @var Formation|null $formation */ $formation = $this->getEntityManager()->getRepository(Formation::class)->getRequestedModule($this); $formation = $this->getEntityManager()->getRepository(Formation::class)->getRequestedFormation($this); $this->getFormationService()->restore($formation); Loading @@ -142,7 +142,7 @@ class FormationController extends AbstractController public function supprimerAction() { /** @var Formation|null $formation */ $formation = $this->getEntityManager()->getRepository(Formation::class)->getRequestedModule($this); $formation = $this->getEntityManager()->getRepository(Formation::class)->getRequestedFormation($this); $request = $this->getRequest(); if ($request->isPost()) { Loading module/Formation/src/Formation/Controller/SessionController.php +4 −4 Changes for module/Formation/src/Formation/Controller/SessionController.php: 4 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -88,15 +88,15 @@ class SessionController extends AbstractController public function ajouterAction() { /** @var Formation $module */ $module = $this->getEntityManager()->getRepository(Formation::class)->getRequestedModule($this); /** @var Formation $formation */ $formation = $this->getEntityManager()->getRepository(Formation::class)->getRequestedFormation($this); $session = new Session(); $session->setFormation($module); $session->setFormation($formation); $session = $this->getSessionService()->setValeurParDefaut($session); $form = $this->getSessionForm(); $form->setAttribute('action', $this->url()->fromRoute('formation/session/ajouter', ['module' => $module->getId()], [], true)); $form->setAttribute('action', $this->url()->fromRoute('formation/session/ajouter', ['module' => $formation->getId()], [], true)); $form->bind($session); $request = $this->getRequest(); Loading module/Formation/src/Formation/Entity/Db/Repository/FormationRepository.php +1 −1 Changes for module/Formation/src/Formation/Entity/Db/Repository/FormationRepository.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -17,7 +17,7 @@ class FormationRepository extends EntityRepository * @param string $param * @return Formation|null */ public function getRequestedModule(AbstractActionController $controller, string $param = 'formation') : ?Formation public function getRequestedFormation(AbstractActionController $controller, string $param = 'formation') : ?Formation { $id = $controller->params()->fromRoute($param); /** @var Formation|null $formation */ Loading module/Formation/view/formation/index/index-doctorant.phtml +3 −21 Changes for module/Formation/view/formation/index/index-doctorant.phtml: 3 added lines, 21 removed lines. Original line number Diff line number Diff line Loading @@ -27,7 +27,7 @@ foreach ($inscriptions as $inscription) { $seances = $inscription->getSession()->getSeances()->toArray(); $seances = array_filter($seances, function ($a) { return $a->estNonHistorise(); }); $nbSeance = count($seances); if ($nbSeance > 0 /** AND $inscription->getSession()->estTerminee() **/ AND $inscription->getSession()->getEtat() === Etat::CODE_CLOTURER) { if ($nbSeance > 0 /** AND $inscription->getSession()->estTerminee() **/ AND $inscription->getSession()->getEtat()->getCode() === Etat::CODE_CLOTURER) { $terminees[] = $inscription; } else { if ($inscription->estNonHistorise()) $encours[] = $inscription; Loading Loading @@ -137,21 +137,16 @@ $canAttestationInscription = $this->isAllowed(InscriptionPrivileges::getResource </td> <td> <?php $inscrit = $session->estInscrit($doctorant); ?> <?php if ($session->getEtat()->getCode() === Etat::CODE_OUVERTE AND !$inscrit) : ?> <?php if ($canAjouterInscription) : ?> <?php if ($canAjouterInscription and !$inscrit) : ?> <?php /** @see \Formation\Controller\InscriptionController::ajouterAction() */ ?> <a href="<?php echo $this->url('formation/inscription/ajouter', ['session' => $session->getId(), 'doctorant' => $doctorant->getId()], ['query' => ['retour' => $this->url('formation/index-doctorant', [], [], true)]], true); ?>" <a href="<?php echo $this->url('formation/inscription/ajouter', ['session' => $session->getId(), 'doctorant' => $doctorant->getId()], ['query' => ['retour' => $this->url('formation/index-doctorant', ['doctorant' => $doctorant->getId()], ['fragment' => 'preparation'], true)]], true); ?>" > <span class="glyphicon glyphicon-plus" title="M'inscrire" data-toggle="tooltip" data-html="true" ></span></a> <?php endif; ?> <?php else: ?> <?php if ($inscrit) : ?> <span class="glyphicon glyphicon-ok" style="color:darkgreen;" title="Vous êtes déjà inscrit"></span> <?php else : ?> <span class="glyphicon glyphicon-info-sign" title="Les inscriptions ne sont pas ouvertes"></span> <?php endif; ?> <?php endif; ?> </td> </tr> Loading Loading @@ -206,22 +201,11 @@ $canAttestationInscription = $this->isAllowed(InscriptionPrivileges::getResource </td> <td> <?php $inscrit = $session->estInscrit($doctorant); ?> <?php if ($session->getEtat()->getCode() === Etat::CODE_OUVERTE AND !$inscrit) : ?> <?php if ($canAjouterInscription) : ?> <?php /** @see \Formation\Controller\InscriptionController::ajouterAction() */ ?> <a href="<?php echo $this->url('formation/inscription/ajouter', ['session' => $session->getId(), 'doctorant' => $doctorant->getId()], ['query' => ['retour' => $this->url('formation/index-doctorant', [], [], true)]], true); ?>" > <span class="glyphicon glyphicon-plus" title="M'inscrire" data-toggle="tooltip" data-html="true" ></span></a> <?php endif; ?> <?php else: ?> <?php if ($inscrit) : ?> <span class="glyphicon glyphicon-ok" style="color:darkgreen;" title="Vous êtes déjà inscrit"></span> <?php else : ?> <span class="glyphicon glyphicon-info-sign" title="Les inscriptions ne sont pas ouvertes"></span> <?php endif; ?> <?php endif; ?> </td> </tr> <?php endforeach; ?> Loading Loading @@ -298,8 +282,6 @@ $canAttestationInscription = $this->isAllowed(InscriptionPrivileges::getResource Mes formations suivies </h2> <h2> Mes formations suivis</h2> <table class="table table-condensed"> <thead> <tr> Loading Loading
module/Formation/src/Formation/Controller/FormationController.php +5 −5 Changes for module/Formation/src/Formation/Controller/FormationController.php: 5 added lines, 5 removed lines. Original line number Diff line number Diff line Loading @@ -49,7 +49,7 @@ class FormationController extends AbstractController public function afficherAction() { /** @var Formation|null $formation */ $formation = $this->getEntityManager()->getRepository(Formation::class)->getRequestedModule($this); $formation = $this->getEntityManager()->getRepository(Formation::class)->getRequestedFormation($this); return new ViewModel([ 'formation' => $formation, Loading Loading @@ -87,7 +87,7 @@ class FormationController extends AbstractController public function modifierAction() { /** @var Formation|null $formation */ $formation = $this->getEntityManager()->getRepository(Formation::class)->getRequestedModule($this); $formation = $this->getEntityManager()->getRepository(Formation::class)->getRequestedFormation($this); $form = $this->getFormationForm(); $form->setAttribute('action', $this->url()->fromRoute('formation/formation/modifier', [], [], true)); Loading @@ -113,7 +113,7 @@ class FormationController extends AbstractController public function historiserAction() { /** @var Formation|null $formation */ $formation = $this->getEntityManager()->getRepository(Formation::class)->getRequestedModule($this); $formation = $this->getEntityManager()->getRepository(Formation::class)->getRequestedFormation($this); $this->getFormationService()->historise($formation); Loading @@ -128,7 +128,7 @@ class FormationController extends AbstractController public function restaurerAction() { /** @var Formation|null $formation */ $formation = $this->getEntityManager()->getRepository(Formation::class)->getRequestedModule($this); $formation = $this->getEntityManager()->getRepository(Formation::class)->getRequestedFormation($this); $this->getFormationService()->restore($formation); Loading @@ -142,7 +142,7 @@ class FormationController extends AbstractController public function supprimerAction() { /** @var Formation|null $formation */ $formation = $this->getEntityManager()->getRepository(Formation::class)->getRequestedModule($this); $formation = $this->getEntityManager()->getRepository(Formation::class)->getRequestedFormation($this); $request = $this->getRequest(); if ($request->isPost()) { Loading
module/Formation/src/Formation/Controller/SessionController.php +4 −4 Changes for module/Formation/src/Formation/Controller/SessionController.php: 4 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -88,15 +88,15 @@ class SessionController extends AbstractController public function ajouterAction() { /** @var Formation $module */ $module = $this->getEntityManager()->getRepository(Formation::class)->getRequestedModule($this); /** @var Formation $formation */ $formation = $this->getEntityManager()->getRepository(Formation::class)->getRequestedFormation($this); $session = new Session(); $session->setFormation($module); $session->setFormation($formation); $session = $this->getSessionService()->setValeurParDefaut($session); $form = $this->getSessionForm(); $form->setAttribute('action', $this->url()->fromRoute('formation/session/ajouter', ['module' => $module->getId()], [], true)); $form->setAttribute('action', $this->url()->fromRoute('formation/session/ajouter', ['module' => $formation->getId()], [], true)); $form->bind($session); $request = $this->getRequest(); Loading
module/Formation/src/Formation/Entity/Db/Repository/FormationRepository.php +1 −1 Changes for module/Formation/src/Formation/Entity/Db/Repository/FormationRepository.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -17,7 +17,7 @@ class FormationRepository extends EntityRepository * @param string $param * @return Formation|null */ public function getRequestedModule(AbstractActionController $controller, string $param = 'formation') : ?Formation public function getRequestedFormation(AbstractActionController $controller, string $param = 'formation') : ?Formation { $id = $controller->params()->fromRoute($param); /** @var Formation|null $formation */ Loading
module/Formation/view/formation/index/index-doctorant.phtml +3 −21 Changes for module/Formation/view/formation/index/index-doctorant.phtml: 3 added lines, 21 removed lines. Original line number Diff line number Diff line Loading @@ -27,7 +27,7 @@ foreach ($inscriptions as $inscription) { $seances = $inscription->getSession()->getSeances()->toArray(); $seances = array_filter($seances, function ($a) { return $a->estNonHistorise(); }); $nbSeance = count($seances); if ($nbSeance > 0 /** AND $inscription->getSession()->estTerminee() **/ AND $inscription->getSession()->getEtat() === Etat::CODE_CLOTURER) { if ($nbSeance > 0 /** AND $inscription->getSession()->estTerminee() **/ AND $inscription->getSession()->getEtat()->getCode() === Etat::CODE_CLOTURER) { $terminees[] = $inscription; } else { if ($inscription->estNonHistorise()) $encours[] = $inscription; Loading Loading @@ -137,21 +137,16 @@ $canAttestationInscription = $this->isAllowed(InscriptionPrivileges::getResource </td> <td> <?php $inscrit = $session->estInscrit($doctorant); ?> <?php if ($session->getEtat()->getCode() === Etat::CODE_OUVERTE AND !$inscrit) : ?> <?php if ($canAjouterInscription) : ?> <?php if ($canAjouterInscription and !$inscrit) : ?> <?php /** @see \Formation\Controller\InscriptionController::ajouterAction() */ ?> <a href="<?php echo $this->url('formation/inscription/ajouter', ['session' => $session->getId(), 'doctorant' => $doctorant->getId()], ['query' => ['retour' => $this->url('formation/index-doctorant', [], [], true)]], true); ?>" <a href="<?php echo $this->url('formation/inscription/ajouter', ['session' => $session->getId(), 'doctorant' => $doctorant->getId()], ['query' => ['retour' => $this->url('formation/index-doctorant', ['doctorant' => $doctorant->getId()], ['fragment' => 'preparation'], true)]], true); ?>" > <span class="glyphicon glyphicon-plus" title="M'inscrire" data-toggle="tooltip" data-html="true" ></span></a> <?php endif; ?> <?php else: ?> <?php if ($inscrit) : ?> <span class="glyphicon glyphicon-ok" style="color:darkgreen;" title="Vous êtes déjà inscrit"></span> <?php else : ?> <span class="glyphicon glyphicon-info-sign" title="Les inscriptions ne sont pas ouvertes"></span> <?php endif; ?> <?php endif; ?> </td> </tr> Loading Loading @@ -206,22 +201,11 @@ $canAttestationInscription = $this->isAllowed(InscriptionPrivileges::getResource </td> <td> <?php $inscrit = $session->estInscrit($doctorant); ?> <?php if ($session->getEtat()->getCode() === Etat::CODE_OUVERTE AND !$inscrit) : ?> <?php if ($canAjouterInscription) : ?> <?php /** @see \Formation\Controller\InscriptionController::ajouterAction() */ ?> <a href="<?php echo $this->url('formation/inscription/ajouter', ['session' => $session->getId(), 'doctorant' => $doctorant->getId()], ['query' => ['retour' => $this->url('formation/index-doctorant', [], [], true)]], true); ?>" > <span class="glyphicon glyphicon-plus" title="M'inscrire" data-toggle="tooltip" data-html="true" ></span></a> <?php endif; ?> <?php else: ?> <?php if ($inscrit) : ?> <span class="glyphicon glyphicon-ok" style="color:darkgreen;" title="Vous êtes déjà inscrit"></span> <?php else : ?> <span class="glyphicon glyphicon-info-sign" title="Les inscriptions ne sont pas ouvertes"></span> <?php endif; ?> <?php endif; ?> </td> </tr> <?php endforeach; ?> Loading Loading @@ -298,8 +282,6 @@ $canAttestationInscription = $this->isAllowed(InscriptionPrivileges::getResource Mes formations suivies </h2> <h2> Mes formations suivis</h2> <table class="table table-condensed"> <thead> <tr> Loading