function multichoice_submit in Quiz 5.2
Same name and namespace in other branches
- 6.2 multichoice.module \multichoice_submit()
Implementation of hook_submit().
File
- ./
multichoice.module, line 354 - Multiple choice question type for the Quiz module.
Code
function multichoice_submit(&$node) {
if (!user_access('allow user titles') || empty($node->title)) {
// User is not allowed to set a title or they left it blank, so make one for them.
$node->title = theme('multichoice_generate_title', $node);
}
if (!user_access('allow multiple correct answers')) {
// Convert the select box to the old checkbox.
$node->answers[$node->correct]['correct'] = TRUE;
}
}