plugin/exo/Serializer/ExerciseSerializer.php
private function serializeParameters(Exercise $exercise)
    {
        $parameters = [
            'type' => $exercise->getType(),
            'maxAttempts' => $exercise->getMaxAttempts(),
            'maxAttemptsPerDay' => $exercise->getMaxAttemptsPerDay(),
            'maxPapers' => $exercise->getMaxPapers(),
            'showFeedback' => $exercise->getShowFeedback(),
            'progressionDisplayed' => $exercise->isProgressionDisplayed(),
            'timeLimited' => $exercise->isTimeLimited(), // todo : remove me
            'duration' => $exercise->getDuration(),
            'anonymizeAttempts' => $exercise->getAnonymizeAttempts(),
            'interruptible' => $exercise->isInterruptible(),
            'numbering' => $exercise->getNumbering(),
            'mandatoryQuestions' => $exercise->getMandatoryQuestions(),
            'answersEditable' => $exercise->isAnswersEditable(),
            'showOverview' => $exercise->getShowOverview(),
            'showEndConfirm' => $exercise->getShowEndConfirm(),
            'showEndPage' => $exercise->getShowEndPage(),
            'endNavigation' => $exercise->hasEndNavigation(),
            'showMetadata' => $exercise->isMetadataVisible(),
            'showStatistics' => $exercise->hasStatistics(),
            'allPapersStatistics' => $exercise->isAllPapersStatistics(),
            'showFullCorrection' => !$exercise->isMinimalCorrection(),
            'showScoreAt' => $exercise->getMarkMode(),
            'showCorrectionAt' => $exercise->getCorrectionMode(),
            'successMessage' => $exercise->getSuccessMessage(),
            'failureMessage' => $exercise->getFailureMessage(),
            'totalScoreOn' => $exercise->getTotalScoreOn(),
            'successScore' => $exercise->getSuccessScore(),
            'correctionDate' => $exercise->getDateCorrection() ? DateNormalizer::normalize($exercise->getDateCorrection()) : null,
        ];

        if (!empty($exercise->getEndMessage())) {
            $parameters['endMessage'] = $exercise->getEndMessage();
        }

        return $parameters;
    }
private function serializeParameters(Exercise $exercise)
    {
        $parameters = [
            'type' => $exercise->getType(),
            'maxAttempts' => $exercise->getMaxAttempts(),
            'maxAttemptsPerDay' => $exercise->getMaxAttemptsPerDay(),
            'maxPapers' => $exercise->getMaxPapers(),
            'showFeedback' => $exercise->getShowFeedback(),
            'progressionDisplayed' => $exercise->isProgressionDisplayed(),
            'timeLimited' => $exercise->isTimeLimited(), // todo : remove me
            'duration' => $exercise->getDuration(),
            'anonymizeAttempts' => $exercise->getAnonymizeAttempts(),
            'interruptible' => $exercise->isInterruptible(),
            'numbering' => $exercise->getNumbering(),
            'mandatoryQuestions' => $exercise->getMandatoryQuestions(),
            'answersEditable' => $exercise->isAnswersEditable(),
            'showOverview' => $exercise->getShowOverview(),
            'showEndConfirm' => $exercise->getShowEndConfirm(),
            'showEndPage' => $exercise->getShowEndPage(),
            'endNavigation' => $exercise->hasEndNavigation(),
            'showMetadata' => $exercise->isMetadataVisible(),
            'showStatistics' => $exercise->hasStatistics(),
            'allPapersStatistics' => $exercise->isAllPapersStatistics(),
            'showFullCorrection' => !$exercise->isMinimalCorrection(),
            'showScoreAt' => $exercise->getMarkMode(),
            'showCorrectionAt' => $exercise->getCorrectionMode(),
            'successMessage' => $exercise->getSuccessMessage(),
            'failureMessage' => $exercise->getFailureMessage(),
            'totalScoreOn' => $exercise->getTotalScoreOn(),
            'successScore' => $exercise->getSuccessScore(),
            'correctionDate' => $exercise->getDateCorrection() ? DateNormalizer::normalize($exercise->getDateCorrection()) : null,
        ];

        if (!empty($exercise->getEndMessage())) {
            $parameters['endMessage'] = $exercise->getEndMessage();
        }

        return $parameters;
    }
private function serializeParameters ( Exercise $ exercise ) { $ parameters = [ 'type' => $ exercise -> getType ( ) , 'maxAttempts' => $ exercise -> getMaxAttempts ( ) , 'maxAttemptsPerDay' => $ exercise -> getMaxAttemptsPerDay ( ) , 'maxPapers' => $ exercise -> getMaxPapers ( ) , 'showFeedback' => $ exercise -> getShowFeedback ( ) , 'progressionDisplayed' => $ exercise -> isProgressionDisplayed ( ) , 'timeLimited' => $ exercise -> isTimeLimited ( ) , // todo : remove me 'duration' => $ exercise -> getDuration ( ) , 'anonymizeAttempts' => $ exercise -> getAnonymizeAttempts ( ) , 'interruptible' => $ exercise -> isInterruptible ( ) , 'numbering' => $ exercise -> getNumbering ( ) , 'mandatoryQuestions' => $ exercise -> getMandatoryQuestions ( ) , 'answersEditable' => $ exercise -> isAnswersEditable ( ) , 'showOverview' => $ exercise -> getShowOverview ( ) , 'showEndConfirm' => $ exercise -> getShowEndConfirm ( ) , 'showEndPage' => $ exercise -> getShowEndPage ( ) , 'endNavigation' => $ exercise -> hasEndNavigation ( ) , 'showMetadata' => $ exercise -> isMetadataVisible ( ) , 'showStatistics' => $ exercise -> hasStatistics ( ) , 'allPapersStatistics' => $ exercise -> isAllPapersStatistics ( ) , 'showFullCorrection' => ! $ exercise -> isMinimalCorrection ( ) , 'showScoreAt' => $ exercise -> getMarkMode ( ) , 'showCorrectionAt' => $ exercise -> getCorrectionMode ( ) , 'successMessage' => $ exercise -> getSuccessMessage ( ) , 'failureMessage' => $ exercise -> getFailureMessage ( ) , 'totalScoreOn' => $ exercise -> getTotalScoreOn ( ) , 'successScore' => $ exercise -> getSuccessScore ( ) , 'correctionDate' => $ exercise -> getDateCorrection ( ) ? DateNormalizer :: normalize ( $ exercise -> getDateCorrection ( ) ) : null , ] ; if ( ! empty ( $ exercise -> getEndMessage ( ) ) ) { $ parameters [ 'endMessage' ] = $ exercise -> getEndMessage ( ) ; } return $ parameters ; }
Serializes Exercise parameters.

@param Exercise $exercise

@return array
Serializes Exercise parameters .