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

Huis clos

parent 51a58522
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
@@ -106,6 +106,8 @@ class PdcData
    private $cotutuelleLibelle;
    /** @var string */
    private $cotutuellePays;
    /** @var bool */
    private  $huisClos;

    /** @var bool */
    private $associe;
@@ -610,5 +612,20 @@ 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;
    }
}
 No newline at end of file
+7 −1
Original line number Diff line number Diff line
@@ -94,7 +94,13 @@ use Application\View\Renderer\PhpRenderer;
<table class='jury'>
    <tr>
        <th colspan='3'>
            Thèse soutenue publiquement le
            Thèse soutenue
            <?php if ($informations->isHuisClos()) : ?>
                à huis clos
            <?php else : ?>
                publiquement
            <?php endif; ?>
            le
            <?php if ($informations->getDate() !== null): ?>
                <?php echo $informations->getDate(); ?>
            <?php else: ?>
+13 −1
Original line number Diff line number Diff line
@@ -33,6 +33,8 @@ use Application\Service\Variable\VariableServiceAwareTrait;
use Assert\Assertion;
use Doctrine\DBAL\DBALException;
use Doctrine\ORM\OptimisticLockException;
use Soutenance\Entity\Proposition;
use Soutenance\Service\Proposition\PropositionServiceAwareTrait;
use UnicaenApp\Exception\LogicException;
use UnicaenApp\Exception\RuntimeException;
use UnicaenApp\Traits\MessageAwareInterface;
@@ -57,6 +59,7 @@ class TheseService extends BaseService implements ListenerAggregateInterface
    use FileServiceAwareTrait;
    use AuthorizeServiceAwareTrait;
    use ActeurServiceAwareTrait;
    use PropositionServiceAwareTrait;

    /**
     * Resaisir l'autorisation de diffusion ? Sinon celle saisie au 1er dépôt est reprise/dupliquée.
@@ -454,7 +457,9 @@ class TheseService extends BaseService implements ListenerAggregateInterface
    public function fetchInformationsPageDeCouverture(These $these)
    {
        $pdcData = new PdcData();

        $propositions = $these->getPropositions()->toArray();
        /** @var Proposition $proposition */
        $proposition = end($propositions);

        if ($these->getDateSoutenance() !== null) {
            $mois = (int) $these->getDateSoutenance()->format('m');
@@ -484,6 +489,13 @@ class TheseService extends BaseService implements ListenerAggregateInterface
            if ($these->getLibellePaysCotutelle()) $pdcData->setCotutuellePays($these->getLibellePaysCotutelle());
        }

        /** Huis Clos */
        if ($proposition AND $proposition->isHuitClos()) {
            $pdcData->setHuisClos(true);
        } else {
            $pdcData->setHuisClos(false);
        }

        /** Jury de thèses */
        $acteurs = $these->getActeurs()->toArray();