function quiz_settings_form_validate in Quiz 7.6
Same name and namespace in other branches
- 5.2 quiz.module \quiz_settings_form_validate()
- 5 quiz.module \quiz_settings_form_validate()
- 6.6 quiz.admin.inc \quiz_settings_form_validate()
- 6.2 quiz.admin.inc \quiz_settings_form_validate()
- 6.3 quiz.admin.inc \quiz_settings_form_validate()
- 6.4 quiz.admin.inc \quiz_settings_form_validate()
- 6.5 quiz.admin.inc \quiz_settings_form_validate()
- 7 quiz.admin.inc \quiz_settings_form_validate()
- 7.4 quiz.admin.inc \quiz_settings_form_validate()
- 7.5 quiz.admin.inc \quiz_settings_form_validate()
Validation of the Form Settings form.
Checks the values for the form administration form for quiz settings.
1 string reference to 'quiz_settings_form_validate'
- quiz_admin_settings in ./
quiz.admin.inc - This builds the main settings form for the quiz module.
File
- ./
quiz.admin.inc, line 231 - Administrator interface for Quiz module.
Code
function quiz_settings_form_validate($form, &$form_state) {
if (!_quiz_is_int($form_state['values']['quiz_default_close'])) {
form_set_error('quiz_default_close', t('The default number of days before a quiz is closed must be a number greater than 0.'));
}
if (!_quiz_is_int($form_state['values']['quiz_autotitle_length'], 0, 128)) {
form_set_error('quiz_autotitle_length', t('The autotitle length value must be an integer between 0 and 128.'));
}
if (!_quiz_is_int($form_state['values']['quiz_max_result_options'], 0, 100)) {
form_set_error('quiz_max_result_options', t('The number of resultoptions must be an integer between 0 and 100.'));
}
if (!_quiz_is_plain($form_state['values']['quiz_name'])) {
form_set_error('quiz_name', t('The quiz name must be plain text.'));
}
/* if (!_quiz_is_plain($form_state['values']['quiz_action_type']))
form_set_error('quiz_action_type', t('The action type must be plain text.')); */
}