You are here

function quiz_view in Quiz 5

Same name and namespace in other branches
  1. 5.2 quiz.module \quiz_view()
  2. 6.6 quiz.module \quiz_view()
  3. 6.2 quiz.module \quiz_view()
  4. 6.3 quiz.module \quiz_view()
  5. 6.4 quiz.module \quiz_view()
  6. 6.5 quiz.module \quiz_view()
  7. 7.6 quiz.module \quiz_view()
  8. 7 quiz.module \quiz_view()
  9. 7.4 quiz.module \quiz_view()
  10. 7.5 quiz.module \quiz_view()

Implementation of hook_view().

File

./quiz.module, line 448
Quiz Module

Code

function quiz_view($node, $teaser = FALSE, $page = FALSE) {
  if (!$teaser) {
    $node = node_prepare($node, $teaser);
    if (user_access('create quiz') || user_access('administer quiz') || user_access(QUIZ_PERM_ADMIN_CONFIG)) {
      $theme = 'quiz_view';
    }
    else {
      $theme = 'quiz_availability';
    }
    $node->content['body']['#value'] .= theme($theme, $node, $teaser, $page);
  }
  return $node;
}