public function MultichoiceQuestion::getAnsweringFormValidate in Quiz 7.5
Same name and namespace in other branches
- 7.6 question_types/multichoice/multichoice.classes.inc \MultichoiceQuestion::getAnsweringFormValidate()
Question response validator.
Overrides QuizQuestion::getAnsweringFormValidate
File
- question_types/
multichoice/ multichoice.classes.inc, line 786 - Multichoice classes.
Class
- MultichoiceQuestion
- Extension of QuizQuestion.
Code
public function getAnsweringFormValidate(array &$element, &$values) {
if (!$this->node->choice_multi && is_null($values['user_answer'])) {
form_error($element['user_answer'], t('You must provide an answer.'));
}
}