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

Nettoyage

parent 6ebf5297
Loading
Loading
Loading
Loading
+1 −1
Changes for module/Formation/SQL/002_donnees_initiales.sql: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -4,4 +4,4 @@ INSERT INTO FORMATION_ETAT (CODE, LIBELLE, DESCRIPTION, ICONE, COULEUR, ORDRE) V
INSERT INTO FORMATION_ETAT (CODE, LIBELLE, DESCRIPTION, ICONE, COULEUR, ORDRE) VALUES ('A', 'Session annulée', 'La session a été annulée', 'icon icon-historiser', '#cc0000', 5);
INSERT INTO FORMATION_ETAT (CODE, LIBELLE, DESCRIPTION, ICONE, COULEUR, ORDRE) VALUES ('C', 'Close', 'Formation close', null, null, 4);

INSERT INTO nature_fichier (code, libelle) VALUES ('SIGNATURE_FORMATION', 'Signature pour les formations');
 No newline at end of file
INSERT INTO nature_fichier (id, code, libelle) VALUES (nextval(nature_fichier_id_seq), 'SIGNATURE_FORMATION', 'Signature pour les formations');
 No newline at end of file
+12 −10
Changes for module/Formation/SQL/004_donnees_tests.sql: 12 added lines, 10 removed lines.
Original line number Diff line number Diff line
@@ -9,10 +9,12 @@
-- -- Responsable : Sandrine Maviel (5063)
-- -- Site : UCN 2

INSERT INTO formation_module (id, libelle, description, lien, site_id, responsable_id, modalite, type, type_structure_id, taille_liste_principale, taille_liste_complementaire, histo_createur_id, histo_creation, histo_modificateur_id, histo_modification, histo_destructeur_id, histo_destruction) VALUES (1, 'Sécurité à la paillasse', '<p>Module pr&eacute;sentant les r&egrave;gles de s&eacute;curit&eacute; dans un laboratoire</p>', null, 3, 863448, null, 'S', 12401, null, null, 1446, '2021-06-29 16:28:37.000000', 1446, '2021-07-23 12:26:37.000000', null, null);
INSERT INTO formation_module (id, libelle, description, lien, site_id, responsable_id, modalite, type, type_structure_id, taille_liste_principale, taille_liste_complementaire, histo_createur_id, histo_creation, histo_modificateur_id, histo_modification, histo_destructeur_id, histo_destruction) VALUES (2, 'Créer une formation', null, null, 2, 5063, 'P', 'S', null, 10, null, 1446, '2021-06-25 17:12:09.000000', 1446, '2021-06-25 17:12:09.000000', null, null);
INSERT INTO formation_module (id, libelle, description, lien, histo_createur_id, histo_creation, histo_modificateur_id, histo_modification, histo_destructeur_id, histo_destruction) VALUES (1, 'Sécurité à la paillasse', '<p>Module pr&eacute;sentant les r&egrave;gles de s&eacute;curit&eacute; dans un laboratoire</p>', null,  1446, '2021-06-29 16:28:37.000000', 1446, '2021-07-23 12:26:37.000000', null, null);
INSERT INTO formation_module (id, libelle, description, lien, histo_createur_id, histo_creation, histo_modificateur_id, histo_modification, histo_destructeur_id, histo_destruction) VALUES (2, 'Créer une formation', null, null, 1446, '2021-06-25 17:12:09.000000', 1446, '2021-06-25 17:12:09.000000', null, null);
alter sequence formation_module_id_seq restart with 3;

-- FORMATION

-- SESSIONS ------------------------------------------------------------------------------------------------------------

-- -- Responsable : Patrice Lerouge (863448)
@@ -22,14 +24,14 @@ alter sequence formation_module_id_seq restart with 3;
-- -- Site : INSA 5
-- -- Specifique : NBISE 12401

