plugin/exo/Manager/Attempt/PaperManager.php
public function calculateScore(Paper $paper, $base = null)
    {
        $score = $this->repository->findScore($paper);
        if (!empty($base) && $base > 0) {
            $scoreTotal = $this->calculateTotal($paper);
            if ($scoreTotal && $scoreTotal !== $base) {
                $score = ($score / $scoreTotal) * $base;
            }
        }

        return $score;
    }
public function calculateScore(Paper $paper, $base = null)
    {
        $score = $this->repository->findScore($paper);
        if (!empty($base) && $base > 0) {
            $scoreTotal = $this->calculateTotal($paper);
            if ($scoreTotal && $scoreTotal !== $base) {
                $score = ($score / $scoreTotal) * $base;
            }
        }

        return $score;
    }
public function calculateScore ( Paper $ paper , $ base = null ) { $ score = $ this -> repository -> findScore ( $ paper ) ; if ( ! empty ( $ base ) && $ base > 0 ) { $ scoreTotal = $ this -> calculateTotal ( $ paper ) ; if ( $ scoreTotal && $ scoreTotal !== $ base ) { $ score = ( $ score / $ scoreTotal ) * $ base ; } } return $ score ; }
Calculates the score of a Paper.

@param Paper $paper
@param float $base

@return float
Calculates the score of a Paper .