plugin/exo/Manager/Attempt/PaperManager.php
public function serialize(Paper $paper, array $options = [])
    {
        // Adds user score if available and the method options do not already request it
        if (!in_array(Transfer::INCLUDE_USER_SCORE, $options)
            && $this->isScoreAvailable($paper->getExercise(), $paper)) {
            $options[] = Transfer::INCLUDE_USER_SCORE;
        }

        return $this->serializer->serialize($paper, $options);
    }
public function serialize(Paper $paper, array $options = [])
    {
        // Adds user score if available and the method options do not already request it
        if (!in_array(Transfer::INCLUDE_USER_SCORE, $options)
            && $this->isScoreAvailable($paper->getExercise(), $paper)) {
            $options[] = Transfer::INCLUDE_USER_SCORE;
        }

        return $this->serializer->serialize($paper, $options);
    }
public function serialize ( Paper $ paper , array $ options = [ ] ) { // Adds user score if available and the method options do not already request it if ( ! in_array ( Transfer :: INCLUDE_USER_SCORE , $ options ) && $ this -> isScoreAvailable ( $ paper -> getExercise ( ) , $ paper ) ) { $ options [ ] = Transfer :: INCLUDE_USER_SCORE ; } return $ this -> serializer -> serialize ( $ paper , $ options ) ; }
Serializes a user paper.

@param Paper $paper
@param array $options

@return array
Serializes a user paper .