INSERT INTO formation_session (id, module_id, description, taille_liste_principale, taille_liste_complementaire, type_structure_id, site_id, responsable_id, modalite, type, etat_code, session_index, histo_creation, histo_createur_id, histo_modification, histo_modificateur_id, histo_destruction, histo_destructeur_id) VALUES (3, 1, null, 30, 100, null, 5, null, 'D', 'T', 'P', 4, '2021-06-29 18:18:08.000000', 1446, '2021-06-29 18:18:08.000000', 1446, null, null);
INSERT INTO formation_session (id, module_id, description, taille_liste_principale, taille_liste_complementaire, type_structure_id, site_id, responsable_id, modalite, type, etat_code, session_index, histo_creation, histo_createur_id, histo_modification, histo_modificateur_id, histo_destruction, histo_destructeur_id) VALUES (4, 1, null, 1, 10, null, 2, null, 'P', 'S', 'F', 1, '2021-06-29 16:44:49.000000', 1446, '2021-06-30 09:24:54.000000', 1446, null, null);
INSERT INTO formation_session (id, module_id, description, taille_liste_principale, taille_liste_complementaire, type_structure_id, site_id, responsable_id, modalite, type, etat_code, session_index, histo_creation, histo_createur_id, histo_modification, histo_modificateur_id, histo_destruction, histo_destructeur_id) VALUES (5, 2, null, 2, 1, 12401, 2, null, 'D', 'S', 'F', 1, '2021-06-25 18:00:33.000000', 1446, '2021-07-05 15:37:20.000000', 1446, null, null);
INSERT INTO formation_session (id, module_id, description, taille_liste_principale, taille_liste_complementaire, type_structure_id, site_id, responsable_id, modalite, type, etat_code, session_index, histo_creation, histo_createur_id, histo_modification, histo_modificateur_id, histo_destruction, histo_destructeur_id) VALUES (8, 2, null, null, null, 12401, 3, 863448, 'P', 'T', 'O', 3, '2021-06-29 09:35:30.000000', 1446, '2021-07-01 15:27:09.000000', 1446, null, null);
INSERT INTO formation_session (id, module_id, description, taille_liste_principale, taille_liste_complementaire, type_structure_id, site_id, responsable_id, modalite, type, etat_code, session_index, histo_creation, histo_createur_id, histo_modification, histo_modificateur_id, histo_destruction, histo_destructeur_id) VALUES (7, 2, null, 10, 5, 12401, 2, 863448, 'D', 'S', 'O', 5, '2021-07-01 15:32:32.000000', 1446, '2021-07-02 14:33:46.000000', 1446, null, null);
INSERT INTO formation_session (id, module_id, description, taille_liste_principale, taille_liste_complementaire, type_structure_id, site_id, responsable_id, modalite, type, etat_code, session_index, histo_creation, histo_createur_id, histo_modification, histo_modificateur_id, histo_destruction, histo_destructeur_id) VALUES (2, 2, null, null, null, null, 3, 863448, 'P', 'T', 'O', 4, '2021-06-29 14:12:00.000000', 1446, '2021-06-29 14:12:00.000000', 1446, null, null);
INSERT INTO formation_session (id, module_id, description, taille_liste_principale, taille_liste_complementaire, type_structure_id, site_id, responsable_id, modalite, type, etat_code, session_index, histo_creation, histo_createur_id, histo_modification, histo_modificateur_id, histo_destruction, histo_destructeur_id) VALUES (6, 1, null, 5, 5, null, 5, 5063, 'D', 'T', 'P', 3, '2021-06-29 17:52:48.000000', 1446, '2021-07-05 14:58:34.000000', 1446, null, null);
INSERT INTO formation_session (id, module_id, description, taille_liste_principale, taille_liste_complementaire, type_structure_id, site_id, responsable_id, modalite, type, etat_code, session_index, histo_creation, histo_createur_id, histo_modification, histo_modificateur_id, histo_destruction, histo_destructeur_id) VALUES (9, 1, null, null, null, null, null, 5063, null, null, null, 2, '2021-06-29 17:18:39.000000', 1446, '2021-06-29 17:18:39.000000', 1446, null, null);
INSERT INTO formation_session (id, formation_id, description, taille_liste_principale, taille_liste_complementaire, type_structure_id, site_id, responsable_id, modalite, type, etat_code, session_index, histo_creation, histo_createur_id, histo_modification, histo_modificateur_id, histo_destruction, histo_destructeur_id) VALUES (3, 1, null, 30, 100, null, 5, null, 'D', 'T', 'P', 4, '2021-06-29 18:18:08.000000', 1446, '2021-06-29 18:18:08.000000', 1446, null, null);
INSERT INTO formation_session (id, formation_id, description, taille_liste_principale, taille_liste_complementaire, type_structure_id, site_id, responsable_id, modalite, type, etat_code, session_index, histo_creation, histo_createur_id, histo_modification, histo_modificateur_id, histo_destruction, histo_destructeur_id) VALUES (4, 1, null, 1, 10, null, 2, null, 'P', 'S', 'F', 1, '2021-06-29 16:44:49.000000', 1446, '2021-06-30 09:24:54.000000', 1446, null, null);
INSERT INTO formation_session (id, formation_id, description, taille_liste_principale, taille_liste_complementaire, type_structure_id, site_id, responsable_id, modalite, type, etat_code, session_index, histo_creation, histo_createur_id, histo_modification, histo_modificateur_id, histo_destruction, histo_destructeur_id) VALUES (5, 2, null, 2, 1, 12401, 2, null, 'D', 'S', 'F', 1, '2021-06-25 18:00:33.000000', 1446, '2021-07-05 15:37:20.000000', 1446, null, null);
INSERT INTO formation_session (id, formation_id, description, taille_liste_principale, taille_liste_complementaire, type_structure_id, site_id, responsable_id, modalite, type, etat_code, session_index, histo_creation, histo_createur_id, histo_modification, histo_modificateur_id, histo_destruction, histo_destructeur_id) VALUES (8, 2, null, null, null, 12401, 3, 863448, 'P', 'T', 'O', 3, '2021-06-29 09:35:30.000000', 1446, '2021-07-01 15:27:09.000000', 1446, null, null);
INSERT INTO formation_session (id, formation_id, description, taille_liste_principale, taille_liste_complementaire, type_structure_id, site_id, responsable_id, modalite, type, etat_code, session_index, histo_creation, histo_createur_id, histo_modification, histo_modificateur_id, histo_destruction, histo_destructeur_id) VALUES (7, 2, null, 10, 5, 12401, 2, 863448, 'D', 'S', 'O', 5, '2021-07-01 15:32:32.000000', 1446, '2021-07-02 14:33:46.000000', 1446, null, null);
INSERT INTO formation_session (id, formation_id, description, taille_liste_principale, taille_liste_complementaire, type_structure_id, site_id, responsable_id, modalite, type, etat_code, session_index, histo_creation, histo_createur_id, histo_modification, histo_modificateur_id, histo_destruction, histo_destructeur_id) VALUES (2, 2, null, null, null, null, 3, 863448, 'P', 'T', 'O', 4, '2021-06-29 14:12:00.000000', 1446, '2021-06-29 14:12:00.000000', 1446, null, null);
INSERT INTO formation_session (id, formation_id, description, taille_liste_principale, taille_liste_complementaire, type_structure_id, site_id, responsable_id, modalite, type, etat_code, session_index, histo_creation, histo_createur_id, histo_modification, histo_modificateur_id, histo_destruction, histo_destructeur_id) VALUES (6, 1, null, 5, 5, null, 5, 5063, 'D', 'T', 'P', 3, '2021-06-29 17:52:48.000000', 1446, '2021-07-05 14:58:34.000000', 1446, null, null);
INSERT INTO formation_session (id, formation_id, description, taille_liste_principale, taille_liste_complementaire, type_structure_id, site_id, responsable_id, modalite, type, etat_code, session_index, histo_creation, histo_createur_id, histo_modification, histo_modificateur_id, histo_destruction, histo_destructeur_id) VALUES (9, 1, null, null, null, null, null, 5063, null, null, null, 2, '2021-06-29 17:18:39.000000', 1446, '2021-06-29 17:18:39.000000', 1446, null, null);
alter sequence formation_session_id_seq restart with 10;

