You are here

public function ShortAnswerResponse::getReportFormAnswerFeedback in Quiz 6.4

Same name and namespace in other branches
  1. 7.6 question_types/short_answer/short_answer.classes.inc \ShortAnswerResponse::getReportFormAnswerFeedback()
  2. 7.4 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 478
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' => 'textarea',
      '#default_value' => $this->answer_feedback,
      '#attributes' => array(
        'class' => 'quiz-report-score',
      ),
    );
  }
  return FALSE;
}