function multichoice_view in Quiz 5
Same name and namespace in other branches
- 5.2 multichoice.module \multichoice_view()
- 6.6 question_types/multichoice/multichoice.module \multichoice_view()
- 6.2 multichoice.module \multichoice_view()
- 6.3 question_types/multichoice/multichoice.module \multichoice_view()
- 6.5 question_types/multichoice/multichoice.module \multichoice_view()
Implementation of hook_view().
File
- ./
multichoice.module, line 294 - Multiple choice question type for quiz module
Code
function multichoice_view(&$node, $teaser = FALSE, $page = FALSE) {
if (user_access('create multichoice')) {
if (!$teaser) {
$mynode = node_prepare($node, $teaser);
$mynode->content['body'] = array(
'#value' => multichoice_render_question($node),
);
return $mynode;
//$node->body = multichoice_render_question($node);
}
}
else {
if ($teaser) {
$mynode = node_prepare($node, $teaser);
return $mynode;
//$node->teaser = t('This is a quiz question, not to be viewed independently.');
//$node->body = $node->teaser; // we do not need Read more...
}
else {
drupal_access_denied();
}
}
}