Loading bin/import-UCN.sh 0 → 100755 +18 −0 Changes for bin/import-UCN.sh: 18 added lines, 0 removed lines. Original line number Diff line number Diff line #!/bin/bash ########################################################################################## # Script de lancement de l'import de toutes les données d'un établissement. ########################################################################################## ETAB="UCN" php public/index.php import --service=structure --etablissement=${ETAB} && echo && \ php public/index.php import --service=ecole-doctorale --etablissement=${ETAB} && echo && \ php public/index.php import --service=unite-recherche --etablissement=${ETAB} && echo && \ php public/index.php import --service=etablissement --etablissement=${ETAB} && echo && \ php public/index.php import --service=individu --etablissement=${ETAB} && echo && \ php public/index.php import --service=doctorant --etablissement=${ETAB} && echo && \ php public/index.php import --service=these --etablissement=${ETAB} && echo && \ php public/index.php import --service=role --etablissement=${ETAB} && echo && \ php public/index.php import --service=acteur --etablissement=${ETAB} && echo && \ php public/index.php import --service=variable --etablissement=${ETAB} && echo bin/import-URN.sh 0 → 100755 +18 −0 Changes for bin/import-URN.sh: 18 added lines, 0 removed lines. Original line number Diff line number Diff line #!/bin/bash ########################################################################################## # Script de lancement de l'import de toutes les données d'un établissement. ########################################################################################## ETAB="URN" php public/index.php import --service=structure --etablissement=${ETAB} && echo && \ php public/index.php import --service=ecole-doctorale --etablissement=${ETAB} && echo && \ php public/index.php import --service=unite-recherche --etablissement=${ETAB} && echo && \ php public/index.php import --service=etablissement --etablissement=${ETAB} && echo && \ php public/index.php import --service=individu --etablissement=${ETAB} && echo && \ php public/index.php import --service=doctorant --etablissement=${ETAB} && echo && \ php public/index.php import --service=these --etablissement=${ETAB} && echo && \ php public/index.php import --service=role --etablissement=${ETAB} && echo && \ php public/index.php import --service=acteur --etablissement=${ETAB} && echo && \ php public/index.php import --service=variable --etablissement=${ETAB} && echo module/Application/src/Application/Controller/ExportController.php +1 −1 Changes for module/Application/src/Application/Controller/ExportController.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -27,7 +27,7 @@ class ExportController extends AbstractController 'Nom patronymique' => function (These $these) { return $these->getDoctorant()->getIndividu()->getNomPatronymique(); }, 'Date de naissance' => function (These $these) { return $these->getDoctorant()->getIndividu()->getDateNaissance(); }, 'Mail' => function (These $these) { return $these->getDoctorant()->getIndividu()->getEmail(); }, 'Numéro étudiant' => function (These $these) { return $these->getDoctorant()->getSourceCode(); }, 'Numéro étudiant' => function (These $these) { return $these->getDoctorant()->getSourceCodeSansPrefix(); }, //These 'Identifiant de la thèse' => function (These $these) { return $these->getSourceCode(); }, 'Titre' => function (These $these) { return $these->getTitre(); }, Loading module/Application/src/Application/Controller/SubstitutionController.php +15 −14 Changes for module/Application/src/Application/Controller/SubstitutionController.php: 15 added lines, 14 removed lines. Original line number Diff line number Diff line Loading @@ -2,19 +2,17 @@ namespace Application\Controller; use Application\Entity\Db\EcoleDoctorale; use Application\Entity\Db\Etablissement; use Application\Entity\Db\Structure; use Application\Entity\Db\StructureConcreteInterface; use Application\Entity\Db\TypeStructure; use Application\Entity\Db\UniteRecherche; use Application\Filter\EtablissementPrefixFilterAwareTrait; use Application\Service\EcoleDoctorale\EcoleDoctoraleServiceAwareTrait; use Application\Service\Etablissement\EtablissementServiceAwareTrait; use Application\Service\Structure\StructureServiceAwareTrait; use Application\Service\UniteRecherche\UniteRechercheServiceAwareTrait; use UnicaenApp\Exception\RuntimeException; use UnicaenApp\Service\EntityManagerAwareTrait; use Zend\Validator\Date; use Zend\View\Model\ViewModel; class SubstitutionController extends AbstractController Loading @@ -24,6 +22,9 @@ class SubstitutionController extends AbstractController use EcoleDoctoraleServiceAwareTrait; use UniteRechercheServiceAwareTrait; use StructureServiceAwareTrait; use EtablissementPrefixFilterAwareTrait; const CODE_SYGAL = 'SyGAL'; /** Affiche l'index générale */ public function indexAction() { Loading Loading @@ -202,7 +203,7 @@ class SubstitutionController extends AbstractController $dictionnaire = []; foreach ($structures as $structure) { $identifiant = explode("::", $structure->getSourceCode())[1]; $identifiant = $this->getEtablissementPrefixFilter()->removePrefixFrom($structure->getSourceCode()); $dictionnaire[$identifiant][] = $structure; } Loading @@ -223,8 +224,8 @@ class SubstitutionController extends AbstractController /** @var StructureConcreteInterface $structure */ foreach ($structures as $structure) { $prefix = explode("::",$structure->getSourceCode())[0]; if ($prefix === "SyGAL" || $prefix === "COMUE") { $prefix = $this->getEtablissementPrefixFilter()->extractCodeEtablissementFrom($structure->getSourceCode()); if ($prefix === self::CODE_SYGAL || $prefix === Etablissement::CODE_COMUE) { $cible = $structure; } else { $sources[] = $structure; Loading @@ -249,8 +250,8 @@ class SubstitutionController extends AbstractController /** @var StructureConcreteInterface $structure */ foreach ($structures as $structure) { $prefix = explode("::", $structure->getSourceCode())[0]; if ($prefix === "SyGAL" || $prefix === "COMUE") { $prefix = $this->getEtablissementPrefixFilter()->extractCodeEtablissementFrom($structure->getSourceCode()); if ($prefix === self::CODE_SYGAL || $prefix === Etablissement::CODE_COMUE) { $cible = $structure; } else { $sources[] = $structure; Loading @@ -273,8 +274,8 @@ class SubstitutionController extends AbstractController /** @var StructureConcreteInterface $structure */ foreach ($structures as $structure) { $prefix = explode("::",$structure->getSourceCode())[0]; if ($prefix === "SyGAL" || $prefix === "COMUE") { $prefix = $this->getEtablissementPrefixFilter()->extractCodeEtablissementFrom($structure->getSourceCode()); if ($prefix === self::CODE_SYGAL || $prefix === Etablissement::CODE_COMUE) { $cible = $structure; } else { $sources[] = $structure; Loading Loading @@ -318,7 +319,7 @@ class SubstitutionController extends AbstractController if ($cible === null) { $cible = $this->getStructureService()->createStructureConcrete($type); $this->structureService->updateFromPostData($cible,$data['cible']); $cible->setSourceCode("SyGAL" . "::" . $identifiant); $cible->setSourceCode($this->getEtablissementPrefixFilter()->addPrefixEtablissementTo($identifiant)); $this->getEntityManager()->persist($cible); $this->getEntityManager()->flush($cible); } else { Loading @@ -342,7 +343,7 @@ class SubstitutionController extends AbstractController if ($cible === null) { $cible = $this->getStructureService()->createStructureConcrete($type); $cible->setSourceCode("SyGAL" . "::" . $identifiant); $cible->setSourceCode($this->getEtablissementPrefixFilter()->addPrefixEtablissementTo($identifiant)); } $vm = new ViewModel(); Loading Loading @@ -370,8 +371,8 @@ class SubstitutionController extends AbstractController /** @var StructureConcreteInterface $structure */ foreach ($structures as $structure) { $prefix = explode("::",$structure->getSourceCode())[0]; if ($prefix === "SyGAL" || $prefix === "COMUE") { $prefix = $this->getEtablissementPrefixFilter()->extractCodeEtablissementFrom($structure->getSourceCode()); if ($prefix === self::CODE_SYGAL || $prefix === Etablissement::CODE_COMUE) { $cible = $structure; } else { $sources[] = $structure; Loading module/Application/src/Application/Entity/Db/Doctorant.php +5 −7 Changes for module/Application/src/Application/Entity/Db/Doctorant.php: 5 added lines, 7 removed lines. Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ namespace Application\Entity\Db; use Application\Entity\Db\Interfaces\DoctorantInterface; use Application\Filter\EtablissementPrefixFilterAwareTrait; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; use LogicException; Loading @@ -18,6 +19,7 @@ class Doctorant implements DoctorantInterface, HistoriqueAwareInterface, Resourc { use HistoriqueAwareTrait; use SourceAwareTrait; use EtablissementPrefixFilterAwareTrait; /** * @var integer Loading Loading @@ -87,23 +89,19 @@ class Doctorant implements DoctorantInterface, HistoriqueAwareInterface, Resourc * * @return string */ public function getSourceCode($no_prefix = false) public function getSourceCode() { if ($no_prefix) { $res = explode("::", $this->sourceCode); return end($res); } return $this->sourceCode; } /** * Get sourceCode * Retourne le source code sans le préfixe établissement. * * @return string */ public function getSourceCodeSansPrefix() { return $this->getEtablissement()->removePrefixFrom($this->sourceCode); return $this->getEtablissementPrefixFilter()->removePrefixFrom($this->getSourceCode()); } /** Loading Loading
bin/import-UCN.sh 0 → 100755 +18 −0 Changes for bin/import-UCN.sh: 18 added lines, 0 removed lines. Original line number Diff line number Diff line #!/bin/bash ########################################################################################## # Script de lancement de l'import de toutes les données d'un établissement. ########################################################################################## ETAB="UCN" php public/index.php import --service=structure --etablissement=${ETAB} && echo && \ php public/index.php import --service=ecole-doctorale --etablissement=${ETAB} && echo && \ php public/index.php import --service=unite-recherche --etablissement=${ETAB} && echo && \ php public/index.php import --service=etablissement --etablissement=${ETAB} && echo && \ php public/index.php import --service=individu --etablissement=${ETAB} && echo && \ php public/index.php import --service=doctorant --etablissement=${ETAB} && echo && \ php public/index.php import --service=these --etablissement=${ETAB} && echo && \ php public/index.php import --service=role --etablissement=${ETAB} && echo && \ php public/index.php import --service=acteur --etablissement=${ETAB} && echo && \ php public/index.php import --service=variable --etablissement=${ETAB} && echo
bin/import-URN.sh 0 → 100755 +18 −0 Changes for bin/import-URN.sh: 18 added lines, 0 removed lines. Original line number Diff line number Diff line #!/bin/bash ########################################################################################## # Script de lancement de l'import de toutes les données d'un établissement. ########################################################################################## ETAB="URN" php public/index.php import --service=structure --etablissement=${ETAB} && echo && \ php public/index.php import --service=ecole-doctorale --etablissement=${ETAB} && echo && \ php public/index.php import --service=unite-recherche --etablissement=${ETAB} && echo && \ php public/index.php import --service=etablissement --etablissement=${ETAB} && echo && \ php public/index.php import --service=individu --etablissement=${ETAB} && echo && \ php public/index.php import --service=doctorant --etablissement=${ETAB} && echo && \ php public/index.php import --service=these --etablissement=${ETAB} && echo && \ php public/index.php import --service=role --etablissement=${ETAB} && echo && \ php public/index.php import --service=acteur --etablissement=${ETAB} && echo && \ php public/index.php import --service=variable --etablissement=${ETAB} && echo
module/Application/src/Application/Controller/ExportController.php +1 −1 Changes for module/Application/src/Application/Controller/ExportController.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -27,7 +27,7 @@ class ExportController extends AbstractController 'Nom patronymique' => function (These $these) { return $these->getDoctorant()->getIndividu()->getNomPatronymique(); }, 'Date de naissance' => function (These $these) { return $these->getDoctorant()->getIndividu()->getDateNaissance(); }, 'Mail' => function (These $these) { return $these->getDoctorant()->getIndividu()->getEmail(); }, 'Numéro étudiant' => function (These $these) { return $these->getDoctorant()->getSourceCode(); }, 'Numéro étudiant' => function (These $these) { return $these->getDoctorant()->getSourceCodeSansPrefix(); }, //These 'Identifiant de la thèse' => function (These $these) { return $these->getSourceCode(); }, 'Titre' => function (These $these) { return $these->getTitre(); }, Loading
module/Application/src/Application/Controller/SubstitutionController.php +15 −14 Changes for module/Application/src/Application/Controller/SubstitutionController.php: 15 added lines, 14 removed lines. Original line number Diff line number Diff line Loading @@ -2,19 +2,17 @@ namespace Application\Controller; use Application\Entity\Db\EcoleDoctorale; use Application\Entity\Db\Etablissement; use Application\Entity\Db\Structure; use Application\Entity\Db\StructureConcreteInterface; use Application\Entity\Db\TypeStructure; use Application\Entity\Db\UniteRecherche; use Application\Filter\EtablissementPrefixFilterAwareTrait; use Application\Service\EcoleDoctorale\EcoleDoctoraleServiceAwareTrait; use Application\Service\Etablissement\EtablissementServiceAwareTrait; use Application\Service\Structure\StructureServiceAwareTrait; use Application\Service\UniteRecherche\UniteRechercheServiceAwareTrait; use UnicaenApp\Exception\RuntimeException; use UnicaenApp\Service\EntityManagerAwareTrait; use Zend\Validator\Date; use Zend\View\Model\ViewModel; class SubstitutionController extends AbstractController Loading @@ -24,6 +22,9 @@ class SubstitutionController extends AbstractController use EcoleDoctoraleServiceAwareTrait; use UniteRechercheServiceAwareTrait; use StructureServiceAwareTrait; use EtablissementPrefixFilterAwareTrait; const CODE_SYGAL = 'SyGAL'; /** Affiche l'index générale */ public function indexAction() { Loading Loading @@ -202,7 +203,7 @@ class SubstitutionController extends AbstractController $dictionnaire = []; foreach ($structures as $structure) { $identifiant = explode("::", $structure->getSourceCode())[1]; $identifiant = $this->getEtablissementPrefixFilter()->removePrefixFrom($structure->getSourceCode()); $dictionnaire[$identifiant][] = $structure; } Loading @@ -223,8 +224,8 @@ class SubstitutionController extends AbstractController /** @var StructureConcreteInterface $structure */ foreach ($structures as $structure) { $prefix = explode("::",$structure->getSourceCode())[0]; if ($prefix === "SyGAL" || $prefix === "COMUE") { $prefix = $this->getEtablissementPrefixFilter()->extractCodeEtablissementFrom($structure->getSourceCode()); if ($prefix === self::CODE_SYGAL || $prefix === Etablissement::CODE_COMUE) { $cible = $structure; } else { $sources[] = $structure; Loading @@ -249,8 +250,8 @@ class SubstitutionController extends AbstractController /** @var StructureConcreteInterface $structure */ foreach ($structures as $structure) { $prefix = explode("::", $structure->getSourceCode())[0]; if ($prefix === "SyGAL" || $prefix === "COMUE") { $prefix = $this->getEtablissementPrefixFilter()->extractCodeEtablissementFrom($structure->getSourceCode()); if ($prefix === self::CODE_SYGAL || $prefix === Etablissement::CODE_COMUE) { $cible = $structure; } else { $sources[] = $structure; Loading @@ -273,8 +274,8 @@ class SubstitutionController extends AbstractController /** @var StructureConcreteInterface $structure */ foreach ($structures as $structure) { $prefix = explode("::",$structure->getSourceCode())[0]; if ($prefix === "SyGAL" || $prefix === "COMUE") { $prefix = $this->getEtablissementPrefixFilter()->extractCodeEtablissementFrom($structure->getSourceCode()); if ($prefix === self::CODE_SYGAL || $prefix === Etablissement::CODE_COMUE) { $cible = $structure; } else { $sources[] = $structure; Loading Loading @@ -318,7 +319,7 @@ class SubstitutionController extends AbstractController if ($cible === null) { $cible = $this->getStructureService()->createStructureConcrete($type); $this->structureService->updateFromPostData($cible,$data['cible']); $cible->setSourceCode("SyGAL" . "::" . $identifiant); $cible->setSourceCode($this->getEtablissementPrefixFilter()->addPrefixEtablissementTo($identifiant)); $this->getEntityManager()->persist($cible); $this->getEntityManager()->flush($cible); } else { Loading @@ -342,7 +343,7 @@ class SubstitutionController extends AbstractController if ($cible === null) { $cible = $this->getStructureService()->createStructureConcrete($type); $cible->setSourceCode("SyGAL" . "::" . $identifiant); $cible->setSourceCode($this->getEtablissementPrefixFilter()->addPrefixEtablissementTo($identifiant)); } $vm = new ViewModel(); Loading Loading @@ -370,8 +371,8 @@ class SubstitutionController extends AbstractController /** @var StructureConcreteInterface $structure */ foreach ($structures as $structure) { $prefix = explode("::",$structure->getSourceCode())[0]; if ($prefix === "SyGAL" || $prefix === "COMUE") { $prefix = $this->getEtablissementPrefixFilter()->extractCodeEtablissementFrom($structure->getSourceCode()); if ($prefix === self::CODE_SYGAL || $prefix === Etablissement::CODE_COMUE) { $cible = $structure; } else { $sources[] = $structure; Loading
module/Application/src/Application/Entity/Db/Doctorant.php +5 −7 Changes for module/Application/src/Application/Entity/Db/Doctorant.php: 5 added lines, 7 removed lines. Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ namespace Application\Entity\Db; use Application\Entity\Db\Interfaces\DoctorantInterface; use Application\Filter\EtablissementPrefixFilterAwareTrait; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; use LogicException; Loading @@ -18,6 +19,7 @@ class Doctorant implements DoctorantInterface, HistoriqueAwareInterface, Resourc { use HistoriqueAwareTrait; use SourceAwareTrait; use EtablissementPrefixFilterAwareTrait; /** * @var integer Loading Loading @@ -87,23 +89,19 @@ class Doctorant implements DoctorantInterface, HistoriqueAwareInterface, Resourc * * @return string */ public function getSourceCode($no_prefix = false) public function getSourceCode() { if ($no_prefix) { $res = explode("::", $this->sourceCode); return end($res); } return $this->sourceCode; } /** * Get sourceCode * Retourne le source code sans le préfixe établissement. * * @return string */ public function getSourceCodeSansPrefix() { return $this->getEtablissement()->removePrefixFrom($this->sourceCode); return $this->getEtablissementPrefixFilter()->removePrefixFrom($this->getSourceCode()); } /** Loading