public function ShortAnswerResponse::isValid in Quiz 7
Same name and namespace in other branches
- 6.4 question_types/short_answer/short_answer.classes.inc \ShortAnswerResponse::isValid()
- 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 356 - 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;
}