You are here

function long_answer_config_validate in Quiz 8.4

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.5 question_types/quiz_long_answer/quiz_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_config in question_types/long_answer/long_answer.module
Implements hook_config().

File

question_types/long_answer/long_answer.module, line 80
This module defines a long answer question type for quizzes.

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', $form_state, t('The default max score must be greater than 0'));
  }
}