Loading module/Soutenance/config/others/presoutenance.config.php +46 −6 Changes for module/Soutenance/config/others/presoutenance.config.php: 46 added lines, 6 removed lines. Original line number Diff line number Diff line Loading @@ -13,8 +13,6 @@ use Soutenance\Form\AdresseSoutenance\AdresseSoutenanceHydrator; use Soutenance\Form\DateRenduRapport\DateRenduRapportForm; use Soutenance\Form\DateRenduRapport\DateRenduRapportFormFactory; use Soutenance\Form\DateRenduRapport\DateRenduRapportHydrator; use Soutenance\Form\InitCompte\InitCompteForm; use Soutenance\Form\InitCompte\InitCompteFormFactory; use Soutenance\Provider\Privilege\AvisSoutenancePrivileges; use Soutenance\Provider\Privilege\EngagementImpartialitePrivileges; use Soutenance\Provider\Privilege\PresoutenancePrivileges; Loading Loading @@ -61,12 +59,21 @@ return [ 'feu-vert', 'stopper-demarche', 'avis-soutenance', 'convocation', 'convocations', 'proces-verbal-soutenance', 'modifier-adresse', 'envoyer-convocation', ], 'privileges' => PresoutenancePrivileges::PRESOUTENANCE_DATE_RETOUR_MODIFICATION, ], [ 'controller' => PresoutenanceController::class, 'action' => [ 'convocation-doctorant', 'convocation-membre', ], 'roles' => [], ], [ 'controller' => PresoutenanceController::class, 'action' => [ Loading Loading @@ -138,14 +145,47 @@ return [ ], ], ], 'convocation' => [ 'convocations' => [ 'type' => Segment::class, 'may_terminate' => true, 'options' => [ 'route' => '/convocations', 'defaults' => [ 'controller' => PresoutenanceController::class, 'action' => 'convocations', ], ], ], 'convocation-doctorant' => [ 'type' => Segment::class, 'may_terminate' => true, 'options' => [ 'route' => '/convocation-doctorant', 'defaults' => [ 'controller' => PresoutenanceController::class, 'action' => 'convocation-doctorant', ], ], ], 'convocation-membre' => [ 'type' => Segment::class, 'may_terminate' => true, 'options' => [ 'route' => '/convocation-membre/:membre', 'defaults' => [ 'controller' => PresoutenanceController::class, 'action' => 'convocation-membre', ], ], ], 'envoyer-convocation' => [ 'type' => Segment::class, 'may_terminate' => true, 'options' => [ 'route' => '/convocation', 'route' => '/envoyer-convocation', 'defaults' => [ 'controller' => PresoutenanceController::class, 'action' => 'convocation', 'action' => 'envoyer-convocation', ], ], ], Loading module/Soutenance/src/Soutenance/Controller/Presoutenance/PresoutenanceController.php +107 −1 Changes for module/Soutenance/src/Soutenance/Controller/Presoutenance/PresoutenanceController.php: 107 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -383,7 +383,7 @@ class PresoutenanceController extends AbstractController } /** Document pour la signature en présidence */ public function convocationAction() public function convocationsAction() { $these = $this->requestedThese(); $proposition = $this->getPropositionService()->findByThese($these); Loading Loading @@ -421,6 +421,112 @@ class PresoutenanceController extends AbstractController exit; } public function convocationDoctorantAction() { $these = $this->requestedThese(); $proposition = $this->getPropositionService()->findByThese($these); /** @var PdcData $pdcData */ $pdcData = $this->getTheseService()->fetchInformationsPageDeCouverture($these); /* @var $renderer PhpRenderer */ $renderer = $this->getServiceLocator()->get('view_renderer'); /** @var Validation[] $validationMDD */ $validationMDD = $this->getValidationService()->getRepository()->findValidationByCodeAndThese(TypeValidation::CODE_VALIDATION_PROPOSITION_BDD, $these); $dateValidation = (! empty($validationMDD))?current($validationMDD)->getHistoModification():null; /** @var string $ville */ switch($these->getEtablissement()->getSigle()) { case "UCN" : $ville = "Caen"; break; case "URN" : case "INSA" : $ville = "Rouen"; break; case "ULHN" : $ville = "Le Havre"; break; default: $ville = "Manquant"; } $exporter = new ConvocationPdfExporter($renderer, 'A4'); $exporter->setVars([ 'proposition' => $proposition, 'these' => $these, 'informations' => $pdcData, 'date' => $dateValidation, 'ville' => $ville, ]); $exporter->exportDoctorant($these->getId() . '_convocation.pdf'); exit; } public function convocationMembreAction() { $these = $this->requestedThese(); $proposition = $this->getPropositionService()->findByThese($these); $membre = $this->getMembreService()->getRequestedMembre($this); /** @var PdcData $pdcData */ $pdcData = $this->getTheseService()->fetchInformationsPageDeCouverture($these); /* @var $renderer PhpRenderer */ $renderer = $this->getServiceLocator()->get('view_renderer'); /** @var Validation[] $validationMDD */ $validationMDD = $this->getValidationService()->getRepository()->findValidationByCodeAndThese(TypeValidation::CODE_VALIDATION_PROPOSITION_BDD, $these); $dateValidation = (! empty($validationMDD))?current($validationMDD)->getHistoModification():null; /** @var string $ville */ switch($these->getEtablissement()->getSigle()) { case "UCN" : $ville = "Caen"; break; case "URN" : case "INSA" : $ville = "Rouen"; break; case "ULHN" : $ville = "Le Havre"; break; default: $ville = "Manquant"; } $exporter = new ConvocationPdfExporter($renderer, 'A4'); $exporter->setVars([ 'proposition' => $proposition, 'these' => $these, 'informations' => $pdcData, 'date' => $dateValidation, 'ville' => $ville, ]); $exporter->exportMembre($membre, $these->getId() . '_convocation.pdf'); exit; } public function envoyerConvocationAction() { $these = $this->requestedThese(); $proposition = $this->getPropositionService()->findByThese($these); /** @var Validation[] $validationMDD */ $validationMDD = $this->getValidationService()->getRepository()->findValidationByCodeAndThese(TypeValidation::CODE_VALIDATION_PROPOSITION_BDD, $these); $dateValidation = (! empty($validationMDD))?current($validationMDD)->getHistoModification():null; //doctorant $doctorant = $these->getDoctorant(); $email = $doctorant->getIndividu()->getEmail(); /** @see PresoutenanceController::convocationDoctorantAction() */ $url = $this->url()->fromRoute('soutenance/presoutenance/convocation-doctorant', ['proposition' => $proposition->getId()], ['force_canonical' => true], true); $this->getNotifierSoutenanceService()->triggerEnvoiConvocationDoctorant($doctorant, $proposition, $dateValidation, $email, $url); //membres /** @var Membre $membre */ foreach ($proposition->getMembres() as $membre) { if ($membre->isMembre()) { $email = ($membre->getIndividu() AND $membre->getIndividu()->getEmail())?$membre->getIndividu()->getEmail():$membre->getEmail(); /** @see PresoutenanceController::convocationMembreAction() */ $url = $this->url()->fromRoute('soutenance/presoutenance/convocation-membre', ['proposition' => $proposition->getId(), 'membre' => $membre->getId()], ['force_canonical' => true], true); $this->getNotifierSoutenanceService()->triggerEnvoiConvocationMembre($membre, $proposition, $dateValidation, $email, $url); } } exit; } public function notifierRetardRapportPresoutenanceAction() { $delai = new DateInterval('P15D'); Loading module/Soutenance/src/Soutenance/Entity/Membre.php +10 Changes for module/Soutenance/src/Soutenance/Entity/Membre.php: 10 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -290,4 +290,14 @@ class Membre { $this->visio = $visio; return $this; } public function isMembre() { switch ($this->getRole()) { case Membre::RAPPORTEUR_JURY : case Membre::RAPPORTEUR_VISIO : case Membre::MEMBRE_JURY : return true; } return false; } } No newline at end of file module/Soutenance/src/Soutenance/Service/Exporter/AvisSoutenance/footer.phtml +1 −1 Changes for module/Soutenance/src/Soutenance/Service/Exporter/AvisSoutenance/footer.phtml: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -15,7 +15,7 @@ $lieu = "l'Université de Caen Normandie"; </td> <td style="text-align:right;"> Générer par SyGAL <br/> Généré par SyGAL <br/> Le <?php echo $date->format('d/m/Y à H:i:s'); ?> </td> </tr> Loading module/Soutenance/src/Soutenance/Service/Exporter/Convocation/ConvocationPdfExporter.php +29 Changes for module/Soutenance/src/Soutenance/Service/Exporter/Convocation/ConvocationPdfExporter.php: 29 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -49,6 +49,35 @@ class ConvocationPdfExporter extends PdfExporter } return PdfExporter::export($filename, $destination, $memoryLimit); } public function exportDoctorant($filename = null, $destination = self::DESTINATION_BROWSER, $memoryLimit = null) { /** @var These $these */ $these = $this->vars["these"]; $this->addBodyHtml('<style>' . file_get_contents(APPLICATION_DIR . '/public/css/page-unicaen.css') . '</style>'); $this->setHeaderScript('empty.phtml'); $this->setFooterScript('empty.phtml'); $this->addBodyScript('convocation_doctorant.phtml', false, $this->vars); return PdfExporter::export($filename, $destination, $memoryLimit); } public function exportMembre(Membre $membre, $filename = null, $destination = self::DESTINATION_BROWSER, $memoryLimit = null) { /** @var These $these */ $these = $this->vars["these"]; $this->addBodyHtml('<style>' . file_get_contents(APPLICATION_DIR . '/public/css/page-unicaen.css') . '</style>'); $this->setHeaderScript('empty.phtml'); $this->setFooterScript('empty.phtml'); $this->vars["membre"] = $membre; $this->addBodyScript('convocation_membre.phtml', false, $this->vars); return PdfExporter::export($filename, $destination, $memoryLimit); } } No newline at end of file Loading
module/Soutenance/config/others/presoutenance.config.php +46 −6 Changes for module/Soutenance/config/others/presoutenance.config.php: 46 added lines, 6 removed lines. Original line number Diff line number Diff line Loading @@ -13,8 +13,6 @@ use Soutenance\Form\AdresseSoutenance\AdresseSoutenanceHydrator; use Soutenance\Form\DateRenduRapport\DateRenduRapportForm; use Soutenance\Form\DateRenduRapport\DateRenduRapportFormFactory; use Soutenance\Form\DateRenduRapport\DateRenduRapportHydrator; use Soutenance\Form\InitCompte\InitCompteForm; use Soutenance\Form\InitCompte\InitCompteFormFactory; use Soutenance\Provider\Privilege\AvisSoutenancePrivileges; use Soutenance\Provider\Privilege\EngagementImpartialitePrivileges; use Soutenance\Provider\Privilege\PresoutenancePrivileges; Loading Loading @@ -61,12 +59,21 @@ return [ 'feu-vert', 'stopper-demarche', 'avis-soutenance', 'convocation', 'convocations', 'proces-verbal-soutenance', 'modifier-adresse', 'envoyer-convocation', ], 'privileges' => PresoutenancePrivileges::PRESOUTENANCE_DATE_RETOUR_MODIFICATION, ], [ 'controller' => PresoutenanceController::class, 'action' => [ 'convocation-doctorant', 'convocation-membre', ], 'roles' => [], ], [ 'controller' => PresoutenanceController::class, 'action' => [ Loading Loading @@ -138,14 +145,47 @@ return [ ], ], ], 'convocation' => [ 'convocations' => [ 'type' => Segment::class, 'may_terminate' => true, 'options' => [ 'route' => '/convocations', 'defaults' => [ 'controller' => PresoutenanceController::class, 'action' => 'convocations', ], ], ], 'convocation-doctorant' => [ 'type' => Segment::class, 'may_terminate' => true, 'options' => [ 'route' => '/convocation-doctorant', 'defaults' => [ 'controller' => PresoutenanceController::class, 'action' => 'convocation-doctorant', ], ], ], 'convocation-membre' => [ 'type' => Segment::class, 'may_terminate' => true, 'options' => [ 'route' => '/convocation-membre/:membre', 'defaults' => [ 'controller' => PresoutenanceController::class, 'action' => 'convocation-membre', ], ], ], 'envoyer-convocation' => [ 'type' => Segment::class, 'may_terminate' => true, 'options' => [ 'route' => '/convocation', 'route' => '/envoyer-convocation', 'defaults' => [ 'controller' => PresoutenanceController::class, 'action' => 'convocation', 'action' => 'envoyer-convocation', ], ], ], Loading
module/Soutenance/src/Soutenance/Controller/Presoutenance/PresoutenanceController.php +107 −1 Changes for module/Soutenance/src/Soutenance/Controller/Presoutenance/PresoutenanceController.php: 107 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -383,7 +383,7 @@ class PresoutenanceController extends AbstractController } /** Document pour la signature en présidence */ public function convocationAction() public function convocationsAction() { $these = $this->requestedThese(); $proposition = $this->getPropositionService()->findByThese($these); Loading Loading @@ -421,6 +421,112 @@ class PresoutenanceController extends AbstractController exit; } public function convocationDoctorantAction() { $these = $this->requestedThese(); $proposition = $this->getPropositionService()->findByThese($these); /** @var PdcData $pdcData */ $pdcData = $this->getTheseService()->fetchInformationsPageDeCouverture($these); /* @var $renderer PhpRenderer */ $renderer = $this->getServiceLocator()->get('view_renderer'); /** @var Validation[] $validationMDD */ $validationMDD = $this->getValidationService()->getRepository()->findValidationByCodeAndThese(TypeValidation::CODE_VALIDATION_PROPOSITION_BDD, $these); $dateValidation = (! empty($validationMDD))?current($validationMDD)->getHistoModification():null; /** @var string $ville */ switch($these->getEtablissement()->getSigle()) { case "UCN" : $ville = "Caen"; break; case "URN" : case "INSA" : $ville = "Rouen"; break; case "ULHN" : $ville = "Le Havre"; break; default: $ville = "Manquant"; } $exporter = new ConvocationPdfExporter($renderer, 'A4'); $exporter->setVars([ 'proposition' => $proposition, 'these' => $these, 'informations' => $pdcData, 'date' => $dateValidation, 'ville' => $ville, ]); $exporter->exportDoctorant($these->getId() . '_convocation.pdf'); exit; } public function convocationMembreAction() { $these = $this->requestedThese(); $proposition = $this->getPropositionService()->findByThese($these); $membre = $this->getMembreService()->getRequestedMembre($this); /** @var PdcData $pdcData */ $pdcData = $this->getTheseService()->fetchInformationsPageDeCouverture($these); /* @var $renderer PhpRenderer */ $renderer = $this->getServiceLocator()->get('view_renderer'); /** @var Validation[] $validationMDD */ $validationMDD = $this->getValidationService()->getRepository()->findValidationByCodeAndThese(TypeValidation::CODE_VALIDATION_PROPOSITION_BDD, $these); $dateValidation = (! empty($validationMDD))?current($validationMDD)->getHistoModification():null; /** @var string $ville */ switch($these->getEtablissement()->getSigle()) { case "UCN" : $ville = "Caen"; break; case "URN" : case "INSA" : $ville = "Rouen"; break; case "ULHN" : $ville = "Le Havre"; break; default: $ville = "Manquant"; } $exporter = new ConvocationPdfExporter($renderer, 'A4'); $exporter->setVars([ 'proposition' => $proposition, 'these' => $these, 'informations' => $pdcData, 'date' => $dateValidation, 'ville' => $ville, ]); $exporter->exportMembre($membre, $these->getId() . '_convocation.pdf'); exit; } public function envoyerConvocationAction() { $these = $this->requestedThese(); $proposition = $this->getPropositionService()->findByThese($these); /** @var Validation[] $validationMDD */ $validationMDD = $this->getValidationService()->getRepository()->findValidationByCodeAndThese(TypeValidation::CODE_VALIDATION_PROPOSITION_BDD, $these); $dateValidation = (! empty($validationMDD))?current($validationMDD)->getHistoModification():null; //doctorant $doctorant = $these->getDoctorant(); $email = $doctorant->getIndividu()->getEmail(); /** @see PresoutenanceController::convocationDoctorantAction() */ $url = $this->url()->fromRoute('soutenance/presoutenance/convocation-doctorant', ['proposition' => $proposition->getId()], ['force_canonical' => true], true); $this->getNotifierSoutenanceService()->triggerEnvoiConvocationDoctorant($doctorant, $proposition, $dateValidation, $email, $url); //membres /** @var Membre $membre */ foreach ($proposition->getMembres() as $membre) { if ($membre->isMembre()) { $email = ($membre->getIndividu() AND $membre->getIndividu()->getEmail())?$membre->getIndividu()->getEmail():$membre->getEmail(); /** @see PresoutenanceController::convocationMembreAction() */ $url = $this->url()->fromRoute('soutenance/presoutenance/convocation-membre', ['proposition' => $proposition->getId(), 'membre' => $membre->getId()], ['force_canonical' => true], true); $this->getNotifierSoutenanceService()->triggerEnvoiConvocationMembre($membre, $proposition, $dateValidation, $email, $url); } } exit; } public function notifierRetardRapportPresoutenanceAction() { $delai = new DateInterval('P15D'); Loading
module/Soutenance/src/Soutenance/Entity/Membre.php +10 Changes for module/Soutenance/src/Soutenance/Entity/Membre.php: 10 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -290,4 +290,14 @@ class Membre { $this->visio = $visio; return $this; } public function isMembre() { switch ($this->getRole()) { case Membre::RAPPORTEUR_JURY : case Membre::RAPPORTEUR_VISIO : case Membre::MEMBRE_JURY : return true; } return false; } } No newline at end of file
module/Soutenance/src/Soutenance/Service/Exporter/AvisSoutenance/footer.phtml +1 −1 Changes for module/Soutenance/src/Soutenance/Service/Exporter/AvisSoutenance/footer.phtml: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -15,7 +15,7 @@ $lieu = "l'Université de Caen Normandie"; </td> <td style="text-align:right;"> Générer par SyGAL <br/> Généré par SyGAL <br/> Le <?php echo $date->format('d/m/Y à H:i:s'); ?> </td> </tr> Loading
module/Soutenance/src/Soutenance/Service/Exporter/Convocation/ConvocationPdfExporter.php +29 Changes for module/Soutenance/src/Soutenance/Service/Exporter/Convocation/ConvocationPdfExporter.php: 29 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -49,6 +49,35 @@ class ConvocationPdfExporter extends PdfExporter } return PdfExporter::export($filename, $destination, $memoryLimit); } public function exportDoctorant($filename = null, $destination = self::DESTINATION_BROWSER, $memoryLimit = null) { /** @var These $these */ $these = $this->vars["these"]; $this->addBodyHtml('<style>' . file_get_contents(APPLICATION_DIR . '/public/css/page-unicaen.css') . '</style>'); $this->setHeaderScript('empty.phtml'); $this->setFooterScript('empty.phtml'); $this->addBodyScript('convocation_doctorant.phtml', false, $this->vars); return PdfExporter::export($filename, $destination, $memoryLimit); } public function exportMembre(Membre $membre, $filename = null, $destination = self::DESTINATION_BROWSER, $memoryLimit = null) { /** @var These $these */ $these = $this->vars["these"]; $this->addBodyHtml('<style>' . file_get_contents(APPLICATION_DIR . '/public/css/page-unicaen.css') . '</style>'); $this->setHeaderScript('empty.phtml'); $this->setFooterScript('empty.phtml'); $this->vars["membre"] = $membre; $this->addBodyScript('convocation_membre.phtml', false, $this->vars); return PdfExporter::export($filename, $destination, $memoryLimit); } } No newline at end of file