-- SEANCES -------------------------------------------------------------------------------------------------------------
+9 −1
Changes for module/Formation/src/Formation/Controller/EnqueteControllerFactory.php: 9 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -10,10 +10,18 @@ use Formation\Service\EnqueteCategorie\EnqueteCategorieService;
use Formation\Service\EnqueteQuestion\EnqueteQuestionService;
use Formation\Service\EnqueteReponse\EnqueteReponseService;
use Interop\Container\ContainerInterface;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;

class EnqueteControllerFactory {

    public function __invoke(ContainerInterface $container)
    /**
     * @param ContainerInterface $container
     * @return EnqueteController
     * @throws ContainerExceptionInterface
     * @throws NotFoundExceptionInterface
     */
    public function __invoke(ContainerInterface $container) : EnqueteController
    {
        /**
         * @var EntityManager $entityManager
+7 −7
Changes for module/Formation/src/Formation/Controller/FormateurController.php: 7 added lines, 7 removed lines.
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@
namespace Formation\Controller;

use Application\Controller\AbstractController;
use Formation\Service\Session\SessionServiceAwareTrait;
use Individu\Entity\Db\Individu;
use Individu\Service\IndividuServiceAwareTrait;
use Formation\Entity\Db\Formateur;
@@ -14,12 +15,12 @@ use Laminas\View\Model\ViewModel;
class FormateurController extends AbstractController {
    use EntityManagerAwareTrait;
    use FormateurServiceAwareTrait;
    use SessionServiceAwareTrait;
    use IndividuServiceAwareTrait;

    public function ajouterAction()
    public function ajouterAction() : ViewModel
    {
        /** @var Session $session */
        $session = $this->getEntityManager()->getRepository(Session::class)->getRequestedSession($this);
        $session = $this->getSessionService()->getRepository()->getRequestedSession($this);

        $request = $this->getRequest();
        if ($request->isPost()) {
@@ -40,9 +41,9 @@ class FormateurController extends AbstractController {
        ]);
    }

