Commit 199ce1df authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

[FIX] Corrections diverses concernant la substitution de structures

parent e50923de
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -6,7 +6,8 @@

ARG PHP_VERSION

FROM registre.unicaen.fr:5000/open-source/docker/sygal-image:php${PHP_VERSION}
#FROM registre.unicaen.fr:5000/open-source/docker/sygal-image:php${PHP_VERSION}
FROM sygal-image-php${PHP_VERSION}

LABEL maintainer="Bertrand GAUTHIER <bertrand.gauthier at unicaen.fr>"

+34 −1
Original line number Diff line number Diff line
@@ -9,6 +9,21 @@
git fetch --tags && git checkout --force 5.2.4 && bash ./install.sh
```

- Il faut installer sur la serveur l'outils de transformation XSL SaxonC :

```bash
# Saxon/C : https://www.saxonica.com/download/c.xml
export SAXONC_INSTALL_DIR="/opt/Saxonica/SaxonHEC" && \
export SAXONC_HOME="/usr/lib" && \
cd /tmp && \
wget https://www.saxonica.com/download/libsaxon-HEC-setup64-v11.4.zip && \
unzip -o /tmp/libsaxon-HEC-setup64-v11.4.zip -d /tmp/ && \
mkdir -p ${SAXONC_INSTALL_DIR} && cp -r /tmp/libsaxon-HEC-11.4/* ${SAXONC_INSTALL_DIR}/ && \
cd ${SAXONC_INSTALL_DIR} && \
cp *.so /usr/lib/. && cp -r rt /usr/lib/. && cp -r saxon-data /usr/lib/. && \
cd command && ./buildhec-command.sh && ln -s ${SAXONC_INSTALL_DIR}/command/transform /usr/local/bin/
```

- Selon le moteur PHP que vous avez installé, rechargez le service, exemple :
    - php7.4-fpm         : `service php7.4-fpm reload`
    - apache2-mod-php7.4 : `service apache2 reload`
@@ -17,7 +32,25 @@ git fetch --tags && git checkout --force 5.2.4 && bash ./install.sh
## 2. Dans la base de données

```sql
INSERT INTO formation_etat (code, libelle, description, icone, couleur, ordre) VALUES ('I', 'Session imminente', 'Session imminente', 'icon icon-calendirer', '#FECACA', 4);
INSERT INTO formation_etat (code, libelle, description, icone, couleur, ordre) 
VALUES ('I', 'Session imminente', 'Session imminente', 'icon icon-calendirer', '#FECACA', 4);
update formation_etat set ordre=5 where code='C';
update formation_etat set ordre=6 where code='A';


drop view if exists v_diff_etablissement;
drop view if exists src_etablissement;

create view src_etablissement(id, source_code, source_id, structure_id) as
SELECT NULL::text      AS id,
       tmp.source_code,
       src.id          AS source_id,
       --tmp.source_code AS code,
       s.id            AS structure_id
FROM tmp_etablissement tmp
       JOIN source src ON src.id = tmp.source_id
       JOIN structure s ON s.source_code::text = tmp.structure_id::text;

alter table etablissement drop column code;

```
 No newline at end of file
+2 −0
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@ use Application\Cache\MemcachedFactory;
use Application\Controller\Factory\IndexControllerFactory;
use Application\Controller\Plugin\Forward;
use Application\Controller\Plugin\ForwardFactory;
use Application\ORM\Query\Functions\ToNumber;
use Fichier\Controller\Plugin\Uploader\UploaderPluginFactory;
use Application\Entity\Db\Repository\DefaultEntityRepository;
use Application\Entity\UserWrapperFactory;
@@ -108,6 +109,7 @@ return array(
                'default_repository_class_name' => DefaultEntityRepository::class,
                'string_functions' => [
                    'strReduce' => StrReduce::class,
                    'toNumber' => ToNumber::class,
                ],
            ]
        ],
+1 −1
Original line number Diff line number Diff line
@@ -80,7 +80,7 @@ class ListeDiffusionController extends AbstractController

        /** @var EcoleDoctorale[] $ecolesDoctorales */
        $etablissements = $this->etablissementService->getRepository()->findAllEtablissementsInscriptions(true);
        $ecolesDoctorales = $this->structureService->getAllStructuresAffichablesByType(TypeStructure::CODE_ECOLE_DOCTORALE, 'libelle', false, true);
        $ecolesDoctorales = $this->structureService->findAllStructuresAffichablesByType(TypeStructure::CODE_ECOLE_DOCTORALE, 'libelle', false, true);
        $codesRolesAvecTemoinsED = [
            Role::CODE_DOCTORANT => true,
            Role::CODE_DIRECTEUR_THESE => true,
+1 −1
Original line number Diff line number Diff line
@@ -85,7 +85,7 @@ class PrivilegeController extends AbstractController
     */
    private function cleanRoles($roles)
    {
        $substituees = $this->structureService->getStructuresSubstituees();
        $substituees = $this->structureService->findStructuresSubstituees();

        // Retrait des rôles associés à des structures historisées ou substituées
        $roles = array_filter($roles, function (Role $role) use ($substituees) {
Loading