Loading CHANGELOG.md +1 −0 Original line number Diff line number Diff line Loading @@ -6,6 +6,7 @@ Journal des modifications - [FIX] Signature de méthode setObject() modifiée en PHP8 dans Doctrine\Laminas\Hydrator\Strategy\AbstractCollectionStrategy. - Mise en place d'une zone de dépot du pv de soutrenance sur la page de présoutenance - Rapport d'activité : implémentation pour les rapports de fin de contrat du même circuit de validation/avis que les annuels. - Affichage du nom complet d'un individu : choc de simplification en supprimant 2 options d'affichage dans le formatteur. 6.0.2 ----- Loading module/Application/src/Application/Filter/NomCompletFormatter.php +19 −36 Original line number Diff line number Diff line Loading @@ -2,11 +2,11 @@ namespace Application\Filter; use Application\Entity\Db\Utilisateur; use Doctorant\Entity\Db\Doctorant; use Individu\Entity\Db\Individu; use Laminas\Filter\AbstractFilter; use UnicaenApp\Entity\Ldap\People; use Application\Entity\Db\Utilisateur; /** * Formatte le nom complet d'un individu (nom usuel, patronymique, etc.) Loading @@ -15,13 +15,11 @@ use Application\Entity\Db\Utilisateur; */ class NomCompletFormatter extends AbstractFilter { protected $nomEnMajuscule = true; protected $avecCivilite = false; protected $avecNomPatro = false; protected $prenomDabord = false; protected $tousLesPrenoms = false; protected $court = false; protected $patroPlutotQueUsuel = false; protected bool $nomEnMajuscule = true; protected bool $avecCivilite = false; protected bool $avecNomPatro = false; protected bool $prenomDabord = false; protected bool $tousLesPrenoms = false; /** * Constructeur. Loading @@ -32,15 +30,18 @@ class NomCompletFormatter extends AbstractFilter * @param bool $prenomDabord * @param bool $tousLesPrenoms */ public function __construct($nomEnMajuscule = true, $avecCivilite = false, $avecNomPatro = false, $prenomDabord = false, $tousLesPrenoms = false, $court = false, $patroPlutotQueUsuel=false) public function __construct( bool $nomEnMajuscule = true, bool $avecCivilite = false, bool $avecNomPatro = false, bool $prenomDabord = false, bool $tousLesPrenoms = false) { $this->nomEnMajuscule = $nomEnMajuscule; $this->avecCivilite = $avecCivilite; $this->avecNomPatro = $avecNomPatro; $this->prenomDabord = $prenomDabord; $this->tousLesPrenoms = $tousLesPrenoms; $this->court = $court; $this->patroPlutotQueUsuel = $patroPlutotQueUsuel; } /** Loading @@ -48,9 +49,8 @@ class NomCompletFormatter extends AbstractFilter * * @param mixed $value * @throws \RuntimeException If filtering $value is impossible * @return mixed */ public function filter($value) public function filter($value): string { // normalisation if ($value instanceof Individu) { Loading Loading @@ -113,32 +113,15 @@ class NomCompletFormatter extends AbstractFilter $nomPatro = ucfirst($this->nomEnMajuscule ? mb_strtoupper($nomPatro) : $nomPatro); $civilite = $this->avecCivilite ? $civilite : null; if ($this->patroPlutotQueUsuel && $nomPatro != '') { $parts = [ $civilite, $this->prenomDabord ? "$prenom $nomPatro" : "$nomPatro $prenom", ]; } else { $parts = [ $civilite, $this->prenomDabord ? "$prenom $nomUsuel" : "$nomUsuel $prenom", ]; } $result = implode(' ', array_filter($parts)); if (! $this->patroPlutotQueUsuel) { if ($this->avecNomPatro && $nomPatro !== $nomUsuel) { if ($this->court) { $result = ""; if ($this->avecCivilite) $result .= "$civilite"; if ($this->prenomDabord) $result .= " $prenom"; $result .= " $nomPatro-$nomUsuel"; if (!$this->prenomDabord) $result .= " $prenom"; } else { $result .= ", née $nomPatro"; } } $result .= ", né·e $nomPatro"; } return $result; Loading module/Individu/src/Individu/Entity/Db/Individu.php +6 −10 Original line number Diff line number Diff line Loading @@ -542,19 +542,15 @@ class Individu implements HistoriqueAwareInterface, SourceAwareInterface, Resour * @param bool $avecNomPatro * @param bool $prenoms * @param bool $prenomfirst * @param bool $court * @param bool $patroPlutotQueUsuel * @return string */ public function getNomComplet( $avecCivilite = false, $avecNomPatro = false, $prenoms = false, $prenomfirst = false, $court = false, $patroPlutotQueUsuel=false) { $f = new NomCompletFormatter(true, $avecCivilite, $avecNomPatro, $prenomfirst, $prenoms, $court, $patroPlutotQueUsuel); bool $avecCivilite = false, bool $avecNomPatro = false, bool $prenoms = false, bool $prenomfirst = false): string { $f = new NomCompletFormatter(true, $avecCivilite, $avecNomPatro, $prenomfirst, $prenoms); return $f->filter($this); } Loading module/RapportActivite/src/RapportActivite/Service/RapportActiviteService.php +1 −1 Original line number Diff line number Diff line Loading @@ -389,7 +389,7 @@ class RapportActiviteService extends BaseService // doctorant if ($these->getDoctorant()) { $exportData->doctorant = strtoupper($these->getDoctorant()->getIndividu()->getNomComplet(true, true, false, true, true, false)); $exportData->doctorant = strtoupper($these->getDoctorant()->getIndividu()->getNomComplet(true, true, false, true)); } // structures Loading module/Soutenance/view/soutenance/notification/connexion-rapporteur.phtml +1 −1 Original line number Diff line number Diff line Loading @@ -13,7 +13,7 @@ use Application\View\Renderer\PhpRenderer;use Soutenance\Entity\Proposition; * @var string $url */ $doctorant = $these->getDoctorant()->getIndividu()->getNomComplet(false, false, false, true, false, true); $doctorant = $these->getDoctorant()->getIndividu()->getNomComplet(false, false, false, true); $titre = $these->getTitre(); $justification = true; Loading Loading
CHANGELOG.md +1 −0 Original line number Diff line number Diff line Loading @@ -6,6 +6,7 @@ Journal des modifications - [FIX] Signature de méthode setObject() modifiée en PHP8 dans Doctrine\Laminas\Hydrator\Strategy\AbstractCollectionStrategy. - Mise en place d'une zone de dépot du pv de soutrenance sur la page de présoutenance - Rapport d'activité : implémentation pour les rapports de fin de contrat du même circuit de validation/avis que les annuels. - Affichage du nom complet d'un individu : choc de simplification en supprimant 2 options d'affichage dans le formatteur. 6.0.2 ----- Loading
module/Application/src/Application/Filter/NomCompletFormatter.php +19 −36 Original line number Diff line number Diff line Loading @@ -2,11 +2,11 @@ namespace Application\Filter; use Application\Entity\Db\Utilisateur; use Doctorant\Entity\Db\Doctorant; use Individu\Entity\Db\Individu; use Laminas\Filter\AbstractFilter; use UnicaenApp\Entity\Ldap\People; use Application\Entity\Db\Utilisateur; /** * Formatte le nom complet d'un individu (nom usuel, patronymique, etc.) Loading @@ -15,13 +15,11 @@ use Application\Entity\Db\Utilisateur; */ class NomCompletFormatter extends AbstractFilter { protected $nomEnMajuscule = true; protected $avecCivilite = false; protected $avecNomPatro = false; protected $prenomDabord = false; protected $tousLesPrenoms = false; protected $court = false; protected $patroPlutotQueUsuel = false; protected bool $nomEnMajuscule = true; protected bool $avecCivilite = false; protected bool $avecNomPatro = false; protected bool $prenomDabord = false; protected bool $tousLesPrenoms = false; /** * Constructeur. Loading @@ -32,15 +30,18 @@ class NomCompletFormatter extends AbstractFilter * @param bool $prenomDabord * @param bool $tousLesPrenoms */ public function __construct($nomEnMajuscule = true, $avecCivilite = false, $avecNomPatro = false, $prenomDabord = false, $tousLesPrenoms = false, $court = false, $patroPlutotQueUsuel=false) public function __construct( bool $nomEnMajuscule = true, bool $avecCivilite = false, bool $avecNomPatro = false, bool $prenomDabord = false, bool $tousLesPrenoms = false) { $this->nomEnMajuscule = $nomEnMajuscule; $this->avecCivilite = $avecCivilite; $this->avecNomPatro = $avecNomPatro; $this->prenomDabord = $prenomDabord; $this->tousLesPrenoms = $tousLesPrenoms; $this->court = $court; $this->patroPlutotQueUsuel = $patroPlutotQueUsuel; } /** Loading @@ -48,9 +49,8 @@ class NomCompletFormatter extends AbstractFilter * * @param mixed $value * @throws \RuntimeException If filtering $value is impossible * @return mixed */ public function filter($value) public function filter($value): string { // normalisation if ($value instanceof Individu) { Loading Loading @@ -113,32 +113,15 @@ class NomCompletFormatter extends AbstractFilter $nomPatro = ucfirst($this->nomEnMajuscule ? mb_strtoupper($nomPatro) : $nomPatro); $civilite = $this->avecCivilite ? $civilite : null; if ($this->patroPlutotQueUsuel && $nomPatro != '') { $parts = [ $civilite, $this->prenomDabord ? "$prenom $nomPatro" : "$nomPatro $prenom", ]; } else { $parts = [ $civilite, $this->prenomDabord ? "$prenom $nomUsuel" : "$nomUsuel $prenom", ]; } $result = implode(' ', array_filter($parts)); if (! $this->patroPlutotQueUsuel) { if ($this->avecNomPatro && $nomPatro !== $nomUsuel) { if ($this->court) { $result = ""; if ($this->avecCivilite) $result .= "$civilite"; if ($this->prenomDabord) $result .= " $prenom"; $result .= " $nomPatro-$nomUsuel"; if (!$this->prenomDabord) $result .= " $prenom"; } else { $result .= ", née $nomPatro"; } } $result .= ", né·e $nomPatro"; } return $result; Loading
module/Individu/src/Individu/Entity/Db/Individu.php +6 −10 Original line number Diff line number Diff line Loading @@ -542,19 +542,15 @@ class Individu implements HistoriqueAwareInterface, SourceAwareInterface, Resour * @param bool $avecNomPatro * @param bool $prenoms * @param bool $prenomfirst * @param bool $court * @param bool $patroPlutotQueUsuel * @return string */ public function getNomComplet( $avecCivilite = false, $avecNomPatro = false, $prenoms = false, $prenomfirst = false, $court = false, $patroPlutotQueUsuel=false) { $f = new NomCompletFormatter(true, $avecCivilite, $avecNomPatro, $prenomfirst, $prenoms, $court, $patroPlutotQueUsuel); bool $avecCivilite = false, bool $avecNomPatro = false, bool $prenoms = false, bool $prenomfirst = false): string { $f = new NomCompletFormatter(true, $avecCivilite, $avecNomPatro, $prenomfirst, $prenoms); return $f->filter($this); } Loading
module/RapportActivite/src/RapportActivite/Service/RapportActiviteService.php +1 −1 Original line number Diff line number Diff line Loading @@ -389,7 +389,7 @@ class RapportActiviteService extends BaseService // doctorant if ($these->getDoctorant()) { $exportData->doctorant = strtoupper($these->getDoctorant()->getIndividu()->getNomComplet(true, true, false, true, true, false)); $exportData->doctorant = strtoupper($these->getDoctorant()->getIndividu()->getNomComplet(true, true, false, true)); } // structures Loading
module/Soutenance/view/soutenance/notification/connexion-rapporteur.phtml +1 −1 Original line number Diff line number Diff line Loading @@ -13,7 +13,7 @@ use Application\View\Renderer\PhpRenderer;use Soutenance\Entity\Proposition; * @var string $url */ $doctorant = $these->getDoctorant()->getIndividu()->getNomComplet(false, false, false, true, false, true); $doctorant = $these->getDoctorant()->getIndividu()->getNomComplet(false, false, false, true); $titre = $these->getTitre(); $justification = true; Loading