Loading doc/release-notes/fiche_rncp/01_fiche_rncp.sql +5 −1 Original line number Diff line number Diff line Loading @@ -306,3 +306,7 @@ select privilege__grant_privileges_to_profiles('portfolio', ARRAY['afficher'], ARRAY['ADMIN_TECH', 'DOCTORANT'] ); -- Ajout de l'id HAL pour un doctorant alter table individu add id_hal varchar(200); No newline at end of file module/Depot/src/Depot/Form/Diffusion/DiffusionHydrator.php +10 −1 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ class DiffusionHydrator extends DoctrineObject implements EntityManagerAwareInte $data['confidentielle'] = $object->getThese()->getDateFinConfidentialite() !== null ? Diffusion::CONFIDENTIELLE_OUI : Diffusion::CONFIDENTIELLE_NON; $data['dateFinConfidentialite'] = $object->getThese()->getDateFinConfidentialite(); $data['orcid'] = $object->getThese()->getDoctorant()->getIndividu()->getOrcid(); $data['halId'] = $object->getThese()->getDoctorant()->getIndividu()->getIdHal(); return $data; } Loading Loading @@ -56,8 +57,16 @@ class DiffusionHydrator extends DoctrineObject implements EntityManagerAwareInte $data['orcid'] = null; } if (isset($data['halId'])) { $individu = $this->getIndividuThese($object); $individu?->setIdHal($data['halId']); if (!isset($data['halId'])) { try { $this->objectManager->flush($individu); } catch (ORMException $e) { throw new RuntimeException("Impossible d'enregistrer les modifications sur l'individu", null, $e); } }else{ $data['halId'] = null; } Loading module/Depot/src/Depot/Form/Hydrator/RdvBuHydrator.php +3 −2 Original line number Diff line number Diff line Loading @@ -41,7 +41,7 @@ class RdvBuHydrator extends DoctrineObject // todo : à déplacer dans Doctorant/Individu : $individu = $this->getIndividuThese($diffusion); $data['idOrcid'] = $individu?->getOrcid(); $data['halId'] = $diffusion->getHalId(); $data['halId'] = $individu?->getIdHal(); // todo : à déplacer dans These : $data['nnt'] = $diffusion->getNNT(); } Loading Loading @@ -69,13 +69,14 @@ class RdvBuHydrator extends DoctrineObject // todo : à déplacer dans Doctorant/Individu : $individu = $this->getIndividuThese($diffusion); $individu?->setOrcid($data['idOrcid']); $individu?->setIdHal($data['halId']); try { $this->objectManager->flush($individu); } catch (ORMException $e) { throw new RuntimeException("Impossible d'enregistrer les modifications sur l'individu", null, $e); } $diffusion->setHalId($data['halId']); // todo : à déplacer dans These : $diffusion->setNNT($data['nnt'] ?? null); try { Loading module/Depot/view/depot/depot/partial/diffusion.phtml +1 −1 Original line number Diff line number Diff line Loading @@ -74,7 +74,7 @@ use These\Entity\Db\These; <li>Identifiant ORCID : <code class="text-muted"><?php echo $orcid ?></code></li> <?php endif ?> <?php if ($halId = $diffusion->getHalId()): ?> <?php if ($halId = $these->getDoctorant()->getIndividu()?->getIdHal()): ?> <li>IdHAL : <code class="text-muted"><?php echo $halId ?></code></li> <?php endif ?> </ul> No newline at end of file module/Doctorant/src/Doctorant/Form/Doctorant/DoctorantForm.php +10 −0 Original line number Diff line number Diff line Loading @@ -32,6 +32,10 @@ class DoctorantForm extends Form implements InputFilterProviderInterface (new Text('orcid')) ->setLabel("ORCID :") ); $this->add( (new Text('idHal')) ->setLabel("IdHAL :") ); $this->add( (new Text('idRef')) ->setLabel("IdRef :") Loading Loading @@ -105,6 +109,12 @@ class DoctorantForm extends Form implements InputFilterProviderInterface ], ], ], 'idHal' => [ 'required' => false, 'filters' => [ ['name' => StringTrim::class], ], ], ]; } } No newline at end of file Loading
doc/release-notes/fiche_rncp/01_fiche_rncp.sql +5 −1 Original line number Diff line number Diff line Loading @@ -306,3 +306,7 @@ select privilege__grant_privileges_to_profiles('portfolio', ARRAY['afficher'], ARRAY['ADMIN_TECH', 'DOCTORANT'] ); -- Ajout de l'id HAL pour un doctorant alter table individu add id_hal varchar(200); No newline at end of file
module/Depot/src/Depot/Form/Diffusion/DiffusionHydrator.php +10 −1 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ class DiffusionHydrator extends DoctrineObject implements EntityManagerAwareInte $data['confidentielle'] = $object->getThese()->getDateFinConfidentialite() !== null ? Diffusion::CONFIDENTIELLE_OUI : Diffusion::CONFIDENTIELLE_NON; $data['dateFinConfidentialite'] = $object->getThese()->getDateFinConfidentialite(); $data['orcid'] = $object->getThese()->getDoctorant()->getIndividu()->getOrcid(); $data['halId'] = $object->getThese()->getDoctorant()->getIndividu()->getIdHal(); return $data; } Loading Loading @@ -56,8 +57,16 @@ class DiffusionHydrator extends DoctrineObject implements EntityManagerAwareInte $data['orcid'] = null; } if (isset($data['halId'])) { $individu = $this->getIndividuThese($object); $individu?->setIdHal($data['halId']); if (!isset($data['halId'])) { try { $this->objectManager->flush($individu); } catch (ORMException $e) { throw new RuntimeException("Impossible d'enregistrer les modifications sur l'individu", null, $e); } }else{ $data['halId'] = null; } Loading
module/Depot/src/Depot/Form/Hydrator/RdvBuHydrator.php +3 −2 Original line number Diff line number Diff line Loading @@ -41,7 +41,7 @@ class RdvBuHydrator extends DoctrineObject // todo : à déplacer dans Doctorant/Individu : $individu = $this->getIndividuThese($diffusion); $data['idOrcid'] = $individu?->getOrcid(); $data['halId'] = $diffusion->getHalId(); $data['halId'] = $individu?->getIdHal(); // todo : à déplacer dans These : $data['nnt'] = $diffusion->getNNT(); } Loading Loading @@ -69,13 +69,14 @@ class RdvBuHydrator extends DoctrineObject // todo : à déplacer dans Doctorant/Individu : $individu = $this->getIndividuThese($diffusion); $individu?->setOrcid($data['idOrcid']); $individu?->setIdHal($data['halId']); try { $this->objectManager->flush($individu); } catch (ORMException $e) { throw new RuntimeException("Impossible d'enregistrer les modifications sur l'individu", null, $e); } $diffusion->setHalId($data['halId']); // todo : à déplacer dans These : $diffusion->setNNT($data['nnt'] ?? null); try { Loading
module/Depot/view/depot/depot/partial/diffusion.phtml +1 −1 Original line number Diff line number Diff line Loading @@ -74,7 +74,7 @@ use These\Entity\Db\These; <li>Identifiant ORCID : <code class="text-muted"><?php echo $orcid ?></code></li> <?php endif ?> <?php if ($halId = $diffusion->getHalId()): ?> <?php if ($halId = $these->getDoctorant()->getIndividu()?->getIdHal()): ?> <li>IdHAL : <code class="text-muted"><?php echo $halId ?></code></li> <?php endif ?> </ul> No newline at end of file
module/Doctorant/src/Doctorant/Form/Doctorant/DoctorantForm.php +10 −0 Original line number Diff line number Diff line Loading @@ -32,6 +32,10 @@ class DoctorantForm extends Form implements InputFilterProviderInterface (new Text('orcid')) ->setLabel("ORCID :") ); $this->add( (new Text('idHal')) ->setLabel("IdHAL :") ); $this->add( (new Text('idRef')) ->setLabel("IdRef :") Loading Loading @@ -105,6 +109,12 @@ class DoctorantForm extends Form implements InputFilterProviderInterface ], ], ], 'idHal' => [ 'required' => false, 'filters' => [ ['name' => StringTrim::class], ], ], ]; } } No newline at end of file