You are here

public function ShortAnswerResponse::getFeedbackValues in Quiz 7.6

Same name and namespace in other branches
  1. 7.5 question_types/short_answer/short_answer.classes.inc \ShortAnswerResponse::getFeedbackValues()

Implementation of getReportFormResponse

Overrides QuizQuestionResponse::getFeedbackValues

File

question_types/short_answer/short_answer.classes.inc, line 438
The main classes for the short answer question type.

Class

ShortAnswerResponse
Extension of QuizQuestionResponse

Code

public function getFeedbackValues() {
  $data = array();
  $data[] = array(
    // Hide this column. Does not make sense for short answer as there are no choices.
    'choice' => NULL,
    'attempt' => $this->answer,
    'correct' => $this->question->answers[0]['is_correct'] ? quiz_icon('correct') : quiz_icon(''),
    'score' => !$this->evaluated ? t('This answer has not yet been scored.') : $this
      ->getScore(),
    'answer_feedback' => check_markup($this->answer_feedback, $this->answer_feedback_format),
    'solution' => $this->question->correct_answer,
  );
  return $data;
}