    public function retirerAction() {
        /** @var Formateur $formateur */
        $formateur = $this->getEntityManager()->getRepository(Formateur::class)->getRequestedFormateur($this);
    public function retirerAction() : ViewModel
    {
        $formateur = $this->getFormateurService()->getRepository()->getRequestedFormateur($this);

        $request = $this->getRequest();
        if ($request->isPost()) {
@@ -61,6 +62,5 @@ class FormateurController extends AbstractController {
            ]);
        }
        return $vm;

    }
}
 No newline at end of file
+13 −1
Changes for module/Formation/src/Formation/Controller/FormateurControllerFactory.php: 13 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -2,28 +2,40 @@

namespace Formation\Controller;

use Formation\Service\Session\SessionService;
use Individu\Service\IndividuService;
use Doctrine\ORM\EntityManager;
use Formation\Service\Formateur\FormateurService;
use Interop\Container\ContainerInterface;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;

class FormateurControllerFactory {

    public function __invoke(ContainerInterface $container)
    /**
     * @param ContainerInterface $container
     * @return FormateurController
     * @throws ContainerExceptionInterface
     * @throws NotFoundExceptionInterface
     */
    public function __invoke(ContainerInterface $container) : FormateurController
    {
        /**
         * @var EntityManager $entityManager
         * @var FormateurService $formateurService
         * @var IndividuService $individuService
         * @var SessionService $sessionService
         */
        $entityManager = $container->get('doctrine.entitymanager.orm_default');
        $formateurService = $container->get(FormateurService::class);
        $individuService = $container->get(IndividuService::class);
        $sessionService = $container->get(SessionService::class);

        $controller = new FormateurController();
        $controller->setEntityManager($entityManager);
        $controller->setFormateurService($formateurService);
        $controller->setIndividuService($individuService);
        $controller->setSessionService($sessionService);
        return $controller;
    }
}
 No newline at end of file
Loading