function quiz_admin_node_form_validate in Quiz 7.6
Same name and namespace in other branches
- 8.4 quiz.admin.inc \quiz_admin_node_form_validate()
- 6.4 quiz.admin.inc \quiz_admin_node_form_validate()
- 7 quiz.admin.inc \quiz_admin_node_form_validate()
- 7.4 quiz.admin.inc \quiz_admin_node_form_validate()
- 7.5 quiz.admin.inc \quiz_admin_node_form_validate()
Validation function for the quiz_admin_node_form form
File
- ./
quiz.admin.inc, line 302 - Administrator interface for Quiz module.
Code
function quiz_admin_node_form_validate($form, &$form_state) {
// Create dummy node for quiz_validate
$dummy_node = new stdClass();
foreach ($form_state['values'] as $key => $value) {
$dummy_node->{$key} = $value;
}
$dummy_node->resultoptions = array();
// We use quiz_validate to validate the default values
quiz_validate($dummy_node);
}