Loading module/Application/config/others/these.config.php +1 −2 Changes for module/Application/config/others/these.config.php: 1 added line, 2 removed lines. Original line number Diff line number Diff line Loading @@ -54,7 +54,6 @@ return [ ThesePrivileges::THESE_SAISIE_RDV_BU, ThesePrivileges::FICHIER_DIVERS_TELEVERSER, ThesePrivileges::FICHIER_DIVERS_CONSULTER, ThesePrivileges::THESE_VERSION_PAPIER_CORRIGEE, ], 'resources' => ['These'], 'assertion' => 'Assertion\\These', Loading Loading @@ -236,7 +235,7 @@ return [ 'depot-papier-final', ], 'privileges' => [ ThesePrivileges::THESE_VERSION_PAPIER_CORRIGEE, ThesePrivileges::THESE_CONSULTATION_VERSION_PAPIER_CORRIGEE, ], 'assertion' => 'Assertion\\These', ], Loading module/Application/config/others/validation.config.php +1 Changes for module/Application/config/others/validation.config.php: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ return [ ValidationPrivileges::VALIDATION_DEPOT_THESE_CORRIGEE_SUPPR, ValidationPrivileges::VALIDATION_CORRECTION_THESE, ValidationPrivileges::VALIDATION_CORRECTION_THESE_SUPPR, ValidationPrivileges::VALIDATION_VERSION_PAPIER_CORRIGEE, ], 'resources' => ['These'], 'assertion' => 'Assertion\\These', Loading module/Application/src/Application/Assertion/These/TheseEntityAssertion.php +8 −15 Changes for module/Application/src/Application/Assertion/These/TheseEntityAssertion.php: 8 added lines, 15 removed lines. Original line number Diff line number Diff line Loading @@ -170,22 +170,15 @@ class TheseEntityAssertion implements EntityAssertionInterface, ValidationServic break; /** * REMISE VERSION CORRIGEE * Validation de la remise de la version papier corrigée. */ case ThesePrivileges::THESE_VERSION_PAPIER_CORRIGEE: //EXISTE T IL DEJA UNE VALIDATION ? $qb = $this->validationService->getRepository()->createQueryBuilder('v') //NB pas besoin de faire les jointures car déjà fait dans le query builder custom de Bertrand ->where("t.id = :theseid") ->andWhere("tv.code = :type"); $qb->setParameter(":theseid", $this->these->getId()); $qb->setParameter(":type", TypeValidation::CODE_VERSION_PAPIER_CORRIGEE); $query = $qb->getQuery(); $res = $query->getResult(); $nbValidation = count($res); $this->assertTrue($nbValidation === 0); case ValidationPrivileges::VALIDATION_VERSION_PAPIER_CORRIGEE: $res = $this->validationService->getRepository()->findValidationByCodeAndThese( TypeValidation::CODE_VERSION_PAPIER_CORRIGEE, $this->these ); $pasEncoreValidee = empty($res); $this->assertTrue($pasEncoreValidee); break; } Loading module/Application/src/Application/Authentication/Storage/AppStorage.php +3 −1 Changes for module/Application/src/Application/Authentication/Storage/AppStorage.php: 3 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -120,8 +120,10 @@ class AppStorage implements ChainableStorage * - avec son persopass (DoctorantCompl::persopass), seulement après qu'il l'a saisi sur la page d'identité de la thèse. */ $username = $this->people->getSupannAliasLogin(); // todo: solution provisoire! $etablissement = 'UCN'; try { $this->doctorant = $this->doctorantService->getRepository()->findOneByUsername($username); $this->doctorant = $this->doctorantService->getRepository()->findOneByUsernameAndEtab($username, $etablissement); } catch (NonUniqueResultException $e) { throw new RuntimeException("Plusieurs doctorants ont été trouvés avec le même username: " . $username); } Loading module/Application/src/Application/Controller/TheseController.php +7 −6 Changes for module/Application/src/Application/Controller/TheseController.php: 7 added lines, 6 removed lines. Original line number Diff line number Diff line Loading @@ -1316,18 +1316,19 @@ class TheseController extends AbstractController implements $request = $this->getRequest(); if ($request->isPost()) { $post = $request->getPost(); echo "Ajout de la validation<br/>"; $this->validationService->validateVersionPapierCorrigee($these); //pour sortir du post $this->flashMessenger()->addSuccessMessage("Validation enregistrée avec succès."); return $this->redirect()->toRoute('these/version-papier', [], [], true); } $validations = $this->validationService->getRepository()->findValidationByCodeAndThese( TypeValidation::CODE_VERSION_PAPIER_CORRIGEE, $these ); return new ViewModel(array( 'these' => $these, 'validation' => empty($validations) ? null : $validations[0], )); } Loading Loading
module/Application/config/others/these.config.php +1 −2 Changes for module/Application/config/others/these.config.php: 1 added line, 2 removed lines. Original line number Diff line number Diff line Loading @@ -54,7 +54,6 @@ return [ ThesePrivileges::THESE_SAISIE_RDV_BU, ThesePrivileges::FICHIER_DIVERS_TELEVERSER, ThesePrivileges::FICHIER_DIVERS_CONSULTER, ThesePrivileges::THESE_VERSION_PAPIER_CORRIGEE, ], 'resources' => ['These'], 'assertion' => 'Assertion\\These', Loading Loading @@ -236,7 +235,7 @@ return [ 'depot-papier-final', ], 'privileges' => [ ThesePrivileges::THESE_VERSION_PAPIER_CORRIGEE, ThesePrivileges::THESE_CONSULTATION_VERSION_PAPIER_CORRIGEE, ], 'assertion' => 'Assertion\\These', ], Loading
module/Application/config/others/validation.config.php +1 Changes for module/Application/config/others/validation.config.php: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ return [ ValidationPrivileges::VALIDATION_DEPOT_THESE_CORRIGEE_SUPPR, ValidationPrivileges::VALIDATION_CORRECTION_THESE, ValidationPrivileges::VALIDATION_CORRECTION_THESE_SUPPR, ValidationPrivileges::VALIDATION_VERSION_PAPIER_CORRIGEE, ], 'resources' => ['These'], 'assertion' => 'Assertion\\These', Loading
module/Application/src/Application/Assertion/These/TheseEntityAssertion.php +8 −15 Changes for module/Application/src/Application/Assertion/These/TheseEntityAssertion.php: 8 added lines, 15 removed lines. Original line number Diff line number Diff line Loading @@ -170,22 +170,15 @@ class TheseEntityAssertion implements EntityAssertionInterface, ValidationServic break; /** * REMISE VERSION CORRIGEE * Validation de la remise de la version papier corrigée. */ case ThesePrivileges::THESE_VERSION_PAPIER_CORRIGEE: //EXISTE T IL DEJA UNE VALIDATION ? $qb = $this->validationService->getRepository()->createQueryBuilder('v') //NB pas besoin de faire les jointures car déjà fait dans le query builder custom de Bertrand ->where("t.id = :theseid") ->andWhere("tv.code = :type"); $qb->setParameter(":theseid", $this->these->getId()); $qb->setParameter(":type", TypeValidation::CODE_VERSION_PAPIER_CORRIGEE); $query = $qb->getQuery(); $res = $query->getResult(); $nbValidation = count($res); $this->assertTrue($nbValidation === 0); case ValidationPrivileges::VALIDATION_VERSION_PAPIER_CORRIGEE: $res = $this->validationService->getRepository()->findValidationByCodeAndThese( TypeValidation::CODE_VERSION_PAPIER_CORRIGEE, $this->these ); $pasEncoreValidee = empty($res); $this->assertTrue($pasEncoreValidee); break; } Loading
module/Application/src/Application/Authentication/Storage/AppStorage.php +3 −1 Changes for module/Application/src/Application/Authentication/Storage/AppStorage.php: 3 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -120,8 +120,10 @@ class AppStorage implements ChainableStorage * - avec son persopass (DoctorantCompl::persopass), seulement après qu'il l'a saisi sur la page d'identité de la thèse. */ $username = $this->people->getSupannAliasLogin(); // todo: solution provisoire! $etablissement = 'UCN'; try { $this->doctorant = $this->doctorantService->getRepository()->findOneByUsername($username); $this->doctorant = $this->doctorantService->getRepository()->findOneByUsernameAndEtab($username, $etablissement); } catch (NonUniqueResultException $e) { throw new RuntimeException("Plusieurs doctorants ont été trouvés avec le même username: " . $username); } Loading
module/Application/src/Application/Controller/TheseController.php +7 −6 Changes for module/Application/src/Application/Controller/TheseController.php: 7 added lines, 6 removed lines. Original line number Diff line number Diff line Loading @@ -1316,18 +1316,19 @@ class TheseController extends AbstractController implements $request = $this->getRequest(); if ($request->isPost()) { $post = $request->getPost(); echo "Ajout de la validation<br/>"; $this->validationService->validateVersionPapierCorrigee($these); //pour sortir du post $this->flashMessenger()->addSuccessMessage("Validation enregistrée avec succès."); return $this->redirect()->toRoute('these/version-papier', [], [], true); } $validations = $this->validationService->getRepository()->findValidationByCodeAndThese( TypeValidation::CODE_VERSION_PAPIER_CORRIGEE, $these ); return new ViewModel(array( 'these' => $these, 'validation' => empty($validations) ? null : $validations[0], )); } Loading