public function MatchingResponse::isValid in Quiz 8.4
Implementation of isValid
Overrides QuizQuestionResponse::isValid
See also
QuizQuestionResponse#isValid()
File
- question_types/
matching/ lib/ Drupal/ matching/ MatchingResponse.php, line 38
Class
- MatchingResponse
- Extension of QuizQuestionResponse
Namespace
Drupal\matchingCode
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.');
}