You are here

public function MatchingResponse::isValid in Quiz 7

Same name and namespace in other branches
  1. 6.4 question_types/matching/matching.classes.inc \MatchingResponse::isValid()
  2. 7.4 question_types/matching/matching.classes.inc \MatchingResponse::isValid()

Implementation of isValid

Overrides QuizQuestionResponse::isValid

See also

QuizQuestionResponse#isValid()

File

question_types/matching/matching.classes.inc, line 387
matching.classes

Class

MatchingResponse
Extension of QuizQuestionResponse

Code

public function isValid() {
  foreach ($this->answer as $value) {
    if ($value != 'def') {
      return TRUE;
    }
  }
  return t('You need to match at least one of the items.');
}