Browse Source

Verkeerde variabelen bij optellen data.

master
Rogier Neeleman 8 years ago
parent
commit
d6a0a1bc55
  1. 4
      application/controllers/Uitslag.php

4
application/controllers/Uitslag.php

@ -49,14 +49,14 @@ class Uitslag extends CI_Controller
$uitslag = array(); $uitslag = array();
foreach ($subgroepen as $subgroep) { foreach ($subgroepen as $subgroep) {
$data['uitslag'][$subgroep['id']]['total'] = 0; $uitslagr[$subgroep['id']]['total'] = 0;
$scores = $this->Uitslag_model->get_subgroep_punten($subgroep['id']); $scores = $this->Uitslag_model->get_subgroep_punten($subgroep['id']);
foreach ($scores as $score) { foreach ($scores as $score) {
$scoremaxsg = $this->Uitslag_model->get_max_punten_detail($score['spelgebiedid']); $scoremaxsg = $this->Uitslag_model->get_max_punten_detail($score['spelgebiedid']);
$scoreitem = ($score['score']/$scoremaxsg['maxscore']) * $totaalpsg * $scoremaxsg['gewicht']; $scoreitem = ($score['score']/$scoremaxsg['maxscore']) * $totaalpsg * $scoremaxsg['gewicht'];
$uitslagr[$subgroep['id']][$score['spelgebiedid']] = $scoreitem; $uitslagr[$subgroep['id']][$score['spelgebiedid']] = $scoreitem;
$uitslagr[$subgroep['id']]['total'] = $data['uitslag'][$subgroep['id']]['total'] + $scoreitem; $uitslagr[$subgroep['id']]['total'] = $uitslagr[$subgroep['id']]['total'] + $scoreitem;
} }
} }

Loading…
Cancel
Save