You are here

function advpoll_ranking_results_page in Advanced Poll 7.2

Same name and namespace in other branches
  1. 7.3 advpoll_ranking/advpoll_ranking.module \advpoll_ranking_results_page()
  2. 7 advpoll_ranking/advpoll_ranking.module \advpoll_ranking_results_page()
1 string reference to 'advpoll_ranking_results_page'
advpoll_ranking_menu_alter in advpoll_ranking/advpoll_ranking.module
Implements hook_menu_alter().

File

advpoll_ranking/advpoll_ranking.module, line 115

Code

function advpoll_ranking_results_page($node) {
  drupal_add_css(drupal_get_path('module', 'advpoll') . '/css/advpoll.css', array(
    'group' => CSS_DEFAULT,
    'every_page' => TRUE,
  ));
  drupal_set_title(check_plain($node->title));
  $data = advpoll_get_data($node);
  if ($data->behavior == 'borda') {
    $results = advpoll_display_borda_results($node->nid, $data);
  }
  elseif ($data->behavior == 'runoff') {
    $results = advpoll_display_runoff_results($node->nid, $data);
  }
  else {
    $results = advpoll_display_results($node->nid, $data);
  }
  return $results;
}