Commit c8009d21 authored by Jean-Baptiste Oellers's avatar Jean-Baptiste Oellers
Browse files

Ajout passage étape suivante

parent 98dd9989
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -24,9 +24,13 @@ class ConventionModeleInstanceController extends AbstractOscarController impleme
        if ($this->params()->fromPost('action') == "enregistrer_reponse") {
            $this->conventionModeleInstanceService->enregitrerRéponse($conventionModeleInstance, $this->params()->fromQuery('question', ''), $this->params()->fromQuery('reponse', ''), $this->getCurrentPerson());

            if ($conventionModeleInstance->conventionModeleEtapeEnCours->conventionModeleEtapeSuivante != NULL) {
                $conventionModeleInstance->conventionModeleEtapeEnCours = $conventionModeleInstance->conventionModeleEtapeEnCours->conventionModeleEtapeSuivante;
            } else {
                $this->créerActivité($conventionModeleInstance->conventionModeleEtapeEnCours);

                $conventionModeleInstance->conventionModeleEtapeEnCours = NULL;
            }
            
            $conventionModeleInstance->updatedBy = $this->getCurrentPerson();
            $conventionModeleInstance->dateUpdated = new \DateTime();
            $this->getEntityManager()->flush();