Loading module/Application/src/Service/OffreFormationService.php +21 −10 Original line number Diff line number Diff line Loading @@ -30,11 +30,13 @@ class OffreFormationService extends AbstractEntityService } public function getAlias() { } public function getNeep($structure, $niveau, $etape, $annee = null, $source = null) { if ($etape) { Loading Loading @@ -130,6 +132,7 @@ class OffreFormationService extends AbstractEntityService } public function getNeepEtape($etape) { $niveaux = []; Loading Loading @@ -179,6 +182,7 @@ class OffreFormationService extends AbstractEntityService } /** * @return array */ Loading @@ -197,9 +201,9 @@ class OffreFormationService extends AbstractEntityService //Offre année en cours [$niveaux, $etapes, $elements] = $this->getNeep($structure, $niveau, $etape, $anneeEnCours, $source); [$niveaux, $etapes, $elements] = $this->getNeep($structure, $niveau, $etape, $anneeEnCours); //Offre année suivante [$niveauxN1, $etapesN1, $elementsN1] = $this->getNeep($structure, $niveau, $etape, $anneeSuivante, $source); [$niveauxN1, $etapesN1, $elementsN1] = $this->getNeep($structure, $niveau, $etape, $anneeSuivante); //Organisation pour traitement dans la vue $codesEtapeN1 = []; Loading @@ -219,23 +223,29 @@ class OffreFormationService extends AbstractEntityService $codesEtapeN1[] = $v->getCode(); } foreach ($etapes as $v) { // $histoDestru = []; /*if (!$v->isFromSourceOse()) { foreach ($etapes as $v) { if ($v->getHistoDestruction() != null) { continue; }*/ } $offresComplementaires[$v->getId()]['reconduction_partiel'] = 'non'; $offresComplementaires[$v->getId()]['reconduction'] = (in_array($v->getCode(), $codesEtapeN1)) ? 'oui' : 'non'; $offresComplementaires[$v->getId()]['etape'] = $v; $offresComplementaires[$v->getId()]['elements_pedagogique'] = []; $offresComplementaires[$v->getId()]['etape'] = $v; if ($v->getSource() == $source) { $offresComplementaires[$v->getId()]['reconduction'] = (in_array($v->getCode(), $codesEtapeN1)) ? 'oui' : 'non'; $offresComplementaires[$v->getId()]['reconductionFait'] = (in_array($v->getCode(), $codesEtapeN1)) ? 'oui' : 'non'; } else { $offresComplementaires[$v->getId()]['reconduction'] = 'oui'; $offresComplementaires[$v->getId()]['reconductionFait'] = 'non'; } } foreach ($elements as $v) { /*if (!$v->getEtape()->isFromSourceOse()) { if ($v->getSource() != $source || $v->getHistoDestruction() != null || $v->getEtape()->getHistoDestruction() != null) { continue; }*/ } $etapeId = $v->getEtape()->getId(); if (!in_array($v->getCode(), $codesElementN1)) { Loading @@ -252,6 +262,7 @@ class OffreFormationService extends AbstractEntityService } public function createMappingEtapeNEtapeN1($etapesN, $etapesN1) { $codesEtapeN = []; Loading module/Application/view/application/offre-formation/reconduction.phtml +10 −2 Original line number Diff line number Diff line Loading @@ -18,7 +18,7 @@ $this->headScript()->offsetSetFile(100, $this->basePath('/js/reconduction-offre. $selectStructure = new \Laminas\Form\Element\Select('structure'); $selectStructure ->setValueOptions(['' => "(Sélectionnez une composante)"] + \UnicaenApp\Util::collectionAsOptions($structures)) ->setValue($structure ? $structure->getId() : null) ->setValue($structure?->getId()) ->setAttributes(['class' => 'structure', 'style' => 'width:250px;']); echo $this->formSelect($selectStructure); Loading Loading @@ -84,7 +84,7 @@ $this->headScript()->offsetSetFile(100, $this->basePath('/js/reconduction-offre. <table class="reconduction-offre table table-bordered table-condensed table-hover"> <?php else: ?> <table class="reconduction-offre table table-bordered table-condensed table-hover" style="display: none;"> style="display: none" ;> <?php endif; ?> <thead> <tr class="<?php if ($ec['reconduction'] == 'oui') { Loading @@ -93,11 +93,19 @@ $this->headScript()->offsetSetFile(100, $this->basePath('/js/reconduction-offre. echo "info"; } ?>"> <?php if ($ec['reconduction'] == 'oui'): ?> <?php if ($ec['reconductionFait'] == 'oui'): ?> <th><input title="Formation déjà reconduite pour l'année prochaine" type="checkbox" class="checkbox-formation" disabled="disabled" name="etape[]" value="<?= $ec['etape']->getId(); ?>"/> <span class="label label-warning" style="margin:0 auto;">Reconduit</span> </th> <?php else: ?> <th><input title="Formation non reconductible" type="checkbox" class="checkbox-formation" disabled="disabled" name="etape[]" value="<?= $ec['etape']->getId(); ?>"/> <span class="label label-warning" style="margin:0 auto;">Non reconductible</span> </th> <?php endif; ?> <?php else: ?> <th><input type="checkbox" class="checkbox-formation" checked="checked" name="etape[]" value="<?= $ec['etape']->getId(); ?>"/></th> Loading Loading
module/Application/src/Service/OffreFormationService.php +21 −10 Original line number Diff line number Diff line Loading @@ -30,11 +30,13 @@ class OffreFormationService extends AbstractEntityService } public function getAlias() { } public function getNeep($structure, $niveau, $etape, $annee = null, $source = null) { if ($etape) { Loading Loading @@ -130,6 +132,7 @@ class OffreFormationService extends AbstractEntityService } public function getNeepEtape($etape) { $niveaux = []; Loading Loading @@ -179,6 +182,7 @@ class OffreFormationService extends AbstractEntityService } /** * @return array */ Loading @@ -197,9 +201,9 @@ class OffreFormationService extends AbstractEntityService //Offre année en cours [$niveaux, $etapes, $elements] = $this->getNeep($structure, $niveau, $etape, $anneeEnCours, $source); [$niveaux, $etapes, $elements] = $this->getNeep($structure, $niveau, $etape, $anneeEnCours); //Offre année suivante [$niveauxN1, $etapesN1, $elementsN1] = $this->getNeep($structure, $niveau, $etape, $anneeSuivante, $source); [$niveauxN1, $etapesN1, $elementsN1] = $this->getNeep($structure, $niveau, $etape, $anneeSuivante); //Organisation pour traitement dans la vue $codesEtapeN1 = []; Loading @@ -219,23 +223,29 @@ class OffreFormationService extends AbstractEntityService $codesEtapeN1[] = $v->getCode(); } foreach ($etapes as $v) { // $histoDestru = []; /*if (!$v->isFromSourceOse()) { foreach ($etapes as $v) { if ($v->getHistoDestruction() != null) { continue; }*/ } $offresComplementaires[$v->getId()]['reconduction_partiel'] = 'non'; $offresComplementaires[$v->getId()]['reconduction'] = (in_array($v->getCode(), $codesEtapeN1)) ? 'oui' : 'non'; $offresComplementaires[$v->getId()]['etape'] = $v; $offresComplementaires[$v->getId()]['elements_pedagogique'] = []; $offresComplementaires[$v->getId()]['etape'] = $v; if ($v->getSource() == $source) { $offresComplementaires[$v->getId()]['reconduction'] = (in_array($v->getCode(), $codesEtapeN1)) ? 'oui' : 'non'; $offresComplementaires[$v->getId()]['reconductionFait'] = (in_array($v->getCode(), $codesEtapeN1)) ? 'oui' : 'non'; } else { $offresComplementaires[$v->getId()]['reconduction'] = 'oui'; $offresComplementaires[$v->getId()]['reconductionFait'] = 'non'; } } foreach ($elements as $v) { /*if (!$v->getEtape()->isFromSourceOse()) { if ($v->getSource() != $source || $v->getHistoDestruction() != null || $v->getEtape()->getHistoDestruction() != null) { continue; }*/ } $etapeId = $v->getEtape()->getId(); if (!in_array($v->getCode(), $codesElementN1)) { Loading @@ -252,6 +262,7 @@ class OffreFormationService extends AbstractEntityService } public function createMappingEtapeNEtapeN1($etapesN, $etapesN1) { $codesEtapeN = []; Loading
module/Application/view/application/offre-formation/reconduction.phtml +10 −2 Original line number Diff line number Diff line Loading @@ -18,7 +18,7 @@ $this->headScript()->offsetSetFile(100, $this->basePath('/js/reconduction-offre. $selectStructure = new \Laminas\Form\Element\Select('structure'); $selectStructure ->setValueOptions(['' => "(Sélectionnez une composante)"] + \UnicaenApp\Util::collectionAsOptions($structures)) ->setValue($structure ? $structure->getId() : null) ->setValue($structure?->getId()) ->setAttributes(['class' => 'structure', 'style' => 'width:250px;']); echo $this->formSelect($selectStructure); Loading Loading @@ -84,7 +84,7 @@ $this->headScript()->offsetSetFile(100, $this->basePath('/js/reconduction-offre. <table class="reconduction-offre table table-bordered table-condensed table-hover"> <?php else: ?> <table class="reconduction-offre table table-bordered table-condensed table-hover" style="display: none;"> style="display: none" ;> <?php endif; ?> <thead> <tr class="<?php if ($ec['reconduction'] == 'oui') { Loading @@ -93,11 +93,19 @@ $this->headScript()->offsetSetFile(100, $this->basePath('/js/reconduction-offre. echo "info"; } ?>"> <?php if ($ec['reconduction'] == 'oui'): ?> <?php if ($ec['reconductionFait'] == 'oui'): ?> <th><input title="Formation déjà reconduite pour l'année prochaine" type="checkbox" class="checkbox-formation" disabled="disabled" name="etape[]" value="<?= $ec['etape']->getId(); ?>"/> <span class="label label-warning" style="margin:0 auto;">Reconduit</span> </th> <?php else: ?> <th><input title="Formation non reconductible" type="checkbox" class="checkbox-formation" disabled="disabled" name="etape[]" value="<?= $ec['etape']->getId(); ?>"/> <span class="label label-warning" style="margin:0 auto;">Non reconductible</span> </th> <?php endif; ?> <?php else: ?> <th><input type="checkbox" class="checkbox-formation" checked="checked" name="etape[]" value="<?= $ec['etape']->getId(); ?>"/></th> Loading