Ejemplo n.º 1
0
 public function finishpaper(Paper $paper)
 {
     $this->paperManager->finishPaper($paper);
 }
Ejemplo n.º 2
0
 /**
  * Marks a paper as finished.
  *
  * @EXT\Route("/papers/{id}/end", name="exercise_finish_paper")
  * @EXT\Method("PUT")
  * @EXT\ParamConverter("user", converter="current_user", options={"allowAnonymous"=true})
  *
  * @param Paper $paper
  * @param User  $user
  *
  * @return JsonResponse
  */
 public function finishPaperAction(Paper $paper, User $user = null)
 {
     $this->assertHasPaperAccess($paper, $user);
     $this->paperManager->finishPaper($paper);
     return new JsonResponse($this->paperManager->exportPaper($paper), 200);
 }