function advpoll_ranking_results_page in Advanced Poll 7
Same name and namespace in other branches
- 7.3 advpoll_ranking/advpoll_ranking.module \advpoll_ranking_results_page()
- 7.2 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 104
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);
}
else {
if ($data->behavior == 'runoff') {
$results = advpoll_display_runoff_results($node->nid, $data);
}
else {
$results = advpoll_display_results($node->nid, $data);
}
}
return $results;
}