plugin/drop-zone/Controller/API/DropController.php
public function submitAction(Drop $drop, User $user)
    {
        $dropzone = $drop->getDropzone();
        $this->checkPermission('OPEN', $dropzone->getResourceNode(), [], true);
        $this->checkDropEdition($drop, $user);

        try {
            $this->manager->submitDrop($drop, $user);
            $progression = $dropzone->isPeerReview() ? 50 : 100;
            $this->manager->updateDropProgression($dropzone, $drop, $progression);

            return new JsonResponse($this->manager->serializeDrop($drop));
        } catch (\Exception $e) {
            return new JsonResponse($e->getMessage(), 422);
        }
    }
public function submitAction(Drop $drop, User $user)
    {
        $dropzone = $drop->getDropzone();
        $this->checkPermission('OPEN', $dropzone->getResourceNode(), [], true);
        $this->checkDropEdition($drop, $user);

        try {
            $this->manager->submitDrop($drop, $user);
            $progression = $dropzone->isPeerReview() ? 50 : 100;
            $this->manager->updateDropProgression($dropzone, $drop, $progression);

            return new JsonResponse($this->manager->serializeDrop($drop));
        } catch (\Exception $e) {
            return new JsonResponse($e->getMessage(), 422);
        }
    }
public function submitAction ( Drop $ drop , User $ user ) { $ dropzone = $ drop -> getDropzone ( ) ; $ this -> checkPermission ( 'OPEN' , $ dropzone -> getResourceNode ( ) , [ ] , true ) ; $ this -> checkDropEdition ( $ drop , $ user ) ; try { $ this -> manager -> submitDrop ( $ drop , $ user ) ; $ progression = $ dropzone -> isPeerReview ( ) ? 50 : 100 ; $ this -> manager -> updateDropProgression ( $ dropzone , $ drop , $ progression ) ; return new JsonResponse ( $ this -> manager -> serializeDrop ( $ drop ) ) ; } catch ( \ Exception $ e ) { return new JsonResponse ( $ e -> getMessage ( ) , 422 ) ; } }
Submits Drop.

@EXT\Route("/drop/{id}/submit", name="claro_dropzone_drop_submit")
@EXT\Method("PUT")
@EXT\ParamConverter(
"drop",
class="ClarolineDropZoneBundle:Drop",
options={"mapping": {"id": "uuid"}}
)
@EXT\ParamConverter("user", converter="current_user", options={"allowAnonymous"=false})

@param Drop $drop
@param User $user

@return JsonResponse
Submits Drop .