diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f14f17f324f654f0d43a953a2d70199aa134fbb..6b830b0dfbce646512424b5b269f6e5479b311f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,18 @@ Journal des modifications 1.4.0 (??/01/2020) ------------------ +### Ajouts + +- La remise d'un exemplaire papier de la thèse n'est requise que si la diffusion est acceptée avec embargo ou refusée. +- Inversion des étapes Diffusion et Attestations. +- Modification des textes liés à l'autorisation de diffusion dans le formulaire et dans la convention PDF générée. +- Convention de MEL : suppression du petit logo dans l'entête puisqu'il y en a déjà un sous le titre +- Nouvelle charte de diffusion téléchargeable. +- Ajout du flag "fermé" pour les structures et utilisations dans la recherche de thèses. +- Ajout d'un champ "Id HAL" dans le formulaire d'autorisation de diffusion. - Ajout d'un menu dépôt pour séparer les action liés au dépôt de la partie annuaire +- La couverture est maintenant recto/verso lorsque la premiere page n'est pas retirée +- Ajout de la colonne durée des thèses dans l'export 1.3.3 (18/12/2019) ------------------ diff --git a/config/autoload/version.global.php b/config/autoload/version.global.php index 50a0d36e45a1ad8c567218e2ba547a3012ed4081..27f00e5102c3cee599d47900748e15af1f195629 100644 --- a/config/autoload/version.global.php +++ b/config/autoload/version.global.php @@ -2,9 +2,9 @@ return [ 'unicaen-app' => [ 'app_infos' => [ - 'version' => '1.3.3', - 'date' => '18/12/2019', + 'version' => '1.4.0', + 'date' => '15/01/2020', ], ], - 'comment' => 'Fichier généré le 18/12/2019 à 11:49:34 avec /home/metivier/MyWeb/sygal/bump-version', + 'comment' => 'Fichier généré le 15/01/2020 à 09:22:35 avec /home/gauthierb/workspace/sygal/bump-version', ]; diff --git a/doc/release-notes/1.4.0/01-schema-1.4.0.sql b/doc/release-notes/1.4.0/01-schema-1.4.0.sql new file mode 100644 index 0000000000000000000000000000000000000000..e138f6bb3cc89d2b668afacde52452cbb37ae8b8 --- /dev/null +++ b/doc/release-notes/1.4.0/01-schema-1.4.0.sql @@ -0,0 +1,987 @@ + +-- +-- Structure fermée +-- + +alter table STRUCTURE + add EST_FERME number(1) default 0 ; + +-- +-- Id HAL dans le formulaire de diffusion. +-- + +alter table DIFFUSION add HAL_ID varchar2(100) ; + +-- +-- La remise d'un exemplaire papier dépend de l'autorisation de diffusion. +-- + +alter table DIFFUSION add VERSION_CORRIGEE NUMBER(1) default 0 not null; +alter table ATTESTATION modify EX_IMPR_CONFORM_VER_DEPO default null null; +alter table ATTESTATION add VERSION_CORRIGEE NUMBER(1) default 0 not null; +alter table RDV_BU modify EXEMPL_PAPIER_FOURNI default null null; + +create or replace view V_WF_ETAPE_PERTIN as +select + to_number(these_id) these_id, + to_number(etape_id) etape_id, + code, + ordre, + rownum id +from ( + -- + -- validation_page_de_couverture + -- + select + t.id as these_id, + e.id as etape_id, + e.code, + e.ordre + from these t + join wf_etape e on e.code = 'VALIDATION_PAGE_DE_COUVERTURE' + where t.ETAT_THESE in ('E', 'S') -- thèses en cours ou soutenues + + union all + + -- + -- depot_version_originale + -- + select + t.id as these_id, + e.id as etape_id, + e.code, + e.ordre + from these t + join wf_etape e on e.code = 'DEPOT_VERSION_ORIGINALE' + where t.ETAT_THESE in ('E', 'S') -- thèses en cours ou soutenues + + union all + + -- + -- autorisation_diffusion_these + -- + select + t.id as these_id, + e.id as etape_id, + e.code, + e.ordre + from these t + join wf_etape e on e.code = 'AUTORISATION_DIFFUSION_THESE' + where t.ETAT_THESE in ('E', 'S') -- thèses en cours ou soutenues + + union all + + -- + -- attestations + -- + select + t.id as these_id, + e.id as etape_id, + e.code, + e.ordre + from these t + join wf_etape e on e.code = 'ATTESTATIONS' + where t.ETAT_THESE in ('E', 'S') -- thèses en cours ou soutenues + + union all + + -- + -- signalement_these + -- + select + t.id as these_id, + e.id as etape_id, + e.code, + e.ordre + from these t + join wf_etape e on e.code = 'SIGNALEMENT_THESE' + where t.ETAT_THESE in ('E', 'S') -- thèses en cours ou soutenues + + union all + + -- + -- archivabilite_version_originale + -- + select + t.id as these_id, + e.id as etape_id, + e.code, + e.ordre + from these t + join wf_etape e on e.code = 'ARCHIVABILITE_VERSION_ORIGINALE' + where t.ETAT_THESE in ('E', 'S') -- thèses en cours ou soutenues + + union all + + -- + -- depot_version_archivage + -- + select + t.id as these_id, + e.id as etape_id, + e.code, + e.ordre + from these t + join wf_etape e on e.code = 'DEPOT_VERSION_ARCHIVAGE' + join v_situ_archivab_vo situ on situ.these_id = t.id and situ.est_valide = 0 -- VO non archivable + where t.ETAT_THESE in ('E', 'S') -- thèses en cours ou soutenues + + union all + + -- + -- archivabilite_version_archivage + -- + select + t.id as these_id, + e.id as etape_id, + e.code, + e.ordre + from these t + join wf_etape e on e.code = 'ARCHIVABILITE_VERSION_ARCHIVAGE' + join v_situ_archivab_vo situ on situ.these_id = t.id and situ.est_valide = 0 -- VO non archivable + where t.ETAT_THESE in ('E', 'S') -- thèses en cours ou soutenues + + union all + + -- + -- verification_version_archivage + -- + select + t.id as these_id, + e.id as etape_id, + e.code, + e.ordre + from these t + join wf_etape e on e.code = 'VERIFICATION_VERSION_ARCHIVAGE' + join v_situ_archivab_va situ on situ.these_id = t.id and situ.est_valide = 1 -- VA archivable + where t.ETAT_THESE in ('E', 'S') -- thèses en cours ou soutenues + + union all + + -- + -- rdv_bu_saisie_doctorant + -- + select + t.id as these_id, + e.id as etape_id, + e.code, + e.ordre + from these t + join wf_etape e on e.code = 'RDV_BU_SAISIE_DOCTORANT' + where t.ETAT_THESE in ('E', 'S') -- thèses en cours ou soutenues + + union all + + -- + -- rdv_bu_saisie_bu + -- + select + t.id as these_id, + e.id as etape_id, + e.code, + e.ordre + from these t + join wf_etape e on e.code = 'RDV_BU_SAISIE_BU' + where t.ETAT_THESE in ('E', 'S') -- thèses en cours ou soutenues + + union all + + -- + -- rdv_bu_validation_bu + -- + select + t.id as these_id, + e.id as etape_id, + e.code, + e.ordre + from these t + join wf_etape e on e.code = 'RDV_BU_VALIDATION_BU' + where t.ETAT_THESE in ('E', 'S') -- thèses en cours ou soutenues + + + + union all + + + + -- + -- depot_version_originale_corrigee + -- + select + t.id as these_id, + e.id as etape_id, + e.code, + e.ordre + from these t + join wf_etape e on e.code = 'DEPOT_VERSION_ORIGINALE_CORRIGEE' + where (t.correc_autorisee is not null or t.CORREC_AUTORISEE_FORCEE is not null) -- correction attendue + and t.ETAT_THESE in ('E', 'S') -- thèses en cours ou soutenues + + union all + + -- + -- autorisation_diffusion_these_version_corrigee + -- + select + t.id as these_id, + e.id as etape_id, + e.code, + e.ordre + from these t + join wf_etape e on e.code = 'AUTORISATION_DIFFUSION_THESE_VERSION_CORRIGEE' + where (t.correc_autorisee is not null or t.CORREC_AUTORISEE_FORCEE is not null) -- correction attendue + and t.ETAT_THESE in ('E', 'S') -- thèses en cours ou soutenues + + union all + + -- + -- attestations_version_corrigee + -- + select + t.id as these_id, + e.id as etape_id, + e.code, + e.ordre + from these t + join wf_etape e on e.code = 'ATTESTATIONS_VERSION_CORRIGEE' + where (t.correc_autorisee is not null or t.CORREC_AUTORISEE_FORCEE is not null) -- correction attendue + and t.ETAT_THESE in ('E', 'S') -- thèses en cours ou soutenues + + union all + + -- + -- archivabilite_version_originale_corrigee + -- + select + t.id as these_id, + e.id as etape_id, + e.code, + e.ordre + from these t + join wf_etape e on e.code = 'ARCHIVABILITE_VERSION_ORIGINALE_CORRIGEE' + where (t.correc_autorisee is not null or t.CORREC_AUTORISEE_FORCEE is not null) -- correction attendue + and t.ETAT_THESE in ('E', 'S') -- thèses en cours ou soutenues + + union all + + -- + -- depot_version_archivage_corrigee + -- + select + t.id as these_id, + e.id as etape_id, + e.code, + e.ordre + from these t + join wf_etape e on e.code = 'DEPOT_VERSION_ARCHIVAGE_CORRIGEE' + join v_situ_archivab_voc situ on situ.these_id = t.id and situ.est_valide = 0 -- VOC non archivable + where (t.correc_autorisee is not null or t.CORREC_AUTORISEE_FORCEE is not null) -- correction attendue + and t.ETAT_THESE in ('E', 'S') -- thèses en cours ou soutenues + + union all + + -- + -- archivabilite_version_archivage_corrigee + -- + select + t.id as these_id, + e.id as etape_id, + e.code, + e.ordre + from these t + join wf_etape e on e.code = 'ARCHIVABILITE_VERSION_ARCHIVAGE_CORRIGEE' + join v_situ_archivab_voc situ on situ.these_id = t.id and situ.est_valide = 0 -- VOC non archivable + where (t.correc_autorisee is not null or t.CORREC_AUTORISEE_FORCEE is not null) -- correction attendue + and t.ETAT_THESE in ('E', 'S') -- thèses en cours ou soutenues + + union all + + -- + -- verification_version_archivage_corrigee + -- + select + t.id as these_id, + e.id as etape_id, + e.code, + e.ordre + from these t + join wf_etape e on e.code = 'VERIFICATION_VERSION_ARCHIVAGE_CORRIGEE' + join v_situ_archivab_vac situ on situ.these_id = t.id and situ.est_valide = 1 -- VAC archivable + where (t.correc_autorisee is not null or t.CORREC_AUTORISEE_FORCEE is not null) -- correction attendue + and t.ETAT_THESE in ('E', 'S') -- thèses en cours ou soutenues + + union all + + -- + -- depot_version_corrigee_validation_doctorant + -- + select + t.id as these_id, + e.id as etape_id, + e.code, + e.ordre + from these t + join wf_etape e on e.code = 'DEPOT_VERSION_CORRIGEE_VALIDATION_DOCTORANT' + where (t.correc_autorisee is not null or t.CORREC_AUTORISEE_FORCEE is not null) -- correction attendue + and t.ETAT_THESE in ('E', 'S') -- thèses en cours ou soutenues + + union all + + -- + -- depot_version_corrigee_validation_directeur + -- + select + t.id as these_id, + e.id as etape_id, + e.code, + e.ordre + from these t + join wf_etape e on e.code = 'DEPOT_VERSION_CORRIGEE_VALIDATION_DIRECTEUR' + where (t.correc_autorisee is not null or t.CORREC_AUTORISEE_FORCEE is not null) -- correction attendue + and t.ETAT_THESE in ('E', 'S') -- thèses en cours ou soutenues + + union all + + -- + -- REMISE_EXEMPLAIRE_PAPIER_THESE_CORRIGEE + -- + select + t.id as these_id, + e.id as etape_id, + e.code, + e.ordre + from these t + join wf_etape e on e.code = 'REMISE_EXEMPLAIRE_PAPIER_THESE_CORRIGEE' + join DIFFUSION d on d.VERSION_CORRIGEE = 1 and d.AUTORIS_MEL in (0/*Non*/, 1/*Oui+embargo*/) -- exemplaire papier requis + where (t.correc_autorisee is not null or t.CORREC_AUTORISEE_FORCEE is not null) -- correction attendue + and t.ETAT_THESE in ('E', 'S') -- thèses en cours ou soutenues + + ) +; + +create or replace view V_WORKFLOW as +SELECT + ROWNUM as id, + t.THESE_ID, + t.ETAPE_ID, + t.CODE, + t.ORDRE, + t.FRANCHIE, + t.RESULTAT, + t.OBJECTIF, + -- NB: dans les 3 lignes suivantes, c'est la même expression 'dense_rank() over(...)' qui est répétée : + (dense_rank() over(partition by t.THESE_ID, t.FRANCHIE order by t.ORDRE)) dense_rank, + case when t.FRANCHIE = 1 or (dense_rank() over(partition by t.THESE_ID, t.FRANCHIE order by t.ORDRE)) = 1 then 1 else 0 end atteignable, + case when (dense_rank() over(partition by t.THESE_ID, t.FRANCHIE order by t.ORDRE)) = 1 and t.FRANCHIE = 0 then 1 else 0 end courante +FROM ( + + -- + -- VALIDATION_PAGE_DE_COUVERTURE : franchie si version page de couverture validée + -- + SELECT + t.id AS these_id, + e.id AS etape_id, + e.code, + e.ORDRE, + CASE WHEN v.valide IS NULL THEN 0 ELSE 1 END franchie, + CASE WHEN v.valide IS NULL THEN 0 ELSE 1 END resultat, + 1 objectif + FROM these t + JOIN WF_ETAPE e ON e.code = 'VALIDATION_PAGE_DE_COUVERTURE' + LEFT JOIN V_SITU_VALIDATION_PAGE_COUV v ON v.these_id = t.id + + UNION ALL + + -- + -- DEPOT_VERSION_ORIGINALE : franchie si version originale déposée + -- + SELECT + t.id AS these_id, + e.id AS etape_id, + e.code, + e.ORDRE, + CASE WHEN v.fichier_id IS NULL + THEN 0 + ELSE 1 END franchie, + CASE WHEN v.fichier_id IS NULL + THEN 0 + ELSE 1 END resultat, + 1 objectif + FROM these t + JOIN WF_ETAPE e ON e.code = 'DEPOT_VERSION_ORIGINALE' + LEFT JOIN V_SITU_DEPOT_VO v ON v.these_id = t.id + + UNION ALL + + -- + -- AUTORISATION_DIFFUSION_THESE : franchie si données saisies + -- + SELECT + t.id AS these_id, + e.id AS etape_id, + e.code, + e.ORDRE, + CASE WHEN v.diffusion_id IS NULL + THEN 0 + ELSE 1 END franchie, + CASE WHEN v.diffusion_id IS NULL + THEN 0 + ELSE 1 END resultat, + 1 objectif + FROM these t + JOIN WF_ETAPE e ON e.code = 'AUTORISATION_DIFFUSION_THESE' + LEFT JOIN V_SITU_AUTORIS_DIFF_THESE v ON v.these_id = t.id + + UNION ALL + + -- + -- ATTESTATIONS : franchie si données saisies + -- + SELECT + t.id AS these_id, + e.id AS etape_id, + e.code, + e.ORDRE, + CASE WHEN v.attestation_id IS NULL THEN 0 ELSE 1 END franchie, + CASE WHEN v.attestation_id IS NULL THEN 0 ELSE 1 END resultat, + 1 objectif + FROM these t + JOIN WF_ETAPE e ON e.code = 'ATTESTATIONS' + LEFT JOIN V_SITU_ATTESTATIONS v ON v.these_id = t.id + + UNION ALL + + -- + -- SIGNALEMENT_THESE : franchie si données saisies + -- + SELECT + t.id AS these_id, + e.id AS etape_id, + e.code, + e.ORDRE, + CASE WHEN v.description_id IS NULL + THEN 0 + ELSE 1 END franchie, + CASE WHEN v.description_id IS NULL + THEN 0 + ELSE 1 END resultat, + 1 objectif + FROM these t + JOIN WF_ETAPE e ON e.code = 'SIGNALEMENT_THESE' + LEFT JOIN V_SITU_SIGNALEMENT_THESE v ON v.these_id = t.id + + UNION ALL + + -- + -- ARCHIVABILITE_VERSION_ORIGINALE : franchie si l'archivabilité de la version originale a été testée + -- + SELECT + t.id AS these_id, + e.id AS etape_id, + e.code, + e.ORDRE, + CASE WHEN v.THESE_ID IS NULL THEN 0 ELSE 1 END franchie, + -- CASE WHEN v.THESE_ID IS NULL THEN + -- 0 -- test d'archivabilité inexistant + -- ELSE + -- CASE WHEN v.EST_VALIDE IS NULL THEN + -- 1 -- test d'archivabilité existant mais résultat indéterminé (plantage) + -- ELSE + -- CASE WHEN v.EST_VALIDE = 1 THEN + -- 1 -- test d'archivabilité réussi + -- ELSE + -- 0 -- test d'archivabilité échoué + -- END + -- END + -- END franchie, + CASE WHEN v.EST_VALIDE IS NULL OR v.EST_VALIDE = 0 THEN 0 ELSE 1 END resultat, + 1 objectif + FROM these t + JOIN WF_ETAPE e ON e.code = 'ARCHIVABILITE_VERSION_ORIGINALE' + LEFT JOIN V_SITU_ARCHIVAB_VO v ON v.these_id = t.id + + UNION ALL + + -- + -- DEPOT_VERSION_ARCHIVAGE : franchie si version d'archivage déposée + -- + SELECT + t.id AS these_id, + e.id AS etape_id, + e.code, + e.ORDRE, + CASE WHEN v.fichier_id IS NULL + THEN 0 + ELSE 1 END franchie, + CASE WHEN v.fichier_id IS NULL + THEN 0 + ELSE 1 END resultat, + 1 objectif + FROM these t + JOIN WF_ETAPE e ON e.code = 'DEPOT_VERSION_ARCHIVAGE' + LEFT JOIN V_SITU_DEPOT_VA v ON v.these_id = t.id + LEFT JOIN fichier f ON f.id = v.fichier_id + + UNION ALL + + -- + -- ARCHIVABILITE_VERSION_ARCHIVAGE : franchie si l'archivabilité de la version d'archivage a été testée + -- + SELECT + t.id AS these_id, + e.id AS etape_id, + e.code, + e.ORDRE, + CASE WHEN v.EST_VALIDE IS NULL + THEN 0 + ELSE 1 END franchie, + CASE WHEN v.EST_VALIDE IS NULL OR v.EST_VALIDE = 0 + THEN 0 + ELSE 1 END resultat, + 1 objectif + FROM these t + JOIN WF_ETAPE e ON e.code = 'ARCHIVABILITE_VERSION_ARCHIVAGE' + LEFT JOIN V_SITU_ARCHIVAB_VA v ON v.these_id = t.id + + UNION ALL + + -- + -- VERIFICATION_VERSION_ARCHIVAGE : franchie si vérification de la version originale effectuée (peu importe la réponse) + -- + SELECT + t.id AS these_id, + e.id AS etape_id, + e.code, + e.ORDRE, + CASE WHEN v.EST_CONFORME IS NULL + THEN 0 + ELSE 1 END franchie, + CASE WHEN v.EST_CONFORME IS NULL OR v.EST_CONFORME = 0 + THEN 0 + ELSE 1 END resultat, + 1 objectif + FROM these t + JOIN WF_ETAPE e ON e.code = 'VERIFICATION_VERSION_ARCHIVAGE' + LEFT JOIN V_SITU_VERIF_VA v ON v.these_id = t.id + + UNION ALL + + -- + -- RDV_BU_SAISIE_DOCTORANT : franchie si données doctorant saisies + -- + SELECT + t.id AS these_id, + e.id AS etape_id, + e.code, + e.ORDRE, + coalesce(v.ok, 0) franchie, + (CASE WHEN rdv.COORD_DOCTORANT IS NULL THEN 0 ELSE 1 END + + CASE WHEN rdv.DISPO_DOCTORANT IS NULL THEN 0 ELSE 1 END) resultat, + 2 objectif + FROM these t + JOIN WF_ETAPE e ON e.code = 'RDV_BU_SAISIE_DOCTORANT' + LEFT JOIN V_SITU_RDV_BU_SAISIE_DOCT v ON v.these_id = t.id + LEFT JOIN RDV_BU rdv ON rdv.THESE_ID = t.id + + UNION ALL + + -- + -- RDV_BU_VALIDATION_BU : franchie si /*données BU saisies ET*/ une validation BU existe + -- + SELECT + t.id AS these_id, + e.id AS etape_id, + e.code, + e.ORDRE, + /*coalesce(vs.ok, 0) **/ coalesce(v.valide, 0) franchie, + /*coalesce(vs.ok, 0) +*/ coalesce(v.valide, 0) resultat, + /*2*/1 objectif + FROM these t + JOIN WF_ETAPE e ON e.code = 'RDV_BU_VALIDATION_BU' + --LEFT JOIN V_SITU_RDV_BU_SAISIE_BU vs ON vs.these_id = t.id + LEFT JOIN V_SITU_RDV_BU_VALIDATION_BU v ON v.these_id = t.id + + UNION ALL + + -- + -- DEPOT_VERSION_ORIGINALE_CORRIGEE : franchie si version originale corrigée déposée + -- + SELECT + t.id AS these_id, + e.id AS etape_id, + e.code, + e.ORDRE, + CASE WHEN v.fichier_id IS NULL + THEN 0 + ELSE 1 END franchie, + CASE WHEN v.fichier_id IS NULL + THEN 0 + ELSE 1 END resultat, + 1 objectif + FROM these t + JOIN WF_ETAPE e ON e.code = 'DEPOT_VERSION_ORIGINALE_CORRIGEE' + LEFT JOIN V_SITU_DEPOT_VOC v ON v.these_id = t.id + + UNION ALL + + -- + -- AUTORISATION_DIFFUSION_THESE_VERSION_CORRIGEE : franchie si données saisies + -- + SELECT + t.id AS these_id, + e.id AS etape_id, + e.code, + e.ORDRE, + CASE WHEN v.diffusion_id IS NULL THEN 0 ELSE 1 END franchie, + CASE WHEN v.diffusion_id IS NULL THEN 0 ELSE 1 END resultat, + 1 objectif + FROM these t + JOIN WF_ETAPE e ON e.code = 'AUTORISATION_DIFFUSION_THESE_VERSION_CORRIGEE' + LEFT JOIN V_SITU_AUTORIS_DIFF_THESE_VOC v ON v.these_id = t.id + + UNION ALL + + -- + -- ATTESTATIONS_VERSION_CORRIGEE : franchie si données saisies + -- + SELECT + t.id AS these_id, + e.id AS etape_id, + e.code, + e.ORDRE, + CASE WHEN v.attestation_id IS NULL THEN 0 ELSE 1 END franchie, + CASE WHEN v.attestation_id IS NULL THEN 0 ELSE 1 END resultat, + 1 objectif + FROM these t + JOIN WF_ETAPE e ON e.code = 'ATTESTATIONS_VERSION_CORRIGEE' + LEFT JOIN V_SITU_ATTESTATIONS_VOC v ON v.these_id = t.id + + UNION ALL + + -- + -- ARCHIVABILITE_VERSION_ORIGINALE_CORRIGEE : franchie si l'archivabilité de la version originale corrigée a été testée + -- + SELECT + t.id AS these_id, + e.id AS etape_id, + e.code, + e.ORDRE, + CASE WHEN v.THESE_ID IS NULL THEN 0 ELSE 1 END franchie, + CASE WHEN v.EST_VALIDE IS NULL OR v.EST_VALIDE = 0 THEN 0 ELSE 1 END resultat, + 1 objectif + FROM these t + JOIN WF_ETAPE e ON e.code = 'ARCHIVABILITE_VERSION_ORIGINALE_CORRIGEE' + LEFT JOIN V_SITU_ARCHIVAB_VOC v ON v.these_id = t.id + + UNION ALL + + -- + -- DEPOT_VERSION_ARCHIVAGE_CORRIGEE : franchie si version d'archivage corrigée déposée + -- + SELECT + t.id AS these_id, + e.id AS etape_id, + e.code, + e.ORDRE, + CASE WHEN v.fichier_id IS NULL + THEN 0 + ELSE 1 END franchie, + CASE WHEN v.fichier_id IS NULL + THEN 0 + ELSE 1 END resultat, + 1 objectif + FROM these t + JOIN WF_ETAPE e ON e.code = 'DEPOT_VERSION_ARCHIVAGE_CORRIGEE' + LEFT JOIN V_SITU_DEPOT_VAC v ON v.these_id = t.id + LEFT JOIN fichier f ON f.id = v.fichier_id + + UNION ALL + + -- + -- ARCHIVABILITE_VERSION_ARCHIVAGE_CORRIGEE : franchie si la version d'archivage corrigée est archivable + -- + SELECT + t.id AS these_id, + e.id AS etape_id, + e.code, + e.ORDRE, + CASE WHEN v.EST_VALIDE = 1 THEN 1 ELSE 0 END franchie, + CASE WHEN v.EST_VALIDE = 1 THEN 1 ELSE 0 END resultat, + 1 objectif + FROM these t + JOIN WF_ETAPE e ON e.code = 'ARCHIVABILITE_VERSION_ARCHIVAGE_CORRIGEE' + LEFT JOIN V_SITU_ARCHIVAB_VAC v ON v.these_id = t.id + + UNION ALL + + -- + -- VERIFICATION_VERSION_ARCHIVAGE_CORRIGEE : franchie si la version corrigée est certifiée conforme + -- + SELECT + t.id AS these_id, + e.id AS etape_id, + e.code, + e.ORDRE, + CASE WHEN v.EST_CONFORME = 1 THEN 1 ELSE 0 END franchie, + CASE WHEN v.EST_CONFORME = 1 THEN 1 ELSE 0 END resultat, + 1 objectif + FROM these t + JOIN WF_ETAPE e ON e.code = 'VERIFICATION_VERSION_ARCHIVAGE_CORRIGEE' + LEFT JOIN V_SITU_VERIF_VAC v ON v.these_id = t.id + + UNION ALL + + -- + -- DEPOT_VERSION_CORRIGEE_VALIDATION_DOCTORANT : franchie si la validation attendue existe + -- + SELECT + t.id AS these_id, + e.id AS etape_id, + e.code, + e.ORDRE, + coalesce(v.valide, 0) franchie, + coalesce(v.valide, 0) resultat, + 1 objectif + FROM these t + JOIN WF_ETAPE e ON e.code = 'DEPOT_VERSION_CORRIGEE_VALIDATION_DOCTORANT' + LEFT JOIN V_SITU_DEPOT_VC_VALID_DOCT v ON v.these_id = t.id + + UNION ALL + + -- + -- DEPOT_VERSION_CORRIGEE_VALIDATION_DIRECTEUR : franchie si toutes les validations attendues existent + -- + select * from ( + WITH tmp AS ( + SELECT + these_id, + sum(valide) AS resultat, + count(valide) AS objectif + FROM V_SITU_DEPOT_VC_VALID_DIR + GROUP BY these_id + ) + SELECT + t.id AS these_id, + e.id AS etape_id, + e.code, + e.ORDRE, + case when coalesce(v.resultat, 0) = v.objectif then 1 else 0 end franchie, + coalesce(v.resultat, 0) resultat, + v.objectif + FROM these t + JOIN WF_ETAPE e ON e.code = 'DEPOT_VERSION_CORRIGEE_VALIDATION_DIRECTEUR' + LEFT JOIN tmp v ON v.these_id = t.id + ) + + UNION ALL + + -- + -- REMISE_EXEMPLAIRE_PAPIER_THESE_CORRIGEE : franchie pas pour le moment + -- + select * from ( + WITH tmp_last AS ( + SELECT + THESE_ID as these_id, + count(THESE_ID) AS resultat + FROM V_SITU_VERSION_PAPIER_CORRIGEE + GROUP BY THESE_ID + ) + SELECT + t.id AS these_id, + e.id AS etape_id, + e.code, + e.ORDRE, + coalesce(tl.resultat, 0) franchie, + 0, + 1 + FROM these t + JOIN WF_ETAPE e ON e.code = 'REMISE_EXEMPLAIRE_PAPIER_THESE_CORRIGEE' + LEFT JOIN tmp_last tl ON tl.these_id = t.id + ) + + ) t + JOIN V_WF_ETAPE_PERTIN v ON t.these_id = v.these_id AND t.etape_id = v.etape_id +; + +create or replace view V_SITU_AUTORIS_DIFF_THESE as +SELECT + d.these_id, + d.id AS diffusion_id +FROM DIFFUSION d +where d.VERSION_CORRIGEE = 0 and d.HISTO_DESTRUCTEUR_ID is null +; + +create or replace view V_SITU_AUTORIS_DIFF_THESE_VOC as +SELECT + d.these_id, + d.id AS diffusion_id +FROM DIFFUSION d + -- NB: on se base sur l'existence d'une version corrigée et pas sur t.CORRECTION_AUTORISEE qui peut revenir à null + JOIN FICHIER_THESE ft ON ft.THESE_ID = d.THESE_ID AND EST_ANNEXE = 0 AND EST_EXPURGE = 0 + JOIN FICHIER f ON ft.FICHIER_ID = f.id and f.HISTO_DESTRUCTION is null + JOIN VERSION_FICHIER v ON f.VERSION_FICHIER_ID = v.id AND v.CODE = 'VOC' +where d.VERSION_CORRIGEE = 1 and d.HISTO_DESTRUCTEUR_ID is null +; + +create or replace view V_SITU_ATTESTATIONS as +SELECT + a.these_id, + a.id AS attestation_id +FROM ATTESTATION a +where a.VERSION_CORRIGEE = 0 and a.HISTO_DESTRUCTEUR_ID is null +; + +create or replace view V_SITU_ATTESTATIONS_VOC as +SELECT + a.these_id, + a.id AS attestation_id +FROM ATTESTATION a + -- NB: on se base sur l'existence d'une version corrigée et pas sur t.CORRECTION_AUTORISEE qui peut revenir à null + JOIN FICHIER_THESE ft ON ft.THESE_ID = a.THESE_ID AND EST_ANNEXE = 0 AND EST_EXPURGE = 0 + JOIN FICHIER f ON ft.FICHIER_ID = f.id and f.HISTO_DESTRUCTION is null + JOIN VERSION_FICHIER v ON f.VERSION_FICHIER_ID = v.id AND v.CODE = 'VOC' +where a.VERSION_CORRIGEE = 1 and a.HISTO_DESTRUCTEUR_ID is null +; + + + +-- +-- Ajout des dates d'abandon et de transfert. +-- + +alter table TMP_THESE + add DAT_ABANDON date +/ +alter table TMP_THESE + add DAT_TRANSFERT_DEP date +/ +alter table THESE + add DATE_ABANDON date +/ +alter table THESE + add DATE_TRANSFERT date +/ + +create or replace view SRC_THESE as +select + null as id, + tmp.source_code as source_code, + src.id as source_id, + e.id as etablissement_id, + d.id as doctorant_id, + coalesce(ed_substit.id, ed.id) as ecole_doct_id, + coalesce(ur_substit.id, ur.id) as unite_rech_id, + ed.id as ecole_doct_id_orig, + ur.id as unite_rech_id_orig, + tmp.lib_ths as titre, + tmp.eta_ths as etat_these, + to_number(tmp.cod_neg_tre) as resultat, + tmp.lib_int1_dis as lib_disc, + tmp.dat_deb_ths as date_prem_insc, + tmp.ANNEE_UNIV_1ERE_INSC as annee_univ_1ere_insc, -- deprecated + tmp.dat_prev_sou as date_prev_soutenance, + tmp.dat_sou_ths as date_soutenance, + tmp.dat_fin_cfd_ths as date_fin_confid, + tmp.lib_etab_cotut as lib_etab_cotut, + tmp.lib_pays_cotut as lib_pays_cotut, + tmp.correction_possible as correc_autorisee, + tem_sou_aut_ths as soutenance_autoris, + dat_aut_sou_ths as date_autoris_soutenance, + tem_avenant_cotut as tem_avenant_cotut, + dat_abandon as date_abandon, + dat_transfert_dep as date_transfert +from tmp_these tmp + JOIN STRUCTURE s ON s.SOURCE_CODE = tmp.ETABLISSEMENT_ID + join etablissement e on e.structure_id = s.id + join source src on src.code = tmp.source_id + join doctorant d on d.source_code = tmp.doctorant_id + left join ecole_doct ed on ed.source_code = tmp.ecole_doct_id + left join unite_rech ur on ur.source_code = tmp.unite_rech_id + left join structure_substit ss_ed on ss_ed.from_structure_id = ed.structure_id + left join ecole_doct ed_substit on ed_substit.structure_id = ss_ed.to_structure_id + left join structure_substit ss_ur on ss_ur.from_structure_id = ur.structure_id + left join unite_rech ur_substit on ur_substit.structure_id = ss_ur.to_structure_id +/ + +create or replace view V_DIFF_THESE as +select diff."ID",diff."SOURCE_ID",diff."SOURCE_CODE",diff."IMPORT_ACTION",diff."ANNEE_UNIV_1ERE_INSC",diff."CORREC_AUTORISEE",diff."DATE_ABANDON",diff."DATE_AUTORIS_SOUTENANCE",diff."DATE_FIN_CONFID",diff."DATE_PREM_INSC",diff."DATE_PREV_SOUTENANCE",diff."DATE_SOUTENANCE",diff."DATE_TRANSFERT",diff."DOCTORANT_ID",diff."ECOLE_DOCT_ID",diff."ETABLISSEMENT_ID",diff."ETAT_THESE",diff."LIB_DISC",diff."LIB_ETAB_COTUT",diff."LIB_PAYS_COTUT",diff."RESULTAT",diff."SOUTENANCE_AUTORIS",diff."TEM_AVENANT_COTUT",diff."TITRE",diff."UNITE_RECH_ID",diff."U_ANNEE_UNIV_1ERE_INSC",diff."U_CORREC_AUTORISEE",diff."U_DATE_ABANDON",diff."U_DATE_AUTORIS_SOUTENANCE",diff."U_DATE_FIN_CONFID",diff."U_DATE_PREM_INSC",diff."U_DATE_PREV_SOUTENANCE",diff."U_DATE_SOUTENANCE",diff."U_DATE_TRANSFERT",diff."U_DOCTORANT_ID",diff."U_ECOLE_DOCT_ID",diff."U_ETABLISSEMENT_ID",diff."U_ETAT_THESE",diff."U_LIB_DISC",diff."U_LIB_ETAB_COTUT",diff."U_LIB_PAYS_COTUT",diff."U_RESULTAT",diff."U_SOUTENANCE_AUTORIS",diff."U_TEM_AVENANT_COTUT",diff."U_TITRE",diff."U_UNITE_RECH_ID" from (SELECT + COALESCE( D.id, S.id ) id, + COALESCE( S.source_id, D.source_id ) source_id, + COALESCE( S.source_code, D.source_code ) source_code, +CASE + WHEN S.source_code IS NOT NULL AND D.source_code IS NULL THEN 'insert' + WHEN S.source_code IS NOT NULL AND D.source_code IS NOT NULL AND (D.histo_destruction IS NULL OR D.histo_destruction > SYSDATE) THEN 'update' + WHEN S.source_code IS NULL AND D.source_code IS NOT NULL AND (D.histo_destruction IS NULL OR D.histo_destruction > SYSDATE) THEN 'delete' + WHEN S.source_code IS NOT NULL AND D.source_code IS NOT NULL AND D.histo_destruction IS NOT NULL AND D.histo_destruction <= SYSDATE THEN 'undelete' END import_action, + CASE WHEN S.source_code IS NULL AND D.source_code IS NOT NULL THEN D.ANNEE_UNIV_1ERE_INSC ELSE S.ANNEE_UNIV_1ERE_INSC END ANNEE_UNIV_1ERE_INSC, + CASE WHEN S.source_code IS NULL AND D.source_code IS NOT NULL THEN D.CORREC_AUTORISEE ELSE S.CORREC_AUTORISEE END CORREC_AUTORISEE, + CASE WHEN S.source_code IS NULL AND D.source_code IS NOT NULL THEN D.DATE_ABANDON ELSE S.DATE_ABANDON END DATE_ABANDON, + CASE WHEN S.source_code IS NULL AND D.source_code IS NOT NULL THEN D.DATE_AUTORIS_SOUTENANCE ELSE S.DATE_AUTORIS_SOUTENANCE END DATE_AUTORIS_SOUTENANCE, + CASE WHEN S.source_code IS NULL AND D.source_code IS NOT NULL THEN D.DATE_FIN_CONFID ELSE S.DATE_FIN_CONFID END DATE_FIN_CONFID, + CASE WHEN S.source_code IS NULL AND D.source_code IS NOT NULL THEN D.DATE_PREM_INSC ELSE S.DATE_PREM_INSC END DATE_PREM_INSC, + CASE WHEN S.source_code IS NULL AND D.source_code IS NOT NULL THEN D.DATE_PREV_SOUTENANCE ELSE S.DATE_PREV_SOUTENANCE END DATE_PREV_SOUTENANCE, + CASE WHEN S.source_code IS NULL AND D.source_code IS NOT NULL THEN D.DATE_SOUTENANCE ELSE S.DATE_SOUTENANCE END DATE_SOUTENANCE, + CASE WHEN S.source_code IS NULL AND D.source_code IS NOT NULL THEN D.DATE_TRANSFERT ELSE S.DATE_TRANSFERT END DATE_TRANSFERT, + CASE WHEN S.source_code IS NULL AND D.source_code IS NOT NULL THEN D.DOCTORANT_ID ELSE S.DOCTORANT_ID END DOCTORANT_ID, + CASE WHEN S.source_code IS NULL AND D.source_code IS NOT NULL THEN D.ECOLE_DOCT_ID ELSE S.ECOLE_DOCT_ID END ECOLE_DOCT_ID, + CASE WHEN S.source_code IS NULL AND D.source_code IS NOT NULL THEN D.ETABLISSEMENT_ID ELSE S.ETABLISSEMENT_ID END ETABLISSEMENT_ID, + CASE WHEN S.source_code IS NULL AND D.source_code IS NOT NULL THEN D.ETAT_THESE ELSE S.ETAT_THESE END ETAT_THESE, + CASE WHEN S.source_code IS NULL AND D.source_code IS NOT NULL THEN D.LIB_DISC ELSE S.LIB_DISC END LIB_DISC, + CASE WHEN S.source_code IS NULL AND D.source_code IS NOT NULL THEN D.LIB_ETAB_COTUT ELSE S.LIB_ETAB_COTUT END LIB_ETAB_COTUT, + CASE WHEN S.source_code IS NULL AND D.source_code IS NOT NULL THEN D.LIB_PAYS_COTUT ELSE S.LIB_PAYS_COTUT END LIB_PAYS_COTUT, + CASE WHEN S.source_code IS NULL AND D.source_code IS NOT NULL THEN D.RESULTAT ELSE S.RESULTAT END RESULTAT, + CASE WHEN S.source_code IS NULL AND D.source_code IS NOT NULL THEN D.SOUTENANCE_AUTORIS ELSE S.SOUTENANCE_AUTORIS END SOUTENANCE_AUTORIS, + CASE WHEN S.source_code IS NULL AND D.source_code IS NOT NULL THEN D.TEM_AVENANT_COTUT ELSE S.TEM_AVENANT_COTUT END TEM_AVENANT_COTUT, + CASE WHEN S.source_code IS NULL AND D.source_code IS NOT NULL THEN D.TITRE ELSE S.TITRE END TITRE, + CASE WHEN S.source_code IS NULL AND D.source_code IS NOT NULL THEN D.UNITE_RECH_ID ELSE S.UNITE_RECH_ID END UNITE_RECH_ID, + CASE WHEN D.ANNEE_UNIV_1ERE_INSC <> S.ANNEE_UNIV_1ERE_INSC OR (D.ANNEE_UNIV_1ERE_INSC IS NULL AND S.ANNEE_UNIV_1ERE_INSC IS NOT NULL) OR (D.ANNEE_UNIV_1ERE_INSC IS NOT NULL AND S.ANNEE_UNIV_1ERE_INSC IS NULL) THEN 1 ELSE 0 END U_ANNEE_UNIV_1ERE_INSC, + CASE WHEN D.CORREC_AUTORISEE <> S.CORREC_AUTORISEE OR (D.CORREC_AUTORISEE IS NULL AND S.CORREC_AUTORISEE IS NOT NULL) OR (D.CORREC_AUTORISEE IS NOT NULL AND S.CORREC_AUTORISEE IS NULL) THEN 1 ELSE 0 END U_CORREC_AUTORISEE, + CASE WHEN D.DATE_ABANDON <> S.DATE_ABANDON OR (D.DATE_ABANDON IS NULL AND S.DATE_ABANDON IS NOT NULL) OR (D.DATE_ABANDON IS NOT NULL AND S.DATE_ABANDON IS NULL) THEN 1 ELSE 0 END U_DATE_ABANDON, + CASE WHEN D.DATE_AUTORIS_SOUTENANCE <> S.DATE_AUTORIS_SOUTENANCE OR (D.DATE_AUTORIS_SOUTENANCE IS NULL AND S.DATE_AUTORIS_SOUTENANCE IS NOT NULL) OR (D.DATE_AUTORIS_SOUTENANCE IS NOT NULL AND S.DATE_AUTORIS_SOUTENANCE IS NULL) THEN 1 ELSE 0 END U_DATE_AUTORIS_SOUTENANCE, + CASE WHEN D.DATE_FIN_CONFID <> S.DATE_FIN_CONFID OR (D.DATE_FIN_CONFID IS NULL AND S.DATE_FIN_CONFID IS NOT NULL) OR (D.DATE_FIN_CONFID IS NOT NULL AND S.DATE_FIN_CONFID IS NULL) THEN 1 ELSE 0 END U_DATE_FIN_CONFID, + CASE WHEN D.DATE_PREM_INSC <> S.DATE_PREM_INSC OR (D.DATE_PREM_INSC IS NULL AND S.DATE_PREM_INSC IS NOT NULL) OR (D.DATE_PREM_INSC IS NOT NULL AND S.DATE_PREM_INSC IS NULL) THEN 1 ELSE 0 END U_DATE_PREM_INSC, + CASE WHEN D.DATE_PREV_SOUTENANCE <> S.DATE_PREV_SOUTENANCE OR (D.DATE_PREV_SOUTENANCE IS NULL AND S.DATE_PREV_SOUTENANCE IS NOT NULL) OR (D.DATE_PREV_SOUTENANCE IS NOT NULL AND S.DATE_PREV_SOUTENANCE IS NULL) THEN 1 ELSE 0 END U_DATE_PREV_SOUTENANCE, + CASE WHEN D.DATE_SOUTENANCE <> S.DATE_SOUTENANCE OR (D.DATE_SOUTENANCE IS NULL AND S.DATE_SOUTENANCE IS NOT NULL) OR (D.DATE_SOUTENANCE IS NOT NULL AND S.DATE_SOUTENANCE IS NULL) THEN 1 ELSE 0 END U_DATE_SOUTENANCE, + CASE WHEN D.DATE_TRANSFERT <> S.DATE_TRANSFERT OR (D.DATE_TRANSFERT IS NULL AND S.DATE_TRANSFERT IS NOT NULL) OR (D.DATE_TRANSFERT IS NOT NULL AND S.DATE_TRANSFERT IS NULL) THEN 1 ELSE 0 END U_DATE_TRANSFERT, + CASE WHEN D.DOCTORANT_ID <> S.DOCTORANT_ID OR (D.DOCTORANT_ID IS NULL AND S.DOCTORANT_ID IS NOT NULL) OR (D.DOCTORANT_ID IS NOT NULL AND S.DOCTORANT_ID IS NULL) THEN 1 ELSE 0 END U_DOCTORANT_ID, + CASE WHEN D.ECOLE_DOCT_ID <> S.ECOLE_DOCT_ID OR (D.ECOLE_DOCT_ID IS NULL AND S.ECOLE_DOCT_ID IS NOT NULL) OR (D.ECOLE_DOCT_ID IS NOT NULL AND S.ECOLE_DOCT_ID IS NULL) THEN 1 ELSE 0 END U_ECOLE_DOCT_ID, + CASE WHEN D.ETABLISSEMENT_ID <> S.ETABLISSEMENT_ID OR (D.ETABLISSEMENT_ID IS NULL AND S.ETABLISSEMENT_ID IS NOT NULL) OR (D.ETABLISSEMENT_ID IS NOT NULL AND S.ETABLISSEMENT_ID IS NULL) THEN 1 ELSE 0 END U_ETABLISSEMENT_ID, + CASE WHEN D.ETAT_THESE <> S.ETAT_THESE OR (D.ETAT_THESE IS NULL AND S.ETAT_THESE IS NOT NULL) OR (D.ETAT_THESE IS NOT NULL AND S.ETAT_THESE IS NULL) THEN 1 ELSE 0 END U_ETAT_THESE, + CASE WHEN D.LIB_DISC <> S.LIB_DISC OR (D.LIB_DISC IS NULL AND S.LIB_DISC IS NOT NULL) OR (D.LIB_DISC IS NOT NULL AND S.LIB_DISC IS NULL) THEN 1 ELSE 0 END U_LIB_DISC, + CASE WHEN D.LIB_ETAB_COTUT <> S.LIB_ETAB_COTUT OR (D.LIB_ETAB_COTUT IS NULL AND S.LIB_ETAB_COTUT IS NOT NULL) OR (D.LIB_ETAB_COTUT IS NOT NULL AND S.LIB_ETAB_COTUT IS NULL) THEN 1 ELSE 0 END U_LIB_ETAB_COTUT, + CASE WHEN D.LIB_PAYS_COTUT <> S.LIB_PAYS_COTUT OR (D.LIB_PAYS_COTUT IS NULL AND S.LIB_PAYS_COTUT IS NOT NULL) OR (D.LIB_PAYS_COTUT IS NOT NULL AND S.LIB_PAYS_COTUT IS NULL) THEN 1 ELSE 0 END U_LIB_PAYS_COTUT, + CASE WHEN D.RESULTAT <> S.RESULTAT OR (D.RESULTAT IS NULL AND S.RESULTAT IS NOT NULL) OR (D.RESULTAT IS NOT NULL AND S.RESULTAT IS NULL) THEN 1 ELSE 0 END U_RESULTAT, + CASE WHEN D.SOUTENANCE_AUTORIS <> S.SOUTENANCE_AUTORIS OR (D.SOUTENANCE_AUTORIS IS NULL AND S.SOUTENANCE_AUTORIS IS NOT NULL) OR (D.SOUTENANCE_AUTORIS IS NOT NULL AND S.SOUTENANCE_AUTORIS IS NULL) THEN 1 ELSE 0 END U_SOUTENANCE_AUTORIS, + CASE WHEN D.TEM_AVENANT_COTUT <> S.TEM_AVENANT_COTUT OR (D.TEM_AVENANT_COTUT IS NULL AND S.TEM_AVENANT_COTUT IS NOT NULL) OR (D.TEM_AVENANT_COTUT IS NOT NULL AND S.TEM_AVENANT_COTUT IS NULL) THEN 1 ELSE 0 END U_TEM_AVENANT_COTUT, + CASE WHEN D.TITRE <> S.TITRE OR (D.TITRE IS NULL AND S.TITRE IS NOT NULL) OR (D.TITRE IS NOT NULL AND S.TITRE IS NULL) THEN 1 ELSE 0 END U_TITRE, + CASE WHEN D.UNITE_RECH_ID <> S.UNITE_RECH_ID OR (D.UNITE_RECH_ID IS NULL AND S.UNITE_RECH_ID IS NOT NULL) OR (D.UNITE_RECH_ID IS NOT NULL AND S.UNITE_RECH_ID IS NULL) THEN 1 ELSE 0 END U_UNITE_RECH_ID +FROM + THESE D + FULL JOIN SRC_THESE S ON S.source_id = D.source_id AND S.source_code = D.source_code +WHERE + (S.source_code IS NOT NULL AND D.source_code IS NOT NULL AND D.histo_destruction IS NOT NULL AND D.histo_destruction <= SYSDATE) + OR (S.source_code IS NULL AND D.source_code IS NOT NULL AND (D.histo_destruction IS NULL OR D.histo_destruction > SYSDATE)) + OR (S.source_code IS NOT NULL AND D.source_code IS NULL) + OR D.ANNEE_UNIV_1ERE_INSC <> S.ANNEE_UNIV_1ERE_INSC OR (D.ANNEE_UNIV_1ERE_INSC IS NULL AND S.ANNEE_UNIV_1ERE_INSC IS NOT NULL) OR (D.ANNEE_UNIV_1ERE_INSC IS NOT NULL AND S.ANNEE_UNIV_1ERE_INSC IS NULL) + OR D.CORREC_AUTORISEE <> S.CORREC_AUTORISEE OR (D.CORREC_AUTORISEE IS NULL AND S.CORREC_AUTORISEE IS NOT NULL) OR (D.CORREC_AUTORISEE IS NOT NULL AND S.CORREC_AUTORISEE IS NULL) + OR D.DATE_ABANDON <> S.DATE_ABANDON OR (D.DATE_ABANDON IS NULL AND S.DATE_ABANDON IS NOT NULL) OR (D.DATE_ABANDON IS NOT NULL AND S.DATE_ABANDON IS NULL) + OR D.DATE_AUTORIS_SOUTENANCE <> S.DATE_AUTORIS_SOUTENANCE OR (D.DATE_AUTORIS_SOUTENANCE IS NULL AND S.DATE_AUTORIS_SOUTENANCE IS NOT NULL) OR (D.DATE_AUTORIS_SOUTENANCE IS NOT NULL AND S.DATE_AUTORIS_SOUTENANCE IS NULL) + OR D.DATE_FIN_CONFID <> S.DATE_FIN_CONFID OR (D.DATE_FIN_CONFID IS NULL AND S.DATE_FIN_CONFID IS NOT NULL) OR (D.DATE_FIN_CONFID IS NOT NULL AND S.DATE_FIN_CONFID IS NULL) + OR D.DATE_PREM_INSC <> S.DATE_PREM_INSC OR (D.DATE_PREM_INSC IS NULL AND S.DATE_PREM_INSC IS NOT NULL) OR (D.DATE_PREM_INSC IS NOT NULL AND S.DATE_PREM_INSC IS NULL) + OR D.DATE_PREV_SOUTENANCE <> S.DATE_PREV_SOUTENANCE OR (D.DATE_PREV_SOUTENANCE IS NULL AND S.DATE_PREV_SOUTENANCE IS NOT NULL) OR (D.DATE_PREV_SOUTENANCE IS NOT NULL AND S.DATE_PREV_SOUTENANCE IS NULL) + OR D.DATE_SOUTENANCE <> S.DATE_SOUTENANCE OR (D.DATE_SOUTENANCE IS NULL AND S.DATE_SOUTENANCE IS NOT NULL) OR (D.DATE_SOUTENANCE IS NOT NULL AND S.DATE_SOUTENANCE IS NULL) + OR D.DATE_TRANSFERT <> S.DATE_TRANSFERT OR (D.DATE_TRANSFERT IS NULL AND S.DATE_TRANSFERT IS NOT NULL) OR (D.DATE_TRANSFERT IS NOT NULL AND S.DATE_TRANSFERT IS NULL) + OR D.DOCTORANT_ID <> S.DOCTORANT_ID OR (D.DOCTORANT_ID IS NULL AND S.DOCTORANT_ID IS NOT NULL) OR (D.DOCTORANT_ID IS NOT NULL AND S.DOCTORANT_ID IS NULL) + OR D.ECOLE_DOCT_ID <> S.ECOLE_DOCT_ID OR (D.ECOLE_DOCT_ID IS NULL AND S.ECOLE_DOCT_ID IS NOT NULL) OR (D.ECOLE_DOCT_ID IS NOT NULL AND S.ECOLE_DOCT_ID IS NULL) + OR D.ETABLISSEMENT_ID <> S.ETABLISSEMENT_ID OR (D.ETABLISSEMENT_ID IS NULL AND S.ETABLISSEMENT_ID IS NOT NULL) OR (D.ETABLISSEMENT_ID IS NOT NULL AND S.ETABLISSEMENT_ID IS NULL) + OR D.ETAT_THESE <> S.ETAT_THESE OR (D.ETAT_THESE IS NULL AND S.ETAT_THESE IS NOT NULL) OR (D.ETAT_THESE IS NOT NULL AND S.ETAT_THESE IS NULL) + OR D.LIB_DISC <> S.LIB_DISC OR (D.LIB_DISC IS NULL AND S.LIB_DISC IS NOT NULL) OR (D.LIB_DISC IS NOT NULL AND S.LIB_DISC IS NULL) + OR D.LIB_ETAB_COTUT <> S.LIB_ETAB_COTUT OR (D.LIB_ETAB_COTUT IS NULL AND S.LIB_ETAB_COTUT IS NOT NULL) OR (D.LIB_ETAB_COTUT IS NOT NULL AND S.LIB_ETAB_COTUT IS NULL) + OR D.LIB_PAYS_COTUT <> S.LIB_PAYS_COTUT OR (D.LIB_PAYS_COTUT IS NULL AND S.LIB_PAYS_COTUT IS NOT NULL) OR (D.LIB_PAYS_COTUT IS NOT NULL AND S.LIB_PAYS_COTUT IS NULL) + OR D.RESULTAT <> S.RESULTAT OR (D.RESULTAT IS NULL AND S.RESULTAT IS NOT NULL) OR (D.RESULTAT IS NOT NULL AND S.RESULTAT IS NULL) + OR D.SOUTENANCE_AUTORIS <> S.SOUTENANCE_AUTORIS OR (D.SOUTENANCE_AUTORIS IS NULL AND S.SOUTENANCE_AUTORIS IS NOT NULL) OR (D.SOUTENANCE_AUTORIS IS NOT NULL AND S.SOUTENANCE_AUTORIS IS NULL) + OR D.TEM_AVENANT_COTUT <> S.TEM_AVENANT_COTUT OR (D.TEM_AVENANT_COTUT IS NULL AND S.TEM_AVENANT_COTUT IS NOT NULL) OR (D.TEM_AVENANT_COTUT IS NOT NULL AND S.TEM_AVENANT_COTUT IS NULL) + OR D.TITRE <> S.TITRE OR (D.TITRE IS NULL AND S.TITRE IS NOT NULL) OR (D.TITRE IS NOT NULL AND S.TITRE IS NULL) + OR D.UNITE_RECH_ID <> S.UNITE_RECH_ID OR (D.UNITE_RECH_ID IS NULL AND S.UNITE_RECH_ID IS NOT NULL) OR (D.UNITE_RECH_ID IS NOT NULL AND S.UNITE_RECH_ID IS NULL) +) diff JOIN source on source.id = diff.source_id WHERE import_action IS NOT NULL AND source.importable = 1 +/ diff --git a/doc/release-notes/1.4.0/02-data-1.4.0.sql b/doc/release-notes/1.4.0/02-data-1.4.0.sql new file mode 100644 index 0000000000000000000000000000000000000000..027b05e8003a012088d6fcd7a8eb1517c1ec9d27 --- /dev/null +++ b/doc/release-notes/1.4.0/02-data-1.4.0.sql @@ -0,0 +1,11 @@ + +-- +-- Inversion des étapes du WF Diffusion et Attestations. +-- + +update WF_ETAPE set ORDRE = 13 where CODE = 'AUTORISATION_DIFFUSION_THESE' ; +update WF_ETAPE set ORDRE = 18 where CODE = 'ATTESTATIONS' ; +update WF_ETAPE set ORDRE = 213 where CODE = 'AUTORISATION_DIFFUSION_THESE_VERSION_CORRIGEE' ; +update WF_ETAPE set ORDRE = 218 where CODE = 'ATTESTATIONS_VERSION_CORRIGEE' ; + +-- COMMIT ; diff --git a/doc/release-notes/v1.4.0.md b/doc/release-notes/v1.4.0.md index a32495d23e8ab38259a2d59e5f65a71f3cbe5838..c90f4159e0962c5c90d116e5ebab1748397d2b92 100644 --- a/doc/release-notes/v1.4.0.md +++ b/doc/release-notes/v1.4.0.md @@ -16,4 +16,4 @@ bash ./install.sh ## 2. Dans la base de données -Rien à faire \ No newline at end of file +Exécuter dans l'ordre les scripts SQL présents dans le répertoire [1.4.0](1.4.0). diff --git a/module/Application/config/module.config.php b/module/Application/config/module.config.php index 9f6a1ba3792e60047b82dd8860528ddf121235b8..a23ef1c5240ec3cc66138263096ed3baa4f593b6 100755 --- a/module/Application/config/module.config.php +++ b/module/Application/config/module.config.php @@ -279,6 +279,7 @@ return array( ], 'stylesheets' => [ '050_bootstrap-theme' => false, + '100_charte' => '/css/charte.css', ], 'printable_stylesheets' => [ ], diff --git a/module/Application/config/others/these.config.php b/module/Application/config/others/these.config.php index 7fb59bfcb5279f6940ac340dceaf71d342650d3f..3f27ca977e47963e5f28de0ba85a77bae3ec37fd 100755 --- a/module/Application/config/others/these.config.php +++ b/module/Application/config/others/these.config.php @@ -1142,6 +1142,39 @@ return [ ], ], + [ + //////////////////////////////////////////////////////////////////////////////////////////////////////// + 'id' => DiffusionMessages::AUTORIS_DIFFUSION_FORM_LAIUS, + //////////////////////////////////////////////////////////////////////////////////////////////////////// + 'data' => [ + "" => + function (Diffusion $d) { + return $d->getAutorisMel() === null; + }, + + "<p>La thèse est consultable sur internet via le portail national des thèses (<a href=\"http://www.theses.fr\">www.theses.fr</a>), " . + "sans authentification. La thèse peut également être accessible depuis des plateformes de diffusion choisies par " . + "Normandie Université dans le cadre de sa politique de valorisation scientifique " . + "(exemple : <a href=\"http://tel.archives-ouvertes.fr\">http://tel.archives-ouvertes.fr</a>). </p>" => + function (Diffusion $d) { + return $d->getAutorisMel() === (int)Diffusion::AUTORISATION_OUI_IMMEDIAT; + }, + + "<p>Pendant cette période, la diffusion de la thèse est uniquement assurée dans l’établissement de préparation du Doctorat et au sein de l’ensemble de la communauté universitaire, sans mise en ligne sur internet. Un exemplaire imprimé ou une version numérique en PDF est accessible dans toute bibliothèque, en faisant la demande dans le cadre du prêt entre bibliothèques. La consultation est alors uniquement ouverte à une personne appartenant à la communauté universitaire, avec engagement de ne pas rediffuser la thèse à des tiers non membres de la communauté universitaire.</p>" . + "<p>La diffusion en ligne de la thèse est ensuite effectuée automatiquement le lendemain de l’expiration du délai, sans préavis. Une demande de prolongation de l’embargo auprès du service de documentation concerné est possible, mais doit anticiper le délai de traitement de la demande (un mois, hors périodes de fermeture).</p>" => + function (Diffusion $d) { + return + $d->getAutorisMel() === (int)Diffusion::AUTORISATION_OUI_EMBARGO; + }, + + "<p>La diffusion de la thèse est uniquement assurée dans l’établissement de préparation du doctorat et au sein de l’ensemble de la communauté universitaire, sans mise en ligne sur internet. L’auteur peut toutefois revenir sur sa décision à tout moment par avenant à la présente convention.</p>" . + "<p>Dans tous les cas, un exemplaire imprimé ou une version numérique en PDF est accessible dans toute bibliothèque, en faisant la demande dans le cadre du prêt entre bibliothèques. La consultation est alors uniquement ouverte à une personne appartenant à la communauté universitaire, avec engagement de ne pas rediffuser la thèse à des tiers non membres de la communauté universitaire.</p>" => + function (Diffusion $d) { + return $d->getAutorisMel() === (int)Diffusion::AUTORISATION_NON; + }, + ], + ], + [ //////////////////////////////////////////////////////////////////////////////////////////////////////// 'id' => DiffusionMessages::AUTORIS_MISE_EN_LIGNE_QUESTION, @@ -1251,32 +1284,17 @@ return [ return $d->getAutorisMel() === null; }, - "<p>La thèse est consultable sur internet via le portail national des thèses (<a href=\"http://www.theses.fr\">www.theses.fr</a>), " . - "sans authentification. La thèse peut également être accessible depuis des plateformes de diffusion choisies par " . - "Normandie Université dans le cadre de sa politique de valorisation scientifique " . - "(exemple : <a href=\"http://tel.archives-ouvertes.fr\">http://tel.archives-ouvertes.fr</a>). </p>" => + "<p>La loi applicable à cette présente convention est la loi française. Le tribunal compétent pour juger de tout contentieux lié au présent contrat est le tribunal administratif dans le ressort duquel l'établissement de préparation du doctorat a son siège.</p>" => function (Diffusion $d) { return $d->getAutorisMel() === (int)Diffusion::AUTORISATION_OUI_IMMEDIAT; }, - "<p>Pendant cette période, la diffusion de la thèse est uniquement assurée dans l'établissement de " . - "préparation du doctorat et au sein de l’ensemble de la communauté universitaire sans mise en ligne sur internet. " . - "Celle-ci est ensuite effectuée automatiquement le lendemain de l'expiration du délai, sans préavis. " . - "Une demande de prolongation de l'embargo auprès du service de documentation concerné esrt possible, " . - "mais doit anticiper le délai de traitement de la demande. </p>" . - "<p>Dès la fin de l'embargo, la thèse est consultable sur internet via le portail national des thèses (<a href=\"http://www.theses.fr\">www.theses.fr</a>), " . - "sans authentification. La thèse pourra également être accessible depuis des plateformes de diffusion choisies par " . - "Normandie Université dans le cadre de sa politique de valorisation scientifique " . - "(exemple : <a href=\"http://tel.archives-ouvertes.fr\">http://tel.archives-ouvertes.fr</a>). </p>" => + "<p>La thèse est disponible en version imprimée au service de documentation de l’établissement d’accueil et en PDF pour l'ensemble de la communauté universitaire (en intranet ou dans le cadre du Prêt Entre Bibliothèques).</p>" . + "<p>La loi applicable à cette présente convention est la loi française. Le tribunal compétent pour juger de tout contentieux lié au présent contrat est le tribunal administratif dans le ressort duquel l'établissement de préparation du doctorat a son siège.</p>" => function (Diffusion $d) { - return $d->getAutorisMel() === (int)Diffusion::AUTORISATION_OUI_EMBARGO; - }, - - "<p>La diffusion de la thèse est uniquement assurée dans l'établissement de préparation du doctorat et " . - "au sein de l'ensemble de la communauté universitaire, sans mise en ligne sur internet. " . - "L'auteur peut toutefois revenir sur sa décision à tout moment par avenant à la présente convention.</p>" => - function (Diffusion $d) { - return $d->getAutorisMel() === (int)Diffusion::AUTORISATION_NON; + return + $d->getAutorisMel() === (int)Diffusion::AUTORISATION_OUI_EMBARGO || + $d->getAutorisMel() === (int)Diffusion::AUTORISATION_NON; }, ], ], diff --git a/module/Application/config/others/utilisateur.config.php b/module/Application/config/others/utilisateur.config.php index ee2a72a98ebbde843248ead914a675da5745e85a..30766de517c79ae25adc54cc5dd540ef3971a7b5 100755 --- a/module/Application/config/others/utilisateur.config.php +++ b/module/Application/config/others/utilisateur.config.php @@ -1,6 +1,7 @@ <?php use Application\Controller\Factory\UtilisateurControllerFactory; +use Application\Controller\UtilisateurController; use Application\Form\CreationUtilisateurForm; use Application\Form\CreationUtilisateurFromIndividuForm; use Application\Form\Factory\CreationUtilisateurFormFactory; @@ -101,15 +102,6 @@ return [ ], ], ], - 'ajouter-pour-individu' => [ - 'type' => Segment::class, - 'options' => [ - 'route' => '/ajouter-pour-individu/:individu', - 'defaults' => [ - 'action' => 'ajouterFromIndividu', - ], - ], - ], 'creer-compte-local-individu' => [ 'type' => Segment::class, 'options' => [ diff --git a/module/Application/src/Application/Assertion/These/TheseEntityAssertion.php b/module/Application/src/Application/Assertion/These/TheseEntityAssertion.php index e46d84c9638b0f2b6c1b8add5bfa521461181cbf..3b06d7c2e9381fa173991cfb262c08f3bb727beb 100644 --- a/module/Application/src/Application/Assertion/These/TheseEntityAssertion.php +++ b/module/Application/src/Application/Assertion/These/TheseEntityAssertion.php @@ -70,10 +70,9 @@ class TheseEntityAssertion extends GeneratedTheseEntityAssertion return !empty($validations); } - protected function isInfosBuSaisies() { - return ($rdvBu = $this->these->getRdvBu()) && $rdvBu->isInfosBuSaisies(); + return $this->theseService->isInfosBuSaisies($this->these); } protected function isExisteValidationRdvBu() diff --git a/module/Application/src/Application/Command/AbstractCommand.php b/module/Application/src/Application/Command/AbstractCommand.php index 39767c3b0b4048a5526f3b32d75b5cd587773a93..f2c56494e620a50aa94f73ff864d9499403e524b 100644 --- a/module/Application/src/Application/Command/AbstractCommand.php +++ b/module/Application/src/Application/Command/AbstractCommand.php @@ -2,7 +2,7 @@ namespace Application\Command; -use Retraitement\Exception\TimedOutCommandException; +use Application\Command\Exception\TimedOutCommandException; use UnicaenApp\Exception\LogicException; use UnicaenApp\Exception\RuntimeException; @@ -44,6 +44,7 @@ abstract class AbstractCommand implements CommandInterface /** * @return string + * @throws TimedOutCommandException Si un timeout d'exécution a été défini et qu'il a expiré */ public function execute() { @@ -73,23 +74,6 @@ abstract class AbstractCommand implements CommandInterface return $output; } - /** - * Exécute la commande avec une limite de temps d'exécution. - * - * @param string $timeoutValue Ex: '60s', '1m', '2h', '1d'. Cf. "man timeout". - * @return string - */ - public function executeWithTimeout($timeoutValue = '20s') - { - if (!$this->commandLine) { - throw new LogicException("La ligne de commande n'a pas été générée, utilisez generate()."); - } - - $this->commandLine = "timeout --signal=HUP $timeoutValue " . $this->commandLine; - - return $this->execute(); - } - /** * @return int|null */ diff --git a/module/Application/src/Application/Command/CommandInterface.php b/module/Application/src/Application/Command/CommandInterface.php index 5f5ebc07e925320653fa92d53f80f0316f6f7265..57e065ba2a1452f07737de7f1c47761227388bc9 100644 --- a/module/Application/src/Application/Command/CommandInterface.php +++ b/module/Application/src/Application/Command/CommandInterface.php @@ -2,6 +2,7 @@ namespace Application\Command; +use Application\Command\Exception\TimedOutCommandException; use UnicaenApp\Exception\RuntimeException; interface CommandInterface @@ -37,6 +38,7 @@ interface CommandInterface /** * @return string + * @throws TimedOutCommandException Si un timeout d'exécution a été défini et qu'il a expiré */ public function execute(); diff --git a/module/Retraitement/src/Retraitement/Exception/TimedOutCommandException.php b/module/Application/src/Application/Command/Exception/TimedOutCommandException.php similarity index 66% rename from module/Retraitement/src/Retraitement/Exception/TimedOutCommandException.php rename to module/Application/src/Application/Command/Exception/TimedOutCommandException.php index fa1fcf1ec8f000910d7b91237b70cb3689ba9e98..0a6ada4b9079deca689fd6368845eab5f06b483d 100644 --- a/module/Retraitement/src/Retraitement/Exception/TimedOutCommandException.php +++ b/module/Application/src/Application/Command/Exception/TimedOutCommandException.php @@ -1,16 +1,14 @@ <?php -namespace Retraitement\Exception; +namespace Application\Command\Exception; -use UnicaenApp\Exception\RuntimeException; - -class TimedOutCommandException extends RuntimeException +class TimedOutCommandException extends \Exception { private $timeout; /** * @param string $userFirendlyTimeout - * @return TimedOutCommandException + * @return $this */ public function setTimeout($userFirendlyTimeout) { diff --git a/module/Application/src/Application/Controller/ExportController.php b/module/Application/src/Application/Controller/ExportController.php index 5dd68d7ac346fa1776041d84d2ba5ddbead8e0f7..f245687d253db299c3e7225184ecd81c15cb17bd 100644 --- a/module/Application/src/Application/Controller/ExportController.php +++ b/module/Application/src/Application/Controller/ExportController.php @@ -79,13 +79,21 @@ class ExportController extends AbstractController foreach ($domaines as $domaine) $liste[] = $domaine->getLibelle(); return implode(",", $liste); }, + //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(); }, 'Date de dépôt version initiale' => function (These $these) { $file = $these->hasVersionInitiale(); if ($file) return $file->getFichier()->getHistoCreation()->format('d/m/Y'); }, 'Date de dépôt version corigée' => function (These $these) { $file = $these->hasVersionCorrigee(); if ($file) return $file->getFichier()->getHistoCreation()->format('d/m/Y'); }, + 'Durée en mois de la thèse' => function (These $these) { if ($these->getDatePremiereInscription() !== null AND $these->getDateSoutenance() !== null) + return number_format(($these->getDateSoutenance())->diff($these->getDatePremiereInscription())->format('%a')/30.5, 2); + else return ""; + }, + //Flags 'Etat de la thèse' => function (These $these) { return $these->getEtatTheseToString();}, 'Autorisation à soutenir' => function (These $these) { return $these->getSoutenanceAutorisee();}, diff --git a/module/Application/src/Application/Controller/FichierTheseController.php b/module/Application/src/Application/Controller/FichierTheseController.php index c636167881569d2ef4283d489531d1669329d6ae..fb96f3d33245526830d5be4a09b589d0067ddb3f 100644 --- a/module/Application/src/Application/Controller/FichierTheseController.php +++ b/module/Application/src/Application/Controller/FichierTheseController.php @@ -2,9 +2,9 @@ namespace Application\Controller; +use Application\Command\Exception\TimedOutCommandException; use Application\Entity\Db\Fichier; use Application\Entity\Db\FichierThese; -use Application\Entity\Db\NatureFichier; use Application\Entity\Db\These; use Application\Entity\Db\VersionFichier; use Application\EventRouterReplacerAwareTrait; @@ -445,7 +445,11 @@ class FichierTheseController extends AbstractController } $pdcData = $this->theseService->fetchInformationsPageDeCouverture($these); - $outputFilePath = $this->fichierTheseService->fusionnerPdcEtThese($these, $pdcData, $versionFichier, $removeFirstPage); + try { + $outputFilePath = $this->fichierTheseService->fusionnerPdcEtThese($these, $pdcData, $versionFichier, $removeFirstPage); + } catch (TimedOutCommandException $e) { + // n'arrive jamais car aucun timeout n'a été spécifié lors de l'appel à fusionnerPdcEtThese() + } $this->eventRouterReplacer->replaceEventRouter($this->getEvent()); diff --git a/module/Application/src/Application/Controller/Plugin/Url/UrlThesePlugin.php b/module/Application/src/Application/Controller/Plugin/Url/UrlThesePlugin.php index e8f114ae8ac741f1f1938a7d7117d169d8eed15f..fa7cf846cecda079a64f6a35d786f75218a6ff7b 100644 --- a/module/Application/src/Application/Controller/Plugin/Url/UrlThesePlugin.php +++ b/module/Application/src/Application/Controller/Plugin/Url/UrlThesePlugin.php @@ -26,9 +26,9 @@ use Zend\Mvc\Controller\Plugin\AbstractPlugin; * @method modifierMetadonneesUrl(These $these) * @method modifierCorrecAutoriseeForceeUrl(These $these) * @method certifierConformiteTheseRetraiteUrl(These $these, $version) - * @method modifierAttestationUrl(These $these) - * @method modifierDiffusionUrl(These $these) - * @method exporterConventionMiseEnLigneUrl(These $these) + * @method modifierAttestationUrl(These $these, VersionFichier $version) + * @method modifierDiffusionUrl(These $these, VersionFichier $version) + * @method exporterConventionMiseEnLigneUrl(These $these, VersionFichier $version) * @method modifierRdvBuUrl(These $these) * @method validerRdvBuUrl(These $these) * @method devaliderRdvBuUrl(These $these) diff --git a/module/Application/src/Application/Controller/StructureConcreteController.php b/module/Application/src/Application/Controller/StructureConcreteController.php index 729a28bc594a7dc7d94692674ae72deeb90befbb..62a2456a4de5c5dd9242f3eb79b09b3d4fff5d25 100644 --- a/module/Application/src/Application/Controller/StructureConcreteController.php +++ b/module/Application/src/Application/Controller/StructureConcreteController.php @@ -278,7 +278,7 @@ abstract class StructureConcreteController extends AbstractController $structureId = $this->params()->fromRoute("structure"); $this->supprimerLogoStructure(); - return $this->redirect()->toRoute($this->routeName, [], ['query' => ['selected' => $structureId], "fragment" => $structureId], true); + return $this->redirect()->toRoute($this->routeName."/information", [], ['query' => ['selected' => $structureId], "fragment" => $structureId], true); } /** diff --git a/module/Application/src/Application/Controller/TheseController.php b/module/Application/src/Application/Controller/TheseController.php index d5efdb5ab2252a53a7ff7f285e452c113d0f460b..30ff5b2454f396117a40f5ce16deee7c64e20395 100755 --- a/module/Application/src/Application/Controller/TheseController.php +++ b/module/Application/src/Application/Controller/TheseController.php @@ -2,6 +2,7 @@ namespace Application\Controller; +use Application\Command\Exception\TimedOutCommandException; use Application\Entity\Db\Attestation; use Application\Entity\Db\Diffusion; use Application\Entity\Db\FichierThese; @@ -46,7 +47,6 @@ use Doctrine\ORM\OptimisticLockException; use Doctrine\ORM\Tools\Pagination\Paginator; use DoctrineORMModule\Paginator\Adapter\DoctrinePaginator; use Import\Service\Traits\ImportServiceAwareTrait; -use Retraitement\Exception\TimedOutCommandException; use UnicaenApp\Exception\RuntimeException; use UnicaenApp\Service\EntityManagerAwareTrait; use UnicaenApp\Service\MessageCollectorAwareTrait; @@ -253,8 +253,8 @@ class TheseController extends AbstractController $utilisateurs = []; foreach ($these->getActeurs() as $acteur) { - $utilisateur = $this->utilisateurService->getRepository()->findByIndividu($acteur->getIndividu()); - $utilisateurs[$acteur->getId()] = $utilisateur; + $utilisateursTrouves = $this->utilisateurService->getRepository()->findByIndividu($acteur->getIndividu()); // ok + $utilisateurs[$acteur->getId()] = $utilisateursTrouves; } //TODO JP remplacer dans modifierPersopassUrl(); @@ -373,10 +373,9 @@ class TheseController extends AbstractController 'attestationUrl' => $this->urlThese()->attestationThese($these, $codeVersion), 'diffusionUrl' => $this->urlThese()->diffusionThese($these, $codeVersion), 'nextStepUrl' => $this->urlWorkflow()->nextStepBox($these, null, [ - WfEtape::CODE_DEPOT_VERSION_ORIGINALE, - WfEtape::CODE_DEPOT_VERSION_ORIGINALE_CORRIGEE, - WfEtape::CODE_ATTESTATIONS, - WfEtape::CODE_AUTORISATION_DIFFUSION_THESE, + $versionCorrigee ? WfEtape::CODE_DEPOT_VERSION_ORIGINALE_CORRIGEE : WfEtape::CODE_DEPOT_VERSION_ORIGINALE, + $versionCorrigee ? WfEtape::CODE_ATTESTATIONS_VERSION_CORRIGEE : WfEtape::CODE_ATTESTATIONS, + $versionCorrigee ? WfEtape::CODE_AUTORISATION_DIFFUSION_THESE_VERSION_CORRIGEE : WfEtape::CODE_AUTORISATION_DIFFUSION_THESE, WfEtape::PSEUDO_ETAPE_FINALE, ]), ]); @@ -496,6 +495,7 @@ class TheseController extends AbstractController { $estDoctorant = (bool) $this->userContextService->getSelectedRoleDoctorant(); $these = $this->requestedThese(); + $version = $this->fichierTheseService->fetchVersionFichier(VersionFichier::CODE_ORIG); $asynchronous = $this->params()->fromRoute('asynchronous'); $versionArchivable = $this->fichierTheseService->getRepository()->getVersionArchivable($these); @@ -507,6 +507,7 @@ class TheseController extends AbstractController $view = new ViewModel([ 'these' => $these, + 'diffusion' => $these->getDiffusionForVersion($version), 'estDoctorant' => $estDoctorant, 'modifierUrl' => $this->urlThese()->modifierRdvBuUrl($these), 'validerUrl' => $this->urlThese()->validerRdvBuUrl($these), @@ -610,6 +611,7 @@ class TheseController extends AbstractController { $these = $this->requestedThese(); $estDoctorant = (bool) $this->userContextService->getSelectedRoleDoctorant(); + $isExemplPapierFourniPertinent = $this->theseService->isExemplPapierFourniPertinent($these); $validationsPdc = $this->validationService->getRepository()->findValidationByCodeAndThese(TypeValidation::CODE_PAGE_DE_COUVERTURE, $these); $pageCouvValidee = !empty($validationsPdc); @@ -621,6 +623,10 @@ class TheseController extends AbstractController $form = $this->getServiceLocator()->get('formElementManager')->get($estDoctorant ? 'RdvBuTheseDoctorantForm' : 'RdvBuTheseForm'); $form->bind($rdvBu); + if ($form instanceof RdvBuTheseForm && ! $this->theseService->isExemplPapierFourniPertinent($these)) { + $form->disableExemplPapierFourni(); + } + if ($this->getRequest()->isPost()) { $post = $this->getRequest()->getPost(); $form->setData($post); @@ -658,6 +664,7 @@ class TheseController extends AbstractController 'form' => $form, 'title' => "Rendez-vous BU", 'pageCouvValidee' => $pageCouvValidee, + 'isExemplPapierFourniPertinent' => $isExemplPapierFourniPertinent, ]); $vm->setTemplate('application/these/modifier-rdv-bu' . ($estDoctorant ? '-doctorant' : null)); @@ -668,6 +675,9 @@ class TheseController extends AbstractController public function validationTheseCorrigeeAction() { $these = $this->requestedThese(); + $version = $this->fichierTheseService->fetchVersionFichier(VersionFichier::CODE_ORIG_CORR); + + $isRemiseExemplairePapierRequise = $this->theseService->isRemiseExemplairePapierRequise($these, $version); $hasVAC = $this->fichierTheseService->getRepository()->hasVersion($these, VersionFichier::CODE_ARCHI_CORR); $hasVDC = $this->fichierTheseService->getRepository()->hasVersion($these, VersionFichier::CODE_DIFF_CORR); @@ -680,7 +690,9 @@ class TheseController extends AbstractController WfEtape::CODE_DEPOT_VERSION_CORRIGEE_VALIDATION_DOCTORANT, WfEtape::CODE_DEPOT_VERSION_CORRIGEE_VALIDATION_DIRECTEUR, ], [ - 'message' => "Il ne reste plus qu'à fournir à la BU un exemplaire imprimé de la version corrigée pour valider le dépôt.", + 'message' => $isRemiseExemplairePapierRequise ? + "Il ne reste plus qu'à fournir à la BU un exemplaire imprimé de la version corrigée pour valider le dépôt." : + null, ]), 'hasVAC' => $hasVAC, 'hasVDC' => $hasVDC, @@ -794,8 +806,6 @@ class TheseController extends AbstractController } catch (TimedOutCommandException $toce) { // relancer le retraitement en tâche de fond $this->fichierTheseService->creerFichierTheseRetraiteAsync($fichierVersionOriginale); - } catch (RuntimeException $re) { - // erreur prévue } } return $this->redirect()->toRoute(null, [], ['query'=>$this->params()->fromQuery()], true); @@ -1072,36 +1082,35 @@ class TheseController extends AbstractController return $view; } + private function isEtapeAttestationVisible(These $these, VersionFichier $version) + { + $versionInitialeAtteignable = $this->workflowService->findOneByEtape($these, WfEtape::CODE_ATTESTATIONS)->getAtteignable(); + $versionCorrigeeAtteignable = $this->workflowService->findOneByEtape($these, WfEtape::CODE_ATTESTATIONS_VERSION_CORRIGEE)->getAtteignable(); + return + $version->estVersionCorrigee() && $versionCorrigeeAtteignable || + !$version->estVersionCorrigee() && $versionInitialeAtteignable /*&& !$versionCorrigeeAtteignable*/; + } + public function attestationAction() { $these = $this->requestedThese(); - $attestation = $these->getAttestation(); $version = $this->fichierTheseService->fetchVersionFichier($this->params()->fromQuery('version')); + $attestation = $these->getAttestationForVersion($version); $hasFichierThese = ! empty($this->fichierTheseService->getRepository()->fetchFichierTheses($these, NatureFichier::CODE_THESE_PDF, $version, false)); -// Est-ce vraiment indispensable d'interroger le moteur du WF ? -// Mis en commentaire pour accélerer l'affichage... -// $versionInitialeAtteignable = $this->workflowService->findOneByEtape($these, WfEtape::CODE_ATTESTATIONS)->getAtteignable(); -// $versionCorrigeeAtteignable = $this->workflowService->findOneByEtape($these, WfEtape::CODE_ATTESTATIONS_VERSION_CORRIGEE)->getAtteignable(); -// $visible = -// $version->estVersionCorrigee() && $versionCorrigeeAtteignable || -// !$version->estVersionCorrigee() && $versionInitialeAtteignable && !$versionCorrigeeAtteignable; -// -// if (! $visible) { -// return false; -// } + if (! $this->isEtapeAttestationVisible($these, $version)) { + return false; + } if (! $hasFichierThese) { return false; } - $form = $this->getAttestationTheseForm(); - $view = new ViewModel([ 'these' => $these, 'version' => $version, 'attestation' => $attestation, - 'form' => $form, - 'modifierAttestationUrl' => $this->urlThese()->modifierAttestationUrl($these), + 'form' => $this->getAttestationTheseForm($version), // les labels des cases à cocher sont affichés + 'modifierAttestationUrl' => $this->urlThese()->modifierAttestationUrl($these, $version), 'hasFichierThese' => $hasFichierThese, ]); $view->setTemplate('application/these/attestation'); @@ -1112,7 +1121,16 @@ class TheseController extends AbstractController public function modifierAttestationAction() { $these = $this->requestedThese(); - $form = $this->getAttestationTheseForm(); + $version = $this->fichierTheseService->fetchVersionFichier($this->params()->fromQuery('version')); + $attestation = $these->getAttestationForVersion($version); + $form = $this->getAttestationTheseForm($version); + + if ($attestation === null) { + $attestation = new Attestation(); + $attestation->setThese($these); + } + + $form->bind($attestation); if ($this->getRequest()->isPost()) { /** @var ParametersInterface $post */ @@ -1122,6 +1140,8 @@ class TheseController extends AbstractController if ($isValid) { /** @var Attestation $attestation */ $attestation = $form->getData(); + $attestation->setVersionCorrigee($version->estVersionCorrigee()); + $this->theseService->updateAttestation($these, $attestation); if (! $this->getRequest()->isXmlHttpRequest()) { @@ -1130,7 +1150,7 @@ class TheseController extends AbstractController } } - $form->setAttribute('action', $this->urlThese()->modifierAttestationUrl($these)); + $form->setAttribute('action', $this->urlThese()->modifierAttestationUrl($these, $version)); return new ViewModel([ 'these' => $these, @@ -1140,82 +1160,42 @@ class TheseController extends AbstractController } /** + * @param VersionFichier $version * @return AttestationTheseForm */ - private function getAttestationTheseForm() + private function getAttestationTheseForm(VersionFichier $version) { $these = $this->requestedThese(); /** @var AttestationTheseForm $form */ $form = $this->getServiceLocator()->get('formElementManager')->get('AttestationTheseForm'); - $attestation = $these->getAttestation(); - - if ($attestation === null) { - // si l'on est dans le cadre du dépôt de la version corrigée, on rappelle les infos historisées - if ($this->existeVersionCorrigee()) { - $attestations = $these->getAttestations($historise = true); - $attestationPrec = $attestations->last() ?: null; // la plus récente - - /** @var Attestation $attestation */ - $attestation = clone $attestationPrec; - } else { - $attestation = new Attestation(); - $attestation->setThese($these); - } + if (! $these->getDiffusionForVersion($version)->isRemiseExemplairePapierRequise()) { + $form->disableExemplaireImprimeConformeAVersionDeposee(); } - $form->bind($attestation); - return $form; } - /** - * @var bool - */ - protected $existeVersionCorrigee = null; - - /** - * Si le fichier de la thèse originale est une version corrigée, on est dans le cadre d'un dépôt d'une version - * corrigée et cette fonction retourne true. - * - * @param These|null $these - * @return bool - */ - private function existeVersionCorrigee(These $these = null) + private function isEtapeDiffusionVisible(These $these, VersionFichier $version) { - if ($these !== null) { - return (!empty($this->fichierTheseService->getRepository()->fetchFichierTheses($these, NatureFichier::CODE_THESE_PDF , VersionFichier::CODE_ORIG_CORR))); - } - if ($this->existeVersionCorrigee !== null) { - return $this->existeVersionCorrigee; - } - if ($these === null) { - $these = $this->requestedThese(); - } - - $this->existeVersionCorrigee = ! empty($this->fichierTheseService->getRepository()->fetchFichierTheses($these, NatureFichier::CODE_THESE_PDF , VersionFichier::CODE_ORIG_CORR)); - - return $this->existeVersionCorrigee; + $versionInitialeAtteignable = $this->workflowService->findOneByEtape($these, WfEtape::CODE_AUTORISATION_DIFFUSION_THESE)->getAtteignable(); + $versionCorrigeeAtteignable = $this->workflowService->findOneByEtape($these, WfEtape::CODE_AUTORISATION_DIFFUSION_THESE_VERSION_CORRIGEE)->getAtteignable(); + return + $version->estVersionCorrigee() && $versionCorrigeeAtteignable || + !$version->estVersionCorrigee() && $versionInitialeAtteignable /*&& !$versionCorrigeeAtteignable*/; } public function diffusionAction() { $these = $this->requestedThese(); $version = $this->fichierTheseService->fetchVersionFichier($this->params()->fromQuery('version')); + $diffusion = $these->getDiffusionForVersion($version); $hasFichierThese = ! empty($this->fichierTheseService->getRepository()->fetchFichierTheses($these, NatureFichier::CODE_THESE_PDF, $version, false)); -// Est-ce vraiment indispensable d'interroger le moteur du WF ? -// Mis en commentaire pour accélerer l'affichage... -// $versionInitialeAtteignable = $this->workflowService->findOneByEtape($these, WfEtape::CODE_AUTORISATION_DIFFUSION_THESE)->getAtteignable(); -// $versionCorrigeeAtteignable = $this->workflowService->findOneByEtape($these, WfEtape::CODE_AUTORISATION_DIFFUSION_THESE_VERSION_CORRIGEE)->getAtteignable(); -// $visible = -// $version->estVersionCorrigee() && $versionCorrigeeAtteignable || -// !$version->estVersionCorrigee() && $versionInitialeAtteignable && !$versionCorrigeeAtteignable; -// -// if (! $visible) { -// return false; -// } + if (! $this->isEtapeDiffusionVisible($these, $version)) { + return false; + } if (! $hasFichierThese) { return false; } @@ -1227,7 +1207,7 @@ class TheseController extends AbstractController $theseFichiersExpurges = $this->fichierTheseService->getRepository()->fetchFichierTheses($these, NatureFichier::CODE_THESE_PDF, $versionExpurgee, false); $annexesFichiersExpurges = $this->fichierTheseService->getRepository()->fetchFichierTheses($these, NatureFichier::CODE_FICHIER_NON_PDF, $versionExpurgee, false); - if ($diffusion = $these->getDiffusion()) { + if ($diffusion) { $form->bind($diffusion); } @@ -1246,12 +1226,13 @@ class TheseController extends AbstractController $view = new ViewModel([ 'these' => $these, + 'diffusion' => $diffusion, 'version' => $version, 'form' => $form, 'theseFichiersExpurgesItems' => $theseFichiersExpurgesItems, 'annexesFichiersExpurgesItems' => $annexesFichiersExpurgesItems, - 'modifierDiffusionUrl' => $this->urlThese()->modifierDiffusionUrl($these), - 'exporterConventionMelUrl' => $this->urlThese()->exporterConventionMiseEnLigneUrl($these), + 'modifierDiffusionUrl' => $this->urlThese()->modifierDiffusionUrl($these, $version), + 'exporterConventionMelUrl' => $this->urlThese()->exporterConventionMiseEnLigneUrl($these, $version), 'hasFichierThese' => $hasFichierThese, ]); $view->setTemplate('application/these/diffusion'); @@ -1265,10 +1246,18 @@ class TheseController extends AbstractController // si le fichier de la thèse originale est une version corrigée, la version de diffusion est aussi en version corrigée $existeVersionOrigCorrig = ! empty($this->fichierTheseService->getRepository()->fetchFichierTheses($these, NatureFichier::CODE_THESE_PDF , VersionFichier::CODE_ORIG_CORR)); - $version = $existeVersionOrigCorrig ? VersionFichier::CODE_DIFF_CORR : VersionFichier::CODE_DIFF; + $version = $this->fichierTheseService->fetchVersionFichier($existeVersionOrigCorrig ? VersionFichier::CODE_DIFF_CORR : VersionFichier::CODE_DIFF); + $diffusion = $these->getDiffusionForVersion($version); $form = $this->getDiffusionForm($version); + if ($diffusion === null) { + $diffusion = new Diffusion(); + $diffusion->setThese($these); + } + + $form->bind($diffusion); + if ($this->getRequest()->isPost()) { /** @var ParametersInterface $post */ $post = $this->getRequest()->getPost(); @@ -1277,7 +1266,9 @@ class TheseController extends AbstractController if ($isValid) { /** @var Diffusion $diffusion */ $diffusion = $form->getData(); - $this->theseService->updateDiffusion($these, $diffusion); + $diffusion->setVersionCorrigee($version->estVersionCorrigee()); + + $this->theseService->updateDiffusion($these, $diffusion, $version); // suppression des fichiers expurgés éventuellement déposés en l'absence de pb de droit d'auteur $besoinVersionExpurgee = ! $diffusion->getDroitAuteurOk(); @@ -1288,53 +1279,35 @@ class TheseController extends AbstractController } if (! $this->getRequest()->isXmlHttpRequest()) { - $url = $this->urlThese()->depotThese($these, $version); + $url = $this->urlThese()->depotThese($these, $version->getCode()); return $this->redirect()->toUrl($url); } } } - $form->setAttribute('action', $this->urlThese()->modifierDiffusionUrl($these)); + $form->setAttribute('action', $this->urlThese()->modifierDiffusionUrl($these, $version)); return new ViewModel([ 'these' => $these, + 'diffusion' => $diffusion, 'form' => $form, 'title' => "Autorisation de diffusion", 'theseUrl' => $this->urlThese()->depotFichiers($these, NatureFichier::CODE_THESE_PDF, $version), -// 'annexesUrl' => $this->urlThese()->fichiersAnnexes($these, NatureFichier::CODE_FICHIER_NON_PDF, $version), 'annexesUrl' => $this->urlThese()->depotFichiers($these, NatureFichier::CODE_FICHIER_NON_PDF, $version), ]); } /** - * @param string $version + * @param VersionFichier $version * @return DiffusionTheseForm */ - private function getDiffusionForm($version) + private function getDiffusionForm(VersionFichier $version) { $these = $this->requestedThese(); /** @var DiffusionTheseForm $form */ $form = $this->getServiceLocator()->get('formElementManager')->get('DiffusionTheseForm'); - $form->setVersionFichier($this->versionFichierService->getRepository()->findOneByCode($version)); - - $diffusion = $these->getDiffusion(); - - if ($diffusion === null) { - // si l'on est dans le cadre du dépôt de la version corrigée, on rappelle les infos historisées - if ($this->existeVersionCorrigee()) { - $diffusions = $these->getDiffusions($historise = true); - $diffusionPrec = $diffusions->last() ?: null; // la plus récente - - /** @var Diffusion $diffusion */ - $diffusion = clone $diffusionPrec; - } else { - $diffusion = new Diffusion(); - $diffusion->setThese($these); - } - } - - $form->bind($diffusion); + $form->setVersionFichier($version); return $form; } @@ -1342,6 +1315,9 @@ class TheseController extends AbstractController public function exporterConventionMiseEnLigneAction() { $these = $this->requestedThese(); + $version = $this->fichierTheseService->fetchVersionFichier($this->params()->fromQuery('version')); + $diffusion = $these->getDiffusionForVersion($version); + $attestation = $these->getAttestationForVersion($version); /** @var DiffusionTheseForm $form */ $form = $this->getServiceLocator()->get('formElementManager')->get('DiffusionTheseForm'); @@ -1349,7 +1325,6 @@ class TheseController extends AbstractController $codes = [ Variable::CODE_ETB_LIB, Variable::CODE_ETB_ART_ETB_LIB, - Variable::CODE_TRIBUNAL_COMPETENT, ]; $dateObs = $these->getDateSoutenance() ?: $these->getDatePrevisionSoutenance(); $variableRepo = $this->variableService->getRepository(); @@ -1359,18 +1334,18 @@ class TheseController extends AbstractController $libEtablissementA = "à " . $letab; $libEtablissementLe = $letab; $libEtablissementDe = "de " . $letab; - $libTribunal = lcfirst($vars[Variable::CODE_TRIBUNAL_COMPETENT]->getValeur()); $renderer = $this->getServiceLocator()->get('view_renderer'); /* @var $renderer \Zend\View\Renderer\PhpRenderer */ $exporter = new ConventionPdfExporter($renderer, 'A4'); $exporter->setVars([ 'these' => $these, + 'diffusion' => $diffusion, + 'attestation' => $attestation, 'form' => $form, 'libEtablissement' => $etab, 'libEtablissementA' => $libEtablissementA, 'libEtablissementLe' => $libEtablissementLe, 'libEtablissementDe' => $libEtablissementDe, - 'libTribunal' => $libTribunal, ]); $exporter->export('export.pdf'); exit; @@ -1587,7 +1562,7 @@ class TheseController extends AbstractController $pdcData = $this->theseService->fetchInformationsPageDeCouverture($these); try { - // Un timeout peut être appliqué au lancement du script de retraitement. + // Un timeout peut être appliqué au lancement du script. // Si ce timout est atteint, l'exécution du script est interrompue // et une exception TimedOutCommandException est levée. $timeout = $this->timeoutRetraitement; @@ -1596,10 +1571,8 @@ class TheseController extends AbstractController $destinataires = [ $this->userContextService->getIdentityDb()->getEmail() ] ; // relancer le retraitement en tâche de fond $this->fichierTheseService->fusionneFichierTheseAsync($these, $versionFichier, $removal, $destinataires); + return $this->redirect()->toRoute('these/rdv-bu', ['these' => $these->getId(), 'asynchronous' => 1], [], true); - exit(); - } catch (RuntimeException $re) { - // erreur prévue } /** Retourner un PDF ... */ diff --git a/module/Application/src/Application/Controller/UtilisateurController.php b/module/Application/src/Application/Controller/UtilisateurController.php index ff4f7164e3bcada3ae8b21e89a595de39019b9ac..20d91255817d4e605713ad0fa710f9b6de3e02d0 100644 --- a/module/Application/src/Application/Controller/UtilisateurController.php +++ b/module/Application/src/Application/Controller/UtilisateurController.php @@ -156,49 +156,6 @@ class UtilisateurController extends \UnicaenAuth\Controller\UtilisateurControlle ]); } - /** - * @return ViewModel - */ - public function ajouterFromIndividuAction() - { - /** @var Individu $individu */ - $individuId = $this->params('individu'); - $individu = $this->individuService->getRepository()->findOneBy(["id"=>$individuId]); - if ($individu === null) { - throw new RuntimeException("Individu introuvable avec cet id"); - } - - $utilisateur = $this->utilisateurService->getRepository()->findByIndividu($individu); - if ($utilisateur !== null) { - throw new RuntimeException("Il existe déjà un utilisateur lié à l'individu $individu."); - } - - /** @var CreationUtilisateurFromIndividuForm $form */ - $form = $this->getServiceLocator()->get('FormElementManager')->get(CreationUtilisateurFromIndividuForm::class); - $form->setIndividu($individu); - - /** @var Request $request */ - $request = $this->getRequest(); - if ($request->isPost()) { - $data = $request->getPost(); - $form->setData($data); - if ($form->isValid()) { - if (!empty($data['email'])) { - $individu->setEmail($data['email']); - } - $utilisateur = $this->utilisateurService->createFromIndividuAndFormData($individu, $data->toArray()); - $this->flashMessenger()->addSuccessMessage( - "Utilisateur <strong>{$utilisateur->getUsername()}</strong> créé avec succès à partir de l'individu $individu."); - $this->redirect()->toRoute('utilisateur'); - } - } - - return new ViewModel([ - 'form' => $form, - 'individu' => $individu, - ]); - } - /** * Usurpe l'identité d'un autre utilisateur. * @@ -414,9 +371,12 @@ class UtilisateurController extends \UnicaenAuth\Controller\UtilisateurControlle { $individu = $this->getIndividuService()->getRequestedIndividu($this); $acteurs = $this->acteurService->getRepository()->findActeursByIndividu($individu); - $utilisateur = $this->utilisateurService->getRepository()->findByIndividu($individu); - if ($utilisateur === null AND $individu->getEmail() !== null) $utilisateur = $this->utilisateurService->getRepository()->findByUsername($individu->getEmail()); - + $utilisateurs = $this->utilisateurService->getRepository()->findByIndividu($individu, $isLocal = true); // done + // NB: findByIndividu() avec $isLocal = true renverra 1 utilisateur au maximum + $utilisateur = $utilisateurs ? current($utilisateurs) : null; + if ($utilisateur === null AND $individu->getEmail() !== null) { + $utilisateur = $this->utilisateurService->getRepository()->findByUsername($individu->getEmail()); + } return new ViewModel([ 'individu' => $individu, @@ -428,9 +388,9 @@ class UtilisateurController extends \UnicaenAuth\Controller\UtilisateurControlle public function creerCompteLocalIndividuAction() { $individu = $this->getIndividuService()->getRequestedIndividu($this); - $utilisateur = $this->utilisateurService->getRepository()->findByIndividu($individu); + $utilisateurs = $this->utilisateurService->getRepository()->findByIndividu($individu); // done - if ($utilisateur === null) { + if (empty($utilisateurs)) { $user = $this->utilisateurService->createFromIndividu($individu, $individu->getEmail(), 'none'); $this->userService->updateUserPasswordResetToken($user); $url = $this->url()->fromRoute('utilisateur/init-compte', ['token' => $user->getPasswordResetToken()], ['force_canonical' => true], true); @@ -442,9 +402,12 @@ class UtilisateurController extends \UnicaenAuth\Controller\UtilisateurControlle return $this->redirect()->toRoute('utilisateur/gerer-utilisateur', ['individu' => $individu->getId()], [], true); } - public function resetPasswordAction() { + public function resetPasswordAction() + { $individu = $this->getIndividuService()->getRequestedIndividu($this); - $utilisateur = $this->utilisateurService->getRepository()->findByIndividu($individu); + $utilisateurs = $this->utilisateurService->getRepository()->findByIndividu($individu, $isLocal = true); // done + // NB: findByIndividu() avec $isLocal = true renverra 1 utilisateur au maximum + $utilisateur = $utilisateurs ? current($utilisateurs) : null; if ($utilisateur !== null) { $this->userService->updateUserPasswordResetToken($utilisateur); diff --git a/module/Application/src/Application/Controller/ValidationController.php b/module/Application/src/Application/Controller/ValidationController.php index b2e61652344f05afca75117979fdb69adb15587a..562453e9ac3ac96844b27ca4327f51c301bdbf24 100755 --- a/module/Application/src/Application/Controller/ValidationController.php +++ b/module/Application/src/Application/Controller/ValidationController.php @@ -163,7 +163,7 @@ class ValidationController extends AbstractController /** @var Acteur $acteur */ foreach ($these->getActeurs() as $acteur) { $individu = $acteur->getIndividu(); - $utilisateurs[$individu->getId()] = $this->utilisateurService->getRepository()->findByIndividu($individu); + $utilisateurs[$individu->getId()] = $this->utilisateurService->getRepository()->findByIndividu($individu); // ok } $view = new ViewModel([ diff --git a/module/Application/src/Application/Entity/Db/Attestation.php b/module/Application/src/Application/Entity/Db/Attestation.php index 101f4982aaf1fbf13476ff77e19ad7f8aafb0cfd..bbf7f25890e44fc630899f141ab1d3cd0f10fe86 100644 --- a/module/Application/src/Application/Entity/Db/Attestation.php +++ b/module/Application/src/Application/Entity/Db/Attestation.php @@ -12,6 +12,11 @@ class Attestation implements HistoriqueAwareInterface { use HistoriqueAwareTrait; + /** + * @var bool + */ + private $versionCorrigee = false; + /** * @var boolean */ @@ -43,40 +48,45 @@ class Attestation implements HistoriqueAwareInterface /** * @return bool */ - public function isVersionDeposeeEstVersionRef() + public function getVersionCorrigee(): bool { - return $this->versionDeposeeEstVersionRef; + return $this->versionCorrigee; } /** - * @param bool $versionDeposeeEstVersionRef + * @param bool $versionCorrigee * @return Attestation */ - public function setVersionDeposeeEstVersionRef($versionDeposeeEstVersionRef = true) + public function setVersionCorrigee(bool $versionCorrigee): Attestation { - $this->versionDeposeeEstVersionRef = $versionDeposeeEstVersionRef; + $this->versionCorrigee = $versionCorrigee; return $this; } /** - * Get isVersionDeposeeEstVersionRef - * - * @return string + * @return bool + */ + public function isVersionDeposeeEstVersionRef() + { + return $this->versionDeposeeEstVersionRef; + } + + /** + * @param bool $versionDeposeeEstVersionRef + * @return Attestation */ - public function isVersionDeposeeEstVersionRefToString() + public function setVersionDeposeeEstVersionRef($versionDeposeeEstVersionRef = true) { - if (null === $this->isVersionDeposeeEstVersionRef()) { - return ""; - } + $this->versionDeposeeEstVersionRef = $versionDeposeeEstVersionRef; - return $this->isVersionDeposeeEstVersionRef() ? "Oui" : "Non"; + return $this; } /** - * @return bool + * @return bool|null */ - public function isExemplaireImprimeConformeAVersionDeposee() + public function getExemplaireImprimeConformeAVersionDeposee() { return $this->exemplaireImprimeConformeAVersionDeposee; } @@ -92,20 +102,6 @@ class Attestation implements HistoriqueAwareInterface return $this; } - /** - * Get isExemplaireImprimeConformeAVersionDeposee - * - * @return string - */ - public function isExemplaireImprimeConformeAVersionDeposeeToString() - { - if (null === $this->isExemplaireImprimeConformeAVersionDeposee()) { - return ""; - } - - return $this->isExemplaireImprimeConformeAVersionDeposee() ? "Oui" : "Non"; - } - /** * Get id * @@ -139,4 +135,6 @@ class Attestation implements HistoriqueAwareInterface { return $this->these; } + + } diff --git a/module/Application/src/Application/Entity/Db/Diffusion.php b/module/Application/src/Application/Entity/Db/Diffusion.php index 819544d66862bb4d267fd62ba4e8d9ad41df9680..af54a6af92b06a2ccb918eee04b987cc8a44f105 100644 --- a/module/Application/src/Application/Entity/Db/Diffusion.php +++ b/module/Application/src/Application/Entity/Db/Diffusion.php @@ -3,11 +3,9 @@ namespace Application\Entity\Db; use Application\Constants; +use Application\Rule\AutorisationDiffusionRule; use UnicaenApp\Entity\HistoriqueAwareInterface; use UnicaenApp\Entity\HistoriqueAwareTrait; -use UnicaenApp\Message\Message; -use UnicaenApp\Message\MessageRepository; -use UnicaenApp\Message\MessageService; /** * Diffusion @@ -19,9 +17,9 @@ class Diffusion implements HistoriqueAwareInterface const CONFIDENTIELLE_OUI = '1'; const CONFIDENTIELLE_NON = '0'; - const AUTORISATION_OUI_IMMEDIAT = '2'; - const AUTORISATION_OUI_EMBARGO = '1'; - const AUTORISATION_NON = '0'; + const AUTORISATION_OUI_IMMEDIAT = 2; + const AUTORISATION_OUI_EMBARGO = 1; + const AUTORISATION_NON = 0; const EMBARGO_DUREE_6_MOIS = '6 mois'; const EMBARGO_DUREE_1_AN = '1 an'; @@ -31,6 +29,11 @@ class Diffusion implements HistoriqueAwareInterface const DROIT_AUTEUR_OK_OUI = '1'; const DROIT_AUTEUR_OK_NON = '0'; + /** + * @var bool + */ + private $versionCorrigee = false; + /** * @var boolean */ @@ -71,6 +74,11 @@ class Diffusion implements HistoriqueAwareInterface */ private $orcid; + /** + * @var string + */ + private $halId; + /** * @var string */ @@ -94,12 +102,31 @@ class Diffusion implements HistoriqueAwareInterface $this->id = null; } + /** + * @return bool + */ + public function getVersionCorrigee(): bool + { + return $this->versionCorrigee; + } + + /** + * @param bool $versionCorrigee + * @return Diffusion + */ + public function setVersionCorrigee(bool $versionCorrigee): Diffusion + { + $this->versionCorrigee = $versionCorrigee; + + return $this; + } + /** * @return boolean */ public function getConfidentielle() { - return $this->confidentielle; + return (bool) $this->confidentielle; } /** @@ -108,7 +135,7 @@ class Diffusion implements HistoriqueAwareInterface */ public function setConfidentielle($confidentielle) { - $this->confidentielle = $confidentielle; + $this->confidentielle = (bool) $confidentielle; return $this; } @@ -149,7 +176,7 @@ class Diffusion implements HistoriqueAwareInterface */ public function setDroitAuteurOk($droitAuteurOk = true) { - $this->droitAuteurOk = $droitAuteurOk; + $this->droitAuteurOk = (bool) $droitAuteurOk; return $this; } @@ -178,7 +205,7 @@ class Diffusion implements HistoriqueAwareInterface */ public function setCertifCharteDiff($certifCharteDiff) { - $this->certifCharteDiff = $certifCharteDiff; + $this->certifCharteDiff = (bool) $certifCharteDiff; return $this; } @@ -274,6 +301,25 @@ class Diffusion implements HistoriqueAwareInterface return $this; } + /** + * @return string|null + */ + public function getHalId() + { + return $this->halId; + } + + /** + * @param string|null $halId + * @return Diffusion + */ + public function setHalId($halId = null): Diffusion + { + $this->halId = $halId; + + return $this; + } + /** * Get id * @@ -326,6 +372,17 @@ class Diffusion implements HistoriqueAwareInterface return $this; } + /** + * Teste si l'exemplaire papier de la thèse est requis, d'après la réponse à l'autorisation de diffusion. + * + * @return bool + */ + public function isRemiseExemplairePapierRequise() + { + $rule = new AutorisationDiffusionRule(); + $rule->setDiffusion($this); + return $rule->computeRemiseExemplairePapierEstRequise(); + } } diff --git a/module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.Attestation.dcm.xml b/module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.Attestation.dcm.xml index 29ecb18ea1454e7dfbb3e54e97023d2e3b7754a9..1c5b8acdebe6c4274cf21a2d28d4b724759aceec 100644 --- a/module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.Attestation.dcm.xml +++ b/module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.Attestation.dcm.xml @@ -9,6 +9,7 @@ <field name="versionDeposeeEstVersionRef" type="boolean" column="VER_DEPO_EST_VER_REF" nullable="false"/> <field name="exemplaireImprimeConformeAVersionDeposee" type="boolean" column="EX_IMPR_CONFORM_VER_DEPO" nullable="false"/> + <field name="versionCorrigee" type="boolean" column="VERSION_CORRIGEE"/> <field name="histoCreation" type="datetime" column="HISTO_CREATION" nullable="false"/> <field name="histoDestruction" type="datetime" column="HISTO_DESTRUCTION" nullable="true"/> diff --git a/module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.Diffusion.dcm.xml b/module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.Diffusion.dcm.xml index 5075c20ea1f5dbafa15f3504d6a7045d77fb9267..c85ce90744cbc26962d147e864ccb0700763d106 100644 --- a/module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.Diffusion.dcm.xml +++ b/module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.Diffusion.dcm.xml @@ -7,6 +7,7 @@ <generator strategy="SEQUENCE"/> </id> + <field name="versionCorrigee" type="boolean" column="VERSION_CORRIGEE"/> <field name="confidentielle" type="boolean" column="CONFIDENT" nullable="false"/> <field name="dateFinConfidentialite" type="datetime" column="CONFIDENT_DATE_FIN" nullable="true"/> <field name="droitAuteurOk" type="boolean" column="DROIT_AUTEUR_OK" nullable="false"/> @@ -15,6 +16,7 @@ <field name="autorisEmbargoDuree" type="string" column="AUTORIS_EMBARGO_DUREE" length="20" nullable="true"/> <field name="autorisMotif" type="string" column="AUTORIS_MOTIF" length="2000" nullable="true"/> <field name="orcid" type="string" column="ORCID" length="200" nullable="true"/> + <field name="halId" type="string" column="HAL_ID" length="100" nullable="true"/> <field name="nnt" type="string" column="NNT" length="200" nullable="true"/> <field name="histoCreation" type="datetime" column="HISTO_CREATION" nullable="false"/> diff --git a/module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.Structure.dcm.xml b/module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.Structure.dcm.xml index ac2f4c947e5d5c1fb168386581a6daba48bf61e7..a9a5026241c2dc3bd8f23d9ee1bcee69aaa5c513 100644 --- a/module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.Structure.dcm.xml +++ b/module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.Structure.dcm.xml @@ -10,6 +10,7 @@ </id> <field name="sigle" type="string" column="SIGLE" length="32" nullable="true"/> <field name="libelle" type="string" column="LIBELLE" length="128" nullable="false"/> + <field name="ferme" type="integer" column="EST_FERME" nullable="false"/> <field name="cheminLogo" type="string" column="CHEMIN_LOGO" length="200" nullable="true"/> <many-to-one field="typeStructure" target-entity="Application\Entity\Db\TypeStructure"> 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 683409d7a9c7a56f6bb72c45edfcf91e334bacc1..364a890adda6beeb46337b1c0dd3f467915a4236 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/RdvBu.php b/module/Application/src/Application/Entity/Db/RdvBu.php index 89dd7cfbc46b911e0cc6102034611e5e07d58ed3..5c951d76262e0dcbd179237d70186909fec1f2ab 100644 --- a/module/Application/src/Application/Entity/Db/RdvBu.php +++ b/module/Application/src/Application/Entity/Db/RdvBu.php @@ -36,9 +36,9 @@ class RdvBu implements HistoriqueAwareInterface private $versionArchivableFournie = false; /** - * @var boolean + * @var boolean|null */ - private $exemplPapierFourni = false; + private $exemplPapierFourni; /** * @var string @@ -93,18 +93,6 @@ class RdvBu implements HistoriqueAwareInterface return $diff; } - /** - * Détermine si les infos qui doivent être saisies pour le RDV BU l'ont été. - * - * @return bool - */ - public function isInfosBuSaisies() - { - return - $this->getExemplPapierFourni() && $this->getConventionMelSignee() && $this->getMotsClesRameau() && - $this->isVersionArchivableFournie(); - } - /** * Set conventionMelSignee * @@ -213,7 +201,7 @@ class RdvBu implements HistoriqueAwareInterface /** * Get exemplPapierFourni * - * @return boolean + * @return boolean|null */ public function getExemplPapierFourni() { diff --git a/module/Application/src/Application/Entity/Db/Repository/UtilisateurRepository.php b/module/Application/src/Application/Entity/Db/Repository/UtilisateurRepository.php index 559d5b8fe9f586cea3b9a71e3f52232e9cefa8ad..c1c0d8a76d0c32301f964b7387fd562011893bcd 100644 --- a/module/Application/src/Application/Entity/Db/Repository/UtilisateurRepository.php +++ b/module/Application/src/Application/Entity/Db/Repository/UtilisateurRepository.php @@ -12,24 +12,35 @@ class UtilisateurRepository extends DefaultEntityRepository /** * Recherche les utilisateurs lié à un individu. * - * @param Individu $individu - * @return Utilisateur + * @param Individu $individu + * @param bool|null $isLocal + * @return Utilisateur[] */ - public function findByIndividu(Individu $individu) + public function findByIndividu(Individu $individu, $isLocal = null) { $qb = $this->createQueryBuilder('u') ->join('u.individu', 'i') ->where('i = :individu') ->setParameter('individu', $individu); - try { - $utilisateur = $qb->getQuery()->getOneOrNullResult(); - } catch (NonUniqueResultException $e) { - $utilisateurs = $qb->getQuery()->getResult(); - throw new RuntimeException("Plusieurs (".count($utilisateurs).") Utilisateur partagent le même individu [".$individu->getId()."]", 0, $e); + if ($isLocal !== null) { + if ($isLocal) { + $qb->andWhere($qb->expr()->notIn('u.password', ['shib', 'ldap'])); + } else { + $qb->andWhere($qb->expr()->in('u.password', ['shib', 'ldap'])); + } } - return $utilisateur; + $utilisateurs = $qb->getQuery()->getResult(); + + if ($isLocal && count($utilisateurs) > 1) { + throw new RuntimeException( + "Plusieurs Utilisateur partagent le même individu " . $individu->getId() . " : " . + implode(', ', array_map(function (Utilisateur $u) { return $u->getId(); }, $utilisateurs)) + ); + } + + return $utilisateurs; } /** diff --git a/module/Application/src/Application/Entity/Db/Structure.php b/module/Application/src/Application/Entity/Db/Structure.php index 887e73433b322f1d992ce572bbc6c182795d7150..ba0a853f3a5a8b1c2a97fc8588eac598d791cfc2 100644 --- a/module/Application/src/Application/Entity/Db/Structure.php +++ b/module/Application/src/Application/Entity/Db/Structure.php @@ -23,11 +23,13 @@ class Structure implements StructureInterface, HistoriqueAwareInterface, SourceA * @var string $sigle * @var string $libelle * @var string $cheminLogo + * @var integer $cheminLogo */ private $id; protected $sigle; protected $libelle; protected $cheminLogo; + protected $ferme; /** * @var string @@ -341,4 +343,20 @@ class Structure implements StructureInterface, HistoriqueAwareInterface, SourceA { return 'structure'; } + + /** + * @return bool + */ + public function isFerme() + { + return $this->ferme === 1; + } + + /** + * @param boolean $ferme + */ + public function setFerme($ferme) + { + if (!$ferme) $this->ferme = 0; else $this->ferme = 1; + } } \ No newline at end of file diff --git a/module/Application/src/Application/Entity/Db/These.php b/module/Application/src/Application/Entity/Db/These.php index 70e7f8886e44cf82d5af3e7b7e51e6e979ac133c..132ee4d5e4bef8343ae04a23bd9d9412dfab6572 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 */ @@ -793,6 +857,24 @@ class These implements HistoriqueAwareInterface, ResourceInterface return $this->getAttestations($historisee)->first() ?: null; } + /** + * Retourne l'éventuelle Attestation concernant la version de fichier spécifiée. + * + * @param VersionFichier $version + * @return Attestation|null + */ + public function getAttestationForVersion(VersionFichier $version) + { + /** @var Attestation $attestation */ + foreach ($this->attestations as $attestation) { + if ($version->estVersionCorrigee() === $attestation->getVersionCorrigee()) { + return $attestation; + } + } + + return null; + } + /** * @param Attestation $attestation * @return $this @@ -814,29 +896,21 @@ class These implements HistoriqueAwareInterface, ResourceInterface } /** - * @param bool $historisee - * @return Collection - */ - public function getDiffusions($historisee = false) - { - $diffusions = $this->miseEnLignes; - - $diffusions = $diffusions->filter(function(Diffusion $d) use ($historisee) { - return $historisee === null || !$historisee === $d->estNonHistorise(); - }); - - return $diffusions; - } - - /** - * Retourne l'éventuelle Diffusion de cette These. + * Retourne l'éventuelle Diffusion concernant la version de fichier spécifiée. * - * @param bool $historisee + * @param VersionFichier $version * @return Diffusion|null */ - public function getDiffusion($historisee = false) + public function getDiffusionForVersion(VersionFichier $version) { - return $this->getDiffusions($historisee)->first() ?: null; + /** @var Diffusion $diffusion */ + foreach ($this->miseEnLignes as $diffusion) { + if ($version->estVersionCorrigee() === $diffusion->getVersionCorrigee()) { + return $diffusion; + } + } + + return null; } /** diff --git a/module/Application/src/Application/Entity/Db/Variable.php b/module/Application/src/Application/Entity/Db/Variable.php index 9450e6e0140038fd73664e48e9a426b407dbd9d3..c99b9a58a3d85cd1cf0ba681e292aa2d49e1577f 100644 --- a/module/Application/src/Application/Entity/Db/Variable.php +++ b/module/Application/src/Application/Entity/Db/Variable.php @@ -21,7 +21,6 @@ class Variable implements HistoriqueAwareInterface const CODE_ETB_LIB = 'ETB_LIB'; // Ex: "Université de Caen Normandie" const CODE_ETB_LIB_TIT_RESP = 'ETB_LIB_TIT_RESP'; // Ex: "Le Président" const CODE_ETB_LIB_NOM_RESP = 'ETB_LIB_NOM_RESP'; // Ex: "Pierre Denise" - const CODE_TRIBUNAL_COMPETENT = 'TRIBUNAL_COMPETENT'; // Ex: "Trinbunal administratif de Caen" /** * @var string diff --git a/module/Application/src/Application/Form/AttestationTheseForm.php b/module/Application/src/Application/Form/AttestationTheseForm.php index d54233a8e55901320e78e9f85d34ef07f49b8c76..b8ab94b3540c8a2e2612d15f03ffe2f70f0d2665 100644 --- a/module/Application/src/Application/Form/AttestationTheseForm.php +++ b/module/Application/src/Application/Form/AttestationTheseForm.php @@ -46,6 +46,16 @@ class AttestationTheseForm extends Form implements InputFilterProviderInterface return $this; } + private $disableExemplaireImprimeConformeAVersionDeposee = false; + + /** + * @param bool $disable + */ + public function disableExemplaireImprimeConformeAVersionDeposee(bool $disable = true) + { + $this->disableExemplaireImprimeConformeAVersionDeposee = $disable; + } + /** * NB: hydrateur injecté par la factory */ @@ -118,14 +128,15 @@ class AttestationTheseForm extends Form implements InputFilterProviderInterface $attestation->getThese()->getCorrectionAutorisee() ? "corrigée" : "" )); + if ($this->disableExemplaireImprimeConformeAVersionDeposee) { + $this->remove('exemplaireImprimeConformeAVersionDeposee'); + } + return $this; } /** - * Should return an array specification compatible with - * {@link Zend\InputFilter\Factory::createInputFilter()}. - * - * @return array + * {@inheritDoc} */ public function getInputFilterSpecification() { @@ -142,7 +153,7 @@ class AttestationTheseForm extends Form implements InputFilterProviderInterface ], ], $name = 'exemplaireImprimeConformeAVersionDeposee' => [ - 'required' => true, + 'required' => ! $this->disableExemplaireImprimeConformeAVersionDeposee, 'validators' => [ [ 'name' => 'NotEmpty', diff --git a/module/Application/src/Application/Form/DiffusionTheseForm.php b/module/Application/src/Application/Form/DiffusionTheseForm.php index 0b7eacbedc3fb9ab34b785088d9a710c235a4e87..04ac65f9273e840f27233da809d30b0a65f8775a 100644 --- a/module/Application/src/Application/Form/DiffusionTheseForm.php +++ b/module/Application/src/Application/Form/DiffusionTheseForm.php @@ -205,7 +205,7 @@ class DiffusionTheseForm extends Form $this->add([ 'type' => 'Text', - 'name' => 'idOrcid', + 'name' => 'orcid', 'options' => [ 'label' => 'Identifiant ORCID (facultatif)', ], @@ -214,6 +214,17 @@ class DiffusionTheseForm extends Form ], ]); + $this->add([ + 'type' => 'Text', + 'name' => 'halId', + 'options' => [ + 'label' => 'IdHAL (facultatif)', + ], + 'attributes' => [ + 'title' => "", + ], + ]); + $this->add([ 'type' => 'Checkbox', 'name' => 'certifCharteDiff', @@ -281,9 +292,6 @@ class DiffusionTheseForm extends Form $autorisMel = $this->get('autorisMel')->getValue(); switch ($autorisMel) { case null: - $required['autorisEmbargoDuree'] = false; - $required['autorisMotif'] = false; - break; case Diffusion::AUTORISATION_OUI_IMMEDIAT: $required['autorisEmbargoDuree'] = false; $required['autorisMotif'] = false; @@ -421,7 +429,7 @@ class DiffusionTheseForm extends Form ], ], ], - $name = 'idOrcid' => [ + $name = 'orcid' => [ 'required' => false, ], $name = 'certifCharteDiff' => [ diff --git a/module/Application/src/Application/Form/EcoleDoctoraleForm.php b/module/Application/src/Application/Form/EcoleDoctoraleForm.php index 579a28b20496835063e29557baa27125d7a9be9d..6a32a25fc53a326961bedee17ee925d45461dc52 100644 --- a/module/Application/src/Application/Form/EcoleDoctoraleForm.php +++ b/module/Application/src/Application/Form/EcoleDoctoraleForm.php @@ -3,6 +3,7 @@ namespace Application\Form; use Application\Entity\Db\EcoleDoctorale; +use Zend\Form\Element\Checkbox; use Zend\Form\Element\Hidden; use Zend\Form\Element\File; use Zend\Form\Element\Submit; @@ -39,6 +40,10 @@ class EcoleDoctoraleForm extends Form new Text('code')) ->setLabel("Code :") ); + $this->add( + (new Checkbox('estFerme')) + ->setLabel("École doctorale fermée") + ); $this ->add(( new File('cheminLogo')) diff --git a/module/Application/src/Application/Form/EtablissementForm.php b/module/Application/src/Application/Form/EtablissementForm.php index 4a9b80fe20a1f1ec3e15c1d8fecd3f5a934dbae8..b41d209319175b285f2b15dca5845486bd3d4441 100644 --- a/module/Application/src/Application/Form/EtablissementForm.php +++ b/module/Application/src/Application/Form/EtablissementForm.php @@ -54,6 +54,10 @@ class EtablissementForm extends Form (new Checkbox('estAssocie')) ->setLabel("Établissement associé") ); + $this->add( + (new Checkbox('estFerme')) + ->setLabel("Établissement fermé") + ); $this ->add(( diff --git a/module/Application/src/Application/Form/Hydrator/DiffusionHydrator.php b/module/Application/src/Application/Form/Hydrator/DiffusionHydrator.php index 13fff2557d34ea37e93e5bda94020c56a0e53121..e9d81d5294c08be760e823a3e3282ff0cc1e949e 100644 --- a/module/Application/src/Application/Form/Hydrator/DiffusionHydrator.php +++ b/module/Application/src/Application/Form/Hydrator/DiffusionHydrator.php @@ -3,18 +3,10 @@ namespace Application\Form\Hydrator; use Application\Entity\Db\Diffusion; -use Application\Entity\Db\RecapBu; -use Doctrine\ORM\OptimisticLockException; use DoctrineModule\Stdlib\Hydrator\DoctrineObject; use UnicaenApp\Service\EntityManagerAwareInterface; use UnicaenApp\Service\EntityManagerAwareTrait; -/** - * Created by PhpStorm. - * User: gauthierb - * Date: 20/05/16 - * Time: 17:08 - */ class DiffusionHydrator extends DoctrineObject implements EntityManagerAwareInterface { use EntityManagerAwareTrait; @@ -41,7 +33,6 @@ class DiffusionHydrator extends DoctrineObject implements EntityManagerAwareInte * @param array $data * @param Diffusion $attestation * @return Diffusion - * @throws OptimisticLockException */ public function hydrate(array $data, $attestation) { @@ -50,6 +41,13 @@ class DiffusionHydrator extends DoctrineObject implements EntityManagerAwareInte $data['confidentielle'] = $attestation->getThese()->getDateFinConfidentialite() !== null ? Diffusion::CONFIDENTIELLE_OUI : Diffusion::CONFIDENTIELLE_NON; } + if (!isset($data['orcid'])) { + $data['orcid'] = null; + } + if (!isset($data['halId'])) { + $data['halId'] = null; + } + /** @var Diffusion $diff */ $diff = parent::hydrate($data, $attestation); diff --git a/module/Application/src/Application/Form/Hydrator/EcoleDoctoraleHydrator.php b/module/Application/src/Application/Form/Hydrator/EcoleDoctoraleHydrator.php index 718f12a6b8bc26fe1960b7e87fdacd81856be0ba..bf1bfbac0cd994133a4cb3dc78d5ffced3addef4 100644 --- a/module/Application/src/Application/Form/Hydrator/EcoleDoctoraleHydrator.php +++ b/module/Application/src/Application/Form/Hydrator/EcoleDoctoraleHydrator.php @@ -20,6 +20,7 @@ class EcoleDoctoraleHydrator extends DoctrineObject $data['code'] = $ed->getStructure()->getCode(); $data['sigle'] = $ed->getSigle(); $data['cheminLogo'] = $ed->getCheminLogo(); + $data['estFerme'] = $ed->getStructure()->isFerme(); return $data; } @@ -40,6 +41,7 @@ class EcoleDoctoraleHydrator extends DoctrineObject $object->getStructure()->setCode($data['code']); $object->setSigle($data['sigle']); $object->setCheminLogo($data['cheminLogo']); + if (isset($data['estFerme']) AND $data['estFerme'] === "1") $object->getStructure()->setFerme(true); else $object->getStructure()->setFerme(false); return $object; } diff --git a/module/Application/src/Application/Form/Hydrator/EtablissementHydrator.php b/module/Application/src/Application/Form/Hydrator/EtablissementHydrator.php index 632fd8da184579f2ca625acd46ca13cd73528bf2..9f71687023fc738e5c0dc4563316d86eb24b4258 100644 --- a/module/Application/src/Application/Form/Hydrator/EtablissementHydrator.php +++ b/module/Application/src/Application/Form/Hydrator/EtablissementHydrator.php @@ -24,6 +24,7 @@ class EtablissementHydrator extends DoctrineObject $data['estMembre'] = $etablissement->estMembre(); $data['estAssocie'] = $etablissement->estAssocie(); $data['cheminLogo'] = $etablissement->getCheminLogo(); + $data['estFerme'] = $etablissement->getStructure()->isFerme(); return $data; } @@ -47,7 +48,7 @@ class EtablissementHydrator extends DoctrineObject $object->setEstMembre($data['estMembre']); $object->setEstAssocie($data['estAssocie']); $object->setCheminLogo($data['cheminLogo']); - + if (isset($data['estFerme']) AND $data['estFerme'] === "1") $object->getStructure()->setFerme(true); else $object->getStructure()->setFerme(false); return $object; } } \ No newline at end of file diff --git a/module/Application/src/Application/Form/Hydrator/RdvBuHydrator.php b/module/Application/src/Application/Form/Hydrator/RdvBuHydrator.php index 6fbbb84a088a86908cab69d7d90a0a68a0327b5c..0725d3a7c53755dc4a3661b2be564e3b03139fad 100644 --- a/module/Application/src/Application/Form/Hydrator/RdvBuHydrator.php +++ b/module/Application/src/Application/Form/Hydrator/RdvBuHydrator.php @@ -4,13 +4,21 @@ namespace Application\Form\Hydrator; use Application\Entity\Db\Diffusion; use Application\Entity\Db\RdvBu; +use Application\Entity\Db\VersionFichier; use Application\Service\FichierThese\FichierTheseServiceAwareTrait; +use Doctrine\ORM\EntityManager; +use Doctrine\ORM\OptimisticLockException; use DoctrineModule\Stdlib\Hydrator\DoctrineObject; +use UnicaenApp\Exception\RuntimeException; +/** + * @property EntityManager $objectManager + * + * @author Unicaen + */ class RdvBuHydrator extends DoctrineObject { use FichierTheseServiceAwareTrait; -// use EntityManagerAwareTrait; private function existeVersionArchivable(RdvBu $rdvBu) { @@ -28,27 +36,17 @@ class RdvBuHydrator extends DoctrineObject $data = parent::extract($rdvBu); $data['versionArchivableFournie'] = $this->existeVersionArchivable($rdvBu); -// /** @var QueryBuilder $qb */ -// $qb = $this->objectManager->getRepository(Diffusion::class)->createQueryBuilder("d") -// ->andWhere("d.theseId = :theseId") -// ->setParameter("theseId", $rdvBu->getThese()->getId()); -// /** @var Diffusion $result */ -// $result = $qb->getQuery()->getOneOrNullResult(); - - /** @var Diffusion $result */ - $result = $this->objectManager->getRepository(Diffusion::class)->findOneBy(["these" => $rdvBu->getThese()]); - - - if ($result) $data['idOrcid'] = $result->getOrcid(); + if ($diffusion = $this->getDiffusion($rdvBu)) { + $data['idOrcid'] = $diffusion->getOrcid(); + $data['halId'] = $diffusion->getHalId(); + } return $data; } /** - * Hydrate $object with the provided $data. - * - * @param array $data - * @param RdvBu $rdvBu + * @param array $data + * @param object $rdvBu * @return RdvBu */ public function hydrate(array $data, $rdvBu) @@ -60,13 +58,29 @@ class RdvBuHydrator extends DoctrineObject /** @var RdvBu $object */ $object = parent::hydrate($data, $rdvBu); - /** @var Diffusion $result */ - $result = $this->objectManager->getRepository(Diffusion::class)->findOneBy(["these" => $rdvBu->getThese()]); - if ($result) { - $result->setOrcid($data['idOrcid']); - $this->objectManager->flush(); + + if ($diffusion = $this->getDiffusion($rdvBu)) { + $diffusion->setOrcid($data['idOrcid']); + $diffusion->setHalId($data['halId']); + try { + $this->objectManager->flush($diffusion); + } catch (OptimisticLockException $e) { + throw new RuntimeException("Impossible d'enregistrer la Diffusion", null, $e); + } } return $object; } + + /** + * @param RdvBu $rdvBu + * @return Diffusion|null + */ + private function getDiffusion(RdvBu $rdvBu) + { + // le RDV BU ne concerne que le dépôt de la version initiale + $version = $this->fichierTheseService->fetchVersionFichier(VersionFichier::CODE_ORIG); + + return $rdvBu->getThese()->getDiffusionForVersion($version); + } } \ No newline at end of file diff --git a/module/Application/src/Application/Form/Hydrator/UniteRechercheHydrator.php b/module/Application/src/Application/Form/Hydrator/UniteRechercheHydrator.php index cb40b5857d53ff8bbc97bb0e964213970172cc84..3684eb8923215ebd0f98ce925ef46c28ae44ee37 100644 --- a/module/Application/src/Application/Form/Hydrator/UniteRechercheHydrator.php +++ b/module/Application/src/Application/Form/Hydrator/UniteRechercheHydrator.php @@ -21,6 +21,7 @@ class UniteRechercheHydrator extends DoctrineObject $data['sigle'] = $ur->getSigle(); $data['cheminLogo'] = $ur->getCheminLogo(); $data['RNSR'] = $ur->getRNSR(); + $data['estFerme'] = $ur->getStructure()->isFerme(); return $data; } @@ -42,6 +43,7 @@ class UniteRechercheHydrator extends DoctrineObject $object->setSigle($data['sigle']); $object->setCheminLogo($data['cheminLogo']); $object->setRNSR($data['RNSR']); + if (isset($data['estFerme']) AND $data['estFerme'] === "1") $object->getStructure()->setFerme(true); else $object->getStructure()->setFerme(false); return $object; } diff --git a/module/Application/src/Application/Form/RdvBuTheseForm.php b/module/Application/src/Application/Form/RdvBuTheseForm.php index aa9949a130cd0a79d4c7dee32404732f68cdccb8..c6e1e8dbc14775aa01e954fb5c3799e691d48cef 100644 --- a/module/Application/src/Application/Form/RdvBuTheseForm.php +++ b/module/Application/src/Application/Form/RdvBuTheseForm.php @@ -5,7 +5,6 @@ namespace Application\Form; use Application\Entity\Db\RdvBu; use Application\Filter\MotsClesFilter; use Zend\Form\Element\Checkbox; -use Zend\Form\Element\Radio; use Zend\Form\Element\Submit; use Zend\Form\Element\Textarea; use Zend\Form\Form; @@ -16,6 +15,16 @@ class RdvBuTheseForm extends Form const SEPARATEUR_MOTS_CLES_RAMEAU = RdvBu::SEPARATEUR_MOTS_CLES_RAMEAU; const SEPARATEUR_MOTS_CLES_RAMEAU_LIB = RdvBu::SEPARATEUR_MOTS_CLES_RAMEAU_LIB; + private $disableExemplPapierFourni = false; + + /** + * @param bool $disable + */ + public function disableExemplPapierFourni(bool $disable = true) + { + $this->disableExemplPapierFourni = $disable; + } + /** * NB: hydrateur injecté par la factory */ @@ -96,6 +105,17 @@ class RdvBuTheseForm extends Form ], ]); + $this->add([ + 'type' => 'Text', + 'name' => 'halId', + 'options' => [ + 'label' => 'IdHAL (facultatif)', + ], + 'attributes' => [ + 'title' => "", + ], + ]); + $this->add((new Submit('submit')) ->setValue("Enregistrer") ->setAttribute('class', 'btn btn-primary') @@ -132,10 +152,30 @@ class RdvBuTheseForm extends Form new MotsClesFilter(['separator' => self::SEPARATEUR_MOTS_CLES_RAMEAU]), ], ], + 'idOrcid' => [ + 'name' => 'idOrcid', + 'required' => false, + ], + 'halId' => [ + 'name' => 'halId', + 'required' => false, + ], 'divers' => [ 'name' => 'divers', 'required' => false, ], ])); } + + /** + * {@inheritDoc} + */ + public function prepare() + { + if ($this->disableExemplPapierFourni) { + $this->remove('exemplPapierFourni'); + } + + return parent::prepare(); + } } \ No newline at end of file diff --git a/module/Application/src/Application/Form/UniteRechercheForm.php b/module/Application/src/Application/Form/UniteRechercheForm.php index 372dfbbafc14727d1ad747f4fe14cdd99525e641..38c51bc8f9d97b4a35ab94abfbac54e080104ea3 100644 --- a/module/Application/src/Application/Form/UniteRechercheForm.php +++ b/module/Application/src/Application/Form/UniteRechercheForm.php @@ -3,6 +3,7 @@ namespace Application\Form; use Application\Entity\Db\UniteRecherche; +use Zend\Form\Element\Checkbox; use Zend\Form\Element\Submit; use Zend\Form\Element\Text; use Zend\Form\Element\File; @@ -42,6 +43,10 @@ class UniteRechercheForm extends Form new Text('RNSR')) ->setLabel("Identifiant RNSR :") ); + $this->add( + (new Checkbox('estFerme')) + ->setLabel("Unité de recherche fermée") + ); $this ->add(( new File('cheminLogo')) diff --git a/module/Application/src/Application/Provider/Privilege/ThesePrivileges.php b/module/Application/src/Application/Provider/Privilege/ThesePrivileges.php index e8d2a68f8689306fe7d977fe64872bb4967aa214..f14f4360683a9bd0a4781d17966558bee31e3619 100644 --- a/module/Application/src/Application/Provider/Privilege/ThesePrivileges.php +++ b/module/Application/src/Application/Provider/Privilege/ThesePrivileges.php @@ -2,6 +2,7 @@ namespace Application\Provider\Privilege; +use Application\Entity\Db\VersionFichier; use UnicaenAuth\Provider\Privilege\Privileges; /** @@ -102,34 +103,34 @@ class ThesePrivileges extends Privileges } /** - * @param bool $correctionAttendue + * @param VersionFichier $version * @return string */ - static public function THESE_SAISIE_ATTESTATIONS_($correctionAttendue) + static public function THESE_SAISIE_ATTESTATIONS_(VersionFichier $version) { - return (bool) $correctionAttendue ? + return $version->estVersionCorrigee() ? ThesePrivileges::THESE_SAISIE_ATTESTATIONS_VERSION_CORRIGEE : ThesePrivileges::THESE_SAISIE_ATTESTATIONS_VERSION_INITIALE; } /** - * @param bool $correctionAttendue + * @param VersionFichier $version * @return string */ - static public function THESE_SAISIE_AUTORISATION_DIFFUSION_($correctionAttendue) + static public function THESE_SAISIE_AUTORISATION_DIFFUSION_(VersionFichier $version) { - return (bool) $correctionAttendue ? + return $version->estVersionCorrigee() ? ThesePrivileges::THESE_SAISIE_AUTORISATION_DIFFUSION_VERSION_CORRIGEE : ThesePrivileges::THESE_SAISIE_AUTORISATION_DIFFUSION_VERSION_INITIALE; } /** - * @param bool $correctionAttendue + * @param VersionFichier $version * @return string */ - static public function THESE_SAISIE_CONFORMITE_VERSION_ARCHIVAGE_($correctionAttendue) + static public function THESE_SAISIE_CONFORMITE_VERSION_ARCHIVAGE_(VersionFichier $version) { - return $correctionAttendue ? + return $version->estVersionCorrigee() ? ThesePrivileges::THESE_SAISIE_CONFORMITE_VERSION_ARCHIVAGE_CORRIGEE : ThesePrivileges::THESE_SAISIE_CONFORMITE_VERSION_ARCHIVAGE_INITIALE; } diff --git a/module/Application/src/Application/Rule/AutorisationDiffusionRule.php b/module/Application/src/Application/Rule/AutorisationDiffusionRule.php new file mode 100644 index 0000000000000000000000000000000000000000..9371a6e72f5aeae70e6d078f4e9b59e3dbfbf793 --- /dev/null +++ b/module/Application/src/Application/Rule/AutorisationDiffusionRule.php @@ -0,0 +1,97 @@ +<?php + +namespace Application\Rule; + +use Application\Entity\Db\Diffusion; +use Doctrine\ORM\EntityManager; + +/** + * Règle métier concernant la remise d'une version papier de la thèse. + * + * @author Unicaen + */ +class AutorisationDiffusionRule implements RuleInterface +{ + /** + * @var Diffusion + */ + private $diffusion; + + /** + * @param Diffusion $diffusion + * @return self + */ + public function setDiffusion(Diffusion $diffusion): self + { + $this->diffusion = $diffusion; + + return $this; + } + + /** + * @return self + */ + public function execute(): self + { + // rien n'est fait ici + + return $this; + } + + /** + * Retourne un booléen indiquant si la remise d'un exemplaire papier est requise. + * + * @return bool + */ + public function computeRemiseExemplairePapierEstRequise(): bool + { + return $this->autorisMelEntraineRemiseExemplairePapier($this->diffusion->getAutorisMel()); + } + + /** + * Détermine si la réponse à l'autorisation de diffusion (NON ENCORE ENREGISTRÉE) a changé de manière "importante", + * càd si elle est passée + * de "Oui" à "Oui+Embargo" ou "Non", + * ou + * de "Oui+Embargo" ou "Non" à "Oui". + * + * ATTENTION: cette méthode ne peut être appelée qu'avant le flush de l'entity manager. + * + * @param EntityManager $entityManager + * @return bool + */ + public function computeChangementDeReponseImportant(EntityManager $entityManager): bool + { + $metadata = $entityManager->getClassMetadata(Diffusion::class); + $uow = $entityManager->getUnitOfWork(); + $uow->recomputeSingleEntityChangeSet($metadata, $this->diffusion); + $changeset = $uow->getEntityChangeSet($this->diffusion); + + if (isset($changeset['autorisMel'])) { + $oldValue = $changeset['autorisMel'][0]; + $newValue = $changeset['autorisMel'][1]; + return + $this->autorisMelEntraineRemiseExemplairePapier($oldValue) && ! $this->autorisMelEntraineRemiseExemplairePapier($newValue) + || + $this->autorisMelEntraineRemiseExemplairePapier($newValue) && ! $this->autorisMelEntraineRemiseExemplairePapier($oldValue); + } + + return false; + } + + /** + * Teste si la réponse spécifiée à l'autorisation de diffusion entraîne ou non la nécessité de remettre + * une version imprimée de la thèse. + * + * @param int $autorisMel + * @return bool + */ + private function autorisMelEntraineRemiseExemplairePapier($autorisMel): bool + { + if ($autorisMel === Diffusion::AUTORISATION_OUI_EMBARGO || $autorisMel === Diffusion::AUTORISATION_NON) { + return true; + } else { + return false; + } + } +} \ No newline at end of file diff --git a/module/Application/src/Application/Rule/SuppressionAttestationsRequiseRule.php b/module/Application/src/Application/Rule/SuppressionAttestationsRequiseRule.php new file mode 100644 index 0000000000000000000000000000000000000000..1b6c553f8492f9c50f15a18dfbf4ef39a2a41042 --- /dev/null +++ b/module/Application/src/Application/Rule/SuppressionAttestationsRequiseRule.php @@ -0,0 +1,85 @@ +<?php + +namespace Application\Rule; + +use Application\Entity\Db\These; +use Application\Entity\Db\VersionFichier; +use UnicaenApp\Exception\LogicException; + +/** + * Règle déterminant s'il est nécessaire de supprimer les réponses aux "attestations" selon les réponses + * à l'autorisation de diffusion. + * + * Supprimer les réponses aux attestations permet de redemander à l'utilisateur d'y répondre à nouveau. + * + * @author Unicaen + */ +class SuppressionAttestationsRequiseRule implements RuleInterface +{ + /** + * @var These + */ + private $these; + + /** + * @var VersionFichier + */ + private $versionFichier; + + /** + * SuppressionAttestationsRequiseRule constructor. + * + * @param These $these + * @param VersionFichier $versionFichier + */ + public function __construct(These $these, VersionFichier $versionFichier) + { + $this->these = $these; + $this->versionFichier = $versionFichier; + } + + /** + * @return self + */ + public function execute() + { + // rien n'est fait ici + + return $this; + } + + /** + * Retourne un booléen indiquant si la remise d'un exemplaire papier est requise. + * + * @return bool + */ + public function computeEstRequise(): bool + { + $attestation = $this->these->getAttestationForVersion($this->versionFichier); + + if ($attestation === null) { + // aucune attestation remplie : suppression inutile + return false; + } + + $diffusion = $this->these->getDiffusionForVersion($this->versionFichier); + + if ($diffusion === null) { + throw new LogicException("Appel de méthode prématuré : autorisation de diffusion introuvable pour la $this->versionFichier"); + } + + if ($diffusion->isRemiseExemplairePapierRequise()) { + if (! $attestation->getExemplaireImprimeConformeAVersionDeposee()) { + // la question "exemplaire papier conforme" n'a pas été posée, il faudra la poser : suppression + return true; + } + } else { + if ($attestation->getExemplaireImprimeConformeAVersionDeposee()) { + // la question "exemplaire papier conforme" a été posée, ce n'est plus pertinent : suppression + return true; + } + } + + return false; + } +} \ No newline at end of file diff --git a/module/Application/src/Application/Service/FichierThese/FichierTheseService.php b/module/Application/src/Application/Service/FichierThese/FichierTheseService.php index 74497f3eb4569a9b888b48cee622559b27e7c927..5880a66b994dfcdaed75f494a268eb925d9798b7 100644 --- a/module/Application/src/Application/Service/FichierThese/FichierTheseService.php +++ b/module/Application/src/Application/Service/FichierThese/FichierTheseService.php @@ -26,7 +26,7 @@ use Application\Service\VersionFichier\VersionFichierServiceAwareTrait; use Application\Validator\Exception\CinesErrorException; use Application\Validator\FichierCinesValidator; use Doctrine\ORM\OptimisticLockException; -use Retraitement\Exception\TimedOutCommandException; +use Application\Command\Exception\TimedOutCommandException; use Retraitement\Service\RetraitementServiceAwareTrait; use UnicaenApp\Exception\LogicException; use UnicaenApp\Exception\RuntimeException; @@ -286,6 +286,7 @@ class FichierTheseService extends BaseService * @param FichierThese $fichierThese Fichier à retraiter * @param string $timeout Timeout éventuel à appliquer au lancement du script de retraitement. * @return FichierThese Fichier retraité + * @throws TimedOutCommandException */ public function creerFichierTheseRetraite(FichierThese $fichierThese, $timeout = null) { @@ -437,12 +438,14 @@ class FichierTheseService extends BaseService * @param PdcData $pdcData * @param PhpRenderer $renderer * @param string $filepath + * @param boolean $recto */ - public function generatePageDeCouverture(PdcData $pdcData, PhpRenderer $renderer, $filepath = null) + public function generatePageDeCouverture(PdcData $pdcData, PhpRenderer $renderer, $filepath = null, $recto = true) { $exporter = new PageDeCouverturePdfExporter($renderer, 'A4'); $exporter->setVars([ 'informations' => $pdcData, + 'recto/verso' => $recto, ]); if ($filepath !== null) { $exporter->export($filepath, Pdf::DESTINATION_FILE); @@ -507,6 +510,7 @@ class FichierTheseService extends BaseService * @param bool $removeFirstPage * @param int $timeout * @return string + * @throws TimedOutCommandException */ public function fusionnerPdcEtThese(These $these, PdcData $pdcData, $versionFichier, $removeFirstPage = false, $timeout = 0) { @@ -531,9 +535,6 @@ class FichierTheseService extends BaseService )); } } - catch (TimedOutCommandException $toce) { - throw $toce; - } catch (RuntimeException $rte) { throw new RuntimeException( "Une erreur est survenue lors de l'exécution de la commande " . $command->getName(), @@ -568,12 +569,17 @@ class FichierTheseService extends BaseService { // generation de la couverture $filename = "sygal_couverture_" . $these->getId() . "_" . uniqid() . ".pdf"; - $this->generatePageDeCouverture($pdcData, $this->renderer, $filename); + $this->generatePageDeCouverture($pdcData, $this->renderer, $filename, !$removeFirstPage); // recuperation de la bonne version du manuscript $manuscritFichier = current($this->getRepository()->fetchFichierTheses($these, NatureFichier::CODE_THESE_PDF, $versionFichier)); $manuscritChemin = $this->fichierService->computeDestinationFilePathForFichier($manuscritFichier->getFichier()); + if (!is_readable($manuscritChemin)) { + throw new RuntimeException( + "Le fichier suivant n'existe pas ou n'est pas accessible sur le serveur : " . $manuscritChemin); + } + $inputFiles = [ 'couverture' => sys_get_temp_dir() . '/' . $filename, 'manuscrit' => $manuscritChemin diff --git a/module/Application/src/Application/Service/Message/DiffusionMessages.php b/module/Application/src/Application/Service/Message/DiffusionMessages.php index e4aace7c650386b3aa47ddf4d892e540e225f46c..76faf608535505ac85e7b609c8cdf789f89ed288 100644 --- a/module/Application/src/Application/Service/Message/DiffusionMessages.php +++ b/module/Application/src/Application/Service/Message/DiffusionMessages.php @@ -14,6 +14,7 @@ class DiffusionMessages const AUTORIS_DIFFUSION_FORM_LABEL = 'AUTORIS_DIFFUSION_FORM_LABEL'; const DROITS_AUTEUR_OK_FORM_VALUE = 'DROITS_AUTEUR_OK_FORM_VALUE'; const AUTORIS_DIFFUSION_FORM_VALUE = 'AUTORIS_DIFFUSION_FORM_VALUE'; + const AUTORIS_DIFFUSION_FORM_LAIUS = 'AUTORIS_DIFFUSION_FORM_LAIUS'; const CONFIDENTIALITE_LAIUS = 'CONFIDENTIALITE_LAIUS'; const AUTORIS_MISE_EN_LIGNE_REPONSE = 'AUTORIS_MISE_EN_LIGNE_REPONSE'; } \ No newline at end of file diff --git a/module/Application/src/Application/Service/Structure/StructureService.php b/module/Application/src/Application/Service/Structure/StructureService.php index 4cc5b54061a95d3c648f57db77d613b83a4b968c..3e09b44040c9882693fe2fdb06360a6466d44e59 100755 --- a/module/Application/src/Application/Service/Structure/StructureService.php +++ b/module/Application/src/Application/Service/Structure/StructureService.php @@ -5,7 +5,6 @@ namespace Application\Service\Structure; use Application\Command\ConvertCommand; use Application\Entity\Db\EcoleDoctorale; use Application\Entity\Db\Etablissement; -use Application\Entity\Db\Source; use Application\Entity\Db\Structure; use Application\Entity\Db\StructureConcreteInterface; use Application\Entity\Db\StructureInterface; @@ -25,7 +24,7 @@ use Doctrine\ORM\NonUniqueResultException; use Doctrine\ORM\OptimisticLockException; use DoctrineModule\Stdlib\Hydrator\DoctrineObject; use Import\Service\Traits\SynchroServiceAwareTrait; -use Retraitement\Exception\TimedOutCommandException; +use Application\Command\Exception\TimedOutCommandException; use UnicaenApp\Exception\RuntimeException; use UnicaenApp\Util; use Webmozart\Assert\Assert; @@ -635,9 +634,9 @@ class StructureService extends BaseService ->leftJoin('structure.structureSubstituante', 'substitutionTo') ->leftJoin('structure.structuresSubstituees', 'substitutionFrom') ->andWhere('substitutionTo.id IS NULL OR pasHistorise(substitutionTo) != 1'); - if ($order) $qb->orderBy('structure.' . $order); + if ($order) $qb->orderBy(' structure.' . $order); else { - if ($type === TypeStructure::CODE_ECOLE_DOCTORALE) $qb->orderBy('structureConcrete.sourceCode'); + if ($type === TypeStructure::CODE_ECOLE_DOCTORALE) $qb->orderBy('structure.ferme, structureConcrete.sourceCode'); } $result = $qb->getQuery()->getResult(); @@ -889,7 +888,7 @@ class StructureService extends BaseService )); } } catch (TimedOutCommandException $toce) { - throw $toce; + // n'arrive jamais car aucun timeout n'a été transmis à ConvertCommand } catch (RuntimeException $rte) { throw new RuntimeException( diff --git a/module/Application/src/Application/Service/These/Convention/ConventionPdfExporter.php b/module/Application/src/Application/Service/These/Convention/ConventionPdfExporter.php index ef36a7eccb9055ce059aa7e367bfe8ba6a263e58..e9d17dfd17f7e87bdf402935d2fe643fc91aba37 100644 --- a/module/Application/src/Application/Service/These/Convention/ConventionPdfExporter.php +++ b/module/Application/src/Application/Service/These/Convention/ConventionPdfExporter.php @@ -8,14 +8,21 @@ use Zend\View\Renderer\PhpRenderer; use Zend\View\Resolver\AggregateResolver; use Zend\View\Resolver\TemplatePathStack; - class ConventionPdfExporter extends PdfExporter { + /** + * @var array + */ private $vars; - - - + /** + * ConventionPdfExporter constructor. + * + * @param PhpRenderer|null $renderer + * @param string $format + * @param bool $orientationPaysage + * @param int $defaultFontSize + */ public function __construct(PhpRenderer $renderer = null, $format = 'A4', $orientationPaysage = false, $defaultFontSize = 10) { parent::__construct($renderer, $format, $orientationPaysage, $defaultFontSize); @@ -25,13 +32,18 @@ class ConventionPdfExporter extends PdfExporter $resolver->attach(new TemplatePathStack(['script_paths' => [__DIR__]])); $this->setLogo(file_get_contents(APPLICATION_DIR . '/public/logo_normandie_univ.jpg')); // 'var:logo' dans les phtml - $this->setHeaderScript('partial/header.phtml'); + $this->setHeaderScript('partial/header-odd.phtml', 'O'); // pages paires + $this->setHeaderScript('partial/header-even.phtml', 'E'); // pages impaires $this->setFooterScript('partial/footer.phtml'); $this->setMarginTop(20); $this->setMarginBottom(25); $this->setFooterTitle("Convention de mise en ligne"); } + /** + * @param array $vars + * @return $this + */ public function setVars(array $vars) { $this->vars = $vars; @@ -40,6 +52,12 @@ class ConventionPdfExporter extends PdfExporter return $this; } + /** + * @param string $filename + * @param string $destination + * @param string $memoryLimit + * @return string + */ public function export($filename = null, $destination = self::DESTINATION_BROWSER, $memoryLimit = null) { if (empty($this->vars)) { diff --git a/module/Application/src/Application/Service/These/Convention/convention.phtml b/module/Application/src/Application/Service/These/Convention/convention.phtml index b5ca2f1db443835460c94d172fb5f497261dbda8..f14751ceced1d4efa03f8ffc5088c7ce74efe25c 100644 --- a/module/Application/src/Application/Service/These/Convention/convention.phtml +++ b/module/Application/src/Application/Service/These/Convention/convention.phtml @@ -1,16 +1,17 @@ <?php +use Application\Entity\Db\Diffusion; use Application\Entity\Db\These; +use Application\Service\Message\DiffusionMessages; use Application\View\Renderer\PhpRenderer; /** * @var PhpRenderer $this * @var These $these + * @var Diffusion $diffusion * @var string $libEtablissement * @var string $libEtablissementA * @var string $libEtablissementLe - * @var string $libEtablissementDe - * @var string $libTribunal */ ?> @@ -75,12 +76,7 @@ use Application\View\Renderer\PhpRenderer; <div> <p> - La thèse est disponible en version imprimée au service de documentation <?php echo $libEtablissementDe ?> et - en PDF pour l'esemble de la communauté universitaire (en intranet ou dans le cadre du Prêt Entre Bibliothèques). - </p> - <p> - La loi applicable à cette présente convention est la loi française. Le tribunal compétent pour juger de tout - contentieux lié au présent contrat est <?php echo $libTribunal ?>. + <?php echo $this->message()->render(DiffusionMessages::AUTORIS_MISE_EN_LIGNE_LAIUS, [], $diffusion) ?> </p> </div> diff --git a/module/Application/src/Application/Service/These/Convention/partial/attestations.phtml b/module/Application/src/Application/Service/These/Convention/partial/attestations.phtml index a06d038ae43418bccf82e01c7381fd48420026df..1df8fe0330784dccc01d5b9bffc15f28d778cef8 100644 --- a/module/Application/src/Application/Service/These/Convention/partial/attestations.phtml +++ b/module/Application/src/Application/Service/These/Convention/partial/attestations.phtml @@ -1,11 +1,12 @@ <?php /** * @var These $these + * @var Attestation $attestation */ +use Application\Entity\Db\Attestation; use Application\Entity\Db\These; -$attestation = $these->getAttestation(); ?> <style> diff --git a/module/Application/src/Application/Service/These/Convention/partial/diffusion.phtml b/module/Application/src/Application/Service/These/Convention/partial/diffusion.phtml index 097a4961dd92582655325030e3961c7f9811e6bb..2b45a8faae8066086b7e71a57b8c9963b746f4ce 100644 --- a/module/Application/src/Application/Service/These/Convention/partial/diffusion.phtml +++ b/module/Application/src/Application/Service/These/Convention/partial/diffusion.phtml @@ -2,13 +2,14 @@ /** * @var PhpRenderer $this * @var These $these + * @var Diffusion $diffusion */ +use Application\Entity\Db\Diffusion; use Application\Entity\Db\These; use Application\Service\Message\DiffusionMessages; use Application\View\Renderer\PhpRenderer; -$diffusion = $these->getDiffusion(); ?> <style> @@ -27,7 +28,4 @@ $diffusion = $these->getDiffusion(); <div class="diffusion-item-value"> <?php echo $this->message()->render(DiffusionMessages::AUTORIS_MISE_EN_LIGNE_REPONSE, [], $diffusion) ?> </div> - <div class="autorisation-laius text-info"> - <?php echo $this->message()->render(DiffusionMessages::AUTORIS_MISE_EN_LIGNE_LAIUS, [], $diffusion) ?> - </div> </div> \ No newline at end of file diff --git a/module/Application/src/Application/Service/These/Convention/partial/droits.phtml b/module/Application/src/Application/Service/These/Convention/partial/droits.phtml index 8cce481e5735a08188b2604725ae1a6bac0719e5..2a12f056267da04f469cccdba22a3ae610a6a459 100644 --- a/module/Application/src/Application/Service/These/Convention/partial/droits.phtml +++ b/module/Application/src/Application/Service/These/Convention/partial/droits.phtml @@ -2,13 +2,14 @@ /** * @var PhpRenderer $this * @var These $these + * @var Diffusion $diffusion */ +use Application\Entity\Db\Diffusion; use Application\Entity\Db\These; use Application\Service\Message\DiffusionMessages; use Application\View\Renderer\PhpRenderer; -$diffusion = $these->getDiffusion(); ?> <style> diff --git a/module/Application/src/Application/Service/These/Convention/partial/header.phtml b/module/Application/src/Application/Service/These/Convention/partial/header-even.phtml similarity index 80% rename from module/Application/src/Application/Service/These/Convention/partial/header.phtml rename to module/Application/src/Application/Service/These/Convention/partial/header-even.phtml index 177648ed84608780e346f82227e1570e06a7e74c..21b790f2ed53e3e3f8892a207c2b64aeb2a3949d 100644 --- a/module/Application/src/Application/Service/These/Convention/partial/header.phtml +++ b/module/Application/src/Application/Service/These/Convention/partial/header-even.phtml @@ -1,7 +1,6 @@ <table width="100%" style="font-size: 110%; vertical-align: top;"> <tr> <td width="30%" style="text-align: left;"> - <img src="//gest.unicaen.fr/images/UNICAEN-logo-NOIR-horizontal.png" height="90px" alt="Logo de l'Université" /> <?php echo $this->headerSubtitle; ?> </td> <td width="40%" align="cegnter" style="font-weight: bold; /*font-size: 120%;*/"> diff --git a/module/Application/src/Application/Service/These/Convention/partial/header-odd.phtml b/module/Application/src/Application/Service/These/Convention/partial/header-odd.phtml new file mode 100644 index 0000000000000000000000000000000000000000..f6219cbd3c3257895db6a637e7d518f5e4c37049 --- /dev/null +++ b/module/Application/src/Application/Service/These/Convention/partial/header-odd.phtml @@ -0,0 +1,14 @@ +<table width="100%" style="font-size: 110%; vertical-align: top;"> + <tr> + <td width="30%" style="text-align: left;"> + <?php echo $this->headerSubtitle; ?> + </td> + <td width="40%" align="cegnter" style="font-weight: bold; /*font-size: 120%;*/"> + <?php echo $this->headerTitle; ?> + </td> + <td width="20" style="text-align: right;"> + + </td> + </tr> +</table> + diff --git a/module/Application/src/Application/Service/These/PageDeGarde/PageDeCouverturePdfExporter.php b/module/Application/src/Application/Service/These/PageDeGarde/PageDeCouverturePdfExporter.php index f3fb5e0434c91727d39694c5e1c5b2c3bc26f6d7..e769a14f0c6b3f0ddb5d7beefb4f3514aa6b479c 100644 --- a/module/Application/src/Application/Service/These/PageDeGarde/PageDeCouverturePdfExporter.php +++ b/module/Application/src/Application/Service/These/PageDeGarde/PageDeCouverturePdfExporter.php @@ -31,6 +31,9 @@ class PageDeCouverturePdfExporter extends PdfExporter $this->setHeaderScript('empty.phtml'); $this->setFooterScript('empty.phtml'); $this->addBodyScript('pagedecouverture.phtml', false, $this->vars); + if (isset($this->vars['recto/verso']) AND $this->vars['recto/verso'] === true) { + $this->addBodyScript('empty.phtml', true, $this->vars); + } return PdfExporter::export($filename, $destination, $memoryLimit); } } \ No newline at end of file diff --git a/module/Application/src/Application/Service/These/TheseRechercheService.php b/module/Application/src/Application/Service/These/TheseRechercheService.php index 50b9721f67b5c4f44f10a4466127bea0f3439948..1e58e4b9b510abbe64e54d318cfc916332f439c6 100644 --- a/module/Application/src/Application/Service/These/TheseRechercheService.php +++ b/module/Application/src/Application/Service/These/TheseRechercheService.php @@ -148,10 +148,10 @@ class TheseRechercheService ['liveSearch' => true] ), TheseSelectFilter::NAME_financement => new TheseSelectFilter( - "Origine financement", + "Origine<br>financement", TheseSelectFilter::NAME_financement, $optionsArray[TheseSelectFilter::NAME_financement], - ['width' => '125px', 'liveSearch' => true] + ['liveSearch' => true] ), TheseSelectFilter::NAME_anneePremiereInscription => new TheseSelectFilter( "Année civile<br>1ère inscr.", @@ -177,13 +177,13 @@ class TheseRechercheService // "Discipline", // TheseSelectFilter::NAME_discipline, // $optionsArray[TheseSelectFilter::NAME_discipline], -// ['width' => '125px', 'liveSearch' => true] +// ['liveSearch' => true] // ), TheseSelectFilter::NAME_domaineScientifique => new TheseSelectFilter( - "Domaine scientifique", + "Domaine<br>scientifique", TheseSelectFilter::NAME_domaineScientifique, $optionsArray[TheseSelectFilter::NAME_domaineScientifique], - ['width' => '125px', 'liveSearch' => true] + ['liveSearch' => true] ), TheseTextFilter::NAME_text => new TheseTextFilter( "Recherche de texte", @@ -775,11 +775,17 @@ class TheseRechercheService private function optionify($value = null, $label = null) { if ($value instanceof Etablissement) { - return ['value' => $value->getStructure()->getCode(), 'label' => $value->getSigle()]; + $subtext = $value->getLibelle(); + if ($value->getStructure()->isFerme()) $subtext.= " <span class='label' style='color:darkred;'>FERME</span>"; + return ['value' => $value->getStructure()->getCode(), 'label' => $subtext]; } elseif ($value instanceof EcoleDoctorale) { - return ['value' => $value->getSourceCode(), 'label' => $value->getSigle(), 'subtext' => $value->getLibelle()]; + $subtext = $value->getLibelle(); + if ($value->getStructure()->isFerme()) $subtext.= " <span class='label' style='color:darkred;'>FERMEE</span>"; + return ['value' => $value->getSourceCode(), 'label' => $value->getSigle(), 'subtext' => $subtext]; } elseif ($value instanceof UniteRecherche) { - return ['value' => $value->getSourceCode(), 'label' => $value->getCode(), 'subtext' => $value->getLibelle()]; + $subtext = $value->getLibelle(); + if ($value->getStructure()->isFerme()) $subtext.= " <span class='label' style='color:darkred;'>FERMEE</span>"; + return ['value' => $value->getSourceCode(), 'label' => $value->getCode(), 'subtext' => $subtext]; } elseif ($value instanceof DomaineScientifique) { return ['value' => (string) $value->getId(), 'label' => $value->getLibelle()]; } elseif ($value instanceof OrigineFinancement) { diff --git a/module/Application/src/Application/Service/These/TheseService.php b/module/Application/src/Application/Service/These/TheseService.php index 0890a8329ecd316d5681a9b29d004d0c9268555e..6a6d9b9f49a4264e80be556724df2f7dccec4ec7 100644 --- a/module/Application/src/Application/Service/These/TheseService.php +++ b/module/Application/src/Application/Service/These/TheseService.php @@ -6,12 +6,15 @@ use Application\Entity\Db\Acteur; use Application\Entity\Db\Attestation; use Application\Entity\Db\Diffusion; use Application\Entity\Db\MetadonneeThese; +use Application\Entity\Db\NatureFichier; use Application\Entity\Db\RdvBu; use Application\Entity\Db\Repository\TheseRepository; use Application\Entity\Db\Role; use Application\Entity\Db\These; use Application\Entity\Db\VersionFichier; use Application\Notification\ValidationRdvBuNotification; +use Application\Rule\AutorisationDiffusionRule; +use Application\Rule\SuppressionAttestationsRequiseRule; use Application\Service\BaseService; use Application\Service\Etablissement\EtablissementServiceAwareTrait; use Application\Service\FichierThese\FichierTheseServiceAwareTrait; @@ -25,6 +28,7 @@ use Application\Service\Variable\VariableServiceAwareTrait; use Assert\Assertion; use Doctrine\DBAL\DBALException; use Doctrine\ORM\OptimisticLockException; +use UnicaenApp\Exception\LogicException; use UnicaenApp\Exception\RuntimeException; use UnicaenApp\Traits\MessageAwareInterface; use UnicaenAuth\Entity\Db\UserInterface; @@ -116,77 +120,135 @@ class TheseService extends BaseService } /** - * Supprime l'Attestation (éventuelle) d'une These. + * Supprime définitivement l'éventuelle Attestation concernant une version de fichier. * - * @param These $these Thèse concernée - * @param UserInterface $destructeur Auteur de l'historisation, le cas échéant + * @param These $these Thèse concernée + * @param VersionFichier $version */ - public function deleteAttestation(These $these, UserInterface $destructeur = null) + public function deleteAttestationForVersion(These $these, VersionFichier $version) { - $attestation = $these->getAttestation(); + $attestation = $these->getAttestationForVersion($version); if ($attestation === null) { return; } - if ($destructeur) { - $attestation->historiser($destructeur); - } else { - $these->removeAttestation($attestation); - $this->entityManager->remove($attestation); - } + $these->removeAttestation($attestation); + $this->entityManager->remove($attestation); try { $this->entityManager->flush($attestation); } catch (OptimisticLockException $e) { - throw new RuntimeException("Erreur rencontrée lors de l'enregistrement", null, $e); + throw new RuntimeException("Erreur rencontrée lors de la suppression", null, $e); } } /** - * @param These $these - * @param Diffusion $mel + * @param These $these + * @param Diffusion $diffusion + * @param VersionFichier $version */ - public function updateDiffusion(These $these, Diffusion $mel) + public function updateDiffusion(These $these, Diffusion $diffusion, VersionFichier $version) { - if (! $mel->getId()) { - $mel->setThese($these); - $these->addDiffusion($mel); + $isUpdate = $diffusion->getId() !== null; + + if ($isUpdate) { + // on teste si la réponse à l'autorisation de diffusion existante a changé de manière "importante" + // (auquel cas, il sera nécessaire de tester s'il faut supprimer ou pas les attestations) + $rule = new AutorisationDiffusionRule(); + $rule->setDiffusion($diffusion); + $rule->execute(); + $suppressionAttestationsAVerifier = $rule->computeChangementDeReponseImportant($this->entityManager); + } else { + $suppressionAttestationsAVerifier = false; + } - $this->entityManager->persist($mel); + if (! $isUpdate) { + $diffusion->setThese($these); + $these->addDiffusion($diffusion); + + $this->entityManager->persist($diffusion); } try { - $this->entityManager->flush($mel); + $this->entityManager->flush($diffusion); } catch (OptimisticLockException $e) { throw new RuntimeException("Erreur rencontrée lors de l'enregistrement", null, $e); } + + // + // Il peut être nécessaire de supprimer les "attestations" existantes en fonction des réponses + // à l'autorisation de diffusion. + // + if ($suppressionAttestationsAVerifier) { + $rule = new SuppressionAttestationsRequiseRule($these, $version); + $suppressionRequise = $rule->computeEstRequise(); + + if ($suppressionRequise) { + $this->deleteAttestationForVersion($these, $version); + } + } } /** - * Supprime la Diffusion (éventuelle) d'une These. + * Détermine d'après la réponse à l'autorisation de diffusion de la thèse si le flag de remise de + * l'exemplaire papier est pertinent ou non. * - * @param These $these Thèse concernée - * @param UserInterface $destructeur Auteur de l'historisation, le cas échéant + * @param These $these + * @param VersionFichier $version + * @return boolean */ - public function deleteDiffusion(These $these, UserInterface $destructeur = null) + public function isRemiseExemplairePapierRequise(These $these, VersionFichier $version) { - $diffusion = $these->getDiffusion(); + $diffusion = $these->getDiffusionForVersion($version); + if ($diffusion === null) { - return; + throw new LogicException("Appel de méthode prématuré : autorisation de diffusion introuvable pour la $version"); } - if ($destructeur) { - $diffusion->historiser($destructeur); - } else { - $these->removeDiffusion($diffusion); - $this->entityManager->remove($diffusion); + return $diffusion->isRemiseExemplairePapierRequise(); + } + + /** + * Détermine d'après la réponse à l'autorisation de diffusion de la thèse si le flag de remise de + * l'exemplaire papier est pertinent ou non. + * + * @param These $these + * @return boolean|null + */ + public function isExemplPapierFourniPertinent(These $these) + { + // le RDV BU ne concerne que le dépôt de la version initiale + $version = $this->fichierTheseService->fetchVersionFichier(VersionFichier::CODE_ORIG); + + $diffusion = $these->getDiffusionForVersion($version); + + if ($diffusion === null) { + return false; } - try { - $this->entityManager->flush($diffusion); - } catch (OptimisticLockException $e) { - throw new RuntimeException("Erreur rencontrée lors de l'enregistrement", null, $e); + return $diffusion->isRemiseExemplairePapierRequise(); + } + + /** + * Détermine si les infos qui doivent être saisies pour le RDV BU l'ont été. + * + * @param These $these + * @return bool + */ + public function isInfosBuSaisies(These $these) + { + $rdvBu = $these->getRdvBu(); + + if ($rdvBu === null) { + return false; } + + $exemplairePapierFourniPertinent = $this->isExemplPapierFourniPertinent($rdvBu->getThese()); + + return + (!$exemplairePapierFourniPertinent || $exemplairePapierFourniPertinent && $rdvBu->getExemplPapierFourni()) && + $rdvBu->getConventionMelSignee() && $rdvBu->getMotsClesRameau() && + $rdvBu->isVersionArchivableFournie(); } /** @@ -209,7 +271,7 @@ class TheseService extends BaseService } // si tout est renseigné, on valide automatiquement - if ($rdvBu->isInfosBuSaisies()) { + if ($this->isInfosBuSaisies($these)) { $this->validationService->validateRdvBu($these); $successMessage = "Validation enregistrée avec succès."; @@ -380,4 +442,21 @@ EOS; throw new RuntimeException("Erreur rencontrée lors des updates en bdd.", null, $e); } } + + /** + * Si le fichier de la thèse originale est une version corrigée, on est dans le cadre d'un dépôt d'une version + * corrigée et cette fonction retourne true. + * + * @param These $these + * @return bool + */ + public function existeVersionCorrigee(These $these) + { + $fichierTheses = $this->fichierTheseService->getRepository()->fetchFichierTheses( + $these, + NatureFichier::CODE_THESE_PDF, + VersionFichier::CODE_ORIG_CORR); + + return !empty($fichierTheses); + } } \ No newline at end of file diff --git a/module/Application/src/Application/Service/Url/UrlTheseService.php b/module/Application/src/Application/Service/Url/UrlTheseService.php index eb9638d619f7588ae7c8c41739c61c48f411f825..29022082fde65a13da8839fd6c46c5474fa2c509 100644 --- a/module/Application/src/Application/Service/Url/UrlTheseService.php +++ b/module/Application/src/Application/Service/Url/UrlTheseService.php @@ -264,24 +264,36 @@ class UrlTheseService extends UrlService ); } - public function modifierAttestationUrl(These $these) + public function modifierAttestationUrl(These $these, VersionFichier $version) { + $queryParams = []; + $queryParams['version'] = $this->idify($version); + return $this->fromRoute('these/modifier-attestation', - ['these' => $this->idify($these)] + ['these' => $this->idify($these)], + ['query' => $queryParams] ); } - public function modifierDiffusionUrl(These $these) + public function modifierDiffusionUrl(These $these, VersionFichier $version) { + $queryParams = []; + $queryParams['version'] = $this->idify($version); + return $this->fromRoute('these/modifier-diffusion', - ['these' => $this->idify($these)] + ['these' => $this->idify($these)], + ['query' => $queryParams] ); } - public function exporterConventionMiseEnLigneUrl(These $these) + public function exporterConventionMiseEnLigneUrl(These $these, VersionFichier $version) { + $queryParams = []; + $queryParams['version'] = $this->idify($version); + return $this->fromRoute('these/exporter-convention-mise-en-ligne', - ['these' => $this->idify($these)] + ['these' => $this->idify($these)], + ['query' => $queryParams] ); } diff --git a/module/Application/src/Application/View/Helper/Url/UrlTheseHelper.php b/module/Application/src/Application/View/Helper/Url/UrlTheseHelper.php index f4730bf7f9423c3c878c36e446608a51d43121a7..fd908a8ec5aaf45913ba68ebaf6232b63825ada3 100644 --- a/module/Application/src/Application/View/Helper/Url/UrlTheseHelper.php +++ b/module/Application/src/Application/View/Helper/Url/UrlTheseHelper.php @@ -22,9 +22,9 @@ use Zend\View\Helper\AbstractHelper; * @method diffusionThese(These $these, $version) * @method modifierMetadonneesUrl(These $these) * @method certifierConformiteTheseRetraiteUrl(These $these, $version) - * @method modifierAttestationUrl(These $these) - * @method modifierDiffusionUrl(These $these) - * @method exporterConventionMiseEnLigneUrl(These $these) + * @method modifierAttestationUrl(These $these, $version) + * @method modifierDiffusionUrl(These $these, $version) + * @method exporterConventionMiseEnLigneUrl(These $these, $version) * @method modifierRdvBuUrl(These $these) * @method validerRdvBuUrl(These $these) * @method devaliderRdvBuUrl(These $these) diff --git a/module/Application/view/application/ecole-doctorale/index.phtml b/module/Application/view/application/ecole-doctorale/index.phtml index e6989fc6d3b58949ac764aa0340fe38d845e4551..b4ab849da140ad17dd0aaae63dd2bbb5bd276bb1 100644 --- a/module/Application/view/application/ecole-doctorale/index.phtml +++ b/module/Application/view/application/ecole-doctorale/index.phtml @@ -60,6 +60,9 @@ $canSubstituer = $this->isAllowed(SubstitutionPrivileges::getResourceId(Substitu <td> <a href="<?php echo $this->url('ecole-doctorale/information', ['structure' => $ecole->getStructure()->getId()], [], true); ?>"> <?php echo $ecole->getLibelle(); ?> + <?php if ($ecole->getStructure()->isFerme()) : ?> + <span class="label" style="background-color: darkred">Structure fermée</span> + <?php endif; ?> </a> </td> <td> diff --git a/module/Application/view/application/ecole-doctorale/information.phtml b/module/Application/view/application/ecole-doctorale/information.phtml index 5fac43e9e90ed2029f0b9657203b70504822af65..efa65afca9aefd5bd22b38a3fbe4739f6215a4de 100644 --- a/module/Application/view/application/ecole-doctorale/information.phtml +++ b/module/Application/view/application/ecole-doctorale/information.phtml @@ -38,6 +38,14 @@ $canAddRole = $canEdit; <dd> <?php echo $ecole->getSigle(); ?> </dd> <dt> Code :</dt> <dd> <?php echo $ecole->getStructure()->getCode(); ?> </dd> + <dt> Statut :</dt> + <dd> + <?php if ($ecole->getStructure()->isFerme()) : ?> + <span class="label" style="background-color:darkred">Structure fermée</span> + <?php else : ?> + <span class="label" style="background-color:darkgreen">Structure ouverte</span> + <?php endif; ?> + </dd> </dl> </div> <div class="col-md-4"> diff --git a/module/Application/view/application/ecole-doctorale/modifier.phtml b/module/Application/view/application/ecole-doctorale/modifier.phtml index 6177ff87b37f0a922772639d9b6fd351b93fcfe0..03136e73504fd534f350de7d001c513c825aefad 100644 --- a/module/Application/view/application/ecole-doctorale/modifier.phtml +++ b/module/Application/view/application/ecole-doctorale/modifier.phtml @@ -45,6 +45,7 @@ $form->get('code')->setAttribute('readonly', !$editable); <?php echo $fcg($form->get('libelle')) ?> <?php echo $fcg($form->get('sigle')) ?> <?php echo $fcg($form->get('code')) ?> + <?php echo $fcg($form->get('estFerme')) ?> </div> <div id="logo-div" class="col-md-6"> diff --git a/module/Application/view/application/etablissement/index.phtml b/module/Application/view/application/etablissement/index.phtml index 51ebdd5abe4f97c6bcfb45e05369e9ca326a2a58..0551a9a9b1c3028e5e43d783a2a3a5f20d17adf6 100644 --- a/module/Application/view/application/etablissement/index.phtml +++ b/module/Application/view/application/etablissement/index.phtml @@ -72,6 +72,9 @@ $canSubstituer = $this->isAllowed(SubstitutionPrivileges::getResourceId(Substitu <td> <a href="<?php echo $this->url('etablissement/information', ['structure' => $etablissement->getStructure()->getId()], [], true); ?>"> <?php echo $etablissement->getLibelle(); ?> + <?php if ($etablissement->getStructure()->isFerme()) : ?> + <span class="label" style="background-color: darkred">Structure fermée</span> + <?php endif; ?> </a> <?php if ($etablissement->estMembre()): ?> <span class="label label-primary">Membre</span> diff --git a/module/Application/view/application/etablissement/information.phtml b/module/Application/view/application/etablissement/information.phtml index a508ad5409510eaf59d1a9383a19a29b51d9db67..7a4480fa1525b3c52b996ed492d72191f7b944a3 100644 --- a/module/Application/view/application/etablissement/information.phtml +++ b/module/Application/view/application/etablissement/information.phtml @@ -67,6 +67,11 @@ $canAddRole = true; <?php if ($etablissement->estAssocie()): ?> <span class="label label-info">Associé</span> <?php endif ?> + <?php if ($etablissement->getStructure()->isFerme()) : ?> + <span class="label" style="background-color:darkred">Structure fermée</span> + <?php else : ?> + <span class="label" style="background-color:darkgreen">Structure ouverte</span> + <?php endif; ?> </dd> </dl> </div> diff --git a/module/Application/view/application/etablissement/modifier.phtml b/module/Application/view/application/etablissement/modifier.phtml index 1cc03b970e1c3a56e916b4f79c25536192381211..70c31d7e0417835e68dab79db562e85c8455db01 100644 --- a/module/Application/view/application/etablissement/modifier.phtml +++ b/module/Application/view/application/etablissement/modifier.phtml @@ -19,13 +19,19 @@ $fcg = $this->formControlGroup(); ?> <?php echo $this->form()->openTag($form->prepare()->setAttribute('class', 'etablissement')) ?> -<?php echo $this->formHidden($form->get('id')) ?> -<?php echo $fcg($form->get('libelle')) ?> -<?php echo $fcg($form->get('sigle')) ?> -<?php echo $fcg($form->get('code')) ?> -<?php echo $fcg($form->get('domaine')) ?> -<?php echo $fcg($form->get('estMembre')) ?> -<?php echo $fcg($form->get('estAssocie')) ?> + +<div class="row"> + <div class="col-md-6"> + <?php echo $this->formHidden($form->get('id')) ?> + <?php echo $fcg($form->get('libelle')) ?> + <?php echo $fcg($form->get('sigle')) ?> + <?php echo $fcg($form->get('code')) ?> + <?php echo $fcg($form->get('domaine')) ?> + <?php echo $fcg($form->get('estMembre')) ?> + <?php echo $fcg($form->get('estAssocie')) ?> + <?php echo $fcg($form->get('estFerme')) ?> + </div> + <div class="col-md-6"> <div id="logo-div"> <?php @@ -76,8 +82,9 @@ $fcg = $this->formControlGroup(); </ul> </small> </div> - </div> + </div> +</div> <?php echo $this->formElement($form->get('submit')) ?> <?php echo $this->form()->closeTag() ?> diff --git a/module/Application/view/application/index/index.phtml b/module/Application/view/application/index/index.phtml index 9693ad0c74cfa374ae48a4c445eb661fd42b29ad..dd984dc58b4fe7309e075479db7fede8a6a4662a 100755 --- a/module/Application/view/application/index/index.phtml +++ b/module/Application/view/application/index/index.phtml @@ -36,17 +36,17 @@ echo $this->messenger() <div id="content" class="jumbotron col-xs-12 col-md-10"> - <h1 class="page-header"><?php echo $this->appInfos()->nom ?></h1> + <h1 class="page-header app-name"><?php echo $this->appInfos()->nom ?></h1> - <p class="appname-subtitle"> - <strong><?php echo $subtitle ?></strong> - </p> +<!-- <p class="appname-subtitle">--> +<!-- <strong>--><?php //echo $subtitle ?><!--</strong>--> +<!-- </p>--> - <?php if (!$this->identity()): ?> - <?php echo $appName ?> (<?php echo $subtitle ?>) est une application permettant la gestion dématérialisée + <p> + <?php echo $appName ?> est une application permettant la gestion dématérialisée de l’ensemble des étapes du parcours doctoral en Normandie. Il offre également aux différents acteurs du parcours doctoral (établissements, écoles doctorales) une visibilité sur les thèses en cours ou passées. - <?php endif ?> + </p> <?php if (!$this->identity()): ?> <p class="text-danger"> diff --git a/module/Application/view/application/substitution/index-structure.phtml b/module/Application/view/application/substitution/index-structure.phtml index b67682a673f554bf720d28cf49955122e4ff9b20..5ff760e277c3db384b234c509a6fb7a94f59a8e3 100644 --- a/module/Application/view/application/substitution/index-structure.phtml +++ b/module/Application/view/application/substitution/index-structure.phtml @@ -31,14 +31,14 @@ $canEdit = $this->isAllowed(SubstitutionPrivileges::getResourceId(SubstitutionP ?> <?php if ($canView): ?> - <div class="panel panel-info"> + <div class="box panel panel-info"> <div class="panel-heading"> - <h3> + <h2> <?php echo $libelle; ?> <span class="badge"> <?php echo count($structures); ?> </span> - </h3> + </h2> </div> <div class="panel-body"> diff --git a/module/Application/view/application/these/archivage/conformite-these-retraitee.phtml b/module/Application/view/application/these/archivage/conformite-these-retraitee.phtml index 205c4ff0813a9ed2ce43d6214fc8b11d5f28bf67..2f76e4ef4c70dfe1bec9eced72b1c4fcd24ee1c7 100644 --- a/module/Application/view/application/these/archivage/conformite-these-retraitee.phtml +++ b/module/Application/view/application/these/archivage/conformite-these-retraitee.phtml @@ -22,10 +22,11 @@ const CERTIF_CONFORME_MODIFIED_EVENT = "CERTIF_CONFORME_MODIFIED_EVENT"; <div class="panel-heading"> <?php - $estVersionCorrigee = $fichierTheseRetraite->getFichier()->getVersion()->estVersionCorrigee(); + $version = $fichierTheseRetraite->getFichier()->getVersion(); + $estVersionCorrigee = $version->estVersionCorrigee(); $heading = $estVersionCorrigee ? "Vérification de la thèse corrigée retraitée" : "Vérification de la thèse retraitée"; - $privilege = ThesePrivileges::THESE_SAISIE_CONFORMITE_VERSION_ARCHIVAGE_($estVersionCorrigee); + $privilege = ThesePrivileges::THESE_SAISIE_CONFORMITE_VERSION_ARCHIVAGE_($version); $canEdit = $this->isAllowed($these, $privilege); ?> <h2 class="first"><?php echo $heading ?></h2> diff --git a/module/Application/view/application/these/attestation.phtml b/module/Application/view/application/these/attestation.phtml index eb284bb784e916289941439d2fe792ebc55e4f85..3cf6bb98f0a3e4f67b3952eeabc6e3d7b3bd88ac 100644 --- a/module/Application/view/application/these/attestation.phtml +++ b/module/Application/view/application/these/attestation.phtml @@ -1,7 +1,9 @@ <?php +use Application\Controller\TheseController; use Application\Entity\Db\Attestation; use Application\Entity\Db\These; +use Application\Entity\Db\VersionFichier; use Application\Form\AttestationTheseForm; use Application\Provider\Privilege\ThesePrivileges; use Application\View\Renderer\PhpRenderer; @@ -9,12 +11,15 @@ use Application\View\Renderer\PhpRenderer; /** * @var PhpRenderer $this * @var These $these + * @var VersionFichier $version * @var Attestation $attestation * @var AttestationTheseForm $form * @var string $modifierAttestationUrl + * + * @see TheseController::attestationAction() */ -$privilege = ThesePrivileges::THESE_SAISIE_ATTESTATIONS_($these->getCorrectionAutorisee()); +$privilege = ThesePrivileges::THESE_SAISIE_ATTESTATIONS_($version); $canEdit = $this->isAllowed($these, $privilege); ?> diff --git a/module/Application/view/application/these/depot.phtml b/module/Application/view/application/these/depot.phtml index c8d18aec5d53fcdcdb7ae652805d82e8062cd88a..dcbfef539e67ab99a3e760a47f47fe2c59c7549f 100644 --- a/module/Application/view/application/these/depot.phtml +++ b/module/Application/view/application/these/depot.phtml @@ -57,13 +57,13 @@ $h1 = $versionCorrigee ? "Dépôt version corrigée" : "Dépôt de la thèse"; </div> </div> - <!-------------------------------------- Attestations ---------------------------------------> - <div id="attestationDiv" data-url="<?php echo $attestationUrl ?>"> + <!-------------------------------------- Diffusion ---------------------------------------> + <div id="diffusionDiv" data-url="<?php echo $diffusionUrl ?>"> <!-- màj via ajax --> </div> - <!-------------------------------------- Diffusion ---------------------------------------> - <div id="diffusionDiv" data-url="<?php echo $diffusionUrl ?>"> + <!-------------------------------------- Attestations ---------------------------------------> + <div id="attestationDiv" data-url="<?php echo $attestationUrl ?>"> <!-- màj via ajax --> </div> @@ -90,8 +90,8 @@ $h1 = $versionCorrigee ? "Dépôt version corrigée" : "Dépôt de la thèse"; var theseDiv = $("#theseDiv"); var annexesDiv = $("#annexesDiv"); - var attestationDiv = $("#attestationDiv"); var diffusionDiv = $("#diffusionDiv"); + var attestationDiv = $("#attestationDiv"); var nextStepDiv = $("#nextStepDiv"); @@ -158,8 +158,8 @@ $h1 = $versionCorrigee ? "Dépôt version corrigée" : "Dépôt de la thèse"; // Au chargement de la page, on actualise les div runInCascade([ fichiersLoader, - { func: attestationsLoader, effect: true }, { func: diffusionLoader, effect: true }, + { func: attestationsLoader, effect: true }, refreshingNextStep ], self); @@ -174,8 +174,8 @@ $h1 = $versionCorrigee ? "Dépôt version corrigée" : "Dépôt de la thèse"; body.on(uploadEventFileUploaded, "#" + depotDivId + " .these.widget-uploader", function() { runInCascade([ annexesLoader, - { func: attestationsLoader, effect: true }, { func: diffusionLoader, effect: true }, + { func: attestationsLoader, effect: true }, refreshingNextStep ], self); }); @@ -185,8 +185,8 @@ $h1 = $versionCorrigee ? "Dépôt version corrigée" : "Dépôt de la thèse"; annexesLoader, function(done, effect) { return function() { - attestationDiv.hide(); diffusionDiv.hide(); + attestationDiv.hide(); nextStepDiv.hide(); if (done) done(); }; @@ -194,22 +194,22 @@ $h1 = $versionCorrigee ? "Dépôt version corrigée" : "Dépôt de la thèse"; ], self); }); - // Attestions enregistrées dans la modale - body.on("event-attestation-modified", function (event) { - // Les métadonnées viennent d'être modifiées. + // Diffusion enregistrée dans la modale + body.on("event-diffusion-modified", function (event) { event.div.modal('hide'); // ferme la fenêtre modale runInCascade([ - { func: attestationsLoader, effect: false }, - { func: diffusionLoader, effect: true }, + { func: diffusionLoader, effect: false }, + { func: attestationsLoader, effect: true }, refreshingNextStep ], self); }); - // Diffusion enregistrée dans la modale - body.on("event-diffusion-modified", function (event) { + // Attestions enregistrées dans la modale + body.on("event-attestation-modified", function (event) { + // Les métadonnées viennent d'être modifiées. event.div.modal('hide'); // ferme la fenêtre modale runInCascade([ - { func: diffusionLoader, effect: false }, + { func: attestationsLoader, effect: false }, refreshingNextStep ], self); }); diff --git a/module/Application/view/application/these/diffusion.phtml b/module/Application/view/application/these/diffusion.phtml index e20840ee6dbd8c9c1c8c140bba78fd4fa475e810..9bbcbf817c002f2c1aba87592ffa1ce5b733e632 100644 --- a/module/Application/view/application/these/diffusion.phtml +++ b/module/Application/view/application/these/diffusion.phtml @@ -1,8 +1,9 @@ <?php +use Application\Controller\TheseController; +use Application\Entity\Db\Diffusion; use Application\Entity\Db\These; use Application\Entity\Db\VersionFichier; -use Application\Entity\Db\WfEtape; use Application\Form\DiffusionTheseForm; use Application\Provider\Privilege\ThesePrivileges; use Application\View\Renderer\PhpRenderer; @@ -10,14 +11,18 @@ use Application\View\Renderer\PhpRenderer; /** * @var $this PhpRenderer * @var These $these + * @var VersionFichier $version + * @var Diffusion $diffusion * @var DiffusionTheseForm $form * @var array $theseFichiersExpurgesItems * @var array $annexesFichiersExpurgesItems * @var string $modifierDiffusionUrl * @var string $exporterConventionMelUrl + * + * @see TheseController::diffusionAction() */ -$privilege = ThesePrivileges::THESE_SAISIE_AUTORISATION_DIFFUSION_($these->getCorrectionAutorisee()); +$privilege = ThesePrivileges::THESE_SAISIE_AUTORISATION_DIFFUSION_($version); $canEdit = $this->isAllowed($these, $privilege); ?> @@ -31,7 +36,7 @@ $canEdit = $this->isAllowed($these, $privilege); <?php if ($hasFichierThese): ?> <!-------------------------------------- Questionnaire ---------------------------------------> - <?php if ($these->getDiffusion()): ?> + <?php if ($diffusion): ?> <?php echo $this->partial('application/these/partial/diffusion') ?> <?php if ($canEdit): ?> <p><a href="<?php echo $modifierDiffusionUrl ?>" @@ -47,7 +52,7 @@ $canEdit = $this->isAllowed($these, $privilege); <?php endif ?> <!-------------------------------------- Convention de mise en ligne ---------------------------------------> - <?php if ($these->getDiffusion()): ?> + <?php if ($diffusion): ?> <hr> <h2>Convention de mise en ligne</h2> diff --git a/module/Application/view/application/these/identite.phtml b/module/Application/view/application/these/identite.phtml index 56ca16c029a8fc96446b655b5f5fdda088db3193..d41a49dc1b0283b60badaf058cb4a8309aef7de7 100644 --- a/module/Application/view/application/these/identite.phtml +++ b/module/Application/view/application/these/identite.phtml @@ -138,6 +138,7 @@ $financementFormatter->setDisplayAs(FinancementFormatter::DISPLAY_AS_LINE); $results = $acteursFormatter->doFormat($acteurs->toArray()); $previous = ""; foreach ($results as $result) { + $aucunSupannIdDansIndividu = isset($result['alerte-supann-id']); /** @var Acteur $acteur */ $acteur = $result["acteur"]; if ($previous != $result["role"]) { @@ -159,8 +160,8 @@ $financementFormatter->setDisplayAs(FinancementFormatter::DISPLAY_AS_LINE); if (isset($result["etablissement"]) && trim($result["etablissement"]) != "") { $ligne[] = $result["etablissement"]; } - if ($acteur->estDirecteur() && isset($result['alerte-supann-id'])) { - if ($utilisateurs[$acteur->getId()] === null) { + if ($acteur->estDirecteur() && $aucunSupannIdDansIndividu) { + if (empty($utilisateurs[$acteur->getId()])) { $ligne[] = sprintf('<span class="glyphicon glyphicon-warning-sign text-danger" title="%s"></span>', $result['alerte-supann-id']); } else { @@ -322,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/Application/view/application/these/modifier-attestation.phtml b/module/Application/view/application/these/modifier-attestation.phtml index 014ec454fc6bdf8497b53430d11b8d952483c807..f6c3b1dfc2aa0de86ed67ae65d5f1cf1ad36a313 100644 --- a/module/Application/view/application/these/modifier-attestation.phtml +++ b/module/Application/view/application/these/modifier-attestation.phtml @@ -1,5 +1,6 @@ <?php +use Application\Controller\TheseController; use Application\Entity\Db\These; use Application\Form\AttestationTheseForm; use Application\View\Renderer\PhpRenderer; @@ -11,6 +12,8 @@ use Application\View\Renderer\PhpRenderer; * @var AttestationTheseForm $form * * @method string formControlGroup() + * + * @see TheseController::modifierAttestationAction() */ $canEdit = true; @@ -28,7 +31,10 @@ $form->prepare(); <label><?php echo $form->getText() ?></label> <?php echo $fcg->render($form->get('versionDeposeeEstVersionRef')) ?> + +<?php if ($form->has('exemplaireImprimeConformeAVersionDeposee')): ?> <?php echo $fcg->render($form->get('exemplaireImprimeConformeAVersionDeposee')) ?> +<?php endif ?> <?php echo $this->formElement($form->get('submit')) ?> diff --git a/module/Application/view/application/these/modifier-diffusion.phtml b/module/Application/view/application/these/modifier-diffusion.phtml index a80add92992390c2f31dbb7e480ba0aa591959e0..b7b2a0e866df7340f25cc3e066d825213f2729e8 100644 --- a/module/Application/view/application/these/modifier-diffusion.phtml +++ b/module/Application/view/application/these/modifier-diffusion.phtml @@ -5,12 +5,12 @@ use Application\Entity\Db\These; use Application\Form\DiffusionTheseForm; use Application\Service\Message\DiffusionMessages; use Application\View\Renderer\PhpRenderer; -use Zend\Form\Form; /** * @var PhpRenderer $this * @var string $title * @var These $these + * @var Diffusion $diffusion * @var bool $expurge * @var DiffusionTheseForm $form * @var string $theseUrl @@ -26,9 +26,9 @@ $protoDiffusion = new Diffusion(); <?php $this->headTitle("Diffusion") ?> -<!--<h1 class="page-header">--><?php //echo $title ?> -<!-- <small>--><?php //echo $this->partial('application/these/partial/titre') ?><!--</small>--> -<!--</h1>--> +<h1 class="page-header"><?php echo $title . ($diffusion->getVersionCorrigee() ? " de la version corrigée" : "") ?> + <small><?php echo $this->partial('application/these/partial/titre') ?></small> +</h1> <?php echo $this->form()->openTag($form->setAttribute('class', 'diffusion')) ?> @@ -74,7 +74,7 @@ $protoDiffusion = new Diffusion(); <!-------------------------------- Charte de diffusion --------------------------------> <h2>Charte de diffusion</h2> <?php echo $fcg($form->get('certifCharteDiff')) ?> -Cliquez <a href="<?php echo $this->basePath('charte_de_depot_et_diffusion.pdf') ?>" target="_blank" download>ici pour télécharger</a> la charte. +Cliquez <a href="<?php echo $this->basePath('charte_depot_et_diffusion_des_theses.pdf') ?>" target="_blank" download>ici pour télécharger</a> la charte. <!-------------------------------- Autorisation de mise en ligne --------------------------------> <h2>Autorisation de mise en ligne</h2> @@ -92,23 +92,28 @@ Cliquez <a href="<?php echo $this->basePath('charte_de_depot_et_diffusion.pdf') </div> <div id="explicOuiImmediat" class="alert alert-md alert-info" style="display: none"> <span class="glyphicon glyphicon-info-sign"></span> - <?php echo $this->message()->render('AUTORIS_MISE_EN_LIGNE_LAIUS', [], $protoDiffusion->setAutorisMel(Diffusion::AUTORISATION_OUI_IMMEDIAT)) ?> + <?php echo $this->message()->render(DiffusionMessages::AUTORIS_DIFFUSION_FORM_LAIUS, [], $protoDiffusion->setAutorisMel(Diffusion::AUTORISATION_OUI_IMMEDIAT)) ?> </div> <div id="explicOuiEmbargo" class="alert alert-md alert-info" style="display: none"> <span class="glyphicon glyphicon-info-sign"></span> - <?php echo $this->message()->render('AUTORIS_MISE_EN_LIGNE_LAIUS', [], $protoDiffusion->setAutorisMel(Diffusion::AUTORISATION_OUI_EMBARGO)) ?> + <?php echo $this->message()->render(DiffusionMessages::AUTORIS_DIFFUSION_FORM_LAIUS, [], $protoDiffusion->setAutorisMel(Diffusion::AUTORISATION_OUI_EMBARGO)) ?> </div> <div id="explicNon" class="alert alert-md alert-info" style="display: none"> <span class="glyphicon glyphicon-info-sign"></span> - <?php echo $this->message()->render('AUTORIS_MISE_EN_LIGNE_LAIUS', [], $protoDiffusion->setAutorisMel(Diffusion::AUTORISATION_NON)) ?> + <?php echo $this->message()->render(DiffusionMessages::AUTORIS_DIFFUSION_FORM_LAIUS, [], $protoDiffusion->setAutorisMel(Diffusion::AUTORISATION_NON)) ?> </div> - <div class="row idOrcid" style="display: none"> + <div class="row auteur" style="display: none"> <div class="col-sm-7 col-md-4"> <?php echo $fcg ->setHelpContent( "Cet identifiant permet d’identifier de manière unique les chercheurs et auteurs de contributions académiques scientifiques. ". '<a target="_blank" title="Ouvrir ce lien dans un autre onglet" href="https://orcid.org">Plus d\'infos...</a>') - ->render($form->get('idOrcid')) ?> + ->render($form->get('orcid')) ?> + <?php echo $fcg + ->setHelpContent( + "L’IdHAL, géré dans l’archive ouverte HAL, permet de vous identifier en tant qu’auteur de vos travaux déposés sur la plateforme. ". + '<a target="_blank" title="Ouvrir ce lien dans un autre onglet" href="https://doc.archives-ouvertes.fr/identifiant-auteur-idhal-cv/">Plus d\'infos...</a>') + ->render($form->get('halId')) ?> </div> </div> </div> diff --git a/module/Application/view/application/these/modifier-rdv-bu.phtml b/module/Application/view/application/these/modifier-rdv-bu.phtml index 8c92eacb235e006da44e902a9f400f067fab9b35..5edef12b0779275740df93b8de32c31d33b22294 100644 --- a/module/Application/view/application/these/modifier-rdv-bu.phtml +++ b/module/Application/view/application/these/modifier-rdv-bu.phtml @@ -52,11 +52,14 @@ $fcg = $this->formControlGroup(); <label for="">Version en ligne et papier</label><br/> <?php echo $fcg($form->get('versionArchivableFournie')) ?> <?php echo $fcg($form->get('conventionMelSignee')) ?> + <?php if ($form->has('exemplPapierFourni')): ?> <?php echo $fcg($form->get('exemplPapierFourni')) ?> + <?php endif ?> </div> <div class="col-md-6"> - <?php echo $fcg($form->get('divers')) ?> + <?php echo $fcg($form->get('divers')->setAttribute('rows', 2)) ?> <?php echo $fcg($form->get('idOrcid')) ?> + <?php echo $fcg($form->get('halId')) ?> </div> </div> diff --git a/module/Application/view/application/these/partial/attestation.phtml b/module/Application/view/application/these/partial/attestation.phtml index 1baaf7efe2d2d65491505d60a3e8878581040e7c..0c334dc8111f7ca1890ace5210d6efa0d1b1ed93 100644 --- a/module/Application/view/application/these/partial/attestation.phtml +++ b/module/Application/view/application/these/partial/attestation.phtml @@ -1,10 +1,12 @@ <?php +use Application\Entity\Db\Attestation; use Application\Entity\Db\These; use Application\Form\AttestationTheseForm; /** * @var These $these + * @var Attestation $attestation * @var AttestationTheseForm $form * @var boolean $masquerFichiers * @var array $theseFichiersExpurgesItems @@ -13,7 +15,10 @@ use Application\Form\AttestationTheseForm; ?> <p><?php echo $form->getText() ?></p> + <ul class="attestation"> - <li><?php echo $form->get('versionDeposeeEstVersionRef')->getLabel() . " ; " ?> - <li><?php echo $form->get('exemplaireImprimeConformeAVersionDeposee')->getLabel() . "." ?> + <li><?php echo $form->get('versionDeposeeEstVersionRef')->getLabel() ?> + <?php if ($attestation->getExemplaireImprimeConformeAVersionDeposee()): ?> + <li><?php echo $form->get('exemplaireImprimeConformeAVersionDeposee')->getLabel() ?> + <?php endif ?> </ul> \ No newline at end of file diff --git a/module/Application/view/application/these/partial/diffusion.phtml b/module/Application/view/application/these/partial/diffusion.phtml index c6fcabc1be32ea1bba98f260dfbd412ed944260d..3902b4edd1247e29fea50ef5bc2f89eeb463cb81 100644 --- a/module/Application/view/application/these/partial/diffusion.phtml +++ b/module/Application/view/application/these/partial/diffusion.phtml @@ -1,6 +1,7 @@ <?php /** * @var These $these + * @var Diffusion $diffusion * @var DiffusionTheseForm $form * @var boolean $masquerFichiers * @var array $theseFichiersExpurgesItems @@ -12,7 +13,6 @@ use Application\Entity\Db\These; use Application\Form\DiffusionTheseForm; use Application\Service\Message\DiffusionMessages; -$diffusion = $these->getDiffusion(); ?> <?php if ($diffusion->getConfidentielle()): ?> @@ -28,7 +28,7 @@ $diffusion = $these->getDiffusion(); <ul class="autorisation-diffusion"> <li><?php echo $this->message()->render('DROITS_AUTEUR_OK_PHRASE', [], $diffusion) ?></li> - <?php if (empty($masquerFichiers) && ! $these->getDiffusion()->getDroitAuteurOk()): ?> + <?php if (empty($masquerFichiers) && ! $diffusion->getDroitAuteurOk()): ?> <li>Version expurgée pour la diffusion : <?php echo $this->partial('application/fichier-these/lister-fichiers', ['items' => $theseFichiersExpurgesItems]) ?></li> <li>Autres formats de fichiers expurgés, le cas échéant : @@ -44,7 +44,11 @@ $diffusion = $these->getDiffusion(); </div> </li> - <?php if ($idOrcid = $diffusion->getOrcid()): ?> - <li>Identifiant ORCID : <code class="text-muted"><?php echo $idOrcid ?></code></li> + <?php if ($orcid = $diffusion->getOrcid()): ?> + <li>Identifiant ORCID : <code class="text-muted"><?php echo $orcid ?></code></li> + <?php endif ?> + + <?php if ($halId = $diffusion->getHalId()): ?> + <li>IdHAL : <code class="text-muted"><?php echo $halId ?></code></li> <?php endif ?> </ul> \ No newline at end of file diff --git a/module/Application/view/application/these/partial/rdv-bu.phtml b/module/Application/view/application/these/partial/rdv-bu.phtml index a2375c17b9c08a38b28c05a56b38aaa3b26e3b89..ffe71c1a1c7d5c5d778c15eb94f7d3debe6535c7 100644 --- a/module/Application/view/application/these/partial/rdv-bu.phtml +++ b/module/Application/view/application/these/partial/rdv-bu.phtml @@ -11,6 +11,7 @@ use Application\Filter\MotsClesFormatter; * @var These $these * @var FichierThese $versionArchivable * @var bool $pageCouvValidee + * @var bool $isExemplPapierFourniPertinent */ $rdvBu = $these->getRdvBu(); @@ -58,9 +59,11 @@ $ddPageCouv = $pageCouvValidee ? $checked : $unchecked; <?php $class = ($ok = $rdvBu->getConventionMelSignee()) ? '' : 'text-danger' ?> <dd class="<?php echo $class ?>"><?php echo $ok ? $checked : $unchecked ?></dd> + <?php if ($isExemplPapierFourniPertinent): ?> <dt>Exemplaire papier fourni :</dt> <?php $class = ($ok = $rdvBu->getExemplPapierFourni()) ? '' : 'text-danger' ?> <dd class="<?php echo $class ?>"><?php echo $ok ? $checked : $unchecked ?></dd> + <?php endif ?> <dt>Points de vigilance :</dt> <dd> diff --git a/module/Application/view/application/these/rdv-bu-doctorant.phtml b/module/Application/view/application/these/rdv-bu-doctorant.phtml index 594e0d4233410872ed3f2063d891fe35a1770ce6..6f97899ea244976bcac83be900d60b9a06595067 100644 --- a/module/Application/view/application/these/rdv-bu-doctorant.phtml +++ b/module/Application/view/application/these/rdv-bu-doctorant.phtml @@ -1,5 +1,6 @@ <?php +use Application\Entity\Db\Diffusion; use Application\Entity\Db\These; use Application\Entity\Db\Validation; use Application\Provider\Privilege\ThesePrivileges; @@ -8,6 +9,7 @@ use Application\View\Renderer\PhpRenderer; /** * @var $this PhpRenderer * @var These $these + * @var Diffusion $diffusion * @var bool $estDoctorant * @var string $modifierUrl * @var Validation|null $validation @@ -27,13 +29,17 @@ $rdvBu = $these->getRdvBu(); <div class="panel panel-info box"> <div class="panel-heading"> - <h2 class="first">Téléchargement de la version imprimable de votre thèse </h2> + <h2 class="first">Téléchargement de la version imprimable de votre thèse</h2> </div> <div class="panel-body"> <p> - Avant de vous rendre au rendez-vous à la BU, vous devez imprimer un exemplaire papier de votre thèse.<br/> - Pour obtenir la version imprimable de votre thèse (avec page de couverture), veuillez cliquer sur le bouton ci-dessous. + <?php if ($diffusion->isRemiseExemplairePapierRequise()): ?> + Avant que la BU ne prenne contact avec vous, vous devez télécharger la thèse complète, c'est à dire le corps du mémoire auquel est ajoutée la page de couverture générée automatiquement par l'application. + Une fois la thèse complète téléchargée, assurez-vous que toutes les informations sur la page de couverture sont présentes et que la fusion n'a pas endommagé le mémoire. + <?php else: ?> + Vous pouvez obtenir la version imprimable de votre thèse (avec page de couverture) en cliquant sur le bouton ci-dessous. + <?php endif ?> </p> <!-- <div class="pull-right">--> diff --git a/module/Application/view/application/these/rdv-bu.phtml b/module/Application/view/application/these/rdv-bu.phtml index 6c2d75b5d76a0ba22d16c30723623cf031177063..b187557d99cd108ee2a720df2b22a9d26895d65e 100644 --- a/module/Application/view/application/these/rdv-bu.phtml +++ b/module/Application/view/application/these/rdv-bu.phtml @@ -1,5 +1,7 @@ <?php +use Application\Controller\TheseController; +use Application\Entity\Db\Diffusion; use Application\Entity\Db\These; use Application\Entity\Db\Validation; use Application\Entity\Db\WfEtape; @@ -12,6 +14,7 @@ use Application\Entity\Db\Repository\FichierTheseRepository; /** * @var PhpRenderer $this * @var These $these + * @var Diffusion $diffusion * @var bool $estDoctorant * @var string $modifierUrl * @var string $validerUrl @@ -21,6 +24,8 @@ use Application\Entity\Db\Repository\FichierTheseRepository; * @var string $nextStepUrl * @var FichierTheseRepository $fichierRepository * @var boolean $asynchronous + * + * @see TheseController::modifierRdvBuAction() */ $canEdit = $this->isAllowed($these, ThesePrivileges::THESE_SAISIE_RDV_BU); @@ -38,14 +43,18 @@ $rdvBu = $these->getRdvBu(); <div class="panel panel-info box"> <div class="panel-heading"> - <h2 class="first">Téléchargement de la thèse avec page de couverture</h2> + <h2 class="first">Téléchargement de la version imprimable de votre thèse</h2> </div> <div class="panel-body"> <p> + <?php if ($diffusion->isRemiseExemplairePapierRequise()): ?> Avant que la BU ne prenne contact avec vous, vous devez télécharger la thèse complète, c'est à dire le corps du mémoire auquel est ajoutée la page de couverture générée automatiquement par l'application. Une fois la thèse complète téléchargée, assurez-vous que toutes les informations sur la page de couverture sont présentes et que la fusion n'a pas endommagé le mémoire. + <?php else: ?> + Vous pouvez obtenir la version imprimable de votre thèse (avec page de couverture) en cliquant sur le bouton ci-dessous. + <?php endif ?> </p> - <div class="checkbox"> + <div class="checkbox checkbox-sm"> <label for="removal"> <input type="checkbox" id="removal"/> <span class="checkbox-label">La 1ère page du corps du mémoire est une page de couverture fournie par le doctorant et je veux retirer cette 1ère page.</span> diff --git a/module/Application/view/application/these/validation-these-corrigee.phtml b/module/Application/view/application/these/validation-these-corrigee.phtml index 5e676d440180b5839c7bc8093ee2c8e112ed220a..904be7102a792e2c323d017dc5191748e47c85e5 100644 --- a/module/Application/view/application/these/validation-these-corrigee.phtml +++ b/module/Application/view/application/these/validation-these-corrigee.phtml @@ -32,7 +32,7 @@ $canUnvalidate = $this->isAllowed($these, ValidationPrivileges::VALIDATION_DEPOT </h1> <div> - <div class="panel panel-info"> + <div class="box panel panel-info"> <div class="panel-heading"> <h2 class="first">Téléchargement de la thèse corrigée complète </h2></div> <div class="panel-body"> diff --git a/module/Application/view/application/unite-recherche/index.phtml b/module/Application/view/application/unite-recherche/index.phtml index b1d8a8928fa72ad4a4dd8dbda360c592c726f969..94714dcf89728690be1b1e2a6bbbbef1fdbb3fd2 100644 --- a/module/Application/view/application/unite-recherche/index.phtml +++ b/module/Application/view/application/unite-recherche/index.phtml @@ -62,6 +62,9 @@ $canSubstituer = $this->isAllowed(SubstitutionPrivileges::getResourceId(Substitu <td> <a href="<?php echo $this->url('unite-recherche/information', ['structure' => $unite->getStructure()->getId()], [], true); ?>"> <?php echo $unite->getLibelle(); ?> + <?php if ($unite->getStructure()->isFerme()) : ?> + <span class="label" style="background-color: darkred">Structure fermée</span> + <?php endif; ?> </a> </td> <td> diff --git a/module/Application/view/application/unite-recherche/information.phtml b/module/Application/view/application/unite-recherche/information.phtml index 6bfc2968b42f4daf83cadbd203ba9d957ab92c91..578a56dc93fe6cc660e1aeffba5c9f95bf88e0e1 100644 --- a/module/Application/view/application/unite-recherche/information.phtml +++ b/module/Application/view/application/unite-recherche/information.phtml @@ -57,6 +57,14 @@ $canAddRole = $canEdit; <?php endforeach; ?> </ul> </dd> + <dt> Statut :</dt> + <dd> + <?php if ($unite->getStructure()->isFerme()) : ?> + <span class="label" style="background-color:darkred">Structure fermée</span> + <?php else : ?> + <span class="label" style="background-color:darkgreen">Structure ouverte</span> + <?php endif; ?> + </dd> </dl> </div> <div class="col-md-4"> diff --git a/module/Application/view/application/unite-recherche/modifier.phtml b/module/Application/view/application/unite-recherche/modifier.phtml index 005006c86ca21c1d667fc41f9457fa05ee36707b..d05928138b126d81af0a7e8cfdf67ba66fea8287 100644 --- a/module/Application/view/application/unite-recherche/modifier.phtml +++ b/module/Application/view/application/unite-recherche/modifier.phtml @@ -59,6 +59,7 @@ $form->get('code')->setAttribute('readonly', !$editable); <?php echo $fcg($form->get('sigle')) ?> <?php echo $fcg($form->get('code')) ?> <?php echo $fcg($form->get('RNSR')) ?> + <?php echo $fcg($form->get('estFerme')) ?> </div> <div class="col-md-6" id="logo-div"> diff --git a/module/Application/view/application/utilisateur/ajouter-from-individu.phtml b/module/Application/view/application/utilisateur/ajouter-from-individu.phtml deleted file mode 100644 index 21f08179fc57a463ca023240f70ad23041fdf131..0000000000000000000000000000000000000000 --- a/module/Application/view/application/utilisateur/ajouter-from-individu.phtml +++ /dev/null @@ -1,32 +0,0 @@ -<?php - -use Application\Controller\UtilisateurController; -use Application\Entity\Db\Individu; -use Zend\Form\Form; -use Application\View\Renderer\PhpRenderer; - -/** - * @var Form $form - * @var Individu $individu - * @var PhpRenderer $this - * - * @see UtilisateurController::ajouterFromIndividuAction() - */ -?> - -<?php $this->headTitle($this->translate("Création d'utilisateur par individu")) ?> - -<h1 class="page-header"><?php echo $this->translate("Création d'utilisateur à partir d'un individu existant"); ?> </h1> - -<p class="lead"> - Cette page permet de créer un utilisateur <em>manuellement</em> à partir de - <strong><?php echo $individu ?> (<?php echo $individu->getId() ?>)</strong>, individu existant en base de données. -</p> -<p class="lead"> - <strong>NB:</strong> l'adresse électronique sera l'identifiant de connexion de l'utilisateur, - elle doit donc être unique. -</p> - -<div class="col-md-4"> - <?php echo $this->form()->render($form->prepare()) ?> -</div> \ No newline at end of file diff --git a/module/Application/view/application/validation/these-corrigee/validation-correction.phtml b/module/Application/view/application/validation/these-corrigee/validation-correction.phtml index a7c3e3a90d6568ad1ff4c9759cbf2c53f40d9b45..b90e5f34865ca10580f117ab3d442258f8ee9f47 100644 --- a/module/Application/view/application/validation/these-corrigee/validation-correction.phtml +++ b/module/Application/view/application/validation/these-corrigee/validation-correction.phtml @@ -49,7 +49,7 @@ $canUnvalidate = $this->isAllowed($these, ValidationPrivileges::VALIDATION_CORRE <li> <?php echo $i = $validation->getIndividu() ?> n'a pas encore validé. <?php if (! $i->getSupannId()): ?> - <?php if ($utilisateurs[$i->getId()] === null) : ?> + <?php if (empty($utilisateurs[$i->getId()])) : ?> <?php $message = sprintf( "Cette personne ne pourra pas utiliser l'application car il manque des informations la concernant dans %s (source code '%s').", diff --git a/module/Application/view/layout/layout.phtml b/module/Application/view/layout/layout.phtml index 66942e13dd558e01a5d427c42bee5deb33bb14b9..3f5ba07a2aefd5f7b3415a7e0bf724592cc3fda9 100644 --- a/module/Application/view/layout/layout.phtml +++ b/module/Application/view/layout/layout.phtml @@ -49,11 +49,11 @@ <p class="navbar-text navbar-right"> <?php echo $this->appConnection(); ?> </p> - <p class="navbar-text navbar-right"> - <?php - //echo $this->languageSelector(); - ?> - </p> +<!-- <p class="navbar-text navbar-right">--> +<!-- --><?php +// //echo $this->languageSelector(); +// ?> +<!-- </p>--> </div><!--/.nav-collapse --> </div> </div> @@ -78,12 +78,12 @@ <?php echo $this->content; ?> <?php endif; ?> </div> - - <hr /> - - <div id="footer" class="container"> - <?php echo $this->navigation()->menuPiedDePage('navigation'); ?> - </div> + + <nav id="footer" class="navbar navbar-default navbar-fixed-bottom"> + <div class="container"> + <?php echo $this->navigation()->menuPiedDePage('navigation'); ?> + </div> + </nav> <a href="#" class="scrollup" title="Remonter en haut de cette page"> <img alt="Remonter" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4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89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAAepJREFUeNrcmbFKw0AYx39WKAgOQXAS5AQf4EAQuhWfoIPQZ/ANBEEq+ACFTk43CFJxKIU+hSAtguAgBF2cSganDnIuFwnBhtzljFf/8E1JLr98X+7j7n9ruGsX6AIHwD4ggXVz7ROYATFwD9wCb9SgLeACeAS0ZTyaZ7d+A2wTOAM+HMDy8WHG2vQFdwy8ewDLx7sZ21nrQP8XwPLRz/y7pbUBjGuAS2Ns3lk6c3XCZSFLZbL/B3DZcheq+4dwaXSLetw8AMD5sl45CAAujUEebgdYBAS4MEw0DOAJ0CQcNQ3Td1t5DSh7abymbecwQLg0DhvAkY+aSCmJ4xitNUopoijyMewRwLDql0opdZIkOqvpdKqjKKqawSHAk284j5BPVGnORXCeIOe49r8ycB4gF06ANnAVIRfWJRZCLIVTShXCj0YjpxJbTZJer7cUrkyGXSbJnc1DnU6nEK4IMo5jW8A7gFPbf1ApVQj3E2SSJFpKaQt4CtBymcVCCC2EKHVvu912bTOt4BcLDWNTXBOebgxb2AvWlVnyr8SmKfhtZwilHvwL6yM1jyY1wk1szKNsJq9qgLtysd9WwsDMW8DnHi3gc58WcFbbxgh32Wg9A5dmjNJaqwC798MxRFYz4AV4MMcQsctLvgYA2It91Klq2nkAAAAASUVORK5CYII="/> 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 07c1eca8fcc0365a1c177d32a86b6ed03e853fb6..7a38f90e4442c1b876c4ae3926a871e55a23eb7d 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 86833dcf0e93da41627825f8cf589a83dd16cd18..3acc2544a98cd4b1f115cbea00dc74626a2ede87 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 */ diff --git a/module/Retraitement/src/Retraitement/Service/RetraitementService.php b/module/Retraitement/src/Retraitement/Service/RetraitementService.php index 56011b62ed21f0e7134b617e95c335a6fb69418d..99ca1cfec08c716fffa0556773ee96d44ae97f72 100644 --- a/module/Retraitement/src/Retraitement/Service/RetraitementService.php +++ b/module/Retraitement/src/Retraitement/Service/RetraitementService.php @@ -2,16 +2,16 @@ namespace Retraitement\Service; -use Retraitement\Exception\TimedOutCommandException; +use Application\Command\Exception\TimedOutCommandException; use Application\Command\CommandInterface; use RuntimeException; class RetraitementService { /** - * FichierStarCorrector constructor. + * RetraitementService constructor. * - * @param \Application\Filter\Command\\Application\Command\CommandInterface $command + * @param CommandInterface $command */ public function __construct(CommandInterface $command) { @@ -19,12 +19,12 @@ class RetraitementService } /** - * @var \Application\Filter\Command\\Application\Command\CommandInterface + * @var CommandInterface */ private $command; /** - * @param \Application\Filter\Command\CommandInterface $command + * @param CommandInterface $command * @return self */ public function setCommand(CommandInterface $command) @@ -40,7 +40,7 @@ class RetraitementService * @param string $inputFilePath Chemin du fichier à retraiter * @param string $outputFilePath Chemin du fichier retraité généré * @param string $timeout Timeout à appliquer au lancement du script de retraitement. - * @throws TimedOutCommandException Le timout a été atteint + * @throws TimedOutCommandException Le timout d'exécution a été atteint */ private function retraiterFichierByPath($inputFilePath, $outputFilePath, $timeout = null) { @@ -62,9 +62,6 @@ class RetraitementService )); } } - catch (TimedOutCommandException $toce) { - throw $toce; - } catch (RuntimeException $rte) { throw new RuntimeException( "Une erreur est survenue lors de l'exécution de la commande de retraitement " . $this->command->getName(), diff --git a/module/Retraitement/src/Retraitement/Service/RetraitementServiceFactory.php b/module/Retraitement/src/Retraitement/Service/RetraitementServiceFactory.php index 0eae5abda5ff45005a96099a27ddc11e6f36dd6e..0d82e1042a3b7396786a6f876975ad43af05461f 100644 --- a/module/Retraitement/src/Retraitement/Service/RetraitementServiceFactory.php +++ b/module/Retraitement/src/Retraitement/Service/RetraitementServiceFactory.php @@ -2,7 +2,6 @@ namespace Retraitement\Service; -use Application\Service\FichierThese\FichierTheseService; use Application\Command\CommandInterface; use Zend\ServiceManager\Exception\InvalidArgumentException; use Zend\ServiceManager\FactoryInterface; @@ -20,11 +19,13 @@ class RetraitementServiceFactory implements FactoryInterface { $command = $this->createCommand($serviceLocator); - $service = new RetraitementService($command); - - return $service; + return new RetraitementService($command); } + /** + * @param ServiceLocatorInterface $serviceLocator + * @return CommandInterface + */ private function createCommand(ServiceLocatorInterface $serviceLocator) { $config = $serviceLocator->get('config'); @@ -37,7 +38,7 @@ class RetraitementServiceFactory implements FactoryInterface throw new InvalidArgumentException("La classe spécifiée dans l'option de 'config sygal.retraitement.command.class' n'existe pas"); } - /** @var \Application\Filter\Command\\Application\Command\CommandInterface $command */ + /** @var CommandInterface $command */ $command = new $commandClass; if (isset($config['sygal']['retraitement']['command']['options'])) { diff --git a/public/charte_de_depot_et_diffusion.pdf b/public/charte_de_depot_et_diffusion.pdf deleted file mode 100644 index 5efaf128bbf2da4e6774ec1c4f796d867a28951e..0000000000000000000000000000000000000000 Binary files a/public/charte_de_depot_et_diffusion.pdf and /dev/null differ diff --git a/public/charte_depot_et_diffusion_des_theses.pdf b/public/charte_depot_et_diffusion_des_theses.pdf new file mode 100644 index 0000000000000000000000000000000000000000..15914cfd87ed7b93e465e2eb1554a56bab8a37b9 Binary files /dev/null and b/public/charte_depot_et_diffusion_des_theses.pdf differ diff --git a/public/css/SyGAL_logo_Blanc03.png b/public/css/SyGAL_logo_Blanc03.png new file mode 100644 index 0000000000000000000000000000000000000000..2a066ebc822315b90e1341daf2c80d840166e7d9 Binary files /dev/null and b/public/css/SyGAL_logo_Blanc03.png differ diff --git a/public/css/SyGAL_logo_Bleu02.png b/public/css/SyGAL_logo_Bleu02.png new file mode 100644 index 0000000000000000000000000000000000000000..ff3e3751061819bb87121fa71e87582abcae4e22 Binary files /dev/null and b/public/css/SyGAL_logo_Bleu02.png differ diff --git a/public/css/app.css b/public/css/app.css index 0183fdf6a1f4c6dbeeb788babe84732954b9bb94..3dca3cde511a25edc23bdda8c10c2f0940f00230 100644 --- a/public/css/app.css +++ b/public/css/app.css @@ -43,8 +43,7 @@ h2.modal-title { padding: 4px 8px; } .panel.box { - margin-bottom: 15px; - box-shadow: 1px 1px 6px #555; } + margin-bottom: 10px; } .panel.box .panel-heading { padding: 5px 10px; } .panel.box .panel-heading h2 { @@ -67,6 +66,44 @@ h2.modal-title { margin-top: 15px; margin-left: 0; } +.panel.box.roadmap-next-step { + width: 50%; } + +.panel .panel-heading { + text-transform: uppercase; } + +.panel-info { + border-color: #009ce4; } + +.panel-info > .panel-heading { + color: white; + background-color: #009ce4; + border-color: #009ce4; } + +.panel-success { + border-color: #2EA662; } + +.panel-success > .panel-heading { + color: white; + background-color: #2EA662; + border-color: #2EA662; } + +.panel-danger { + border-color: #d23544; } + +.panel-danger > .panel-heading { + color: white; + background-color: #d23544; + border-color: #d23544; } + +.panel-warning { + border-color: #f1732d; } + +.panel-warning > .panel-heading { + color: white; + background-color: #f1732d; + border-color: #f1732d; } + .panel.panel-md { font-size: 90%; } .panel.panel-md .panel-heading, @@ -369,6 +406,12 @@ p.autoris-diffusion-motif { .checkbox .checkbox-label { margin-left: 5px; } +.checkbox-sm input[type="checkbox"] { + transform: scale(0.9); } +.checkbox-sm .checkbox-label { + margin-left: 2px; + font-size: 90%; } + form.form-retraiter { margin: 4px 0 15px 0; } @@ -398,6 +441,22 @@ form input[type='submit'] { .btn span.glyphicon { margin-right: 5px; } +.btn-info { + background-color: #009ce4; + border-color: #009ce4; } + +.btn-success { + background-color: #2EA662; + border-color: #2EA662; } + +.btn-danger { + background-color: #d23544; + border-color: #d23544; } + +.btn-warning { + background-color: #f1732d; + border-color: #f1732d; } + .btn.btn-xs span.glyphicon { margin-right: 2px; } @@ -428,7 +487,8 @@ ul.menu-secondaire, ul.menu-information { background: #f5f5f5; border-radius: 4px; - border: 4px solid #e1e1e1; } + padding: 2px; + box-shadow: 1px 1px 6px; } ul.menu-secondaire li, ul.menu-information li { margin-top: 0; } diff --git a/public/css/app.css.map b/public/css/app.css.map index d03d217b37731f5e7c011ded341b7961c049d30b..f1daf68a8bb2008dcf3fbc1e7cf3625e0168c0a8 100644 --- a/public/css/app.css.map +++ b/public/css/app.css.map @@ -1,6 +1,6 @@ { "version": 3, -"mappings": ";AAEA,UAAW;EACT,WAAW,EAAE,IAAI;;AAGnB,EAAG;EACD,UAAU,EAAE,IAAI;;AAGlB,iBAAkB;EAChB,UAAU,EAAE,IAAI;;AAGlB,4BAA6B;EAC3B,gBAAgB,EAAE,8BAA8B;EAChD,iBAAiB,EAAE,SAAS;EAC5B,eAAe,EAAE,SAAS;EAC1B,mBAAmB,EAAE,SAAS;EAC9B,OAAO,EAAE,YAAY;EACrB,MAAM,EAAE,IAAI;EACZ,KAAK,EAAE,IAAI;EACX,WAAW,EAAE,OAAO;;AAIpB,cAAG;EACD,SAAS,EAA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A6C;AAE7C,qBAAsB;EACpB,KAAK,EAAE,KAAK;EACZ,MAAM,EAAE,KAAK;EAEX,YAAK,EAAE,MAAM;EACb,YAAK,EAAE,SAAS;EAChB,YAAK,EAAE,GAAG;;AAGd,6BAA8B;EAC5B,UAAU,EAAE,kEAAkE;;AAGhF,UAAW;EACT,QAAQ,EAAE,QAAQ;EAClB,KAAK,EAAE,IAAI;EACX,YAAY,EAAE,IAAI;;AAIpB,iCAAiC;AAG/B,SAAG;EACD,WAAW,EAAE,IAAI;EACjB,SAAS,EAAE,IAAI;;AAKnB,gDAAgD;AAEhD,kBAAmB;EACjB,WAAW,EAAE,IAAI;EACjB,MAAM,EAAE,CAAC;;AAOX,yBAA0B;EACxB,OAAO,EAAE,MAAM;EACf,8CAAqB;IACnB,MAAM,EAAE,SAAS;;AAKrB,qBAAsB;EACpB,UAAU,EAAE,IAAI;EAChB,WAAW,EAAE,IAAI;EACjB,UAAU,EAAE,oBAAoB;EAChC,iCAAY;IACV,KAAK,EAAE,IAAI;IACX,YAAY,EAAE,GAAG;EAEnB,0BAAK;IACH,UAAU,EAAE,CAAC", "sources": ["app.scss"], "names": [], "file": "app.css" diff --git a/public/css/app.scss b/public/css/app.scss index 82c50541465dc43625966f435846e54c5ab7248d..bf43078a21c02a5b18c4eff293895c124b22f477 100755 --- a/public/css/app.scss +++ b/public/css/app.scss @@ -1,5 +1,10 @@ $uploadedFileFontSize: 80%; +$infoColor: #009ce4; +$successColor: #2EA662; +$warningColor: #f1732d; +$dangerColor: #d23544; + h1, h2, h3 { font-weight: bold; } @@ -59,8 +64,7 @@ h2.modal-title { } .panel.box { - margin-bottom: 15px; - box-shadow: 1px 1px 6px #555; + margin-bottom: 10px; .panel-heading { padding: 5px 10px; @@ -102,6 +106,50 @@ h2.modal-title { } } } +.panel.box.roadmap-next-step { + width: 50%; +} + +.panel .panel-heading { + text-transform: uppercase; +} + +.panel-info { + border-color: $infoColor; +} +.panel-info > .panel-heading { + color: white; + background-color: $infoColor; + border-color: $infoColor; +} + +.panel-success { + border-color: $successColor; +} +.panel-success > .panel-heading { + color: white; + background-color: $successColor; + border-color: $successColor; +} + +.panel-danger { + border-color: $dangerColor; +} +.panel-danger > .panel-heading { + color: white; + background-color: $dangerColor; + border-color: $dangerColor; +} + +.panel-warning { + border-color: $warningColor; +} +.panel-warning > .panel-heading { + color: white; + background-color: $warningColor; + border-color: $warningColor; +} + .panel.panel-md { font-size: 90%; @@ -585,7 +633,15 @@ p.autoris-diffusion-motif { margin-left: 5px; } } - +.checkbox-sm { + input[type="checkbox"] { + transform : scale(0.9); + } + .checkbox-label { + margin-left: 2px; + font-size: 90%; + } +} form.form-retraiter { margin: 4px 0 15px 0; @@ -642,6 +698,23 @@ form { } } +.btn-info { + background-color: $infoColor; + border-color: $infoColor; +} +.btn-success { + background-color: $successColor; + border-color: $successColor; +} +.btn-danger { + background-color: $dangerColor; + border-color: $dangerColor; +} +.btn-warning { + background-color: $warningColor; + border-color: $warningColor; +} + .btn.btn-xs { span.glyphicon { margin-right: 2px; @@ -692,7 +765,9 @@ ul.menu-secondaire, ul.menu-information { background: #f5f5f5; border-radius: 4px; - border: 4px solid #e1e1e1; + padding: 2px; + box-shadow: 1px 1px 6px; + li { margin-top: 0; diff --git a/public/css/charte.css b/public/css/charte.css new file mode 100644 index 0000000000000000000000000000000000000000..8b316a1623f76d4722d53bc3bd706cd3a46d876d --- /dev/null +++ b/public/css/charte.css @@ -0,0 +1,73 @@ +@charset "UTF-8"; +/** + * Charte Normandie Université + */ +body { + padding-bottom: 100px; } + +body.development .navbar-inverse, +body.test .navbar-inverse { + background-image: none; + background-color: #006EAD; + border-color: #006EAD; } + +body.development .navbar-inverse .navbar-nav .active a, +body.test .navbar-inverse .navbar-nav .active a { + background-image: none; + background-color: #004980; + border-color: #004980; } + +.navbar-inverse .navbar-nav > li > a { + color: white; } + +.navbar-inverse .navbar-link { + color: white; } + +.navbar > .container .navbar-brand { + width: 120px; + background-image: url("/css/SyGAL_logo_Blanc03.png"); + background-repeat: no-repeat; + background-size: 85%; + background-position: center 8px; + text-indent: -9999px; } + +.nav-pills > li > a { + border-radius: 20px; } + +#footer { + padding-top: 10px; + margin-bottom: 0; + background-color: #006EAD; } + +#footer ul { + width: 100%; } + +#footer ul li a { + color: white; } + +#footer ul li a.logo-etablissement { + height: 60px; } + +h1.app-name { + font-size: 130px; + background-image: url("/css/SyGAL_logo_Bleu02.png"); + background-repeat: no-repeat; + background-size: contain; + background-position: right top; + text-indent: -9999px; } + +.scrollup { + bottom: 80px; } + +ul.menu-secondaire, +ul.menu-information { + background: none; + border-radius: 18px; + padding: 2px; + box-shadow: 1px 1px 6px; } + +ul.menu-secondaire li a, +ul.menu-information li a { + padding: 7px 10px; } + +/*# sourceMappingURL=charte.css.map */ diff --git a/public/css/charte.css.map b/public/css/charte.css.map new file mode 100644 index 0000000000000000000000000000000000000000..3411d8778ad55001384189e4630114148ff77808 --- /dev/null +++ b/public/css/charte.css.map @@ -0,0 +1,7 @@ +{ +"version": 3, +"mappings": ";AAGA;;GAEG;AAEH,IAAK;EACH,cAAc,EAAE,KAAK;;AAGvB;yBAC0B;EACxB,gBAAgB,EAAE,IAAI;EACtB,gBAAgB,EAdM,OAAO;EAe7B,YAAY,EAfU,OAAO;;AAkB/B;+CACgD;EAC9C,gBAAgB,EAAE,IAAI;EACtB,gBAAgB,EApBY,OAAO;EAqBnC,YAAY,EArBgB,OAAO;;AAwBrC,oCAAqC;EACnC,KAAK,EAAE,KAAK;;AAEd,4BAA6B;EAC3B,KAAK,EAAE,KAAK;;AAEd,kCAAmC;EACjC,KAAK,EAAE,KAAK;EACZ,gBAAgB,EAAE,kCAAkC;EACpD,iBAAiB,EAAE,SAAS;EAC5B,eAAe,EAAE,GAAG;EACpB,mBAAmB,EAAE,UAAU;EAC/B,WAAW,EAAE,OAAO;;AAGtB,mBAAoB;EAClB,aAAa,EAAE,IAAI;;AAGrB,OAAQ;EACN,WAAW,EAAE,IAAI;EACjB,aAAa,EAAE,CAAC;EAChB,gBAAgB,EA/CM,OAAO;;AAiD/B,UAAW;EACT,KAAK,EAAE,IAAI;;AAEb,eAAgB;EACd,KAAK,EAAE,KAAK;;AAEd,kCAAmC;EACjC,MAAM,EAAE,IAAI;;AAGd,WAAY;EACV,SAAS,EAAE,KAAK;EAChB,gBAAgB,EAAE,iCAAiC;EACnD,iBAAiB,EAAE,SAAS;EAC5B,eAAe,EAAE,OAAO;EACxB,mBAAmB,EAAE,SAAS;EAC9B,WAAW,EAAE,OAAO;;AAGtB,SAAU;EACR,MAAM,EAAE,IAAI;;AAGd;mBACoB;EAClB,UAAU,EAAE,IAAI;EAChB,aAAa,EAAE,IAAI;EACnB,OAAO,EAAE,GAAG;EACZ,UAAU,EAAE,WAAW;;AAEzB;wBACyB;EACvB,OAAO,EAAE,QAAQ", +"sources": ["charte.scss"], +"names": [], +"file": "charte.css" +} \ No newline at end of file diff --git a/public/css/charte.scss b/public/css/charte.scss new file mode 100644 index 0000000000000000000000000000000000000000..19faf8425d47fc202968d142e7cc107cb41eebb5 --- /dev/null +++ b/public/css/charte.scss @@ -0,0 +1,83 @@ +$navbarBackgroundColor: #006EAD; +$navbarBackgroundColorActive: #004980; + +/** + * Charte Normandie Université + */ + +body { + padding-bottom: 100px; +} + +body.development .navbar-inverse, +body.test .navbar-inverse { + background-image: none; //linear-gradient(to bottom, #660000 0px, #870a0a 100%); + background-color: $navbarBackgroundColor; + border-color: $navbarBackgroundColor; +} + +body.development .navbar-inverse .navbar-nav .active a, +body.test .navbar-inverse .navbar-nav .active a { + background-image: none; //linear-gradient(to bottom, #d22828 0px, #a41212 100%); + background-color: $navbarBackgroundColorActive; + border-color: $navbarBackgroundColorActive +} + +.navbar-inverse .navbar-nav > li > a { + color: white; +} +.navbar-inverse .navbar-link { + color: white; +} +.navbar > .container .navbar-brand { + width: 120px; + background-image: url('/css/SyGAL_logo_Blanc03.png'); + background-repeat: no-repeat; + background-size: 85%; + background-position: center 8px; + text-indent: -9999px; +} + +.nav-pills > li > a { + border-radius: 20px; +} + +#footer { + padding-top: 10px; + margin-bottom: 0; + background-color: $navbarBackgroundColor; +} +#footer ul { + width: 100%; +} +#footer ul li a { + color: white; +} +#footer ul li a.logo-etablissement { + height: 60px; +} + +h1.app-name { + font-size: 130px; + background-image: url('/css/SyGAL_logo_Bleu02.png'); + background-repeat: no-repeat; + background-size: contain; + background-position: right top; + text-indent: -9999px; +} + +.scrollup { + bottom: 80px; +} + +ul.menu-secondaire, +ul.menu-information { + background: none; + border-radius: 18px; + padding: 2px; + box-shadow: 1px 1px 6px; +} +ul.menu-secondaire li a, +ul.menu-information li a { + padding: 7px 10px; +} \ No newline at end of file diff --git a/public/js/app.js b/public/js/app.js index 6f4ae6f1304f3bb192e5c75212a6a5fc987379ab..a76f4ac8d7552c725fd035224b252c106bb52d4f 100755 --- a/public/js/app.js +++ b/public/js/app.js @@ -270,7 +270,7 @@ $.widget("unicaen.widgetAutorisationMiseEnLigne", { case "2": // oui immédiatement this.getInputDivEmbargoDuree().hide(effect, {direction: "left"}).find(':input').prop('disabled', 'disabled'); this.getInputDivMotif().hide(effect, {direction: "up"}).find(':input').prop('disabled', 'disabled'); - this.getInputDivIdOrcid().show(effect, {direction: "up"}).find(':input').removeProp('disabled'); + this.getInputDivAuteur().show(effect, {direction: "up"}).find(':input').removeProp('disabled'); this.getExplicOuiImmediat().show(); this.getExplicOuiEmbargo().hide(); this.getExplicNon().hide(); @@ -278,7 +278,7 @@ $.widget("unicaen.widgetAutorisationMiseEnLigne", { case "1": // oui avec embargo this.getInputDivEmbargoDuree().show(effect, {direction: "left"}).find(':input').removeProp('disabled'); this.getInputDivMotif().show(effect, {direction: "up"}).find(':input').removeProp('disabled'); - this.getInputDivIdOrcid().show(effect, {direction: "up"}).find(':input').removeProp('disabled'); + this.getInputDivAuteur().show(effect, {direction: "up"}).find(':input').removeProp('disabled'); this.getExplicOuiImmediat().hide(); this.getExplicOuiEmbargo().show(); this.getExplicNon().hide(); @@ -286,7 +286,7 @@ $.widget("unicaen.widgetAutorisationMiseEnLigne", { case "0": // non this.getInputDivEmbargoDuree().hide(effect, {direction: "left"}).find(':input').prop('disabled', 'disabled'); this.getInputDivMotif().show(effect, {direction: "up"}).find(':input').removeProp('disabled'); - this.getInputDivIdOrcid().hide(effect, {direction: "up"}).find(':input').prop('disabled', 'disabled'); + this.getInputDivAuteur().hide(effect, {direction: "up"}).find(':input').prop('disabled', 'disabled'); this.getExplicOuiImmediat().hide(); this.getExplicOuiEmbargo().hide(); this.getExplicNon().show(); @@ -294,7 +294,7 @@ $.widget("unicaen.widgetAutorisationMiseEnLigne", { default: this.getInputDivEmbargoDuree().hide(); this.getInputDivMotif().hide(); - this.getInputDivIdOrcid().hide(); + this.getInputDivAuteur().hide(); this.getExplicOuiImmediat().hide(); this.getExplicOuiEmbargo().hide(); this.getExplicNon().hide(); @@ -315,8 +315,8 @@ $.widget("unicaen.widgetAutorisationMiseEnLigne", { getInputDivMotif: function () { return this.element.find(".motif"); }, - getInputDivIdOrcid: function () { - return this.element.find(".idOrcid"); + getInputDivAuteur: function () { + return this.element.find(".auteur"); }, getExplicOuiImmediat: function () { return this.element.find("#explicOuiImmediat"); diff --git a/svn2git.md b/svn2git.md index 3ff2f75eec83a1035845cd8a3c2a5831330b4eed..5febe1a94995cb3abd267ac213d09e83ed85ccdb 100644 --- a/svn2git.md +++ b/svn2git.md @@ -38,7 +38,9 @@ Compléter ce fichier à la main, exemple : ## Ajouter la remote "origin" au dépôt local - $ git remote add origin https://git.unicaen.fr/bertrand.gauthier/sodoct.git + $ git remote add origin https://git.unicaen.fr/dsi/sodoct.git + ou bien + $ git remote add origin git@git.unicaen.fr:dsi/sodoct.git ## Lister les tags Subversion importés @@ -51,7 +53,7 @@ Lister les tags Subversion importés : NB: le nom des tags affichés ici ne doit pas contenir `origin/` ; si c'est le cas, ajuster `refs/remotes/origin/tags` et `5-`. -## Déplacer les tags Subversion importés pour en faire de vrais tags Git +## Déplacer les éventuels tags Subversion importés pour en faire de vrais tags Git $ git for-each-ref refs/remotes/origin/tags | cut -d / -f 5- | grep -v @ | while read tagname; do