You are here

public function ClozeQuestion::validateNode in Cloze 6

Same name and namespace in other branches
  1. 7 cloze.classes.inc \ClozeQuestion::validateNode()

Implementation of validateNode

See also

QuizQuestion#validateNode($form)

File

./cloze.classes.inc, line 38
The main classes for the short answer question type.

Class

ClozeQuestion
Extension of QuizQuestion.

Code

public function validateNode(array &$form) {
  if (substr_count($this->node->body, '[') !== substr_count($this->node->body, ']')) {
    form_set_error('body', t('Please check the question format.'));
  }
}