Commit 2e2f2c46 authored by Jean-Philippe Metivier's avatar Jean-Philippe Metivier
Browse files

Calcul de la position sur la liste complémentaire + affichage + possibilité de...

Calcul de la position sur la liste complémentaire + affichage + possibilité de macro pour les templates
parent 00df3b32
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@ Journal des modifications
- Remplacement de \n en <br> pour conserver les sauts de ligne dans les titres sur la page de couverture.
- [FIX] Corrections concernant la subsitution de structures.
- Retrait du readonly sur les libellés et sigles des URs et des EDs
- Calcul de la position sur la liste complémentaire + affichage + possibilité de macro pour les templates

5.2.3
-----
+1 −0
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@ class Etat {
    const CODE_NOTIFIER = 'N';
    const CODE_CLOTURER = 'C';
    const CODE_ANNULEE = 'A';
    const CODE_IMMINENT = 'I';

    private ?string $code = null;
    private ?string $libelle = null;
+13 −0
Original line number Diff line number Diff line
@@ -150,5 +150,18 @@ class Inscription implements HistoriqueAwareInterface {
        $this->validationEnquete = $validationEnquete;
    }

    public function getPositionListeComplementaire() : int
    {
        if ($this->getListe() !== Inscription::LISTE_COMPLEMENTAIRE OR $this->estHistorise()) return -1;

        $liste = $this->session->getListeComplementaire();
        usort($liste, function(Inscription $a, Inscription $b) { return $a->getHistoCreation() > $b->getHistoCreation(); });

        for ($i = 0 ; $i < count($liste) ; $i++) {
            if ($liste[$i] === $this) return ($i+1);
        }
        return -1;
    }


}
 No newline at end of file
+1 −0
Original line number Diff line number Diff line
@@ -93,6 +93,7 @@ class NotificationService extends NotifierService
            'doctorant' => $inscription->getDoctorant(),
            'formation' => $inscription->getSession()->getFormation(),
            'session'   => $inscription->getSession(),
            'inscription' => $inscription,
        ];

        $rendu = $this->getRenduService()->generateRenduByTemplateCode(MailTemplates::INSCRIPTION_LISTE_COMPLEMENTAIRE, $vars);
+1 −1
Original line number Diff line number Diff line
@@ -266,7 +266,7 @@ $canCatalogueAfficher = $this->isAllowed(ModulePrivileges::getResourceId(ModuleP
                    <td> <?php echo $this->etat($session); ?></td>
                    <td>
                        <?php if ($inscription->isListePrincipale()) echo "Liste principale"; ?>
                        <?php if ($inscription->isListeComplementaire()) echo "Liste complementaire #???"; ?>
                        <?php if ($inscription->isListeComplementaire()) echo "Liste complementaire <br/>Position " . $inscription->getPositionListeComplementaire(); ?>
                        <?php if ($inscription->getListe() === null) : ?>
                            <?php if ($session->getEtat()->getCode() === Etat::CODE_OUVERTE) echo "En attente"; ?>
                            <?php if ($session->getEtat()->getCode() === Etat::CODE_FERME) echo "Non classée"; ?>
Loading