You are here

function multichoice_view in Quiz 5.2

Same name and namespace in other branches
  1. 5 multichoice.module \multichoice_view()
  2. 6.6 question_types/multichoice/multichoice.module \multichoice_view()
  3. 6.2 multichoice.module \multichoice_view()
  4. 6.3 question_types/multichoice/multichoice.module \multichoice_view()
  5. 6.5 question_types/multichoice/multichoice.module \multichoice_view()

Implementation of hook_view().

File

./multichoice.module, line 506
Multiple choice question type for the Quiz module.

Code

function multichoice_view(&$node, $teaser = FALSE, $page = FALSE) {
  if (!$teaser && user_access('create multichoice')) {
    $mynode = node_prepare($node, $teaser);
    $mynode->content['body'] = array(
      '#value' => multichoice_render_question($node),
    );
    return $mynode;
  }
  else {
    if ($teaser) {
      $mynode = node_prepare($node, $teaser);
      return $mynode;
    }
    else {
      drupal_access_denied();
    }
  }
}