You are here

public function ShortAnswerResponse::getReportFormAnswerFeedback in Quiz 7.4

Same name and namespace in other branches
  1. 6.4 question_types/short_answer/short_answer.classes.inc \ShortAnswerResponse::getReportFormAnswerFeedback()
  2. 7.6 question_types/short_answer/short_answer.classes.inc \ShortAnswerResponse::getReportFormAnswerFeedback()
  3. 7.5 question_types/short_answer/short_answer.classes.inc \ShortAnswerResponse::getReportFormAnswerFeedback()

Overrides QuizQuestionResponse::getReportFormAnswerFeedback

File

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

Class

ShortAnswerResponse
Extension of QuizQuestionResponse

Code

public function getReportFormAnswerFeedback($showpoints = TRUE, $showfeedback = TRUE, $allow_scoring = FALSE) {
  if (quiz_access_to_score() && $allow_scoring && $this->question->correct_answer_evaluation == ShortAnswerQuestion::ANSWER_MANUAL) {
    return array(
      '#title' => t('Enter feedback'),
      '#type' => 'text_format',
      '#default_value' => $this->answer_feedback,
      '#format' => isset($this->answer_feedback_format) ? $this->answer_feedback_format : NULL,
      '#attributes' => array(
        'class' => array(
          'quiz-report-score',
        ),
      ),
    );
  }
  return FALSE;
}