ijkpunten
This commit is contained in:
@@ -182,20 +182,12 @@ class Gemiddeldenafbeeldingen {
|
||||
private function loopIJkpunten(){
|
||||
foreach($this->ijkpunten as $index =>$this->ijkpunt){
|
||||
if(! isset($this->ijkpunt->score) || ! $this->ijkpunt->score || $this->ijkpunt->disabled =='T') {continue;};
|
||||
$this->setDisablenvt();
|
||||
$this->telScoresOp();
|
||||
$this->setAantalScores();
|
||||
}
|
||||
$this->setGemiddeldeScore(); // gemiddelde ga je niet in de loop berekenen
|
||||
}
|
||||
|
||||
private function setDisablenvt(){
|
||||
$this->ijkpunt->disablenvt = 'F';
|
||||
if($this->ijkpunt->aantalvier > 0 && $this->ijkpunt->aantalvier == $this->ijkpunt->aantalnvt)
|
||||
$this->ijkpunt->disablenvt = 'T';
|
||||
$this->disablenvt++;
|
||||
|
||||
}
|
||||
|
||||
private function telScoresOp(){
|
||||
$this->somscore = $this->somscore + $this->ijkpunt->score;
|
||||
|
||||
@@ -15,6 +15,7 @@ class Gemiddeldescores
|
||||
private $slaover = false;
|
||||
private $ambities;
|
||||
private $gemiddeldescores;
|
||||
private $aantalnvt = 0;
|
||||
|
||||
public function __construct($orgversieid, $orgid)
|
||||
{
|
||||
@@ -67,10 +68,8 @@ class Gemiddeldescores
|
||||
$this->setGemiddeldeScores();
|
||||
}
|
||||
|
||||
private function setIJkpunten()
|
||||
{
|
||||
$this->ijkpunten = $this->CI->Orgversies_model->getijkpunten($this->orgversieid);
|
||||
|
||||
private function setIJkpunten(){
|
||||
$this->ijkpunten = $this->CI->Ijkpunten_model->getijkpuntenMetIndicatoren($this->orgversieid);
|
||||
}
|
||||
|
||||
private function setLeerkrachten()
|
||||
@@ -102,10 +101,12 @@ class Gemiddeldescores
|
||||
private function loopIJkpunten()
|
||||
{
|
||||
foreach ($this->ijkpunten as $index => $this->ijkpunt) {
|
||||
$this->ijkpunt->disablenvt = 'F';
|
||||
$this->ijkpunt->totaal = 0;
|
||||
$this->ijkpunt->aantallkrtn = 0;
|
||||
if($this->ijkpunt->disabled == 'F') {
|
||||
$this->loopLeerkrachten();
|
||||
$this->setNietvanToepassing();
|
||||
$this->setIJkpuntGemiddeldeScores();
|
||||
}
|
||||
}
|
||||
@@ -134,6 +135,7 @@ class Gemiddeldescores
|
||||
$this->setAantalScores();
|
||||
if ($this->slaover == false) {
|
||||
$this->setIJkpuntTotaal();
|
||||
$this->telNietVanToepassing();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -158,6 +160,15 @@ class Gemiddeldescores
|
||||
}
|
||||
}
|
||||
|
||||
private function telNietvanToepassing(){
|
||||
if($this->score->scoretype != 4) return;
|
||||
if ($this->score->nummer == $this->ijkpunt->nummer) {
|
||||
if($this->score->aantalnvt == $this->score->aantalvier )
|
||||
$this->aantalnvt++;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private function setVoldoendeAantal(){
|
||||
if (!isset($this->leerkracht->scores) || $this->leerkracht->scores == false) return;
|
||||
if ($this->scoreteller < 5){
|
||||
@@ -165,6 +176,12 @@ class Gemiddeldescores
|
||||
}
|
||||
}
|
||||
|
||||
private function setNietVanToepassing(){
|
||||
if($this->ijkpunt->aantallkrtn == $this->aantalnvt){
|
||||
$this->ijkpunt->disablenvt = 'T';
|
||||
}
|
||||
}
|
||||
|
||||
private function setIJkpuntGemiddeldeScores()
|
||||
{
|
||||
if ($this->ijkpunt->aantallkrtn > 0) {
|
||||
|
||||
@@ -3,23 +3,19 @@
|
||||
class Schoolafbeeldingen {
|
||||
|
||||
private $CI;
|
||||
private $swvid;
|
||||
|
||||
private $scores;
|
||||
private $score;
|
||||
private $somscore;
|
||||
private $ambities;
|
||||
private $wensen;
|
||||
private $wens;
|
||||
private $ijkpunten;
|
||||
private $aantalY = 0;
|
||||
private $labels;
|
||||
private $kleuren;
|
||||
private $kleurcodes;
|
||||
private $orgversie;
|
||||
private $vantm;
|
||||
private $gemiddelde;
|
||||
private $nummer;
|
||||
private $gem;
|
||||
private $adviezen= [];
|
||||
private $rij = 708;
|
||||
private $standaardorg = 250;
|
||||
@@ -122,7 +118,6 @@ class Schoolafbeeldingen {
|
||||
$this->setLabels();
|
||||
$this->telIJkpunten();
|
||||
$this->setPeriode();
|
||||
$this->setKleurcodes();
|
||||
$this->setKleuren();
|
||||
$this->loopScores1();
|
||||
$this->setGemiddeldeScore();
|
||||
@@ -160,9 +155,6 @@ class Schoolafbeeldingen {
|
||||
}
|
||||
|
||||
|
||||
private function setKleurcodes(){
|
||||
$this->kleurcodes = new Kleurcodes();
|
||||
}
|
||||
|
||||
private function setKleuren(){
|
||||
|
||||
@@ -218,6 +210,8 @@ class Schoolafbeeldingen {
|
||||
$deler = $this->aantalY - $this->disablenvt;
|
||||
if($deler > 0) $this->gemiddelde->gem = round($this->somscore / $deler);
|
||||
|
||||
$this->gemiddelde->disabled = 'F';
|
||||
$this->gemiddelde->disablenvt = 'F';
|
||||
$this->gemiddelde->nummer = 'gem';
|
||||
$this->score = $this->gemiddelde;
|
||||
}
|
||||
@@ -327,20 +321,24 @@ class Schoolafbeeldingen {
|
||||
|
||||
private function setResultatenOverzicht()
|
||||
{
|
||||
if ($this->score->gem > $this->hoogstescore) {
|
||||
$this->hoogstescore = $this->score->gem;
|
||||
$this->welkehoogste = $this->score->nummer;
|
||||
}
|
||||
if ($this->score->gem <= $this->laagstescore) {
|
||||
$this->laagstescore = $this->score->gem;
|
||||
$this->welkelaagste = $this->score->nummer;
|
||||
if($this->score->disabled == 'F' && $this->score->disablenvt == 'F') {
|
||||
if ($this->score->gem > $this->hoogstescore) {
|
||||
$this->hoogstescore = $this->score->gem;
|
||||
$this->welkehoogste = $this->score->nummer;
|
||||
}
|
||||
if ($this->score->gem <= $this->laagstescore) {
|
||||
$this->laagstescore = $this->score->gem;
|
||||
$this->welkelaagste = $this->score->nummer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private function telIJkpuntenok()
|
||||
{
|
||||
if ($this->ambities && $this->score->gem >= $this->ambities->zprocent && $this->score->disabled == 'F') {
|
||||
$this->ijkpuntenok++;
|
||||
if($this->score->disabled == 'F' && $this->score->disablenvt == 'F') {
|
||||
if ($this->ambities && $this->score->gem >= $this->ambities->zprocent && $this->score->disabled == 'F') {
|
||||
$this->ijkpuntenok++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ class Schoolscores
|
||||
|
||||
|
||||
private function setIJkpunten(){
|
||||
$this->ijkpunten = $this->CI->Orgversies_model->getijkpunten($this->orgversieid);
|
||||
$this->ijkpunten = $this->CI->Ijkpunten_model->getijkpuntenMetIndicatoren($this->orgversieid);
|
||||
}
|
||||
|
||||
private function setScores(){
|
||||
|
||||
@@ -76,7 +76,7 @@ class Afbeeldingen {
|
||||
}
|
||||
|
||||
private function setIJkpunten(){
|
||||
$this->ijkpunten = $this->CI->Orgversies_model->getijkpunten($this->orgversieid);
|
||||
$this->ijkpunten = $this->CI->Ijkpunten_model->getijkpuntenMetIndicatoren($this->orgversieid);
|
||||
}
|
||||
|
||||
private function telIJkpunten(){
|
||||
@@ -172,7 +172,8 @@ class Afbeeldingen {
|
||||
$deler = $this->aantalY - $this->disablenvt;
|
||||
if($deler > 0) $this->gemiddelde->gem = round($this->somscore / $deler);
|
||||
|
||||
|
||||
$this->gemiddelde->disabled = 'F';
|
||||
$this->gemiddelde->disablenvt = 'F';
|
||||
$this->gemiddelde->nummer = 'gem';
|
||||
$this->score = $this->gemiddelde;
|
||||
}
|
||||
@@ -225,20 +226,24 @@ class Afbeeldingen {
|
||||
}
|
||||
|
||||
private function setResultatenOverzicht(){
|
||||
if($this->score->disabled == 'F' && $this->score->disablenvt == 'F') {
|
||||
|
||||
if ($this->score->gem > $this->hoogstescore) {
|
||||
$this->hoogstescore = $this->score->gem;
|
||||
$this->welkehoogste = $this->score->nummer;
|
||||
}
|
||||
if ($this->score->gem <= $this->laagstescore) {
|
||||
$this->laagstescore = $this->score->gem;
|
||||
$this->welkelaagste = $this->score->nummer;
|
||||
if ($this->score->gem > $this->hoogstescore) {
|
||||
$this->hoogstescore = $this->score->gem;
|
||||
$this->welkehoogste = $this->score->nummer;
|
||||
}
|
||||
if ($this->score->gem <= $this->laagstescore) {
|
||||
$this->laagstescore = $this->score->gem;
|
||||
$this->welkelaagste = $this->score->nummer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private function telIJkpuntenok(){
|
||||
if ($this->score->gem >= $this->zprocent) {
|
||||
$this->ijkpuntenok++;
|
||||
if($this->score->disabled == 'F' && $this->score->disablenvt == 'F') {
|
||||
if ($this->score->gem >= $this->zprocent) {
|
||||
$this->ijkpuntenok++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,7 @@ class Bestuurscores
|
||||
private $organisatie;
|
||||
private $scores;
|
||||
private $orgstring;
|
||||
private $metingen;
|
||||
|
||||
|
||||
public function __construct( $orgversieid, $orgid, $vorm)
|
||||
@@ -21,11 +22,17 @@ class Bestuurscores
|
||||
return $this->scores;
|
||||
}
|
||||
|
||||
public function getMetingen(){
|
||||
return $this->metingen;
|
||||
}
|
||||
|
||||
|
||||
private function handle(){
|
||||
|
||||
$this->setOrg();
|
||||
$this->setOrglist();
|
||||
$this->setScores();
|
||||
$this->setMetingen();
|
||||
}
|
||||
|
||||
private function setOrg(){
|
||||
@@ -33,7 +40,7 @@ class Bestuurscores
|
||||
}
|
||||
|
||||
private function setOrglist(){
|
||||
$orglist = $this->CI->Organisaties_model->getlistrecursief($this->orgid);
|
||||
$orglist = $this->CI->Organisaties_model->getlistrecursief($this->orgid, []);
|
||||
if($orglist) {
|
||||
$this->orgstring = implode(',', $orglist);
|
||||
}
|
||||
@@ -43,4 +50,8 @@ class Bestuurscores
|
||||
$this->scores = $this->CI->Scores_model->getgemscores($this->orgversieid, $this->orgstring);
|
||||
}
|
||||
|
||||
private function setMetingen(){
|
||||
$this->metingen = $this->CI->Scores_model->fCountGevuldeVersiesNieuw($this->orgversieid, $this->orgstring);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -36,4 +36,5 @@ class Individuelescores
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -8,6 +8,7 @@ class Kamerscores
|
||||
private $kamernaam;
|
||||
private $orgids;
|
||||
private $scores;
|
||||
private $metingen;
|
||||
|
||||
public function __construct( $orgversieid, $orgid, $vorm)
|
||||
{
|
||||
@@ -21,6 +22,9 @@ class Kamerscores
|
||||
public function getScores(){
|
||||
return $this->scores;
|
||||
}
|
||||
public function getMetingen(){
|
||||
return $this->metingen;
|
||||
}
|
||||
|
||||
public function getOrgnaam(){
|
||||
return $this->kamernaam;
|
||||
@@ -33,6 +37,7 @@ class Kamerscores
|
||||
$this->setKamernaam();
|
||||
$this->setScholenString();
|
||||
$this->setScores();
|
||||
$this->setMetingen();
|
||||
|
||||
}
|
||||
|
||||
@@ -67,4 +72,8 @@ class Kamerscores
|
||||
|
||||
}
|
||||
|
||||
private function setMetingen(){
|
||||
$this->metingen = $this->CI->Scores_model->fCountGevuldeVersiesNieuw($this->orgversieid, $this->orgids);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -118,15 +118,16 @@ class Lijsten
|
||||
$this->setKamerScores();
|
||||
$this->setSWVScores();
|
||||
$this->setLijstScores();
|
||||
$this->setMetingen();
|
||||
$this->setGemiddeldeScores();
|
||||
$this->setAdviezen();
|
||||
$this->setGemiddeldenAdviezen();
|
||||
$this->setVNaam();
|
||||
$this->loopVergelijkingScores();
|
||||
$this->setSchoolMetingen();
|
||||
$this->setIndividueleMetingen();
|
||||
$this->setMetingenVergelijking();
|
||||
$this->setMetingenVergelijkingIndividueel();
|
||||
// $this->setSchoolMetingen();
|
||||
// $this->setIndividueleMetingen();
|
||||
// $this->setMetingenVergelijking();
|
||||
// $this->setMetingenVergelijkingIndividueel();
|
||||
$this->setResultaten();
|
||||
$this->setrapportInfo();
|
||||
$this->setLijsten();
|
||||
@@ -203,7 +204,10 @@ class Lijsten
|
||||
private function setSchoolScores(){
|
||||
if ($this->soort != 4 || $this->lijst->vorm != 1) return;
|
||||
$this->schoolScores = new Schoolscores($this->lijst->orgversieid, $this->orgid);
|
||||
|
||||
if($this->schoolScores) {
|
||||
$this->metingen = 1;
|
||||
$this->aantalorgs = 1;
|
||||
$this->schoolAfbeeldingen = new Schoolafbeeldingen($this->schoolScores, $this->modulenr, $this->lijst->orgversieid,
|
||||
$this->clusterid, $this->orgid);
|
||||
}
|
||||
@@ -211,12 +215,16 @@ class Lijsten
|
||||
|
||||
private function setIndividueleScores(){
|
||||
if($this->soort !=4 || $this->lijst->vorm != 2) return;
|
||||
$this->gemiddeldeScores = new Gemiddeldescores($this->lijst->orgversieid, $this->orgid);
|
||||
$this->gemiddeldeScores = new Gemiddeldescores($this->lijst->orgversieid, $this->orgid);
|
||||
|
||||
if($this->gemiddeldeScores){
|
||||
$this->gemiddeldenAfbeeldingen = new Gemiddeldenafbeeldingen($this->gemiddeldeScores, $this->modulenr, $this->lijst->orgversieid,
|
||||
$this->clusterid, $this->orgid);
|
||||
}
|
||||
|
||||
// $this->gemiddeldeScores = new Individuelescores($this->lijst->orgversieid, $this->lijst->orguserid, $this->orgid);
|
||||
// $this->gemiddeldenAfbeeldingen = new Afbeeldingen($this->gemiddeldeScores, $this->modulenr, $this->lijst->orgversieid, $this->clusterid, $this->orgid, $this->zprocent);
|
||||
|
||||
}
|
||||
|
||||
private function setBestuurScores()
|
||||
@@ -224,6 +232,9 @@ class Lijsten
|
||||
if ($this->soort != 3) return;
|
||||
$this->bestuurScores = new Bestuurscores($this->lijst->orgversieid, $this->orgid, $this->lijst->vorm);
|
||||
if ($this->bestuurScores) {
|
||||
$metingen = $this->bestuurScores->getMetingen();
|
||||
$this->metingen = $metingen->aantal;
|
||||
$this->aantalorgs = $metingen->aantalorgs;
|
||||
$this->bestuurAfbeeldingen = new Afbeeldingen($this->bestuurScores, $this->modulenr, $this->lijst->orgversieid,
|
||||
$this->clusterid, $this->orgid, $this->zprocent);
|
||||
}
|
||||
@@ -233,6 +244,10 @@ class Lijsten
|
||||
if($this->soort == 1) return;
|
||||
$this->kamerScores = new Kamerscores($this->lijst->orgversieid, $this->orgid, $this->lijst->vorm);
|
||||
if($this->kamerScores) {
|
||||
$metingen = $this->kamerScores->getMetingen();
|
||||
$this->metingen = $metingen->aantal;
|
||||
$this->aantalorgs = $metingen->aantalorgs;
|
||||
|
||||
$this->kamerAfbeeldingen = new Afbeeldingen($this->kamerScores, $this->modulenr, $this->lijst->orgversieid,
|
||||
$this->clusterid, $this->orgid, $this->zprocent);
|
||||
}
|
||||
@@ -242,6 +257,10 @@ class Lijsten
|
||||
if ($this->soort == 3 || $this->soort == 4 ) return;
|
||||
$this->swvScores = new Swvscores($this->lijst->orgversieid, $this->orgid, $this->lijst->vorm);
|
||||
if($this->swvScores) {
|
||||
$metingen = $this->swvScores->getMetingen();
|
||||
$this->metingen = $metingen->aantal;
|
||||
$this->aantalorgs = $metingen->aantalorgs;
|
||||
|
||||
$this->swvAfbeeldingen = new Afbeeldingen($this->swvScores, $this->modulenr, $this->lijst->orgversieid,
|
||||
$this->clusterid, $this->orgid, $this->zprocent);
|
||||
}
|
||||
@@ -252,6 +271,7 @@ class Lijsten
|
||||
case 1:
|
||||
if(empty($this->swvAfbeeldingen)) return;
|
||||
$this->lijst->scores = $this->swvAfbeeldingen->getScores();
|
||||
|
||||
break;
|
||||
case 2: if(empty($this->kamerAfbeeldingen)) return;
|
||||
$this->lijst->scores = $this->kamerAfbeeldingen->getScores();
|
||||
@@ -274,6 +294,50 @@ class Lijsten
|
||||
}
|
||||
}
|
||||
|
||||
private function setMetingen(){
|
||||
$this->lijst->metingen = 0;
|
||||
$this->lijst->aantalorgs = 0;
|
||||
$this->lijst->metingenV = 0;
|
||||
$this->lijst->aantalorgsV = 0;
|
||||
|
||||
|
||||
switch($this->soort){
|
||||
case 1:
|
||||
if(empty($this->swvScores)) return;
|
||||
$metingen = $this->swvScores->getMetingen();
|
||||
break;
|
||||
case 2: if(empty($this->kamerScores)) return;
|
||||
$metingen = $this->kamerScores->getMetingen();
|
||||
$metingenV = $this->swvScores->getMetingen();
|
||||
break;
|
||||
case 3: if(empty($this->bestuurScores)) return;
|
||||
$metingen = $this->bestuurScores->getMetingen();
|
||||
$metingenV = $this->kamerScores->getMetingen();
|
||||
break;
|
||||
case 4: if(empty($this->schoolScores) ||empty($this->gemiddeldeScores) ) return;
|
||||
if(count((array) $this->schoolScores) > 0) {
|
||||
$this->lijst->metingen = 1;
|
||||
$this->lijst->aantalorgs = 1;
|
||||
}
|
||||
if(count((array)$this->gemiddeldeScores)> 0){
|
||||
$this->lijst->metingen = $this->gemiddeldeScores->getAantalLeerkrachten();
|
||||
$this->lijst->aantalorgs = 1;
|
||||
|
||||
}
|
||||
$metingenV = $this->kamerScores->getMetingen();
|
||||
break;
|
||||
}
|
||||
|
||||
if(isset($metingen)) {
|
||||
$this->lijst->metingen = $metingen->aantal;
|
||||
$this->lijst->aantalorgs = $metingen->aantalorgs;
|
||||
}
|
||||
if(isset($metingenV)) {
|
||||
$this->lijst->metingenV = $metingenV->aantal;
|
||||
$this->lijst->aantalorgsV = $metingenV->aantalorgs;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private function setGemiddeldeScores(){
|
||||
if(count((array)$this->gemiddeldenAfbeeldingen) == 0) return;
|
||||
@@ -322,101 +386,104 @@ class Lijsten
|
||||
if($this->lijst->scores[$i]) {
|
||||
$this->lijst->scores[$i]->gemV = $this->lijst->vergelijkingen[$i]->gem;
|
||||
$this->lijst->scores[$i]->kleurV = $this->lijst->vergelijkingen[$i]->kleur;
|
||||
$this->lijst->scores[$i]->disabledV = $this->lijst->vergelijkingen[$i]->disabled;
|
||||
$this->lijst->scores[$i]->disablenvtV = $this->lijst->vergelijkingen[$i]->disablenvt;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private function setSchoolMetingen(){
|
||||
|
||||
if($this->lijst->vorm != 1) return;
|
||||
if(!$this->lijst->scores) $this->lijst->aantalorgs = 0;
|
||||
else if ($this->soort == 4) $this->lijst->aantalorgs = 1;
|
||||
else {
|
||||
if(! isset($this->lijst->scores[0]->aantalscholen)) $this->lijst->aantalorgs = 0;
|
||||
|
||||
else {
|
||||
$this->lijst->aantalorgs = $this->lijst->scores[0]->aantalscholen;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private function setIndividueleMetingen(){
|
||||
if (!isset($this->lijst->scores)) return;
|
||||
if ($this->lijst->vorm != 2) return;
|
||||
$this->lijst->metingen = 0;
|
||||
$this->lijst->aantalorgs = 0;
|
||||
|
||||
if ($this->soort == 4) {
|
||||
$gevuld = $this->CI->Scores_model->fCountGevuldeVersies($this->lijst->orgversieid, $this->orgid);
|
||||
if($gevuld ){
|
||||
$this->lijst->metingen = $gevuld->aantal;}
|
||||
};
|
||||
|
||||
if ($this->soort == 3) {
|
||||
$gevuld = $this->CI->Scores_model->fCountGevuldeBestuurVersies($this->lijst->orgversieid, $this->orgid);
|
||||
if($gevuld){
|
||||
$this->lijst->metingen = $gevuld->aantal;
|
||||
$this->lijst->aantalorgs = $gevuld->aantalorgs;}
|
||||
};
|
||||
|
||||
if ($this->soort == 2) {
|
||||
|
||||
$this->onderorgs = $this->CI->Organisaties_model->getscholenonderkamer($this->orgid);
|
||||
$this->setGevuldeVersies12();
|
||||
$metingen = $this->CI->Scores_model->fCountGevuldeKamerEnSWVVersies($this->lijst->orgversieid, $this->orgstring);
|
||||
if($metingen){
|
||||
$this->lijst->metingen = $metingen->aantal;
|
||||
$this->lijst->aantalorgs = $metingen->aantalorgs;
|
||||
}
|
||||
};
|
||||
|
||||
if ($this->soort == 1) {
|
||||
$this->onderorgs = $this->CI->Organisaties_model->getscholenonderswv($this->orgid);
|
||||
$this->setGevuldeVersies12();
|
||||
$metingen = $this->CI->Scores_model->fCountGevuldeKamerEnSwvVersies($this->lijst->orgversieid, $this->orgstring);
|
||||
if($metingen){
|
||||
$this->lijst->metingen = $metingen->aantal;
|
||||
$this->lijst->aantalorgs = $metingen->aantalorgs;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private function setGevuldeVersies12(){
|
||||
$orgids = [];
|
||||
if (count($this->onderorgs) > 0) {
|
||||
foreach ($this->onderorgs as $index => $this->org) {
|
||||
$orgids[] = $this->org->id;
|
||||
}
|
||||
$this->orgstring = implode(',', $orgids);
|
||||
} else $this->orgstring = false;
|
||||
|
||||
|
||||
}
|
||||
|
||||
private function setMetingenVergelijking(){
|
||||
if(!isset($this->lijst->vergelijkingen) || !($this->lijst->vergelijkingen)) return;
|
||||
if($this->lijst->vorm != 1) return;
|
||||
foreach($this->lijst->vergelijkingen as $index => $this->lijst->vergelijking) {
|
||||
$this->lijst->metingenV= 0;
|
||||
if(! isset($this->lijst->vergelijking->aantalscholen)){continue;}
|
||||
$this->lijst->metingenV = $this->lijst->vergelijking->aantalscholen;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
// private function setSchoolMetingen(){
|
||||
//
|
||||
// if($this->lijst->vorm != 1) return;
|
||||
// if(!$this->lijst->scores) $this->lijst->aantalorgs = 0;
|
||||
// else if ($this->soort == 4) $this->lijst->aantalorgs = 1;
|
||||
// else {
|
||||
// if(! isset($this->lijst->scores[0]->aantalscholen)) $this->lijst->aantalorgs = 0;
|
||||
//
|
||||
// else {
|
||||
// $this->lijst->aantalorgs = $this->lijst->scores[0]->aantalscholen;
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// }
|
||||
|
||||
private function setMetingenVergelijkingIndividueel(){
|
||||
if(! isset($this->lijst->vergelijkingen )|| ! ($this->lijst->vergelijkingen)) return;
|
||||
if($this->lijst->vorm != 2) return;
|
||||
$this->lijst->metingenV = new stdClass();
|
||||
$this->lijst->metingenV = 0;
|
||||
foreach($this->lijst->vergelijkingen as $index => $this->lijst->vergelijking) {
|
||||
if(! isset($this->lijst->vergelijking->aantallijsten)){continue;}
|
||||
$this->lijst->metingenV = $this->lijst->vergelijking->aantallijsten;
|
||||
break;
|
||||
}
|
||||
}
|
||||
// private function setIndividueleMetingen(){
|
||||
// if (!isset($this->lijst->scores)) return;
|
||||
// if ($this->lijst->vorm != 2) return;
|
||||
// $this->lijst->metingen = 0;
|
||||
// $this->lijst->aantalorgs = 0;
|
||||
//
|
||||
// if ($this->soort == 4) {
|
||||
// $gevuld = $this->CI->Scores_model->fCountGevuldeVersies($this->lijst->orgversieid, $this->orgid);
|
||||
// if($gevuld ){
|
||||
// $this->lijst->metingen = $gevuld->aantal;}
|
||||
// };
|
||||
//
|
||||
// if ($this->soort == 3) {
|
||||
// $gevuld = $this->CI->Scores_model->fCountGevuldeBestuurVersies($this->lijst->orgversieid, $this->orgid);
|
||||
// if($gevuld){
|
||||
// $this->lijst->metingen = $gevuld->aantal;
|
||||
// $this->lijst->aantalorgs = $gevuld->aantalorgs;}
|
||||
// };
|
||||
//
|
||||
// if ($this->soort == 2) {
|
||||
//
|
||||
// $this->onderorgs = $this->CI->Organisaties_model->getscholenonderkamer($this->orgid);
|
||||
// $this->setGevuldeVersies12();
|
||||
// $metingen = $this->CI->Scores_model->fCountGevuldeKamerEnSWVVersies($this->lijst->orgversieid, $this->orgstring);
|
||||
// if($metingen){
|
||||
// $this->lijst->metingen = $metingen->aantal;
|
||||
// $this->lijst->aantalorgs = $metingen->aantalorgs;
|
||||
// }
|
||||
// };
|
||||
//
|
||||
// if ($this->soort == 1) {
|
||||
// $this->onderorgs = $this->CI->Organisaties_model->getscholenonderswv($this->orgid);
|
||||
// $this->setGevuldeVersies12();
|
||||
// $metingen = $this->CI->Scores_model->fCountGevuldeKamerEnSwvVersies($this->lijst->orgversieid, $this->orgstring);
|
||||
// if($metingen){
|
||||
// $this->lijst->metingen = $metingen->aantal;
|
||||
// $this->lijst->aantalorgs = $metingen->aantalorgs;
|
||||
// }
|
||||
// };
|
||||
// }
|
||||
|
||||
// private function setGevuldeVersies12(){
|
||||
// $orgids = [];
|
||||
// if (count($this->onderorgs) > 0) {
|
||||
// foreach ($this->onderorgs as $index => $this->org) {
|
||||
// $orgids[] = $this->org->id;
|
||||
// }
|
||||
// $this->orgstring = implode(',', $orgids);
|
||||
// } else $this->orgstring = false;
|
||||
//
|
||||
//
|
||||
// }
|
||||
|
||||
// private function setMetingenVergelijking(){
|
||||
// if(!isset($this->lijst->vergelijkingen) || !($this->lijst->vergelijkingen)) return;
|
||||
// if($this->lijst->vorm != 1) return;
|
||||
// foreach($this->lijst->vergelijkingen as $index => $this->lijst->vergelijking) {
|
||||
// $this->lijst->metingenV= 0;
|
||||
// if(! isset($this->lijst->vergelijking->aantalscholen)){continue;}
|
||||
// $this->lijst->metingenV = $this->lijst->vergelijking->aantalscholen;
|
||||
// break;
|
||||
// }
|
||||
//
|
||||
// }
|
||||
|
||||
// private function setMetingenVergelijkingIndividueel(){
|
||||
// if(! isset($this->lijst->vergelijkingen )|| ! ($this->lijst->vergelijkingen)) return;
|
||||
// if($this->lijst->vorm != 2) return;
|
||||
// $this->lijst->metingenV = new stdClass();
|
||||
// $this->lijst->metingenV = 0;
|
||||
// foreach($this->lijst->vergelijkingen as $index => $this->lijst->vergelijking) {
|
||||
// if(! isset($this->lijst->vergelijking->aantallijsten)){continue;}
|
||||
// $this->lijst->metingenV = $this->lijst->vergelijking->aantallijsten;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
|
||||
private function setResultaten(){
|
||||
switch($this->soort) {
|
||||
|
||||
@@ -8,6 +8,7 @@ class Swvscores
|
||||
private $swvnaam;
|
||||
private $orgids;
|
||||
private $scores;
|
||||
private $metingen;
|
||||
|
||||
|
||||
public function __construct( $orgversieid, $orgid, $vorm)
|
||||
@@ -23,6 +24,10 @@ class Swvscores
|
||||
return $this->scores;
|
||||
}
|
||||
|
||||
public function getMetingen(){
|
||||
return $this->metingen;
|
||||
}
|
||||
|
||||
public function getOrgnaam(){
|
||||
return $this->swvnaam;
|
||||
}
|
||||
@@ -34,6 +39,7 @@ class Swvscores
|
||||
$this->setSWVnaam();
|
||||
$this->setScholenString();
|
||||
$this->setScores();
|
||||
$this->setMetingen();
|
||||
}
|
||||
|
||||
private function setOrg(){
|
||||
@@ -67,4 +73,8 @@ class Swvscores
|
||||
$this->scores = $this->CI->Scores_model->getgemscores($this->orgversieid, $this->orgids);
|
||||
}
|
||||
|
||||
private function setMetingen(){
|
||||
$this->metingen = $this->CI->Scores_model->fCountGevuldeVersiesNieuw($this->orgversieid, $this->orgids);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -150,14 +150,20 @@ class Userlijsten
|
||||
|
||||
private function setIndividueleMetingen(){
|
||||
if(!isset($this->lijst->scores)) return;
|
||||
$this->lijst->metingen = $this->gemiddeldeScores->getAantalLeerkrachten();
|
||||
$metingen = $this->CI->Scores_model->fCountGevuldeVersiesNieuw($this->orgversieid, $this->orgid);
|
||||
if($metingen){
|
||||
$this->lijst->metingen = $metingen->aantal;
|
||||
$this->lijst->aantalorgs = $metingen->aantalorgs;}
|
||||
}
|
||||
|
||||
private function setMetingenVergelijkingIndividueel(){
|
||||
if(! isset($this->lijst->vergelijkingen)) return;
|
||||
foreach($this->lijst->vergelijkingen as $index => $this->lijst->vergelijking) {
|
||||
$this->lijst->metingenV = $this->lijst->vergelijking->aantallijsten;
|
||||
return;
|
||||
$metingenV = $this->kamerAfbeeldingen->getMetingen();
|
||||
if($metingenV) {
|
||||
$this->lijst->metingen = $metingenV->aantal;
|
||||
$this->lijst->aantalorgs = $metingenV->aantalorgs;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,16 @@ class Ijkpunten_model extends MY_Model{
|
||||
ORDER BY Y.nummer ";
|
||||
return $this->get_query_result();
|
||||
}
|
||||
function getijkpuntenMetIndicatoren($orgversieid){
|
||||
$this->sql="SELECT Y.id, Y.nummer,Y.omschrijving,Y.toelichting, disabled
|
||||
FROM tb_orgversies OV
|
||||
JOIN tb_ijkpunten Y ON Y.versie_id = OV.versie_id
|
||||
JOIN tb_indicatoren I ON Y.id = I.ijkpunt_id
|
||||
WHERE OV.id ={$orgversieid}
|
||||
GROUP BY Y.nummer
|
||||
ORDER BY Y.nummer ";
|
||||
return $this->get_query_result();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -475,7 +475,7 @@ class Scores_model extends MY_Model{
|
||||
FROM tb_scores S
|
||||
JOIN tb_filledversions FV ON FV.id = S.filledversion_id
|
||||
WHERE FV.orgversie_id = {$orgversieid}
|
||||
AND FV.organisatie_id = {$orgid}
|
||||
AND FV.organisatie_id IN ({$orgid})
|
||||
AND FV.meetellen = 1
|
||||
AND S.score > 0
|
||||
GROUP BY S.filledversion_id
|
||||
@@ -517,15 +517,21 @@ class Scores_model extends MY_Model{
|
||||
}
|
||||
|
||||
function fCountGevuldeVersiesNieuw($orgversieid, $orgids){
|
||||
$this->sql =" SELECT COUNT(DISTINCT filledversion_id) as aantal, COUNT(DISTINCT(O.id)) AS aantalorgs
|
||||
FROM tb_scores S
|
||||
JOIN tb_filledversions FV ON FV.id = S.filledversion_id
|
||||
JOIN tb_organisaties O ON FV.organisatie_id = O.id
|
||||
WHERE FV.orgversie_id = {$orgversieid}
|
||||
AND FV.organisatie_id IN ({$orgids})
|
||||
AND FV.meetellen = 1
|
||||
AND S.score > 0
|
||||
HAVING COUNT(S.id) >= 5";
|
||||
$this->sql =" SELECT SUM(CASE WHEN Q.aantal> 0 THEN Q.aantal
|
||||
ELSE 0
|
||||
END ) as aantal,
|
||||
SUM(CASE WHEN Q.aantalorgs > 0 THEN Q.aantalorgs
|
||||
ELSE 0
|
||||
END ) as aantalorgs
|
||||
FROM( SELECT COUNT(DISTINCT filledversion_id) as aantal, COUNT(DISTINCT(FV.organisatie_id)) AS aantalorgs
|
||||
FROM tb_scores S
|
||||
JOIN tb_filledversions FV ON FV.id = S.filledversion_id
|
||||
WHERE FV.orgversie_id = {$orgversieid}
|
||||
AND FV.organisatie_id IN ({$orgids})
|
||||
AND FV.meetellen = 1
|
||||
AND S.score > 0
|
||||
GROUP BY FV.organisatie_id
|
||||
HAVING COUNT(S.id) >= 5 ) AS Q ";
|
||||
return $this->get_query_row();
|
||||
}
|
||||
|
||||
|
||||
@@ -299,8 +299,9 @@
|
||||
style: {backgroundColor: kleur}">
|
||||
</td>
|
||||
<td colspan="1" style="text-align:right; vertical-align:top; padding-right: 5px; border-left: 1px solid #a07b8e; color:#ffffff;"
|
||||
data-bind= "text: gemV,
|
||||
style: {backgroundColor: kleurV}">
|
||||
data-bind="text: gemV,
|
||||
style: {backgroundColor: kleurV}">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
@@ -188,17 +188,46 @@ ls.initIJkpuntenModel = function(){
|
||||
this.omschrijving = s.omschrijving;
|
||||
this.toelichting = s.toelichting;
|
||||
if (meegeven == 'vergelijkingen'){
|
||||
this.gem = 'nvt';
|
||||
this.gem = s.gem;
|
||||
if(s.disablenvt =='T') dit.gem ='nvt';
|
||||
if(s.disabled =='T') dit.gem ='uitgezet';
|
||||
this.gemV = s.gem;
|
||||
this.kleur = 'lightgray'
|
||||
this.kleurV = s.kleur;
|
||||
if(s.disablenvtV =='T') dit.gemV ='nvt';
|
||||
if(s.disabledV =='T') dit.gemV ='uitgezet';
|
||||
this.disabled = ko.observable(false);
|
||||
if(s.disabled == 'T') dit.disabled(true)
|
||||
this.disabledV = ko.observable(false);
|
||||
if(s.disabledV == 'T') dit.disabledV(true)
|
||||
this.disablenvt = ko.observable(false);
|
||||
if(s.disablenvt == 'T') dit.disablenvt(true);
|
||||
this.disablenvtV = ko.observable(false);
|
||||
if(s.disablenvtV == 'T') dit.disablenvtV(true);
|
||||
this.kleur = 'lightgray';
|
||||
if(s.disabled == 'F' && s.disablenvt == 'F')this.kleur =s.kleur;
|
||||
this.kleurV = ko.observable ='lightgray';
|
||||
if(s.disabled == 'F' && s.disablenvt == 'F')this.kleurV =s.kleurV;
|
||||
|
||||
}
|
||||
else {
|
||||
this.gem = s.gem;
|
||||
this.gemV = s.gemV;
|
||||
this.gem = s.gem;
|
||||
if(s.disablenvt =='T') dit.gem ='nvt';
|
||||
if(s.disabled =='T') dit.gem ='uitgezet';
|
||||
this.gemV = s.gemV;
|
||||
if(s.disablenvtV =='T') dit.gemV ='nvt';
|
||||
if(s.disabledV =='T') dit.gemV ='uitgezet';
|
||||
this.disabled = ko.observable(false);
|
||||
if(s.disabled == 'T') dit.disabled(true);
|
||||
this.disabledV = ko.observable(false);
|
||||
if(s.disabledV == 'T') dit.disabledV(true)
|
||||
this.disablenvt = ko.observable(false);
|
||||
if(s.disablenvt == 'T') dit.disablenvt(true);
|
||||
this.disablenvtV = ko.observable(false);
|
||||
if(s.disablenvtV == 'T') dit.disablenvtV(true);
|
||||
this.kleur = 'lightgray';
|
||||
if(s.disabled == 'F' && s.disablenvt == 'F')this.kleur =s.kleur;
|
||||
this.kleurV = 'lightgray';
|
||||
if(s.disabled == 'F' && s.disablenvt == 'F')this.kleurV =s.kleurV;
|
||||
|
||||
this.kleur = s.kleur;
|
||||
this.kleurV = s.kleurV;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user