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

Merge branch 'FixPDC'

parents cc4dbb7f 0e94c86e
Loading
Loading
Loading
Loading
Loading
+13 −1
Changes for module/Application/src/Application/Controller/TheseController.php: 13 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -1441,7 +1441,19 @@ class TheseController extends AbstractController
     */
    public static function estDirecteur(Acteur $var) {
        $role = $var->getRole()->getSourceCode();
        return  (explode("::", $role)[1] == "D");
        return  (explode("::", $role)[1] == "D" || explode("::", $role)[1] == "K");
    }

    /** Vrai si un des acteurs à pour etablissement : '14 ENSI de Caen' ou 'ENSI DE CAEN'
     * @param Acteur[] $acteurs
     */
    public static function estENSI($acteurs) {
        foreach ($acteurs as $acteur) {
            if ($acteur->getEtablissement() == 'ENSI DE CAEN' || $acteur->getEtablissement() == '14 ENSI de Caen') {
                return true;
            }
        }
        return false;
    }

    /**
+1
Changes for module/Application/src/Application/Service/Fichier/FichierService.php: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -549,6 +549,7 @@ class FichierService extends BaseService
        $rapporteurs =  array_filter($acteurs, function($a) {return TheseController::estRapporteur($a); });
        $directeurs =  array_filter($acteurs, function($a) {return TheseController::estDirecteur($a); });
        $membres = array_diff($acteurs, $rapporteurs, $directeurs);
        $informations["ENSI"] = TheseController::estENSI($directeurs);

        $informations["nombre de membres"] = count($membres)?count($membres):"";
        $informations["nombre de rapporteurs"] = count($rapporteurs)?count($rapporteurs):"";
+6
Changes for module/Application/src/Application/Service/These/PageDeGarde/pagedecouverture.phtml: 6 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -146,6 +146,12 @@ $PATH = Structure::PATH;
                <span style='background-color:red;'> Établissement d'inscription ou logo d'établissement non renseigné. </span>
            <?php endif; ?>
        </td>
        <!-- TODO ENSI -->
        <?php if ($informations["ENSI"]): ?>
        <td>
            <img class="logo_small" src="public/logo_ensi.jpg"/>
        </td>
        <?php endif; ?>
        <!-- TODO COTUTELLE -->
        <td>
            <?php if ($informations["logo-ecoleDoctorale"]): ?>
+130 KiB
Loading image diff...