Commit 525e7ded authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Formation : lieu de formation (séance) visible de tous ; lien/mdp visio...

Formation : lieu de formation (séance) visible de tous ; lien/mdp visio visible uniquement des inscrits sur liste principale.
parent d1f79c49
Loading
Loading
Loading
Loading
+1 −0
Changes for CHANGELOG.md: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@ Journal des modifications
- FichierViewHelper : plus qu'un seul argument dans __invoke() donc utilisation des setters ; cosmétique pour le nom du fichier.
- Traitement d'une inscription administrative reçue : précision lorsque le dossier d'admission trouvé est lié à un doctorant.
- Doctorant : nouvelle page 'consulter' ; remplacement de liens 'tableau-de-bord' par 'consulter'.
- Formation : lieu de formation (séance) visible de tous ; lien/mdp visio visible uniquement des inscrits sur liste principale. 
- [FIX] Doctorant : correction de DoctorantAssertion qui interdisait l'accès au rôle Admin tech notamment.  
- [FIX] Plantage des notifications à propos des résultats de thèse passant à Admis (iterator vide à cause d'un critère de filtrage erroné).
- [FIX] TheseEtatRule : suppression d'une vérif empêchant la validation de la thèse corrigée par le président du jury (Transition d'état impossible : S → E).
+1 −1
Changes for module/Formation/config/others/session.config.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@ return [
                'allow' => [
                    [
                        'privileges' => [
                            SessionPrivileges::SESSION_VOIR_LIEU
                            SessionPrivileges::SESSION_VOIR_LIEN
                        ],
                        'resources'  => ['Session'],
                        'assertion'  => SessionAssertion::class,
+1 −1
Changes for module/Formation/src/Formation/Assertion/Session/SessionAssertion.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -59,7 +59,7 @@ class SessionAssertion extends AbstractAssertion implements AssertionInterface,
        }

        switch ($privilege) {
            case SessionPrivileges::SESSION_VOIR_LIEU :
            case SessionPrivileges::SESSION_VOIR_LIEN :
                return $this->canVoirLieuSession($entity);
        }

+1 −1
Changes for module/Formation/src/Formation/Provider/Privilege/SessionPrivileges.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -13,6 +13,6 @@ class SessionPrivileges extends Privileges {
    public const SESSION_HISTORISER = 'formation_session-historiser';
    public const SESSION_SUPPRIMER  = 'formation_session-supprimer';
    public const SESSION_INSCRIPTION  = 'formation_session-gerer_inscription';
    public const SESSION_VOIR_LIEU    = 'formation_session-voir_lieu';
    public const SESSION_VOIR_LIEN    = 'formation_session-voir_lieu'; // léger détournement de privilège !

}
 No newline at end of file
+29 −27
Changes for module/Formation/view/formation/session/afficher-fiche.phtml: 29 added lines, 27 removed lines.
Original line number Diff line number Diff line
<?php

use Application\View\Renderer\PhpRenderer;
use RNCP\Entity\Db\BlocCompetence;
use Formation\Entity\Db\Formateur;
use Formation\Entity\Db\Interfaces\HasModaliteInterface;
use Formation\Entity\Db\Seance;
@@ -18,7 +17,7 @@ use RNCP\Entity\Db\SousCompetence;
 * @var SousCompetence[] $sousCompetencesAssociees
 */

$canVoirLieuSession = $this->isAllowed($session, SessionPrivileges::SESSION_VOIR_LIEU);
$canVoirLienSession = $this->isAllowed($session, SessionPrivileges::SESSION_VOIR_LIEN);
$canModifierFormation   = $this->isAllowed(FormationPrivileges::getResourceId(FormationPrivileges::FORMATION_MODIFIER));

$formation = $session->getFormation();
@@ -66,7 +65,7 @@ $this->headTitle($pageTitle);
                    <?php echo $formation->getProgramme(); ?>
                </dd>
            <?php endif; ?>
            <dt class="col-md-4">Compétences RNCP associées</dt>
            <dt class="col-md-3">Compétences RNCP associées</dt>
            <?php if (!empty($sousCompetencesAssociees)) : ?>
                <dd class="col-md-8">
                    <?php echo $this->sousCompetences($sousCompetencesAssociees, ['avecBlocCompetence' => true]); ?>
@@ -83,7 +82,7 @@ $this->headTitle($pageTitle);
                <dd class="col-md-9"> <?php echo $session->getDescription(); ?> </dd>
            <?php endif; ?>
            <?php if ($formation->getFiche()) : ?>
                <dt class="col-md-4"> Fiche </dt>
                <dt class="col-md-3"> Fiche </dt>
                <dd class="col-md-8">
                    <?php echo $this->fichier($formation->getFiche())
                            ->setUrlTelechargementFichier($this->url('formation/formation/telecharger-fiche',
@@ -216,9 +215,7 @@ $this->headTitle($pageTitle);
    <table class="table table-sm table-hover">
    <thead>
    <tr>
<!--        --><?php //if($canVoirLieuSession) : ?>
        <th> Lieu </th>
<!--        --><?php //endif; ?>
        <th> Jour </th>
        <th> Début </th>
        <th> Fin </th>
@@ -229,39 +226,44 @@ $this->headTitle($pageTitle);
    <?php /** @var Seance $seance */ ?>
    <?php foreach ($seances as $seance) : ?>
        <tr>
            <td class="<?php echo $canVoirLieuSession ? "" : "lieu-session-non-visible"; ?>">
                <?php if($canVoirLieuSession): ?>
            <td>
                <span class=" <?php if ($seance->estHistorise()) echo " historise text-danger "; ?>">
                        <?php if ($seance->getLieu() && $seance->getLien()):
                            echo $seance->getLieu(); ?>
                    <?php if ($seance->getLieu() && $seance->getLien()): ?>
                        <?= $seance->getLieu(); ?>
                        <?php if ($canVoirLienSession): ?>
                            <br>
                            <a href="<?php echo $seance->getLien(); ?>"><?php echo $seance->getLien(); ?></a>
                                <?php if ($seance->getMotDePasse()) echo " (Mot de passe:" . $seance->getMotDePasse() . ")"; ?>
                        <?php else:
                            if ($seance->getLien() !== null): ?>
                            <?php if ($seance->getMotDePasse()): ?>
                                <br><span class="text-secondary text-md"><i class="fas fa-lock"></i> <?= $seance->getMotDePasse() ?></span>
                            <?php endif; ?>
                        <?php endif; ?>
                    <?php else: ?>
                        <?php if ($seance->getLien() !== null && $canVoirLienSession): ?>
                            <a href="<?php echo $seance->getLien(); ?>"><?php echo $seance->getLien(); ?></a>
                                <?php if ($seance->getMotDePasse()) echo " (Mot de passe:" . $seance->getMotDePasse() . ")"; ?>
                            <?php elseif($seance->getLieu() !== null):
                                echo $seance->getLieu();
                            else:
                                if($session->getModalite() === HasModaliteInterface::MODALITE_PRESENTIEL): ?>
                            <?php if ($seance->getMotDePasse()): ?>
                                <br><span class="text-secondary text-md"><i class="fas fa-lock"></i> <?= $seance->getMotDePasse() ?></span>
                            <?php endif; ?>
                        <?php elseif ($seance->getLieu() !== null): ?>
                            <?= $seance->getLieu(); ?>
                        <?php else: ?>
                            <?php if ($session->getModalite() === HasModaliteInterface::MODALITE_PRESENTIEL): ?>
                                <em>Lieu non renseigné</em>
                            <?php else: ?>
                                <?php if ($canVoirLienSession): ?>
                                    <em>Lien non renseigné</em>
                                <?php endif;
                            endif;
                        endif;
                        if ($seance->getDescription() !== null) : ?>
                                <?php endif; ?>
                            <?php endif; ?>
                        <?php endif; ?>
                    <?php endif; ?>
                    <?php if ($seance->getDescription() !== null) : ?>
                        <span class="icon icon-information"
                              title="<?php echo htmlspecialchars($seance->getDescription(), ENT_QUOTES, 'UTF-8'); ?>" data-bs-toggle="tooltip" data-bs-html="true">
                        </span>
                    <?php endif; ?>
                </span>
                <?php else: ?>
                    <span class=" <?php if ($seance->estHistorise()) echo " historise text-danger "; ?>"
                      data-bs-toggle="tooltip"
                      title="Le lieu sera visible lorsque vous serez inscrit à cette session, puis présent en liste principale">
                        <i>Non visible</i>
                <?php if (!$canVoirLienSession): ?>
                    <span class="icon icon-warning text-info" data-bs-toggle="tooltip"
                      title="Les informations complémentaires éventuelles ne sont visibles que des personnes inscrites à cette formation et présentes sur liste principale">
                    </span>
                <?php endif; ?>
            </td>
Loading