plugin/exo/Entity/Attempt/Paper.php
public function getAnswer($questionUuid)
    {
        $found = null;
        foreach ($this->answers as $answer) {
            if ($answer->getQuestionId() === $questionUuid) {
                $found = $answer;
                break;
            }
        }

        return $found;
    }
public function getAnswer($questionUuid)
    {
        $found = null;
        foreach ($this->answers as $answer) {
            if ($answer->getQuestionId() === $questionUuid) {
                $found = $answer;
                break;
            }
        }

        return $found;
    }
public function getAnswer ( $ questionUuid ) { $ found = null ; foreach ( $ this -> answers as $ answer ) { if ( $ answer -> getQuestionId ( ) === $ questionUuid ) { $ found = $ answer ; break ; } } return $ found ; }
Gets the answer to a question if any exist.

@param string $questionUuid

@return Answer
Gets the answer to a question if any exist .