public function ClozeQuestion::validateNode in Cloze 7
Same name and namespace in other branches
- 6 cloze.classes.inc \ClozeQuestion::validateNode()
Implementation of validateNode
See also
QuizQuestion#validateNode($form)
File
- ./
cloze.classes.inc, line 49 - The main classes for the cloze question type. These inherit or implement code found in quiz_question.classes.inc.
Class
- ClozeQuestion
- Extension of QuizQuestion.
Code
public function validateNode(array &$form) {
if (substr_count($this->node->body[LANGUAGE_NONE]['0']['value'], '[') !== substr_count($this->node->body[LANGUAGE_NONE]['0']['value'], ']')) {
form_set_error('body', t('Please check the question format.'));
}
}