You are here

public function LongAnswerQuestion::getAnsweringFormValidate in Quiz 7.6

Same name and namespace in other branches
  1. 7.5 question_types/long_answer/long_answer.classes.inc \LongAnswerQuestion::getAnsweringFormValidate()

Question response validator.

Overrides QuizQuestion::getAnsweringFormValidate

File

question_types/long_answer/long_answer.classes.inc, line 149
Long answer classes.

Class

LongAnswerQuestion
Extension of QuizQuestion.

Code

public function getAnsweringFormValidate(array &$form, array &$form_state = NULL) {
  if ($form_state['values']['question'][$this->node->nid] == '') {
    form_set_error('', t('You must provide an answer.'));
  }
}