You are here

function long_answer_config_validate in Quiz 8.5

Same name and namespace in other branches
  1. 8.6 question_types/quiz_long_answer/quiz_long_answer.module \long_answer_config_validate()
  2. 8.4 question_types/long_answer/long_answer.module \long_answer_config_validate()
  3. 7.6 question_types/long_answer/long_answer.module \long_answer_config_validate()
  4. 7.4 question_types/long_answer/long_answer.module \long_answer_config_validate()
  5. 7.5 question_types/long_answer/long_answer.module \long_answer_config_validate()

Validate the long_answer config form values.

1 string reference to 'long_answer_config_validate'
long_answer_quiz_question_config in question_types/quiz_long_answer/quiz_long_answer.module
Implements hook_quiz_question_config().

File

question_types/quiz_long_answer/quiz_long_answer.module, line 43
Long_answer question type for the Quiz module.

Code

function long_answer_config_validate($form, $form_state) {
  if ($form_state['values']['long_answer_default_max_score'] <= 0) {
    form_set_error('long_answer_default_max_score', t('The default max score must be greater than 0'));
  }
}