You are here

public function QuizfileuploadResponse::getReportFormScore in Quiz File Upload 7.4

Implements getReportFormScore().

See also

QuizQuestionResponse#getReportFormScore($showpoints, $showfeedback, $allow_scoring)

File

./quizfileupload.classes.inc, line 386
The main classes for the quizfileupload question type.

Class

QuizfileuploadResponse
Extension of QuizQuestionResponse

Code

public function getReportFormScore($showfeedback = TRUE, $showpoints = TRUE, $allow_scoring = FALSE) {
  $node = node_load($this->question->nid);
  $score = $this
    ->isEvaluated() ? $this
    ->getScore() : '?';
  if (quiz_access_to_score() && $allow_scoring && $node->correct_answer_evaluation == 1) {
    return array(
      '#type' => 'textfield',
      '#default_value' => $score,
      '#size' => 3,
      '#maxlength' => 3,
      '#attributes' => array(
        'class' => array(
          'quiz-report-score',
        ),
      ),
    );
  }
  else {
    return array(
      '#markup' => $score,
    );
  }
}