tussenstand
This commit is contained in:
@@ -20,6 +20,9 @@ class Afbeeldingen {
|
||||
private $welkelaagste = 0;
|
||||
private $laagstescore = 101;
|
||||
private $resultaten;
|
||||
private $disablenvt = 0;
|
||||
private $ijkpunten;
|
||||
private $aantalY = 0;
|
||||
|
||||
public function __construct($scoresObject, $modulenr, $orgversieid, $clusterid, $orgid, $zprocent){
|
||||
$this->CI = & get_instance();
|
||||
@@ -59,6 +62,8 @@ class Afbeeldingen {
|
||||
}
|
||||
|
||||
private function handle(){
|
||||
$this->setIJkpunten();
|
||||
$this->telIJkpunten();
|
||||
$this->setScores();
|
||||
$this->setSWVid();
|
||||
$this->setOrgversie();
|
||||
@@ -70,6 +75,20 @@ class Afbeeldingen {
|
||||
$this->loopScores2();
|
||||
}
|
||||
|
||||
private function setIJkpunten(){
|
||||
$this->ijkpunten = $this->CI->Orgversies_model->getijkpunten($this->orgversieid);
|
||||
}
|
||||
|
||||
private function telIJkpunten(){
|
||||
if($this->ijkpunten){
|
||||
foreach($this->ijkpunten as $ijkpunt){
|
||||
if($ijkpunt->disabled == 'F'){
|
||||
$this->aantalY++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private function setScores(){
|
||||
$this->scores = $this->scoresobject->getScores();
|
||||
}
|
||||
@@ -115,20 +134,26 @@ class Afbeeldingen {
|
||||
private function loopScores1(){
|
||||
if(!$this->scores) return;
|
||||
foreach ($this->scores as $index => $this->score) {
|
||||
$this->berekenGemiddelden();
|
||||
$this->setScoreSom();
|
||||
$this->setAantalScores($index);
|
||||
if($this->score->disabled == 'F' && $this->score->disablenvt == 'F') {
|
||||
// $this->berekenGemiddelden();
|
||||
$this->setScoreSom();
|
||||
$this->setAantalScores($index);
|
||||
}
|
||||
if($this->score->disabled == 'F' && $this->score->disablenvt == 'T'){
|
||||
$this->disablenvt++;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private function berekenGemiddelden(){
|
||||
if(!$this->scores) return;
|
||||
$this->score->gem = 0;
|
||||
if($this->score->num > 0 ){
|
||||
// $this->score->gem = round((($this->score->somscore/ $this->score->num)* 10)/10);
|
||||
$this->score->gem = $this->score->somscore/ $this->score->num;
|
||||
}
|
||||
}
|
||||
// private function berekenGemiddelden(){
|
||||
// if(!$this->scores) return;
|
||||
// $this->score->gem = 0;
|
||||
// if($this->score->num > 0 ){
|
||||
//// $this->score->gem = round((($this->score->somscore/ $this->score->num)* 10)/10);
|
||||
// $this->score->gem = $this->score->somscore/ $this->score->num;
|
||||
// }
|
||||
// }
|
||||
|
||||
private function setScoreSom(){
|
||||
|
||||
@@ -137,13 +162,17 @@ class Afbeeldingen {
|
||||
}
|
||||
|
||||
private function setAantalScores($index){
|
||||
$this->aantalscores = $index + 1;
|
||||
$this->aantalscores++;
|
||||
}
|
||||
|
||||
private function setGemiddeldeScore(){
|
||||
if(!$this->scores || $this->aantalscores == 0) return;
|
||||
$this->gemiddelde = new stdClass();
|
||||
$this->gemiddelde->gem = $this->somscore / $this->aantalscores;
|
||||
$this->gemiddelde->gem = 0;
|
||||
$deler = $this->aantalY - $this->disablenvt;
|
||||
if($deler > 0) $this->gemiddelde->gem = round($this->somscore / $deler);
|
||||
|
||||
|
||||
$this->gemiddelde->nummer = 'gem';
|
||||
$this->score = $this->gemiddelde;
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ class Bestuurscores
|
||||
private $CI;
|
||||
private $organisatie;
|
||||
private $scores;
|
||||
private $orgstring;
|
||||
|
||||
|
||||
public function __construct( $orgversieid, $orgid, $vorm)
|
||||
@@ -31,9 +32,15 @@ class Bestuurscores
|
||||
$this->organisatie = $this->CI->Organisaties_model->get_record_by_id($this->orgid);
|
||||
}
|
||||
|
||||
private function setOrglist(){
|
||||
$orglist = $this->CI->Organisaties_model->getlistrecursief($this->orgid);
|
||||
if($orglist) {
|
||||
$this->orgstring = implode(',', $orglist);
|
||||
}
|
||||
}
|
||||
|
||||
private function setScores(){
|
||||
$this->scores = $this->CI->Scores_model->calculateBG($this->orgversieid, $this->orgid);
|
||||
$this->scores = $this->CI->Scores_model->getgemscores($this->orgversieid, $this->orgstring);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -63,7 +63,7 @@ class Kamerscores
|
||||
private function setScores(){
|
||||
|
||||
if(!$this->orgids) return;
|
||||
$this->scores = $this->CI->Scores_model->calculateOverScholen($this->orgversieid, $this->orgids);
|
||||
$this->scores = $this->CI->Scores_model->getgemscores($this->orgversieid, $this->orgids);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -196,6 +196,10 @@ class Lijsten
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private function setSchoolScores(){
|
||||
if ($this->soort != 4 || $this->lijst->vorm != 1) return;
|
||||
$this->schoolScores = new Schoolscores($this->lijst->orgversieid, $this->orgid);
|
||||
|
||||
@@ -64,7 +64,7 @@ class Swvscores
|
||||
}
|
||||
|
||||
private function setScores(){
|
||||
$this->scores = $this->CI->Scores_model->calculateOverScholen($this->orgversieid, $this->orgids);
|
||||
$this->scores = $this->CI->Scores_model->getgemscores($this->orgversieid, $this->orgids);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user