function riddler_settings_submit in Captcha Riddler 6
Same name and namespace in other branches
- 7 riddler.module \riddler_settings_submit()
1 string reference to 'riddler_settings_submit'
File
- ./
riddler.module, line 134 - Adds a question and answer type to the Captcha module.
Code
function riddler_settings_submit($form, &$form_state) {
variable_set('riddler_weight', $form_state['values']['riddler_weight']);
$i = 0;
$number = 0;
while (array_key_exists('riddler_question_' . $i, $form_state['values'])) {
if ($form_state['values']['riddler_question_' . $i] != '') {
variable_set('riddler_question_' . $number, $form_state['values']['riddler_question_' . $i]);
variable_set('riddler_answer_' . $number, $form_state['values']['riddler_answer_' . $i]);
$number++;
}
$i++;
}
variable_set('riddler_number', $number);
}