plugin/result/Repository/MarkRepository.php
public function findByResult(Result $result)
    {
        $dql = '
            SELECT
                u.id,
                CONCAT(u.firstName, \' \', u.lastName) AS name,
                m.value AS mark,
                m.id AS markId
            FROM Claroline\ResultBundle\Entity\Mark m
            JOIN m.user u
            WHERE m.result = :result
            ORDER BY u.lastName ASC
        ';

        $query = $this->_em->createQuery($dql);
        $query->setParameter('result', $result);

        return $query->getArrayResult();
    }
public function findByResult(Result $result)
    {
        $dql = '
            SELECT
                u.id,
                CONCAT(u.firstName, \' \', u.lastName) AS name,
                m.value AS mark,
                m.id AS markId
            FROM Claroline\ResultBundle\Entity\Mark m
            JOIN m.user u
            WHERE m.result = :result
            ORDER BY u.lastName ASC
        ';

        $query = $this->_em->createQuery($dql);
        $query->setParameter('result', $result);

        return $query->getArrayResult();
    }
public function findByResult ( Result $ result ) { $ dql = '
            SELECT
                u.id,
                CONCAT(u.firstName, \' \', u.lastName) AS name,
                m.value AS mark,
                m.id AS markId
            FROM Claroline\ResultBundle\Entity\Mark m
            JOIN m.user u
            WHERE m.result = :result
            ORDER BY u.lastName ASC
        ' ; $ query = $ this -> _em -> createQuery ( $ dql ) ; $ query -> setParameter ( 'result' , $ result ) ; return $ query -> getArrayResult ( ) ; }
Returns an array representation of the marks associated
with a given result.

@param Result $result

@return array
Returns an array representation of the marks associated with a given result .