function quiz_admin_node_form_submit in Quiz 7
Same name and namespace in other branches
- 8.4 quiz.admin.inc \quiz_admin_node_form_submit()
- 6.4 quiz.admin.inc \quiz_admin_node_form_submit()
- 7.6 quiz.admin.inc \quiz_admin_node_form_submit()
- 7.4 quiz.admin.inc \quiz_admin_node_form_submit()
- 7.5 quiz.admin.inc \quiz_admin_node_form_submit()
Submit function for quiz_admin_node_form
The default values are saved as the user settings for the "default user" The default user is created when quiz is installed. He has a unique uid, but doesn't exist as a real user.
Why? Default user settings can be loaded and saved using the same code and database tables as any other user settings, making the code a lot easier to maintain. Ref: http://en.wikipedia.org/wiki/Don%27t_repeat_yourself
1 string reference to 'quiz_admin_node_form_submit'
- quiz_admin_node_form in ./
quiz.admin.inc - Renders the quiz node form for the admin pages
File
- ./
quiz.admin.inc, line 326 - Administrator interface for Quiz module.
Code
function quiz_admin_node_form_submit($form, &$form_state) {
// We add the uid for the "default user"
$form_state['values']['save_def_uid'] = variable_get('quiz_def_uid', NULL);
$form_state['values']['nid'] = 0;
$form_state['values']['vid'] = 0;
_quiz_save_user_settings($form_state['values']);
}