/**
  * Ajax call for unlocking step.
  *
  * @Route(
  *     "unlockstep/{step}/user/{user}",
  *     name="innova_path_unlock_step",
  *     options={"expose"=true}
  * )
  * @Method("GET")
  *
  * @return \Symfony\Component\HttpFoundation\JsonResponse
  */
 public function unlockStep(Step $step, User $user)
 {
     $userIds = [$user->getId()];
     //create an event, and pass parameters
     $event = new LogStepUnlockDoneEvent($step, $userIds);
     //send the event to the event dispatcher
     $this->eventDispatcher->dispatch('log', $event);
     //update lockedcall value : set to true = called
     $progression = $this->userProgressionManager->updateLockedState($user, $step, false, false, true, 'unseen');
     //return response
     return new JsonResponse($progression);
 }