public function ScaleResponse::isValid in Quiz 7
Same name and namespace in other branches
- 6.4 question_types/scale/scale.classes.inc \ScaleResponse::isValid()
- 7.4 question_types/scale/scale.classes.inc \ScaleResponse::isValid()
Validates response from a quiz taker. If the response isn't valid the quiz taker won't be allowed to proceed.
Return value
True if the response is valid. False otherwise
Overrides QuizQuestionResponse::isValid
1 call to ScaleResponse::isValid()
- ScaleResponse::score in question_types/
scale/ scale.classes.inc - Implementation of score
File
- question_types/
scale/ scale.classes.inc, line 567 - The main classes for the scale question type.
Class
- ScaleResponse
- Extension of QuizQuestionResponse
Code
public function isValid() {
if (empty($this->answer_id)) {
return t('You must provide an answer');
}
return TRUE;
}