plugin/exo/Manager/AttemptManager.php
public function canUpdate(Paper $paper, User $user = null)
    {
        return empty($paper->getEnd())
            && $user === $paper->getUser();
    }
public function canUpdate(Paper $paper, User $user = null)
    {
        return empty($paper->getEnd())
            && $user === $paper->getUser();
    }
public function canUpdate ( Paper $ paper , User $ user = null ) { return empty ( $ paper -> getEnd ( ) ) && $ user === $ paper -> getUser ( ) ; }
Checks if a user can submit answers to a paper or use hints.

A user can submit to a paper only if it is its own and the paper is not closed (= no end).
ATTENTION : As is, anonymous have access to all the other anonymous Papers !!!

@param Paper $paper
@param User  $user

@return bool
Checks if a user can submit answers to a paper or use hints .