Commit 4eab2db2 authored by Antony Le Courtes's avatar Antony Le Courtes
Browse files

Correction ticket #25514

Faire remonter les ep d'une VET appartenant à une autre composante.
parent cf2d326a
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -144,6 +144,7 @@ class ElementPedagogiqueController extends AbstractController
        $found = $this->getServiceElementPedagogique()->getSearchResultByTerm($params, $term === null ? 'ep.code' : 'gtf.ordre, e.niveau, ep.code');

        $result = [];
        $codeIteration = [];
        foreach ($found as $item) {
            if (null === $term) {
                if (0 === strpos($item['LIBELLE'], $item['CODE'])) {
@@ -157,6 +158,13 @@ class ElementPedagogiqueController extends AbstractController
                    'extra' => $item['LIBELLE_PE'] ?: '',
                ];
            } else {
                $label = $item['CODE'] . ' ' . $item['LIBELLE'];
                if(in_array($label, $codeIteration))
                {
                    continue;
                }
                $codeIteration[] = $item['CODE'] . ' ' . $item['LIBELLE'];

                if ($item['NB_CH'] > 1) {
                    $item['LIBELLE_ETAPE'] = 'Enseignement commun à plusieurs parcours';
                }
+1 −1
Original line number Diff line number Diff line
@@ -140,7 +140,7 @@ select * from (
    JOIN etape e ON cp.etape_id = e.id
    JOIN TYPE_FORMATION tf on e.TYPE_FORMATION_ID = tf.ID
    JOIN GROUPE_TYPE_FORMATION gtf on tf.GROUPE_ID = gtf.ID
    JOIN structure s ON ep.structure_id = s.id
    JOIN structure s ON e.structure_id = s.id
    LEFT JOIN periode pe ON ep.periode_id = pe.id
  where
    (cp.histo_destruction IS NULL$orCp)