You are here

public function ShortAnswerResponse::isValid in Quiz 6.4

Same name and namespace in other branches
  1. 7 question_types/short_answer/short_answer.classes.inc \ShortAnswerResponse::isValid()
  2. 7.4 question_types/short_answer/short_answer.classes.inc \ShortAnswerResponse::isValid()

Implementation of isValid

Overrides QuizQuestionResponse::isValid

See also

QuizQuestionResponse#isValid()

File

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

Class

ShortAnswerResponse
Extension of QuizQuestionResponse

Code

public function isValid() {
  if (trim($this->answer) == '') {
    return t('You must provide an answer');
  }
  return TRUE;
}