function advpoll_ranking_results_page in Advanced Poll 7.3
Same name and namespace in other branches
- 7 advpoll_ranking/advpoll_ranking.module \advpoll_ranking_results_page()
- 7.2 advpoll_ranking/advpoll_ranking.module \advpoll_ranking_results_page()
Determines how to display the votes based on its type.
Parameters
$node: An advpoll node.
Return value
Returns poll display markup.
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 96
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' || $data->behavior == 'borda_all') {
$results = advpoll_display_borda_results($node->nid, $data, 1);
}
elseif ($data->behavior == 'runoff' || $data->behavior == 'runoff_all') {
$results = advpoll_display_runoff_results($node->nid, $data, 1);
}
else {
$results = advpoll_display_results($node->nid, $data, 1);
}
return $results;
}