public function ShortAnswerQuestion::validateNode in Quiz 7
Same name and namespace in other branches
- 6.4 question_types/short_answer/short_answer.classes.inc \ShortAnswerQuestion::validateNode()
- 7.6 question_types/short_answer/short_answer.classes.inc \ShortAnswerQuestion::validateNode()
- 7.4 question_types/short_answer/short_answer.classes.inc \ShortAnswerQuestion::validateNode()
- 7.5 question_types/short_answer/short_answer.classes.inc \ShortAnswerQuestion::validateNode()
Implementation of validateNode
Overrides QuizQuestion::validateNode
See also
QuizQuestion#validateNode($form)
File
- question_types/
short_answer/ short_answer.classes.inc, line 64 - The main classes for the short answer question type.
Class
- ShortAnswerQuestion
- Extension of QuizQuestion.
Code
public function validateNode(array &$form) {
if ($this->node->correct_answer_evaluation != self::ANSWER_MANUAL && empty($this->node->correct_answer)) {
form_set_error('correct_answer', t('An answer must be specified for any evaluation type other than manual scoring.'));
}
}