You are here

function advpoll_ranking_process_results in Advanced Poll 7

Same name and namespace in other branches
  1. 7.3 advpoll_ranking/advpoll_ranking.module \advpoll_ranking_process_results()
  2. 7.2 advpoll_ranking/advpoll_ranking.module \advpoll_ranking_process_results()
1 call to advpoll_ranking_process_results()
advpoll_ranking_submit in advpoll_ranking/advpoll_ranking.module

File

advpoll_ranking/advpoll_ranking.module, line 427

Code

function advpoll_ranking_process_results($results, $choices, $votes) {
  foreach ($results as $key => $result) {
    if ($result) {
      $votes[] = array(
        'rank' => $result,
        'id' => $choices[$key]['choice_id'],
      );
    }
  }
  return $votes;
}