// ... and display all
foreach ($amounts as $userid => $row) {
// Calculate and add percentage to data array
- $row['percents'] = $row['points'] / $totalPoints * 100;
+ $row['percents'] = calculatePercentageRate($row['points'], $totalPoints);
// Load row template
$out['rows'] .= loadTemplate('admin_list_user_amounts_row', TRUE, $row);