Skip to content
Snippets Groups Projects
Commit 048bcf26 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Merge branch 'release_5.3.2'

parents 641ed677 8b596d82
Branches
Tags 5.3.2
No related merge requests found
Pipeline #20295 passed
Showing with 289 additions and 19 deletions
Journal des modifications
=========================
5.3.2
-----
- Module Soutenance : 2 nouvelles qualités possibles : 'Autre membre de rang B' et Associate Professor - Équivalent HDR'
- [FIX] Erreur dans le test de pertinence des étapes de dépôt d'une version corrigée (SQL).
- [FIX] Remise de la fonction getNbInscription effacée car sans d'usage (explicite)
- [FIX] Remise du controle de sursis pour les validations acteurs
- [FIX] Inversion de l'ordre de génération des avis de souteances et procés verbaux
5.3.1
-----
- [FIX] Donnée : ajout de garde lorsque le mail fourni par les données sources est " "
......
# Version 5.3.2
## 1. Sur le serveur d'application
- Placez-vous dans le répertoire de l'application puis lancez la commande suivante
pour installer la nouvelle version :
```bash
git fetch --tags && git checkout --force 5.3.2 && bash ./install.sh
```
- Selon le moteur PHP que vous avez installé, rechargez le service, exemple :
- php7.4-fpm : `service php7.4-fpm reload`
- apache2-mod-php7.4 : `service apache2 reload`
## 2. Dans la base de données
```sql
-- Module Soutenance : 2 nouvelles qualités possibles.
insert into soutenance_qualite (id, libelle, rang, hdr, emeritat, histo_creation, histo_createur_id, histo_modification, histo_modificateur_id)
select nextval('soutenance_qualite_id_seq'), 'Autre membre de rang B', 'B', 'N', 'N', current_timestamp, 1, current_timestamp, 1;
insert into soutenance_qualite (id, libelle, rang, hdr, emeritat, histo_creation, histo_createur_id, histo_modification, histo_modificateur_id)
select nextval('soutenance_qualite_id_seq'), 'Associate Professor - Équivalent HDR', 'B', 'O', 'N', current_timestamp, 1, current_timestamp, 1;
--
-- [FIX] Erreur dans le test de pertinence des étapes de dépôt d'une version corrigée.
--
create or replace view v_wf_etape_pertin(these_id, etape_id, code, ordre, id) as
SELECT alias38.these_id::numeric AS these_id,
alias38.etape_id::numeric AS etape_id,
alias38.code,
alias38.ordre,
row_number() OVER (ORDER BY 1::integer, 2::integer, 3::integer, 4::integer) AS id
FROM (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::text = 'VALIDATION_PAGE_DE_COUVERTURE'::text
WHERE t.etat_these::text = ANY (ARRAY ['E'::character varying::text, 'S'::character varying::text])
UNION ALL
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::text = 'DEPOT_VERSION_ORIGINALE'::text
WHERE t.etat_these::text = ANY (ARRAY ['E'::character varying::text, 'S'::character varying::text])
UNION ALL
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::text = 'AUTORISATION_DIFFUSION_THESE'::text
WHERE t.etat_these::text = ANY (ARRAY ['E'::character varying::text, 'S'::character varying::text])
UNION ALL
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::text = 'ATTESTATIONS'::text
WHERE t.etat_these::text = ANY (ARRAY ['E'::character varying::text, 'S'::character varying::text])
UNION ALL
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::text = 'SIGNALEMENT_THESE'::text
WHERE t.etat_these::text = ANY (ARRAY ['E'::character varying::text, 'S'::character varying::text])
UNION ALL
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::text = 'ARCHIVABILITE_VERSION_ORIGINALE'::text
WHERE t.etat_these::text = ANY (ARRAY ['E'::character varying::text, 'S'::character varying::text])
UNION ALL
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::text = 'DEPOT_VERSION_ARCHIVAGE'::text
JOIN v_situ_archivab_vo situ ON situ.these_id = t.id AND situ.est_valide = false
WHERE t.etat_these::text = ANY (ARRAY ['E'::character varying::text, 'S'::character varying::text])
UNION ALL
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::text = 'ARCHIVABILITE_VERSION_ARCHIVAGE'::text
JOIN v_situ_archivab_vo situ ON situ.these_id = t.id AND situ.est_valide = false
WHERE t.etat_these::text = ANY (ARRAY ['E'::character varying::text, 'S'::character varying::text])
UNION ALL
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::text = 'VERIFICATION_VERSION_ARCHIVAGE'::text
JOIN v_situ_archivab_va situ ON situ.these_id = t.id AND situ.est_valide = true
WHERE t.etat_these::text = ANY (ARRAY ['E'::character varying::text, 'S'::character varying::text])
UNION ALL
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::text = 'RDV_BU_SAISIE_DOCTORANT'::text
WHERE t.etat_these::text = ANY (ARRAY ['E'::character varying::text, 'S'::character varying::text])
UNION ALL
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::text = 'RDV_BU_SAISIE_BU'::text
WHERE t.etat_these::text = ANY (ARRAY ['E'::character varying::text, 'S'::character varying::text])
UNION ALL
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::text = 'RDV_BU_VALIDATION_BU'::text
WHERE t.etat_these::text = ANY (ARRAY ['E'::character varying::text, 'S'::character varying::text])
UNION ALL
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::text = 'DEPOT_VERSION_ORIGINALE_CORRIGEE'::text
WHERE (t.correc_autorisee IS NOT NULL OR
t.correc_autorisee_forcee IS NOT NULL AND t.correc_autorisee_forcee::text <> 'aucune'::text OR
t.correc_effectuee::text = 'O'::text)
AND (t.etat_these::text = ANY (ARRAY ['E'::character varying::text, 'S'::character varying::text]))
UNION ALL
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::text = 'AUTORISATION_DIFFUSION_THESE_VERSION_CORRIGEE'::text
WHERE (t.correc_autorisee IS NOT NULL OR
t.correc_autorisee_forcee IS NOT NULL AND t.correc_autorisee_forcee::text <> 'aucune'::text OR
t.correc_effectuee::text = 'O'::text)
AND (t.etat_these::text = ANY (ARRAY ['E'::character varying::text, 'S'::character varying::text]))
UNION ALL
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::text = 'ATTESTATIONS_VERSION_CORRIGEE'::text
WHERE (t.correc_autorisee IS NOT NULL OR
t.correc_autorisee_forcee IS NOT NULL AND t.correc_autorisee_forcee::text <> 'aucune'::text OR
t.correc_effectuee::text = 'O'::text)
AND (t.etat_these::text = ANY (ARRAY ['E'::character varying::text, 'S'::character varying::text]))
UNION ALL
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::text = 'ARCHIVABILITE_VERSION_ORIGINALE_CORRIGEE'::text
WHERE (t.correc_autorisee IS NOT NULL OR
t.correc_autorisee_forcee IS NOT NULL AND t.correc_autorisee_forcee::text <> 'aucune'::text OR
t.correc_effectuee::text = 'O'::text)
AND (t.etat_these::text = ANY (ARRAY ['E'::character varying::text, 'S'::character varying::text]))
UNION ALL
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::text = 'DEPOT_VERSION_ARCHIVAGE_CORRIGEE'::text
JOIN v_situ_archivab_voc situ ON situ.these_id = t.id AND situ.est_valide = false
WHERE (t.correc_autorisee IS NOT NULL OR
t.correc_autorisee_forcee IS NOT NULL AND t.correc_autorisee_forcee::text <> 'aucune'::text OR
t.correc_effectuee::text = 'O'::text)
AND (t.etat_these::text = ANY (ARRAY ['E'::character varying::text, 'S'::character varying::text]))
UNION ALL
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::text = 'ARCHIVABILITE_VERSION_ARCHIVAGE_CORRIGEE'::text
JOIN v_situ_archivab_voc situ ON situ.these_id = t.id AND situ.est_valide = false
WHERE (t.correc_autorisee IS NOT NULL OR
t.correc_autorisee_forcee IS NOT NULL AND t.correc_autorisee_forcee::text <> 'aucune'::text OR
t.correc_effectuee::text = 'O'::text)
AND (t.etat_these::text = ANY (ARRAY ['E'::character varying::text, 'S'::character varying::text]))
UNION ALL
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::text = 'VERIFICATION_VERSION_ARCHIVAGE_CORRIGEE'::text
JOIN v_situ_archivab_vac situ ON situ.these_id = t.id AND situ.est_valide = true
WHERE (t.correc_autorisee IS NOT NULL OR
t.correc_autorisee_forcee IS NOT NULL AND t.correc_autorisee_forcee::text <> 'aucune'::text OR
t.correc_effectuee::text = 'O'::text)
AND (t.etat_these::text = ANY (ARRAY ['E'::character varying::text, 'S'::character varying::text]))
UNION ALL
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::text = 'DEPOT_VERSION_CORRIGEE_VALIDATION_DOCTORANT'::text
WHERE (t.correc_autorisee IS NOT NULL OR
t.correc_autorisee_forcee IS NOT NULL AND t.correc_autorisee_forcee::text <> 'aucune'::text OR
t.correc_effectuee::text = 'O'::text)
AND (t.etat_these::text = ANY (ARRAY ['E'::character varying::text, 'S'::character varying::text]))
UNION ALL
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::text = 'DEPOT_VERSION_CORRIGEE_VALIDATION_DIRECTEUR'::text
WHERE (t.correc_autorisee IS NOT NULL OR
t.correc_autorisee_forcee IS NOT NULL AND t.correc_autorisee_forcee::text <> 'aucune'::text OR
t.correc_effectuee::text = 'O'::text)
AND (t.etat_these::text = ANY (ARRAY ['E'::character varying::text, 'S'::character varying::text]))
UNION ALL
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::text = 'REMISE_EXEMPLAIRE_PAPIER_THESE_CORRIGEE'::text
WHERE (t.correc_autorisee IS NOT NULL OR
t.correc_autorisee_forcee IS NOT NULL AND t.correc_autorisee_forcee::text <> 'aucune'::text OR
t.correc_effectuee::text = 'O'::text)
AND (t.etat_these::text = ANY (ARRAY ['E'::character varying::text, 'S'::character varying::text]))
AND (EXISTS(SELECT d.id
FROM diffusion d
WHERE d.these_id = t.id
AND d.version_corrigee = true
AND (d.autoris_mel = ANY (ARRAY [0, 1]))))) alias38;
```
\ No newline at end of file
......@@ -21,9 +21,10 @@ trait ShellCommandRunnerTrait
}
if (!$result->isSuccessfull()) {
$message = sprintf("La commande '%s' a échoué (code retour = %s). ",
$message = sprintf("La commande '%s' a échoué (code retour = %s) : %s",
$command->getName(),
$result->getReturnCode()
$result->getReturnCode(),
$command->getCommandLine()
);
if ($output = $result->getOutput()) {
$message .= "Voici le log d'exécution : " . implode(PHP_EOL, $output);
......
......@@ -11,7 +11,7 @@ use Fichier\Command\MergeShellCommand;
*/
class PdfMergeShellCommandQpdf extends MergeShellCommand
{
protected $executable = '/usr/local/bin/qpdf';
protected $executable = 'qpdf';
/**
* @return string
......
......@@ -436,10 +436,12 @@ class SessionController extends AbstractController
foreach ($inscriptions as $inscription) {
$doctorant = $inscription->getDoctorant();
$theses = array_filter($doctorant->getTheses(), function (These $t) { return ($t->getEtatThese() === These::ETAT_EN_COURS AND $t->estNonHistorise());});
/** @var These $these */
$these = (!empty($theses))?current($theses):null;
$etablissements = array_map(function (These $t) { return ($t->getEtablissement())?$t->getEtablissement()->getStructure()->getLibelle():"Établissement non renseigné";}, $theses);
$ecoles = array_map(function (These $t) { return ($t->getEcoleDoctorale())?$t->getEcoleDoctorale()->getStructure()->getLibelle():"École doctorale non renseignée";}, $theses);
$unites = array_map(function (These $t) { return ($t->getUniteRecherche())?$t->getUniteRecherche()->getStructure()->getLibelle():"Unité de recherche non renseignée";}, $theses);
$nbInscription = (!empty($theses))?current($theses)->getNbInscription($annee):"---";
$nbInscription = ($these)?$these->getNbInscription():"---";
$entry = [
'Liste' => $inscription->getListe(),
'Dénomination étudiant' => $doctorant->getIndividu()->getNomComplet(),
......
......@@ -42,7 +42,7 @@ $canAjouterRapport = $this->isAllowed($these, PropositionPrivileges
<?php if ($autorisation === null) : ?>
<div class="card-header bg-warning">
<span class="icon icon-attention"></span>
Aucune autorisation de soutenance de déposée.
Aucune autorisation de soutenance déposée.
</div>
<?php else : ?>
<ul>
......@@ -85,7 +85,7 @@ $canAjouterRapport = $this->isAllowed($these, PropositionPrivileges
<?php if ($rapport === null or empty($rapport)) : ?>
<div class="card-header bg-warning">
<span class="icon icon-attention"></span>
Aucune rapport de soutenance de déposé.
Aucune rapport de soutenance déposé.
</div>
<?php else: ?>
<ul>
......
......@@ -293,18 +293,17 @@ $canSimulerRemonter = $this->isAllowed(PresoutenancePrivileges::getResourceId(Pr
<div class="row">
<div class="col-md-3">
<?php if ($canGenererDocument) : ?>
<a <?php /** @see \Soutenance\Controller\PresoutenanceController::procesVerbalSoutenanceAction() */ ?>
href="<?php echo $this->url('soutenance/presoutenance/proces-verbal-soutenance', ['these' => $these->getId()], [], true); ?>"
<a <?php /** @see \Soutenance\Controller\PresoutenanceController::avisSoutenanceAction() */ ?>
href="<?php echo $this->url('soutenance/presoutenance/avis-soutenance', ['these' => $these->getId()], [], true); ?>"
class="btn btn-primary action"
target="_blank"
>
<span class="fas fa-list-alt"></span>
Générer le procès verbal
<span class="fas fa-list-alt"></span>Générer l'avis de soutenance
</a>
<?php endif; ?>
</div>
<div class="col-md-9">
<?php echo $this->dernierHorodatage($proposition, HorodatageService::TYPE_EDITION, "Procès verbal"); ?>
<?php echo $this->dernierHorodatage($proposition, HorodatageService::TYPE_EDITION, "Avis de soutenance"); ?>
</div>
</div>
......@@ -388,12 +387,13 @@ $canSimulerRemonter = $this->isAllowed(PresoutenancePrivileges::getResourceId(Pr
<div class="row">
<div class="col-md-12">
<?php if ($canGenererDocument) : ?>
<a <?php /** @see \Soutenance\Controller\PresoutenanceController::avisSoutenanceAction() */ ?>
href="<?php echo $this->url('soutenance/presoutenance/avis-soutenance', ['these' => $these->getId()], [], true); ?>"
<a <?php /** @see \Soutenance\Controller\PresoutenanceController::procesVerbalSoutenanceAction() */ ?>
href="<?php echo $this->url('soutenance/presoutenance/proces-verbal-soutenance', ['these' => $these->getId()], [], true); ?>"
class="btn btn-primary action"
target="_blank"
>
<span class="fas fa-list-alt"></span>Générer l'avis de soutenance
<span class="fas fa-list-alt"></span>
Générer le procès verbal
</a>
<?php endif; ?>
......@@ -429,7 +429,7 @@ $canSimulerRemonter = $this->isAllowed(PresoutenancePrivileges::getResourceId(Pr
</div>
<?php echo $this->derniersHorodatages($proposition, [
[HorodatageService::TYPE_EDITION, "Avis de soutenance"],
[HorodatageService::TYPE_EDITION, "Procès verbal"],
[HorodatageService::TYPE_EDITION, "Rapport de soutenance"],
[HorodatageService::TYPE_EDITION, "Rapport technique"],
[HorodatageService::TYPE_EDITION, "Convocations"],
......
......@@ -18,7 +18,7 @@ use These\Entity\Db\These;
<div>
<?php if (empty($avis)) : ?>
<div class="alert alert-info">
Aucun pré-rapport de déposer pour le moment.
Aucun pré-rapport déposé pour le moment.
</div>
<?php else : ?>
<table class="table table-condensed">
......
......@@ -32,8 +32,9 @@ $these = $proposition->getThese();
$hasDeclaration= !empty($validations[TypeValidation::CODE_VALIDATION_DECLARATION_HONNEUR]);
$hasAttestation = !empty($attestationsIntegriteScientifique);
$hasSursis = $proposition->hasSursis();
$isDateOk = ((new DateTime())->add(new DateInterval('P2M')) < $proposition->getDate());
$isDateOk = ((new DateTime())->add(new DateInterval('P2M')) < $proposition->getDate() OR $hasSursis);
$isAllOk = ($hasDeclaration AND $hasAttestation AND $isDateOk AND $isInformationsOk)
?>
......
......@@ -1543,4 +1543,11 @@ class These implements HistoriqueAwareInterface, ResourceInterface
}
return null;
}
public function getNbInscription() : int
{
$inscriptions = $this->getAnneesUnivInscription()->toArray();
$inscriptions = array_filter($inscriptions, function (TheseAnneeUniv $a) { return $a->estNonHistorise();});
return count($inscriptions);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment