/**
  * Display dashboard for path of users.
  *
  * @Route(
  *     "/userpath/{id}",
  *     name         = "innova_path_manage_results",
  *     requirements = {"id" = "\d+"},
  *     options      = {"expose" = true}
  * )
  * @Method("GET")
  * @ParamConverter("path", class="InnovaPathBundle:Path\Path", options={"id" = "id"})
  * @Template("InnovaPathBundle::manageResults.html.twig")
  */
 public function displayStepUnlockAction(Path $path)
 {
     //prevent direct access
     $this->pathManager->checkAccess('EDIT', $path);
     $data = [];
     $workspace = $path->getWorkspace();
     //retrieve users having access to the WS
     //TODO Optimize
     $users = $this->om->getRepository('ClarolineCoreBundle:User')->findUsersByWorkspace($workspace);
     $userdata = [];
     //for all users in the WS
     foreach ($users as $user) {
         //get their progression
         $userdata[] = ['user' => $user, 'progression' => $this->pathManager->getUserProgression($path, $user), 'locked' => $this->pathManager->getPathLockedProgression($path)];
     }
     $data = ['path' => $path, 'userdata' => $userdata];
     return ['_resource' => $path, 'workspace' => $workspace, 'data' => $data];
 }