From d947bf6af9c5c729eaa64dce6874f3b36c318767 Mon Sep 17 00:00:00 2001 From: Bertrand Gauthier <bertrand.gauthier@unicaen.fr> Date: Thu, 23 Jan 2020 15:39:14 +0100 Subject: [PATCH] =?UTF-8?q?Possibilit=C3=A9=20d'importer=20les=20dates=20d?= =?UTF-8?q?'abandon=20et=20de=20de=20transfert=20des=20th=C3=A8ses?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/ExportController.php | 2 + .../Application.Entity.Db.These.dcm.xml | 2 + .../src/Application/Entity/Db/These.php | 64 +++++++++++++++++++ .../view/application/these/identite.phtml | 10 +++ .../Mapping/Import.Model.TmpThese.dcm.xml | 2 + module/Import/src/Import/Model/TmpThese.php | 10 +++ 6 files changed, 90 insertions(+) diff --git a/module/Application/src/Application/Controller/ExportController.php b/module/Application/src/Application/Controller/ExportController.php index 5dd68d7ac..a6decafb3 100644 --- a/module/Application/src/Application/Controller/ExportController.php +++ b/module/Application/src/Application/Controller/ExportController.php @@ -81,6 +81,8 @@ class ExportController extends AbstractController }, //Dates 'Date de première inscription' => function (These $these) { return $these->getDatePremiereInscription(); }, + "Date d'abandon" => function (These $these) { return $these->getDateAbandon(); }, + 'Date de transfert' => function (These $these) { return $these->getDateTransfert(); }, 'Date de prévisionnel de soutenance' => function (These $these) { return $these->getDatePrevisionSoutenance(); }, 'Date de soutenance' => function (These $these) { return $these->getDateSoutenance(); }, 'Date de fin de confientialité' => function (These $these) { return $these->getDateFinConfidentialite(); }, diff --git a/module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.These.dcm.xml b/module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.These.dcm.xml index 683409d7a..364a890ad 100644 --- a/module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.These.dcm.xml +++ b/module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.These.dcm.xml @@ -16,6 +16,8 @@ <field name="datePrevisionSoutenance" type="datetime" column="DATE_PREV_SOUTENANCE" nullable="true"/> <field name="dateSoutenance" type="datetime" column="DATE_SOUTENANCE" nullable="true"/> <field name="dateFinConfidentialite" type="datetime" column="DATE_FIN_CONFID" nullable="true"/> + <field name="dateAbandon" type="datetime" column="DATE_ABANDON" nullable="true"/> + <field name="dateTransfert" type="datetime" column="DATE_TRANSFERT" nullable="true"/> <field name="codeUniteRecherche" type="string" column="COD_UNIT_RECH" length="50" nullable="true"/> <field name="libelleUniteRecherche" type="string" column="LIB_UNIT_RECH" length="200" nullable="true"/> <field name="correctionAutorisee" type="string" column="CORREC_AUTORISEE" nullable="true"/> diff --git a/module/Application/src/Application/Entity/Db/These.php b/module/Application/src/Application/Entity/Db/These.php index a5cf586a4..132ee4d5e 100644 --- a/module/Application/src/Application/Entity/Db/These.php +++ b/module/Application/src/Application/Entity/Db/These.php @@ -125,6 +125,16 @@ class These implements HistoriqueAwareInterface, ResourceInterface */ protected $dateFinConfidentialite; + /** + * @var DateTime|null + */ + protected $dateAbandon; + + /** + * @var DateTime|null + */ + protected $dateTransfert; + /** * @var string */ @@ -451,6 +461,60 @@ class These implements HistoriqueAwareInterface, ResourceInterface return $this; } + /** + * @return DateTime|null + */ + public function getDateAbandon() + { + return $this->dateAbandon; + } + + /** + * @return string + */ + public function getDateAbandonToString(): string + { + return Util::formattedDate($this->getDateAbandon()); + } + + /** + * @param DateTime|null $dateAbandon + * @return These + */ + public function setDateAbandon(DateTime $dateAbandon = null): These + { + $this->dateAbandon = $dateAbandon; + + return $this; + } + + /** + * @return DateTime|null + */ + public function getDateTransfert() + { + return $this->dateTransfert; + } + + /** + * @return string + */ + public function getDateTransfertToString(): string + { + return Util::formattedDate($this->getDateTransfert()); + } + + /** + * @param DateTime|null $dateTransfert + * @return These + */ + public function setDateTransfert(DateTime $dateTransfert = null): These + { + $this->dateTransfert = $dateTransfert; + + return $this; + } + /** * @return string */ diff --git a/module/Application/view/application/these/identite.phtml b/module/Application/view/application/these/identite.phtml index c35ed6290..d41a49dc1 100644 --- a/module/Application/view/application/these/identite.phtml +++ b/module/Application/view/application/these/identite.phtml @@ -323,6 +323,16 @@ $financementFormatter->setDisplayAs(FinancementFormatter::DISPLAY_AS_LINE); <dt>Années universitaires<br>d'inscription</dt> <dd><?php echo $these->getAnneesUnivInscriptionToString('<br>') ?: "(Non renseignée)" ?></dd> + <?php if ($these->getDateAbandon()): ?> + <dt>Date d'abandon</dt> + <dd><?php echo $these->getDateAbandonToString() ?></dd> + <?php endif ?> + + <?php if ($these->getDateTransfert()): ?> + <dt>Date de transfert + <dd><?php echo $these->getDateTransfertToString() ?></dd> + <?php endif ?> + <?php if ($these->getSoutenanceAutorisee()): ?> <dt>Soutenance autorisée</dt> <dd><?php echo $these->getSoutenanceAutorisee() === 'O' ? "Oui" : "Non" ?></dd> diff --git a/module/Import/src/Import/Model/Mapping/Import.Model.TmpThese.dcm.xml b/module/Import/src/Import/Model/Mapping/Import.Model.TmpThese.dcm.xml index 07c1eca8f..7a38f90e4 100644 --- a/module/Import/src/Import/Model/Mapping/Import.Model.TmpThese.dcm.xml +++ b/module/Import/src/Import/Model/Mapping/Import.Model.TmpThese.dcm.xml @@ -17,6 +17,8 @@ <field name="datePremiereInsc" type="date" column="DAT_DEB_THS" nullable="true"/> <field name="dateSoutenancePrev" type="date" column="DAT_PREV_SOU" nullable="true"/> <field name="dateSoutenance" type="date" column="DAT_SOU_THS" nullable="true"/> + <field name="dateAbandon" type="date" column="DAT_ABANDON" nullable="true"/> + <field name="dateTransfert" type="date" column="DAT_TRANSFERT_DEP" nullable="true"/> <field name="etatThese" type="string" column="ETA_THS" length="20" nullable="true"/> <field name="libDiscipline" type="string" column="LIB_INT1_DIS" length="200" nullable="true"/> diff --git a/module/Import/src/Import/Model/TmpThese.php b/module/Import/src/Import/Model/TmpThese.php index 86833dcf0..3acc2544a 100644 --- a/module/Import/src/Import/Model/TmpThese.php +++ b/module/Import/src/Import/Model/TmpThese.php @@ -62,6 +62,16 @@ class TmpThese */ private $dateSoutenance; + /** + * @var \DateTime + */ + private $dateAbandon; + + /** + * @var \DateTime + */ + private $dateTransfert; + /** * @var string */ -- GitLab