Commit df8d18ee authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Merge branch 'release-1.0.10'

parents 3d29bfc6 58f726a6
Loading
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -2,9 +2,9 @@
return [
    'unicaen-app' => [
        'app_infos' => [
            'version' => '1.0.9',
            'date' => '06/02/2019',
            'version' => '1.0.10',
            'date' => '07/02/2019',
        ],
    ],
    'comment' => 'Fichier généré le 06/02/2019 à 15:06:26 avec /home/metivier/MyWeb/sygal/bump-version',
    'comment' => 'Fichier généré le 07/02/2019 à 11:05:01 avec /home/gauthierb/workspace/sygal/bump-version',
];
+4 −4
Original line number Diff line number Diff line
@@ -71,16 +71,16 @@ class ExportController extends AbstractController
            '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(); },
            'Date de dépôt version initiale'        => function (These $these) { $file = $this->fichierService->getRepository()->fetchFichiers($these, NatureFichier::CODE_THESE_PDF, VersionFichier::CODE_ORIG)[0]; if ($file !== null) return $file->getHistoCreation()->format('d/m/Y'); },
            'Date de dépôt version corigée'         => function (These $these) { $file = $this->fichierService->getRepository()->fetchFichiers($these, NatureFichier::CODE_THESE_PDF,VersionFichier::CODE_ORIG_CORR)[0]; if ($file !== null) return $file->getHistoCreation()->format('d/m/Y'); },
            'Date de dépôt version initiale'        => function (These $these) { $file = $these->hasVersionInitiale(); if ($file) return $file->getHistoCreation()->format('d/m/Y'); },
            'Date de dépôt version corigée'         => function (These $these) { $file = $these->hasVersionCorrigee(); if ($file) return $file->getHistoCreation()->format('d/m/Y'); },
            //Flags
            'Etat de la thèse'                      => function (These $these) { return $these->getEtatTheseToString();},
            'Autorisation à soutenir'               => function (These $these) { return $these->getSoutenanceAutorisee();},
            'Est confidentielle'                    => function (These $these) { $now = new \DateTime(); $end= $these->getDateFinConfidentialite(); if ($now > $end) return "N"; else return "O"; },
            'Résultat'                              => function (These $these) { return $these->getResultat();},
            'Corrections'                           => function (These $these) { return $these->getCorrectionAutorisee();},
            'Thèse format PDF'                      => function (These $these) { if (!empty($this->fichierService->getRepository()->fetchFichiers($these, NatureFichier::CODE_THESE_PDF))) return 'O'; else return 'N'; },
            'Annexe non PDF'                        => function (These $these) { if (!empty($this->fichierService->getRepository()->fetchFichiers($these, NatureFichier::CODE_FICHIER_NON_PDF))) return 'O'; else return 'N'; },
            'Thèse format PDF'                      => function (These $these) { if ($these->hasMemoire())  return 'O'; else return 'N'; },
            'Annexe non PDF'                        => function (These $these) { if ($these->hasAnnexe())   return 'O'; else return 'N'; },

        ];

+1 −0
Original line number Diff line number Diff line
@@ -90,6 +90,7 @@ class SubstitutionController extends AbstractController
            'structuresConcretesSubstituees' => $structuresConcretesSubstituees,
            'structuresConcretes' => $structures,
            'type' => $type,
            'structureCibleLogoContent' => $this->structureService->getLogoStructureContent(),
        ]);
        $vm->setTemplate('application/substitution/modifier');

+35 −1
Original line number Diff line number Diff line
@@ -598,7 +598,7 @@ class These implements HistoriqueAwareInterface, ResourceInterface
     * @param string|null $correctionAutoriseeForcee
     * @return These
     */
    public function setCorrectionAutoriseeForcee(string $correctionAutoriseeForcee = null): These
    public function setCorrectionAutoriseeForcee(string $correctionAutoriseeForcee = null)
    {
        Assertion::inArray($correctionAutoriseeForcee, [
            self::CORRECTION_AUTORISEE_FORCAGE_NON,
@@ -1404,4 +1404,38 @@ class These implements HistoriqueAwareInterface, ResourceInterface
        }
        return false;
    }

    public function hasAnnexe()
    {
        /** @var Fichier $fichier */
        foreach ($this->fichiers as $fichier) {
            if ($fichier->getNature() === NatureFichier::CODE_FICHIER_NON_PDF) return true;
        }
        return false;
    }

    public function hasMemoire()
    {
        /** @var Fichier $fichier */
        foreach ($this->fichiers as $fichier) {
            if ($fichier->getNature() === NatureFichier::CODE_THESE_PDF) return true;
        }
        return false;
    }

    public function hasVersionInitiale() {
        /** @var Fichier $fichier */
        foreach ($this->fichiers as $fichier) {
            if ($fichier->getHistoDestruction() === null && $fichier->getNature() === NatureFichier::CODE_THESE_PDF && $fichier->getVersion() === VersionFichier::CODE_ORIG) return $fichier;
        }
        return null;
    }

    public function hasVersionCorrigee() {
        /** @var Fichier $fichier */
        foreach ($this->fichiers as $fichier) {
            if ($fichier->getHistoDestruction() === null && $fichier->getNature() === NatureFichier::CODE_THESE_PDF && $fichier->getVersion() === VersionFichier::CODE_ORIG_CORR) return $fichier;
        }
        return null;
    }
}
+2 −2
Original line number Diff line number Diff line
@@ -828,9 +828,9 @@ class StructureService extends BaseService
     * @param StructureInterface $structure
     * @return string|null
     */
    public function getLogoStructureContent(StructureInterface $structure)
    public function getLogoStructureContent(StructureInterface $structure = null)
    {
        if ($structure->getCheminLogo() === null) {
        if ($structure === null OR $structure->getCheminLogo() === null) {
            return Util::createImageWithText("Aucun logo|renseigné", 200, 200);
        }

Loading