You are here

public function ShortAnswerResponse::getReportFormAnswerFeedback in Quiz 8.4

Overrides QuizQuestionResponse::getReportFormAnswerFeedback

File

question_types/short_answer/lib/Drupal/short_answer/ShortAnswerResponse.php, line 262
The main classes for the short answer response.

Class

ShortAnswerResponse
Extension of QuizQuestionResponse

Namespace

Drupal\short_answer

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' => array(
          'quiz-report-score',
        ),
      ),
    );
  }
  return FALSE;
}