plugin/result/Manager/ResultManager.php
public function getMarks(Result $result, User $user, $canEdit)
    {
        $repo = $this->om->getRepository('ClarolineResultBundle:Mark');

        return $canEdit ?
            $repo->findByResult($result) :
            $repo->findByResultAndUser($result, $user);
    }
public function getMarks(Result $result, User $user, $canEdit)
    {
        $repo = $this->om->getRepository('ClarolineResultBundle:Mark');

        return $canEdit ?
            $repo->findByResult($result) :
            $repo->findByResultAndUser($result, $user);
    }
public function getMarks ( Result $ result , User $ user , $ canEdit ) { $ repo = $ this -> om -> getRepository ( 'ClarolineResultBundle:Mark' ) ; return $ canEdit ? $ repo -> findByResult ( $ result ) : $ repo -> findByResultAndUser ( $ result , $ user ) ; }
Returns an array representation of the marks associated with a
result. If the user passed in has the permission to edit the result,
all the marks are returned, otherwise only his mark is returned.

@param Result $result
@param User   $user
@param bool   $canEdit

@return array
Returns an array representation of the marks associated with a result . If the user passed in has the permission to edit the result all the marks are returned otherwise only his mark is returned .