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

Le texte de l'engagement d'impartialité est maintenant un 'contenu' éditable...

Le texte de l'engagement d'impartialité est maintenant un 'contenu' éditable dans le module unicaen/renderer
parent bdc224f0
Loading
Loading
Loading
Loading
+2 −1
Changes for CHANGELOG.md: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -4,7 +4,8 @@ Journal des modifications
5.2.6
-----
- Déclaration des membres du comite de suivi individuel
- Amélioration du message de blocage des modification des structures
- Amélioration du message de blocage des modifications des structures
- Le texte de l'engagement d'impartialité est maintenant un 'contenu' éditable dans le module unicaen/renderer
- [FIX] Plus d'envoi de mail lors du classement des inscriptions si les inscriptions ne sont pas closes
- [FIX] Ajout de l'affichage de la liste des présences à une session si celle-ci est imminente.

+4 −0
Changes for doc/release-notes/v5.2.6.md: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -41,4 +41,8 @@ histo_modificateur_id bigint not null constraint membre_modificateur_fk
histo_destruction     timestamp,
histo_destructeur_id  bigint                   constraint membre_destructeur_fk references utilisateur,
);

-- insertions liées à l'engagement d'impartialité comme un template
INSERT INTO unicaen_renderer_macro (code, description, variable_name, methode_name) VALUES ('Membre#Denomination', '<p>Retourne la dénomination d''une membre</p>', 'membre', 'getDenomination');
INSERT INTO unicaen_renderer_template (code, description, document_type, document_sujet, document_corps) VALUES ('SOUTENANCE_ENGAGEMENT_IMPARTIALITE', '<p>Texte associé à l''engagement d''impartialité</p>', 'texte', 'Engagement d''impartialité', '<p>En signant cet engagement d''impartialité, je, sous-signé <strong>VAR[Membre#Denomination]</strong>, atteste ne pas avoir de liens d''intérêt, qu''ils soient de nature professionnelle, familiale, personnelle ou patrimoniale avec le doctorant ou son directeur de thèse, ne pas avoir pris part aux travaux de la thèse et ne pas avoir de publication cosignée avec le doctorant dans les cinq dernières années et ne pas avoir participé au comité de suivi de la thèse de VAR[Doctorant#Denomination].</p><p>By signing, I certify that I have no personal or family connection with the doctoral student or his/her PhD supervisor and that I have not taken part in the work of the thesis and not co-authored  publications with the doctoral student for the last five years.<br /><br /></p>');
```
+8 −0
Changes for module/Soutenance/src/Soutenance/Controller/EngagementImpartialiteController.php: 8 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@ namespace Soutenance\Controller;

use Application\Controller\AbstractController;
use Application\Entity\Db\Validation;
use Soutenance\Provider\Template\TexteTemplates;
use These\Service\Acteur\ActeurServiceAwareTrait;
use Soutenance\Entity\Evenement;
use Soutenance\Entity\Membre;
@@ -14,6 +15,7 @@ use Soutenance\Service\Notifier\NotifierSoutenanceServiceAwareTrait;
use Soutenance\Service\Proposition\PropositionServiceAwareTrait;
use UnicaenAuthToken\Service\TokenServiceAwareTrait;
use Laminas\View\Model\ViewModel;
use UnicaenRenderer\Service\Rendu\RenduServiceAwareTrait;

/**
 * Class SoutenanceController
@@ -28,6 +30,7 @@ class EngagementImpartialiteController extends AbstractController
    use MembreServiceAwareTrait;
    use NotifierSoutenanceServiceAwareTrait;
    use PropositionServiceAwareTrait;
    use RenduServiceAwareTrait;
    use TokenServiceAwareTrait;

    public function engagementImpartialiteAction() : ViewModel
@@ -36,6 +39,9 @@ class EngagementImpartialiteController extends AbstractController
        $proposition = $this->getPropositionService()->findOneForThese($these);
        $membre = $this->getMembreService()->getRequestedMembre($this);

        $vars = [ 'membre' => $membre, 'doctorant' => $these->getDoctorant() ];
        $texteEngagnement = $this->getRenduService()->generateRenduByTemplateCode(TexteTemplates::SOUTENANCE_ENGAGEMENT_IMPARTIALITE, $vars);

        /** @var Validation $validation */
        $validation = $this->getEngagementImpartialiteService()->getEngagementImpartialiteByMembre($these, $membre);
        if ($validation === null) $validation = $this->getEngagementImpartialiteService()->getRefusEngagementImpartialiteByMembre($these, $membre);
@@ -49,6 +55,8 @@ class EngagementImpartialiteController extends AbstractController
            'urlSigner' => $this->url()->fromRoute('soutenance/engagement-impartialite/signer', ['these' => $these->getId(), 'membre' => $membre->getId()], [], true),
            'urlRefuser' => $this->url()->fromRoute('soutenance/engagement-impartialite/refuser', ['these' => $these->getId(), 'membre' => $membre->getId()], [], true),
            'urlAnnuler' => $this->url()->fromRoute('soutenance/engagement-impartialite/annuler', ['these' => $these->getId(), 'membre' => $membre->getId()], [], true),

            'texteEngagement' => $texteEngagnement,
        ]);
    }

+9 −2
Changes for module/Soutenance/src/Soutenance/Controller/EngagementImpartialiteControllerFactory.php: 9 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -2,6 +2,8 @@

namespace Soutenance\Controller;

use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
use These\Service\Acteur\ActeurService;
use Interop\Container\ContainerInterface;
use Soutenance\Service\EngagementImpartialite\EngagementImpartialiteService;
@@ -11,14 +13,17 @@ use Soutenance\Service\Notifier\NotifierSoutenanceService;
use Soutenance\Service\Proposition\PropositionService;
use UnicaenAuthToken\Service\TokenService;
use UnicaenAuthToken\Service\TokenServiceAwareTrait;
use UnicaenRenderer\Service\Rendu\RenduService;

class EngagementImpartialiteControllerFactory
{
    /**
     * @param ContainerInterface $container
     * @return EngagementImpartialiteController
     * @throws ContainerExceptionInterface
     * @throws NotFoundExceptionInterface
     */
    public function __invoke(ContainerInterface $container)
    public function __invoke(ContainerInterface $container) : EngagementImpartialiteController
    {
        /**
         * @var ActeurService $acteurService
@@ -27,6 +32,7 @@ class EngagementImpartialiteControllerFactory
         * @var MembreService $membreService
         * @var NotifierSoutenanceService $notifierService
         * @var EngagementImpartialiteService $engagementImpartialiteService
         * @var RenduService $renduService
         * @var TokenService $tokenService
         */
        $acteurService                  = $container->get(ActeurService::class);
@@ -35,9 +41,9 @@ class EngagementImpartialiteControllerFactory
        $membreService                  = $container->get(MembreService::class);
        $notifierService                = $container->get(NotifierSoutenanceService::class);
        $engagementImpartialiteService  = $container->get(EngagementImpartialiteService::class);
        $renduService                   = $container->get(RenduService::class);
        $tokenService                   = $container->get(TokenService::class);

        /** @var EngagementImpartialiteController $controller */
        $controller = new EngagementImpartialiteController();
        $controller->setActeurService($acteurService);
        $controller->setEvenementService($evenementService);
@@ -45,6 +51,7 @@ class EngagementImpartialiteControllerFactory
        $controller->setMembreService($membreService);
        $controller->setNotifierSoutenanceService($notifierService);
        $controller->setEngagementImpartialiteService($engagementImpartialiteService);
        $controller->setRenduService($renduService);
        $controller->setTokenService($tokenService);

        return $controller;
+1 −1
Changes for module/Soutenance/src/Soutenance/Entity/Membre.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -95,7 +95,7 @@ class Membre implements HistoriqueAwareInterface {
     */
    public function getDenomination()
    {
        return $this->prenom." ".$this->getNom();
        return (($this->getGenre()==='F')?"Mme":"M").' '.$this->prenom." ".strtoupper($this->getNom());
    }

    /**
Loading