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

Heurodatage des changements d'etat des sessions de formation

parent abfea6c8
Loading
Loading
Loading
Loading
+1 −0
Changes for CHANGELOG.md: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@ Journal des modifications
- Amélioration du message de blocage des modifications des structures
- Le texte de l'engagement d'impartialité est maintenant un 'contenu' éditable dans le module unicaen/renderer
- Ajout de l'année de thèse du doctorant (au moment de la session) dans l'export des sessions de formation et sur les émargements
- Heurodatage des changements d'etat des sessions de formation
- [FIX] Plus d'envoi de mail lors du classement des inscriptions si les inscriptions ne sont pas closes
- [FIX] Ajout de l'affichage de la liste des présences à une session si celle-ci est imminente.
- [FIX] Correction du calcul d'erreur de l'année de thèse du doctorant dans les sessions de formation.
+10 −0
Changes for doc/release-notes/v5.2.6.md: 10 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -45,4 +45,14 @@ histo_destructeur_id bigint constraint membre_destructeur_fk
-- insertions liées à l'engagement d'impartialité comme un template
INSERT INTO unicaen_renderer_macro (code, description, variable_name, methode_name) VALUES ('Membre#Denomination', '<p>Retourne la dénomination d''une membre</p>', 'membre', 'getDenomination');
INSERT INTO unicaen_renderer_template (code, description, document_type, document_sujet, document_corps) VALUES ('SOUTENANCE_ENGAGEMENT_IMPARTIALITE', '<p>Texte associé à l''engagement d''impartialité</p>', 'texte', 'Engagement d''impartialité', '<p>En signant cet engagement d''impartialité, je, sous-signé <strong>VAR[Membre#Denomination]</strong>, atteste ne pas avoir de liens d''intérêt, qu''ils soient de nature professionnelle, familiale, personnelle ou patrimoniale avec le doctorant ou son directeur de thèse, ne pas avoir pris part aux travaux de la thèse et ne pas avoir de publication cosignée avec le doctorant dans les cinq dernières années et ne pas avoir participé au comité de suivi de la thèse de VAR[Doctorant#Denomination].</p><p>By signing, I certify that I have no personal or family connection with the doctoral student or his/her PhD supervisor and that I have not taken part in the work of the thesis and not co-authored  publications with the doctoral student for the last five years.<br /><br /></p>');

--table pour l'heurodatage des changement d'etats des sessions
create table formation_session_etat_heurodatage
(
  id serial constraint formation_session_etat_heurodatage_pk primary key,
  session_id integer not null constraint formation_session_etat_heurodatage_session references formation_session on delete cascade,
  etat_id varchar(1) not null constraint formation_session_etat_heurodatage_etat references formation_etat on delete cascade,
  heurodatage timestamp not null,
  utilisateur_id int not null constraint formation_session_etat_heurodatage_user references utilisateur on delete cascade
);
```
+2 −0
Changes for module/Formation/src/Formation/Controller/SessionController.php: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -91,6 +91,7 @@ class SessionController extends AbstractController
                /** @var Etat $enPrepration */
                $enPrepration = $this->getEntityManager()->getRepository(Etat::class)->findOneBy(["code" => Etat::CODE_PREPARATION]);
                $session->setEtat($enPrepration);
                $this->sessionService->addHeurodatage($session, $enPrepration);

                $this->getSessionService()->update($session);

@@ -209,6 +210,7 @@ class SessionController extends AbstractController

            if ($etat !== null) {
                $session->setEtat($etat);
                $this->sessionService->addHeurodatage($session, $etat);
                $this->getSessionService()->update($session);

                switch ($session->getEtat()->getCode()) {
+1 −0
Changes for module/Formation/src/Formation/Entity/Db/Mapping/Formation.Entity.Db.Session.dcm.xml: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -44,6 +44,7 @@
        <one-to-many field="structuresValides" target-entity="Formation\Entity\Db\SessionStructureValide" mapped-by="session"/>
        <one-to-many field="seances" target-entity="Formation\Entity\Db\Seance" mapped-by="session"/>
        <one-to-many field="formateurs" target-entity="Formation\Entity\Db\Formateur" mapped-by="session"/>
        <one-to-many field="heurodatages" target-entity="Formation\Entity\Db\SessionEtatHeurodatage" mapped-by="session"/>

        <one-to-many field="inscriptions" target-entity="Formation\Entity\Db\Inscription" mapped-by="session"/>
        <field name="tailleListePrincipale"     type="integer"                     column="TAILLE_LISTE_PRINCIPALE"      nullable="true"/>
+27 −0
Changes for module/Formation/src/Formation/Entity/Db/Mapping/Formation.Entity.Db.SessionEtatHeurodatage.dcm.xml: 27 added lines, 0 removed lines.
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
    <entity name="Formation\Entity\Db\SessionEtatHeurodatage"
            table="FORMATION_SESSION_ETAT_HEURODATAGE"
    >
        <id name="id" type="integer" column="ID">
            <generator strategy="SEQUENCE"/>
        </id>

        <many-to-one field="session" target-entity="Formation\Entity\Db\Session">
            <join-columns>
                <join-column name="SESSION_ID" referenced-column-name="ID"/>
            </join-columns>
        </many-to-one>
        <many-to-one field="etat" target-entity="Formation\Entity\Db\Etat">
            <join-columns>
                <join-column name="ETAT_ID" referenced-column-name="CODE"/>
            </join-columns>
        </many-to-one>
        <field name="heurodatage" type="datetime" column="HEURODATAGE" nullable="false"/>
        <many-to-one field="utilisateur" target-entity="Application\Entity\Db\Utilisateur">
            <join-columns>
                <join-column name="utilisateur_id" referenced-column-name="ID"/>
            </join-columns>
        </many-to-one>
    </entity>
</doctrine-mapping>
 No newline at end of file
Loading