You are here

function short_answer_config_validate in Quiz 7.6

Same name and namespace in other branches
  1. 8.6 question_types/quiz_short_answer/quiz_short_answer.module \short_answer_config_validate()
  2. 8.4 question_types/short_answer/short_answer.module \short_answer_config_validate()
  3. 8.5 question_types/quiz_short_answer/quiz_short_answer.module \short_answer_config_validate()
  4. 7.4 question_types/short_answer/short_answer.module \short_answer_config_validate()
  5. 7.5 question_types/short_answer/short_answer.module \short_answer_config_validate()

Validate the long_answer config form values

1 string reference to 'short_answer_config_validate'
short_answer_quiz_question_config in question_types/short_answer/short_answer.module
Implements hook_quiz_question_config().

File

question_types/short_answer/short_answer.module, line 94
The main file for short_answer.

Code

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