ijkpunten & ontwikelagenda
This commit is contained in:
@@ -24,7 +24,8 @@ class Individuelescores
|
||||
private function handle(){
|
||||
$this->setUserid();
|
||||
$this->setScores();
|
||||
// $this->telScores();
|
||||
$this->loopScores();
|
||||
|
||||
}
|
||||
|
||||
private function setUserid(){
|
||||
@@ -35,6 +36,27 @@ class Individuelescores
|
||||
$this->scores = $this->CI->Scores_model->calculateindividualscores($this->orgversieid, $this->orgid, $this->userid);
|
||||
}
|
||||
|
||||
private function loopScores(){
|
||||
if(! isset($this->scores) || $this->scores == false ) return;
|
||||
foreach($this->scores as $this->score) {
|
||||
$this->setNietVanToepassing();
|
||||
$this->setGem();
|
||||
}
|
||||
}
|
||||
|
||||
private function setNietVanToepassing(){
|
||||
$this->score->disablenvt = 'F';
|
||||
if($this->score->aantalvier> 0 && $this->score->aantalvier == $this->score->aantalnvt)
|
||||
$this->score->disablenvt = 'T';
|
||||
|
||||
}
|
||||
|
||||
private function setGem(){
|
||||
$this->score->gem = 0;
|
||||
if(isset($this->score->somscore) && $this->score->num > 0) {
|
||||
$this->score->gem = $this->score->somscore/$this->score->num;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user