Commit ed2bc1e9 authored by Jean-Philippe Metivier's avatar Jean-Philippe Metivier
Browse files

[FIX] Remise de la fonction getNbInscription effacée car sans d'usage (explicite)

parent 7b787562
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@ Journal des modifications
5.3.2
-----
- [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)

5.3.1
-----
+3 −1
Original line number Diff line number Diff line
@@ -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(),
+7 −0
Original line number Diff line number Diff line
@@ -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);
    }
}