function quiz_start_quiz_button_form in Quiz 7
Same name and namespace in other branches
- 8.4 quiz.module \quiz_start_quiz_button_form()
- 6.4 quiz.module \quiz_start_quiz_button_form()
- 7.4 quiz.module \quiz_start_quiz_button_form()
Helper function for hook_view().
Returns a button to use as a link to start taking the quiz.
Parameters
$form_state: Form state array.
$node: The quiz node.
Return value
Form with a button linking to the take tab.
1 string reference to 'quiz_start_quiz_button_form'
- quiz_view in ./
quiz.module
File
- ./
quiz.module, line 960 - Quiz Module
Code
function quiz_start_quiz_button_form($form, &$form_state, $node) {
$form = array();
$form['#action'] = url("node/{$node->nid}/take");
$form['button'] = array(
'#type' => 'button',
'#value' => t('Start quiz'),
);
return $form;
}