You are here

public function ShortAnswerResponse::getReportFormValidate in Quiz 7

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

Implementation of getReportFormValidate

Overrides QuizQuestionResponse::getReportFormValidate

See also

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

File

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

Class

ShortAnswerResponse
Extension of QuizQuestionResponse

Code

public function getReportFormValidate($showfeedback = TRUE, $showpoints = TRUE, $allow_scoring = FALSE) {
  if (quiz_access_to_score() && $allow_scoring && $this->question->correct_answer_evaluation == ShortAnswerQuestion::ANSWER_MANUAL) {
    return $allow_scoring ? 'short_answer_report_validate' : FALSE;
  }
  return FALSE;
}