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

Merge branch 'hotfix_menu_rapporteur' into develop

parents 1dc99aab a4aaf0c9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@ Journal des modifications
2.1.9
-----
- Ajout de demande de justificatif pour certaines qualités pour les soutenances (par exemple : membre étranger)
- Mention soutenue à huis clos lorsque mentionné dans la proposition de soutenance
- Mention du caractère confidentiel sur la page de couverture
- Generalisation des documents attachés aux structures + exploitation dans les convocations

2.1.8
+13 −0
Original line number Diff line number Diff line
@@ -41,6 +41,7 @@ use Application\Service\These\TheseService;
use Application\Service\TheseAnneeUniv\TheseAnneeUnivService;
use Application\Service\TheseAnneeUniv\TheseAnneeUnivServiceFactory;
use Application\View\Helper\Url\UrlTheseHelperFactory;
use Soutenance\Provider\Privilege\IndexPrivileges;
use UnicaenAuth\Guard\PrivilegeController;
use UnicaenAuth\Provider\Rule\PrivilegeRuleProvider;

@@ -979,6 +980,18 @@ return [
                                'separator' => true,
                            ],
                            //---------------------------------------------------
                            'page-rapporteur' => [
                                'order' => 60,
                                'label' => 'Dépôt du rapport',
                                'route' => 'soutenance/index-rapporteur',
                                'withtarget' => true,
                                'paramsInject' => [
                                    'these',
                                ],
                                'icon' => 'fas fa-clipboard',
                                'resource' => IndexPrivileges::getResourceId(IndexPrivileges::INDEX_RAPPORTEUR),
                            ],
                            //---------------------------------------------------
                            'depot' => [
                                'label' => 'Dépôt',
                                'order' => 60,
+1 −1
Original line number Diff line number Diff line
@@ -265,7 +265,7 @@ class TheseEntityAssertion extends GeneratedTheseEntityAssertion
        $informations = $this->theseService->fetchInformationsPageDeCouverture($this->these);

        foreach ($informations as $clef => $information) {
            if ($information == "") {
            if ($clef !== 'dateFinConfidentialite' AND $information == "") {
                return false;
            }
        }
+8 −25
Original line number Diff line number Diff line
@@ -1444,34 +1444,17 @@ class These implements HistoriqueAwareInterface, ResourceInterface

    /**
     * Retourne les mails des directeurs de thèse.
     *
     * @param Individu[] $individusSansMail Liste des individus sans mail, format: "Paul Hochon" => Individu
     * @return array
     * @return string|null
     */
    public function getPresidentJuryEmail(array &$individusSansMail = [])
    public function getPresidentJuryEmail() : ?string
    {
        $emails = [];
        /** @var Acteur[] $membres */
        $membres = $this->getActeursByRoleCode(Role::CODE_MEMBRE_JURY)->toArray();
        /** @var Acteur[] $rapporteurs */
        $rapporteurs = $this->getActeursByRoleCode(Role::CODE_RAPPORTEUR_JURY)->toArray();
        $acteurs = array_merge($membres, $rapporteurs);

        /** @var Acteur $acteur */
        foreach ($acteurs as $acteur) {
            if ($acteur->getRole()->getCode() === Role::CODE_PRESIDENT_JURY) {
                $email = $acteur->getIndividu()->getEmail();
        $president = $this->getActeursByRoleCode(Role::CODE_PRESIDENT_JURY)->toArray();
        if (count($president) !== 1) throw new \RuntimeException("Nombre de président incorrect ...");
        $president = current($president);

                $name = (string)$acteur->getIndividu();
                if (!$email) {
                    $individusSansMail[$name] = $acteur->getIndividu();
                } else {
                    $emails[$email] = $name;
                }
            }
        }

        return $emails;
        if ($president->getIndividu()->getEmail() !== null) return $president->getIndividu()->getEmail();
        if ($president->getMembre()->getEmail() !== null) return $president->getMembre()->getEmail();
        return null;
    }

    /**
+34 −0
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@
namespace Application\Service\FichierThese;

use Application\Entity\Db\Acteur;
use DateTime;

class MembreData
{
@@ -106,6 +107,8 @@ class PdcData
    private $cotutuelleLibelle;
    /** @var string */
    private $cotutuellePays;
    /** @var bool */
    private  $huisClos;

    /** @var bool */
    private $associe;
@@ -610,5 +613,36 @@ class PdcData
        return $this;
    }

    /**
     * @return bool
     */
    public function isHuisClos() : bool
    {
        if ($this->huisClos !== null AND $this->huisClos === true) return true;
        return false;
    }

    /**
     * @param bool $huisClos
     */
    public function setHuisClos(bool $huisClos)
    {
        $this->huisClos = $huisClos;
    }

    /**
     * @return  DateTime|null
     */
    public function getDateFinConfidentialite()
    {
        return $this->dateFinConfidentialite;
    }

    /**
     * @param  DateTime|null $fin
     */
    public function setDateFinConfidentialite($fin)
    {
        $this->dateFinConfidentialite = $fin;
    }
}
 No newline at end of file
Loading