diff --git a/CHANGELOG.md b/CHANGELOG.md index c828830a7d8d428e86ff3bdb61e39e2c3530a0c0..10b9b1509149fe3a07c33080b58b7f641d80bbaf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ Journal des modifications - [FIX] .gitlab-ci : correction des URL générées dans la release. - [FIX] Contrainte de référence ajoutée récemment à tort (empêche la suppression d'un manuscrit de thèse déposé). - [FIX] Modification du mapping de Thèse : la relation "anneesUniv1ereInscription" ne pointait plus vers un VTheseAnneeUnivFirst +- [FIX] Lien d'une séance non visible pour un doctorant lors de l'affichage de la fiche d'une session de formation 9.0.1 ----- diff --git a/module/Formation/src/Formation/Entity/Db/Session.php b/module/Formation/src/Formation/Entity/Db/Session.php index 8772ce1e9c6b78047432738060a7a452763db26a..6c8378f3aea12c18e079aafe1c8d9935a4f25749 100644 --- a/module/Formation/src/Formation/Entity/Db/Session.php +++ b/module/Formation/src/Formation/Entity/Db/Session.php @@ -353,12 +353,25 @@ class Session implements HistoriqueAwareInterface, $texte .= '<td>'.$seance->getFin()->format('H:i').'</td>'; $texte .= '<td>'; if ($seance->getLieu() !== null) { - $texte .= $seance->getLieu(); + if ($seance->getLien() !== null){ + $texte .= $seance->getLieu(); + $texte .= "<br>"; + $texte .= '<a href="'.$seance->getLien().'">'.$seance->getLien().'</a>'; + if ($seance->getMotDePasse()) $texte .= " (Mot de passe:" . $seance->getMotDePasse() . ")"; + }else{ + $texte .= $seance->getLieu(); + } } else { if ($this->getModalite() === self::MODALITE_PRESENTIEL) { $texte .= "<em> Lieu non renseigné </em>"; } else { - $texte .= "Distanciel"; + if($seance->getLien() !== null){ + $texte .= "Distanciel (lien : + <a href=".$seance->getLien().">".$seance->getLien()."</a>"; + $texte .= $seance->getMotDePasse() ? " (Mot de passe:".$seance->getMotDePasse().")" : ""; + }else{ + $texte .= "Distanciel <em>(lien non renseigné)</em>"; + } } } $texte .='</td>'; diff --git a/module/Formation/view/formation/session/afficher-fiche.phtml b/module/Formation/view/formation/session/afficher-fiche.phtml index 548ae086ee115c01f2cd3b86fbea0d4ce65395c8..29ac6efb91ae27c16578f768e86046936729a024 100644 --- a/module/Formation/view/formation/session/afficher-fiche.phtml +++ b/module/Formation/view/formation/session/afficher-fiche.phtml @@ -1,6 +1,7 @@ <?php use Formation\Entity\Db\Formateur; +use Formation\Entity\Db\Interfaces\HasModaliteInterface; use Formation\Entity\Db\Seance; use Formation\Entity\Db\Session; use Formation\Entity\Db\SessionStructureValide; @@ -185,20 +186,40 @@ $this->headTitle($pageTitle); <?php foreach ($seances as $seance) : ?> <tr> <td class="<?php echo $canVoirLieuSession ? "" : "lieu-session-non-visible"; ?>"> - <?php if ($canVoirLieuSession) : ?> + <?php if($canVoirLieuSession): ?> <span class=" <?php if ($seance->estHistorise()) echo " historise text-danger "; ?>"> + <?php if ($seance->getLieu() && $seance->getLien()): + echo $seance->getLieu(); ?> + <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): ?> + <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): ?> + <em>Lieu non renseigné</em> + <?php else: ?> + <em>Lien non renseigné</em> + <?php endif; + endif; + endif; + 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"> - <?php endif; ?> - <?php echo $canVoirLieuSession ? $seance->getLieu() : "<i>Non visible</i>"; ?> - <?php if ($seance->getDescription() !== null) : ?> - <span class="icon icon-information" - title="<?php echo $seance->getDescription(); ?>" data-bs-toggle="tooltip" data-bs-html="true"> + data-bs-toggle="tooltip" + title="Le lieu sera visible lorsque vous serez inscrit à cette session"> + <i>Non visible</i> </span> <?php endif; ?> - </span> </td> <td> <?php echo $seance->getDebut()->format('d/m/Y'); ?> </td> <td> <?php echo $seance->getDebut()->format('H:i'); ?> </td> diff --git a/module/Formation/view/formation/session/afficher.phtml b/module/Formation/view/formation/session/afficher.phtml index db6d998ea90940c5cf403a2fbaafd95f14700c90..b029d5d15ebb22310a80bbc6431410144445aca0 100644 --- a/module/Formation/view/formation/session/afficher.phtml +++ b/module/Formation/view/formation/session/afficher.phtml @@ -3,6 +3,7 @@ use Application\Entity\AnneeUniv; use Formation\Entity\Db\Etat; use Formation\Entity\Db\Formateur;use Formation\Entity\Db\Inscription; +use Formation\Entity\Db\Interfaces\HasModaliteInterface; use Formation\Entity\Db\Seance; use Formation\Entity\Db\Session; use Formation\Entity\Db\SessionStructureValide; @@ -352,10 +353,17 @@ echo $this->messenger()->addMessagesFromFlashMessengerWithNoNamespace(); if ($seance->getMotDePasse()) echo " (Mot de passe:".$seance->getMotDePasse().")"; $first = false; ?> <?php endif; ?> + <?php if($seance->getLieu() === null && $seance->getLien() === null): + if ($session->getModalite() === HasModaliteInterface::MODALITE_PRESENTIEL): ?> + <em>Lieu non renseigné</em> + <?php else: ?> + <em>Lien non renseigné</em> + <?php endif; + endif; ?> <?php if (!$first) echo "<br>"; ?> <?php if ($seance->getDescription() !== null) : ?> <span class="icon icon-information" - title="<?php echo $seance->getDescription(); ?>" data-bs-toggle="tooltip" data-bs-html="true" + title="<?php echo htmlspecialchars($seance->getDescription(), ENT_QUOTES, 'UTF-8'); ?>" data-bs-toggle="tooltip" data-bs-html="true" ></span> <?php endif; ?> </span>