You are here

public function ShortAnswerQuestion::validateNode in Quiz 7.5

Same name and namespace in other branches
  1. 6.4 question_types/short_answer/short_answer.classes.inc \ShortAnswerQuestion::validateNode()
  2. 7.6 question_types/short_answer/short_answer.classes.inc \ShortAnswerQuestion::validateNode()
  3. 7 question_types/short_answer/short_answer.classes.inc \ShortAnswerQuestion::validateNode()
  4. 7.4 question_types/short_answer/short_answer.classes.inc \ShortAnswerQuestion::validateNode()

Implementation of validateNode().

Overrides QuizQuestion::validateNode

See also

QuizQuestion::validateNode()

File

question_types/short_answer/short_answer.classes.inc, line 54
Short answer classes.

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.'));
  }
}