You are here

public function TrueFalseResponse::isValid in Quiz 6.4

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

Implementation of isValid

Overrides QuizQuestionResponse::isValid

See also

QuizQuestionResponse#isValid()

File

question_types/truefalse/truefalse.classes.inc, line 230
Defines the classes necessary for a True/False quiz.

Class

TrueFalseResponse
Extension of QuizQuestionResponse

Code

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