Commit a301b9f5 authored by Thomas Hamel's avatar Thomas Hamel
Browse files

WIP : attente du retour du GT

parent 796dd335
Loading
Loading
Loading
Loading
+1 −1
Changes for doc/release-notes/8.2.0/01_formation.sql: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -69,6 +69,6 @@ INSERT INTO public.unicaen_renderer_template (code, description, document_type,
VALUES ('FORMATION_FORMATION_SPECIFIQUE_OUVERTE',
        '<p>Mail envoyé au doctorant·e lorsqu''une formation spécifique est ouverte au sein de leur ED</p>', 'mail',
        'Nouvelle formation spécifique ouverte dans votre ED', e'<p>Bonjour,</p>
<p>La formation <strong>VAR[Formation#Libelle]</strong> vient d\'ouvrir dans votre École Doctorale. Si vous voulez plus d\'informations, rendez-vous dans l\'application ESUP-SyGAL, onglet <em>\'mes formations\'.</em></p>
<p>La formation spécifique <strong>VAR[Formation#Libelle]</strong> vient d\'ouvrir. Si vous voulez plus d\'informations, rendez-vous dans l\'application ESUP-SyGAL, onglet <em>\'mes formations\'.</em></p>
<p>En vous souhaitant une bonne journée,<br />VAR[Formation#Responsable]</p>',
        null, 'Formation\Provider\Template');
 No newline at end of file
+10 −2
Changes for module/Formation/src/Formation/Controller/FormationController.php: 10 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -61,7 +61,11 @@ class FormationController extends AbstractController
                    try {
                        $notif = $this->formationNotificationFactory->createNotificationFormationSpecifiqueAjoutee($formation);
                        $this->notifierService->trigger($notif);
                        $this->flashMessenger()->addInfoMessage("Une notification par mail a été envoyée aux doctorants appartenant au site organisateur {$formation->getSite()}, et à l'ED {$formation->getTypeStructure()}.");
                        $destinataires = implode(', ', array_reduce(array_keys($notif->getTo()), function(array $accu, string $key) use ($notif) {
                            $accu[] = sprintf('%s (%s)', $notif->getTo()[$key], $key);
                            return $accu;
                        }, []));
                        $this->flashMessenger()->addInfoMessage("Une notification par mail a été envoyée aux doctorants appartenant à la liste de diffusion suivante : ".$destinataires);
                    } catch (RuntimeException $e) {
                        $ed = $formation->getTypeStructure()->getEcoleDoctorale();
                        $this->flashMessenger()->addErrorMessage("La session a bien été créee, cependant aucune liste de diffusion trouvée pour l'ED {$ed} (afin de notifier les doctorants).");
@@ -102,7 +106,11 @@ class FormationController extends AbstractController
                    try {
                        $notif = $this->formationNotificationFactory->createNotificationFormationSpecifiqueAjoutee($formation);
                        $this->notifierService->trigger($notif);
                        $this->flashMessenger()->addInfoMessage("Le site organisateur et/ou la structure associée ont été modifiés. <br>Une notification par mail a donc été envoyée aux doctorants appartenant au site organisateur {$formation->getSite()}, et à l'ED {$formation->getTypeStructure()}.");
                        $destinataires = implode(', ', array_reduce(array_keys($notif->getTo()), function(array $accu, string $key) use ($notif) {
                            $accu[] = sprintf('%s', $notif->getTo()[$key]);
                            return $accu;
                        }, []));
                        $this->flashMessenger()->addInfoMessage("Le site organisateur et/ou la structure associée ont été modifiés. <br> Une notification par mail a donc été envoyée aux doctorants appartenant à la liste de diffusion suivante : ".$destinataires);
                    } catch (RuntimeException $e) {
                        $ed = $formation->getTypeStructure()->getEcoleDoctorale();
                        $this->flashMessenger()->addErrorMessage("La session a bien été modifiée, cependant aucune liste de diffusion trouvée pour l'ED {$ed} (afin de notifier les doctorants).");
+1 −1
Changes for module/Formation/view/formation/formation/modifier.phtml: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@ echo $this->form()->openTag($form);
</div>
<div class="alert alert-warning">
    <span class="icon icon-attention"></span>
    Lorsque le site organisateur et la structure associée à la formation spécifique sont renseignés (ou modifiés par la suite), un mail sera envoyé aux doctorants afin de les notifier de l'ouverture de la formation.
    Lorsque le site organisateur et la structure associée à <b>une formation spécifique</b> sont renseignés (ou modifiés par la suite), un mail sera envoyé aux doctorants afin de les notifier de l'ouverture de celle-ci.
</div>
<?php echo $this->formControlGroup($form->get('taille_liste_principale')); ?>
<?php echo $this->formControlGroup($form->get('taille_liste_complementaire')); ?>