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

Merge branch 'améliorations_module_formation' into release_8.2.0

parents 03537670 af24ab42
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
@@ -3,7 +3,7 @@
--Ajout d'un paramètre pour spécifier le délai pour une annulation d'inscription
INSERT INTO public.unicaen_parametre_parametre (id, categorie_id, code, libelle, description, valeurs_possibles, valeur,
                                                ordre)
VALUES (20, 2, 'DELAI_ANNULATION_INSCRIPTION', 'Delai annulation', null, 'Number', '3', 20) ON CONFLICT DO NOTHING;
VALUES (20, 2, 'DELAI_ANNULATION_INSCRIPTION', 'Délai avant le blocage de l''annulation d''une inscription (en jours)', null, 'Number', '3', 20) ON CONFLICT DO NOTHING;


--Ajout d'un privilège pour voir le lieu des séances d'une session
+2 −1
Changes for module/Application/src/Application/Service/AnneeUniv/AnneeUnivService.php: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -74,7 +74,8 @@ class AnneeUnivService
     */
    protected function computePremiereAnneeFromDate(DateTime $date): int
    {
        return (int)$date->modify($this->specDateBascule)->format('Y');
        $modifiedDate = clone $date;
        return (int)$modifiedDate->modify($this->specDateBascule)->format('Y');
    }

    public function computeDateDebut(AnneeUniv $anneeUniv): DateTime
+2 −2
Changes for module/ComiteSuiviIndividuel/view/comite-suivi-individuel/default/confirmation.phtml: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@
    <tr><td style="width: 50%;">
<form method="post" action="<?php echo $action; ?>">
    <input type="hidden" name="reponse" value="oui">
    <?php if ($justificationOui === true) : ?>
    <?php if (isset($justificationOui) && $justificationOui === true) : ?>
        <label for="justification-oui"> Justification </label>
        <textarea id="justification-oui" name="justification-oui" style="width: 95%;" placeholder="Merci de justifier"></textarea><br/>
    <?php endif; ?>
@@ -28,7 +28,7 @@
        </td><td style="width: 50%;">
<form method="post" action="<?php echo $action; ?>">
    <input type="hidden" name="reponse" value="non">
    <?php if ($justificationNon === true) : ?>
    <?php if (isset($justificationNon) && $justificationNon === true) : ?>
        <label for="justification-non"> Justification </label>
        <textarea id="justification-non" name="justification-non"  style="width: 95%;" placeholder="Merci de justifier"></textarea><br/>
    <?php endif; ?>
+12 −0
Changes for module/Formation/config/others/seance.config.php: 12 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -51,6 +51,7 @@ return [
                    'controller' => SeanceController::class,
                    'action' => [
                        'modifier',
                        'dupliquer'
                    ],
                    'privileges' => [
                        SeancePrivileges::SEANCE_MODIFIER,
@@ -135,6 +136,17 @@ return [
                                    ],
                                ],
                            ],
                            'dupliquer' => [
                                'type'  => Segment::class,
                                'may_terminate' => true,
                                'options' => [
                                    'route'    => '/dupliquer/:seance',
                                    'defaults' => [
                                        'controller' => SeanceController::class,
                                        'action'     => 'dupliquer',
                                    ],
                                ],
                            ],
                            'historiser' => [
                                'type'  => Segment::class,
                                'may_terminate' => true,
+20 −1
Changes for module/Formation/src/Formation/Controller/FormationController.php: 20 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -3,6 +3,10 @@
namespace Formation\Controller;

use Application\Controller\AbstractController;
use Application\Entity\AnneeUniv;
use Application\Service\AnneeUniv\AnneeUnivServiceAwareTrait;
use Formation\Entity\Db\Seance;
use Formation\Entity\Db\Session;
use Formation\Service\Module\ModuleServiceAwareTrait;
use Formation\Service\Notification\FormationNotificationFactoryAwareTrait;
use Formation\Service\Session\SessionServiceAwareTrait;
@@ -25,6 +29,7 @@ class FormationController extends AbstractController
    use FormationFormAwareTrait;
    use NotifierServiceAwareTrait;
    use FormationNotificationFactoryAwareTrait;
    use AnneeUnivServiceAwareTrait;

    use EtablissementServiceAwareTrait;

@@ -32,10 +37,24 @@ class FormationController extends AbstractController
    {
        $formation = $this->getFormationService()->getRepository()->getRequestedFormation($this);
        $sessions = $this->getSessionService()->getRepository()->fetchSessionsByFormation($formation, 'id', 'asc', true);
        $anneeUnivCourante = $this->anneeUnivService->courante();

        $sessionsAvecAnneeUniv = [];
        /** @var Session $session */
        foreach($sessions as $session){
            $premiereAnnee = null;
            if($session->getDateDebut()){
                $anneeUniv = $this->anneeUnivService->fromDate($session->getDateDebut());
                $premiereAnnee = $anneeUniv->getPremiereAnnee();
            }
            $sessionsAvecAnneeUniv[] = array("session" => $session, "anneeUniv" => $premiereAnnee ?? $anneeUnivCourante->getPremiereAnnee());
        }

        return new ViewModel([
            'formation' => $formation,
            'sessions' => $sessions,
            'sessions' => $sessionsAvecAnneeUniv,
            'anneeUnivCourante' => $anneeUnivCourante,
            'anneesUniv' => $this->formationService->getAnneesUnivAsOptions($sessions)
        ]);
    }

Loading