Commit 5c572ec4 authored by joriot221's avatar joriot221
Browse files

Version 1 de la reconduction des ELP créer dans ose appartenant a une etape non créer dans ose

parent 9ad79e75
Loading
Loading
Loading
Loading
+16 −11
Changes for module/Application/src/Service/OffreFormationService.php: 16 added lines, 11 removed lines.
Original line number Diff line number Diff line
@@ -30,11 +30,13 @@ class OffreFormationService extends AbstractEntityService
    }



    public function getAlias()
    {
    }



    public function getNeep($structure, $niveau, $etape, $annee = null, $source = null)
    {
        if ($etape) {
@@ -130,6 +132,7 @@ class OffreFormationService extends AbstractEntityService
    }



    public function getNeepEtape($etape)
    {
        $niveaux  = [];
@@ -179,6 +182,7 @@ class OffreFormationService extends AbstractEntityService
    }



    /**
     * @return array
     */
@@ -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          = [];
@@ -220,22 +224,22 @@ class OffreFormationService extends AbstractEntityService
        }

        foreach ($etapes as $v) {

            /*if (!$v->isFromSourceOse()) {
                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';
            } else {
                $offresComplementaires[$v->getId()]['reconduction'] = 'non';
            }
        }

        $elementResultat = [];
        foreach ($elements as $v) {

            /*if (!$v->getEtape()->isFromSourceOse()) {
            if ($v->getSource() != $source) {
                continue;
            }*/

            }
            $etapeId = $v->getEtape()->getId();

            if (!in_array($v->getCode(), $codesElementN1)) {
@@ -252,6 +256,7 @@ class OffreFormationService extends AbstractEntityService
    }



    public function createMappingEtapeNEtapeN1($etapesN, $etapesN1)
    {
        $codesEtapeN  = [];
+1 −1
Changes for module/Application/view/application/offre-formation/reconduction.phtml: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -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') {