optie niet van toepassing niet meetellen
als gekozen is voor scoretype 4 bij een orgversie (ja,nee, nvt) de optie nvt niet meetellen in het gemiddelde als bij een ijkpunt in een filledversion voor alle opties nvt is gekozen. De optie elf wordt dan grijs
This commit is contained in:
@@ -260,7 +260,7 @@ class Rapmatrix extends MY_Controller
|
|||||||
|
|
||||||
|
|
||||||
private function getIndividueleMatrix($orgID, $orgversieID, $ijkpunten, $kleuren,$scoretype){
|
private function getIndividueleMatrix($orgID, $orgversieID, $ijkpunten, $kleuren,$scoretype){
|
||||||
$scores = $this->getLeerkrachtscores($orgID, $orgversieID);
|
$scores = $this->getLeerkrachtscores($orgID, $orgversieID, $scoretype);
|
||||||
$labels = $this->getGemiddeldeScores($scores, $ijkpunten, $kleuren, $scoretype);
|
$labels = $this->getGemiddeldeScores($scores, $ijkpunten, $kleuren, $scoretype);
|
||||||
|
|
||||||
return $labels;
|
return $labels;
|
||||||
@@ -269,7 +269,7 @@ class Rapmatrix extends MY_Controller
|
|||||||
|
|
||||||
private function getSchoolMatrix($orgID, $orgversieID, $aantalY, $scoretype)
|
private function getSchoolMatrix($orgID, $orgversieID, $aantalY, $scoretype)
|
||||||
{
|
{
|
||||||
$scores = $this->getSchoolScores($orgID, $orgversieID);
|
$scores = $this->getSchoolScores($orgID, $orgversieID, $scoretype);
|
||||||
$labels = $this->getGemiddeldenSchool($scores, $aantalY,$orgversieID, $scoretype);
|
$labels = $this->getGemiddeldenSchool($scores, $aantalY,$orgversieID, $scoretype);
|
||||||
|
|
||||||
return $labels;
|
return $labels;
|
||||||
@@ -287,7 +287,7 @@ class Rapmatrix extends MY_Controller
|
|||||||
private function getBestuurMatrix($orgID, $orgversieID, $ijkpunten, $kleuren, $scoretype)
|
private function getBestuurMatrix($orgID, $orgversieID, $ijkpunten, $kleuren, $scoretype)
|
||||||
{
|
{
|
||||||
$scholen = $this->getScholenPerBestuur($orgID);
|
$scholen = $this->getScholenPerBestuur($orgID);
|
||||||
$scores = $this->getScoresBijBesturen($scholen, $orgversieID);
|
$scores = $this->getScoresBijBesturen($scholen, $orgversieID, $scoretype);
|
||||||
$labels = $this->getGemiddeldeScores($scores, $ijkpunten, $kleuren, $scoretype);
|
$labels = $this->getGemiddeldeScores($scores, $ijkpunten, $kleuren, $scoretype);
|
||||||
|
|
||||||
return $labels;
|
return $labels;
|
||||||
@@ -307,7 +307,7 @@ class Rapmatrix extends MY_Controller
|
|||||||
{
|
{
|
||||||
$scholen = $this->getCriteriumScholen($orgID, $orgsoort);
|
$scholen = $this->getCriteriumScholen($orgID, $orgsoort);
|
||||||
$ingedeeld = $this->getScholenPerLabel($scholen, $criteriumID);
|
$ingedeeld = $this->getScholenPerLabel($scholen, $criteriumID);
|
||||||
$scores = $this->getScoresBijCriterium($ingedeeld, $orgversieID);
|
$scores = $this->getScoresBijCriterium($ingedeeld, $orgversieID, $scoretype);
|
||||||
$labels = $this->getGemiddeldeScores($scores, $ijkpunten, $kleuren, $scoretype );
|
$labels = $this->getGemiddeldeScores($scores, $ijkpunten, $kleuren, $scoretype );
|
||||||
|
|
||||||
return $labels;
|
return $labels;
|
||||||
@@ -323,7 +323,7 @@ class Rapmatrix extends MY_Controller
|
|||||||
return $returnarray;
|
return $returnarray;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getLeerkrachtScores($orgID, $orgversieID)
|
private function getLeerkrachtScores($orgID, $orgversieID, $scoretype)
|
||||||
{
|
{
|
||||||
$labels = new stdClass;
|
$labels = new stdClass;
|
||||||
$labels->label = new stdClass;
|
$labels->label = new stdClass;
|
||||||
@@ -333,15 +333,19 @@ class Rapmatrix extends MY_Controller
|
|||||||
$labels->label->users = $leerkrachten;
|
$labels->label->users = $leerkrachten;
|
||||||
|
|
||||||
foreach ($labels->label->users as $user) {
|
foreach ($labels->label->users as $user) {
|
||||||
|
if($scoretype ==4) $user->scores = $this->Scores_model->calculateindividualscorestype4($orgversieID, $orgID,$user->user_id );
|
||||||
|
else
|
||||||
$user->scores = $this->Scores_model->calculateindividualscores($orgversieID, $orgID,$user->user_id );
|
$user->scores = $this->Scores_model->calculateindividualscores($orgversieID, $orgID,$user->user_id );
|
||||||
if ($user->scores) {
|
if ($user->scores) {
|
||||||
foreach ($user->scores as $score) {
|
foreach ($user->scores as $score) {
|
||||||
$score->gem = new stdClass();
|
$score->gem = new stdClass();
|
||||||
if($score->somscore && $score->num && $score->num > 0) {
|
if($scoretype ==4) $score->gem = round($score->somscore);
|
||||||
$score->gem = $score->somscore / $score->num;
|
else {
|
||||||
}
|
if ($score->somscore && $score->num && $score->num > 0) {
|
||||||
else{
|
$score->gem = $score->somscore / $score->num;
|
||||||
$score->gem = 0;
|
} else {
|
||||||
|
$score->gem = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -350,7 +354,7 @@ class Rapmatrix extends MY_Controller
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getSchoolScores($orgID, $orgversieID)
|
private function getSchoolScores($orgID, $orgversieID, $scoretype)
|
||||||
{
|
{
|
||||||
$labels = new stdClass;
|
$labels = new stdClass;
|
||||||
$labels->label = new stdClass;
|
$labels->label = new stdClass;
|
||||||
@@ -361,7 +365,8 @@ class Rapmatrix extends MY_Controller
|
|||||||
$users->orgid = $orgID;
|
$users->orgid = $orgID;
|
||||||
$users->fullname = $users->naam;
|
$users->fullname = $users->naam;
|
||||||
$labels->label->users[] = $users;
|
$labels->label->users[] = $users;
|
||||||
$scores = $this->Scores_model->getgemscores($orgversieID, $orgID);
|
if($scoretype == 4) $scores = $this->Scores_model->getgemscorestype4($orgversieID, $orgID);
|
||||||
|
else $scores = $this->Scores_model->getgemscores($orgversieID, $orgID);
|
||||||
|
|
||||||
$labels->label->users[0]->scores = $scores;
|
$labels->label->users[0]->scores = $scores;
|
||||||
return $labels;
|
return $labels;
|
||||||
@@ -424,7 +429,7 @@ private function getGemiddeldenSchool($labels, $aantalY, $orgversieID, $scoretyp
|
|||||||
$user->scores[$aantalY]->gem = new stdClass();
|
$user->scores[$aantalY]->gem = new stdClass();
|
||||||
|
|
||||||
if ($aantalscores > 0) {
|
if ($aantalscores > 0) {
|
||||||
$user->scores[$aantalY]->gem = round($sumscorerij / $aantalscores);
|
$user->scores[$aantalY]->gem = round(round($sumscorerij) / $aantalscores);
|
||||||
} else {
|
} else {
|
||||||
$user->scores[$aantalY]->gem = null;
|
$user->scores[$aantalY]->gem = null;
|
||||||
}
|
}
|
||||||
@@ -580,7 +585,7 @@ private function getScholenPerLabel($scholen, $criteriumID){
|
|||||||
return $labels;
|
return $labels;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getScoresBijBesturen($labels, $orgversieID){
|
private function getScoresBijBesturen($labels, $orgversieID, $scoretype){
|
||||||
foreach ($labels as $label) {
|
foreach ($labels as $label) {
|
||||||
if ($label->users) {
|
if ($label->users) {
|
||||||
if(! is_array($label->users)){
|
if(! is_array($label->users)){
|
||||||
@@ -592,7 +597,9 @@ private function getScholenPerLabel($scholen, $criteriumID){
|
|||||||
}
|
}
|
||||||
foreach ($label->users as $user) {
|
foreach ($label->users as $user) {
|
||||||
$user->scores = new stdClass;
|
$user->scores = new stdClass;
|
||||||
$user->scores = $this->Scores_model->getgemscores($orgversieID, $user->orgid);
|
if($scoretype == 4 )
|
||||||
|
$user->scores = $this->Scores_model->getgemscorestype4($orgversieID, $user->orgid);
|
||||||
|
else $user->scores = $this->Scores_model->getgemscores($orgversieID, $user->orgid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -600,7 +607,7 @@ private function getScholenPerLabel($scholen, $criteriumID){
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private function getScoresBijCriterium($labels, $orgversieID){
|
private function getScoresBijCriterium($labels, $orgversieID, $scoretype){
|
||||||
foreach ($labels as $label) {
|
foreach ($labels as $label) {
|
||||||
if ($label->users) {
|
if ($label->users) {
|
||||||
if(! is_array($label->users)){
|
if(! is_array($label->users)){
|
||||||
@@ -611,7 +618,8 @@ private function getScoresBijCriterium($labels, $orgversieID){
|
|||||||
}
|
}
|
||||||
foreach ($label->users as $user) {
|
foreach ($label->users as $user) {
|
||||||
$user->scores = new stdClass;
|
$user->scores = new stdClass;
|
||||||
$user->scores = $this->Scores_model->getgemscores($orgversieID, $user->id);
|
if($scoretype == 4)$user->scores = $this->Scores_model->getgemscorestype4($orgversieID, $user->id);
|
||||||
|
else $user->scores = $this->Scores_model->getgemscores($orgversieID, $user->id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -634,9 +642,11 @@ private function getGemiddeldeScores($labels, $ijkpunten, $kleuren, $scoretype){
|
|||||||
};
|
};
|
||||||
$aantalrijen = 0;
|
$aantalrijen = 0;
|
||||||
$aantalresults = array();
|
$aantalresults = array();
|
||||||
|
$ingevuld = [];
|
||||||
for ($i = 0; $i < $aantalY; $i++) {
|
for ($i = 0; $i < $aantalY; $i++) {
|
||||||
$aantalresults[$i] = 0;
|
$aantalresults[$i] = 0;
|
||||||
$nvt[$i] = 0;
|
$nvt[$i] = 0;
|
||||||
|
$ingevuld[$i] = 0;
|
||||||
|
|
||||||
}; // for i
|
}; // for i
|
||||||
if ($label->users) {
|
if ($label->users) {
|
||||||
@@ -648,14 +658,11 @@ private function getGemiddeldeScores($labels, $ijkpunten, $kleuren, $scoretype){
|
|||||||
$aantalrijen = $aantalrijen + 1;
|
$aantalrijen = $aantalrijen + 1;
|
||||||
for ($i = 0; $i < $aantalY; $i++) {
|
for ($i = 0; $i < $aantalY; $i++) {
|
||||||
if(isset($user->scores[$i])) {
|
if(isset($user->scores[$i])) {
|
||||||
if($user->scores[$i]->disabled == 'F' &&
|
if(!isset($user->scores[$i]->disablenvt)){
|
||||||
(isset($user->scores[$i]->disablenvt) && $user->scores[$i]->disablenvt == 'F' ||
|
$user->scores[$i]->disablenvt= 'F';
|
||||||
isset($user->scores[$i]->aantalvier) && ($user->scores[$i]->aantalvier == 0 ||
|
}
|
||||||
($user->scores[$i]->aantalvier > 0 &&
|
if($user->scores[$i]->disabled == 'F' && $user->scores[$i]->disablenvt == 'F'){
|
||||||
$user->scores[$i]->aantalnvt != $user->scores[$i]->aantalvier )))){
|
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
$aantalscores++;
|
$aantalscores++;
|
||||||
$sumscore[$i] = $sumscore[$i] + $user->scores[$i]->gem;
|
$sumscore[$i] = $sumscore[$i] + $user->scores[$i]->gem;
|
||||||
$aantalresults[$i] = $aantalresults[$i] + 1;
|
$aantalresults[$i] = $aantalresults[$i] + 1;
|
||||||
@@ -668,13 +675,9 @@ private function getGemiddeldeScores($labels, $ijkpunten, $kleuren, $scoretype){
|
|||||||
|
|
||||||
$kleur = $this->Scorekleuren_model->getGemiddeldeKleur($scoretype, $user->scores[$i]->gem);
|
$kleur = $this->Scorekleuren_model->getGemiddeldeKleur($scoretype, $user->scores[$i]->gem);
|
||||||
$user->scores[$i]->kleur = $kleur->kleurcode;
|
$user->scores[$i]->kleur = $kleur->kleurcode;
|
||||||
if(!isset($user->scores[$i]->disablenvt)){
|
|
||||||
$user->scores[$i]->disablenvt= 'F';
|
|
||||||
if($user->scores[$i]->aantalvier > 0 &&
|
|
||||||
$user->scores[$i]->aantalvier && $user->scores[$i]->aantalnvt)
|
|
||||||
$user->scores[$i]->disablenvt= 'T';
|
|
||||||
}
|
|
||||||
if($user->scores[$i]->disablenvt == 'T') $nvt[$i]++;
|
if($user->scores[$i]->disablenvt == 'T') $nvt[$i]++;
|
||||||
|
if($user->scores[$i]->disabled == 'F') $ingevuld[$i] = $ingevuld[$i] + 1;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
$user->scores[$i] = new stdClass();
|
$user->scores[$i] = new stdClass();
|
||||||
@@ -752,7 +755,7 @@ private function getGemiddeldeScores($labels, $ijkpunten, $kleuren, $scoretype){
|
|||||||
}
|
}
|
||||||
$label->users[$rijcount]->scores[$i]->disabled = $ijkpunten[$i]->disabled;
|
$label->users[$rijcount]->scores[$i]->disabled = $ijkpunten[$i]->disabled;
|
||||||
$label->users[$rijcount]->scores[$i]->disablenvt = 'F';
|
$label->users[$rijcount]->scores[$i]->disablenvt = 'F';
|
||||||
if($nvt[$i] > 0 && $nvt[$i] == $aantalresults[$i]) $label->users[$rijcount]->scores[$i]->disablenvt = 'T';
|
if($nvt[$i] > 0 && $nvt[$i] == $ingevuld[$i]) $label->users[$rijcount]->scores[$i]->disablenvt = 'T';
|
||||||
|
|
||||||
};
|
};
|
||||||
$label->users[$rijcount]->scores[$aantalY] = new stdClass();
|
$label->users[$rijcount]->scores[$aantalY] = new stdClass();
|
||||||
|
|||||||
@@ -109,7 +109,8 @@ class Rapontwikkel extends MY_Controller {
|
|||||||
//
|
//
|
||||||
}
|
}
|
||||||
|
|
||||||
$scores = $this->Scores_model->getgemscores( $orgversieid, $lijst);
|
if($orgversie->scoretype == 4) $scores = $this->Scores_model->getgemscorestype4( $orgversieid, $lijst);
|
||||||
|
else $scores = $this->Scores_model->getgemscores( $orgversieid, $lijst);
|
||||||
if ( $scores )
|
if ( $scores )
|
||||||
{
|
{
|
||||||
$gewenst = $this->Wenssituaties_model->getgewenst( $orgversieid, $orgid );
|
$gewenst = $this->Wenssituaties_model->getgewenst( $orgversieid, $orgid );
|
||||||
@@ -188,6 +189,7 @@ class Rapontwikkel extends MY_Controller {
|
|||||||
$orguserid = $this->clean_input( "orguserid" );
|
$orguserid = $this->clean_input( "orguserid" );
|
||||||
$userid = $this->Orgusers_model->get_fieldvalue( ["id" => $orguserid], "user_id" );
|
$userid = $this->Orgusers_model->get_fieldvalue( ["id" => $orguserid], "user_id" );
|
||||||
$organisatie = $this->Organisaties_model->getorg( $orgid );
|
$organisatie = $this->Organisaties_model->getorg( $orgid );
|
||||||
|
$orgversie = $this->Orgversies_model->get_record_by_id($orgversieid);
|
||||||
$scores = NULL;
|
$scores = NULL;
|
||||||
$gewenst = NULL;
|
$gewenst = NULL;
|
||||||
// als de organisatie een school is : haal de gemiddelde score op (als de 'ik-versie" wordt gebruikt
|
// als de organisatie een school is : haal de gemiddelde score op (als de 'ik-versie" wordt gebruikt
|
||||||
@@ -195,7 +197,8 @@ class Rapontwikkel extends MY_Controller {
|
|||||||
// dat gaat vanzelf omdat gezocht wordt naar organisatie (via filled versions);
|
// dat gaat vanzelf omdat gezocht wordt naar organisatie (via filled versions);
|
||||||
// let op ja nee bezig wordt vertaald naar 10, 0 en 5
|
// let op ja nee bezig wordt vertaald naar 10, 0 en 5
|
||||||
|
|
||||||
$scores = $this->Scores_model->calculateindividualscores( $orgversieid, $orgid, $userid );
|
if($orgversie->scoretype == 4) $scores = $this->Scores_model->calculateindividualscorestype4( $orgversieid, $orgid, $userid );
|
||||||
|
else $scores = $this->Scores_model->calculateindividualscores( $orgversieid, $orgid, $userid );
|
||||||
// haal ook nog de criteria op
|
// haal ook nog de criteria op
|
||||||
if ( ! $scores ) $scores = FALSE;
|
if ( ! $scores ) $scores = FALSE;
|
||||||
|
|
||||||
@@ -205,10 +208,12 @@ class Rapontwikkel extends MY_Controller {
|
|||||||
foreach ( $scores as $score )
|
foreach ( $scores as $score )
|
||||||
{
|
{
|
||||||
|
|
||||||
$score->gem = 0;
|
if($orgversie->scoretype == 4) $score->gem = round($score->somscore, 1);
|
||||||
if ( $score->num > 0 )
|
else {
|
||||||
{
|
$score->gem = 0;
|
||||||
$score->gem = round( $score->somscore / $score->num, 1 );
|
if ($score->num > 0) {
|
||||||
|
$score->gem = round($score->somscore / $score->num, 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$score->huidig = $this->kleurcodes->getnummer( $score->gem );
|
$score->huidig = $this->kleurcodes->getnummer( $score->gem );
|
||||||
}; // foreach scores
|
}; // foreach scores
|
||||||
|
|||||||
@@ -89,7 +89,8 @@ class MY_Controller extends CI_Controller{
|
|||||||
// public $version = '1.20.12';// monfin dubbeltellingen
|
// public $version = '1.20.12';// monfin dubbeltellingen
|
||||||
// public $version = '1.20.13';// wensid was foutief uitgesterd
|
// public $version = '1.20.13';// wensid was foutief uitgesterd
|
||||||
// public $version = '1.20.14';// spelfout in ijkpunten (kleur ipv kleurV)
|
// public $version = '1.20.14';// spelfout in ijkpunten (kleur ipv kleurV)
|
||||||
public $version = '1.20.15';// layout koppen prints monfin, jaartal tot juni op t jaar ervoor
|
// public $version = '1.20.15';// layout koppen prints monfin, jaartal tot juni op t jaar ervoor
|
||||||
|
public $version = '1.20.16';// optie niet van toepassing in lijst type 4 nergens meetellen
|
||||||
public $partituurid;
|
public $partituurid;
|
||||||
public $globProfielVersieID = 1;
|
public $globProfielVersieID = 1;
|
||||||
public $userid; //id of the user that is logged in
|
public $userid; //id of the user that is logged in
|
||||||
|
|||||||
@@ -128,6 +128,10 @@ class Gemiddeldescores
|
|||||||
private function setLeerkrachtScores(){
|
private function setLeerkrachtScores(){
|
||||||
if (!$this->leerkrachten) return;
|
if (!$this->leerkrachten) return;
|
||||||
foreach ($this->leerkrachten as $index => $this->leerkracht) {
|
foreach ($this->leerkrachten as $index => $this->leerkracht) {
|
||||||
|
if($this->scoretype == 4) $this->leerkracht->scores = $this->CI->Scores_model->calculateindividualscorestype4(
|
||||||
|
$this->orgversieid, $this->orgid, $this->leerkracht->user_id);
|
||||||
|
|
||||||
|
else
|
||||||
$this->leerkracht->scores = $this->CI->Scores_model->calculateindividualscores(
|
$this->leerkracht->scores = $this->CI->Scores_model->calculateindividualscores(
|
||||||
$this->orgversieid, $this->orgid, $this->leerkracht->user_id);
|
$this->orgversieid, $this->orgid, $this->leerkracht->user_id);
|
||||||
}
|
}
|
||||||
@@ -190,6 +194,7 @@ class Gemiddeldescores
|
|||||||
private function loopIJkpunten()
|
private function loopIJkpunten()
|
||||||
{
|
{
|
||||||
foreach ($this->ijkpunten as $index => $this->ijkpunt) {
|
foreach ($this->ijkpunten as $index => $this->ijkpunt) {
|
||||||
|
$this->aantalnvt = 0;
|
||||||
$this->ijkpunt->disablenvt = 'F';
|
$this->ijkpunt->disablenvt = 'F';
|
||||||
$this->ijkpunt->totaal = 0;
|
$this->ijkpunt->totaal = 0;
|
||||||
$this->ijkpunt->aantallkrtn = 0;
|
$this->ijkpunt->aantallkrtn = 0;
|
||||||
@@ -244,8 +249,9 @@ class Gemiddeldescores
|
|||||||
private function setIJkpuntTotaal()
|
private function setIJkpuntTotaal()
|
||||||
{
|
{
|
||||||
if ($this->score->nummer == $this->ijkpunt->nummer) {
|
if ($this->score->nummer == $this->ijkpunt->nummer) {
|
||||||
if ($this->score->num > 0) {
|
if ($this->score->num> 0) {
|
||||||
$lkrtscore = $this->score->somscore / $this->score->num;
|
if($this->scoretype == 4) $lkrtscore = round($this->score->somscore);
|
||||||
|
else $lkrtscore = round($this->score->somscore / $this->score->num);
|
||||||
$this->ijkpunt->totaal = $this->ijkpunt->totaal + $lkrtscore;
|
$this->ijkpunt->totaal = $this->ijkpunt->totaal + $lkrtscore;
|
||||||
$this->ijkpunt->aantallkrtn++;
|
$this->ijkpunt->aantallkrtn++;
|
||||||
$this->slaover = true;
|
$this->slaover = true;
|
||||||
@@ -256,7 +262,7 @@ class Gemiddeldescores
|
|||||||
private function telNietvanToepassing(){
|
private function telNietvanToepassing(){
|
||||||
if($this->score->scoretype != 4) return;
|
if($this->score->scoretype != 4) return;
|
||||||
if ($this->score->nummer == $this->ijkpunt->nummer) {
|
if ($this->score->nummer == $this->ijkpunt->nummer) {
|
||||||
if($this->score->aantalnvt == $this->score->aantalvier )
|
if($this->score->disablenvt == 'T' )
|
||||||
$this->aantalnvt++;
|
$this->aantalnvt++;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -270,7 +276,7 @@ class Gemiddeldescores
|
|||||||
}
|
}
|
||||||
|
|
||||||
private function setNietVanToepassing(){
|
private function setNietVanToepassing(){
|
||||||
if($this->ijkpunt->aantallkrtn == $this->aantalnvt){
|
if( $this->aantalnvt == $this->metingen->aantal ){
|
||||||
$this->ijkpunt->disablenvt = 'T';
|
$this->ijkpunt->disablenvt = 'T';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -340,7 +346,7 @@ class Gemiddeldescores
|
|||||||
if(!isset($this->ijkpunt->score)){continue;};
|
if(!isset($this->ijkpunt->score)){continue;};
|
||||||
if(! $this->ijkpunt->score) $this->ijkpuntscore = 0;
|
if(! $this->ijkpunt->score) $this->ijkpuntscore = 0;
|
||||||
$this->setScorenummer();
|
$this->setScorenummer();
|
||||||
$this->rondScoresAf();
|
// $this->rondScoresAf();
|
||||||
$this->setScoreKleuren();
|
$this->setScoreKleuren();
|
||||||
$this->addGewensteScores($index);
|
$this->addGewensteScores($index);
|
||||||
$this->setWenskleuren();
|
$this->setWenskleuren();
|
||||||
|
|||||||
@@ -98,7 +98,10 @@ class Schoolscores
|
|||||||
}
|
}
|
||||||
|
|
||||||
private function setScores(){
|
private function setScores(){
|
||||||
$this->scores = $this->CI->Scores_model->getgemscores($this->orgversieid, $this->orgstring);
|
if($this->scoretype == 4) $this->scores = $this->CI->Scores_model->getgemscorestype4($this->orgversieid, $this->orgstring);
|
||||||
|
else $this->scores = $this->CI->Scores_model->getgemscores($this->orgversieid, $this->orgstring);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private function setMetingen(){
|
private function setMetingen(){
|
||||||
@@ -291,7 +294,7 @@ class Schoolscores
|
|||||||
$this->gemiddelde->gem = 0;
|
$this->gemiddelde->gem = 0;
|
||||||
$this->gemiddelde->score = 0;
|
$this->gemiddelde->score = 0;
|
||||||
$deler = $this->aantalY - $this->aantaldisablenvt;
|
$deler = $this->aantalY - $this->aantaldisablenvt;
|
||||||
if($deler > 0) $this->gemiddelde->gem = round($this->somscore / $deler);
|
if($deler > 0) $this->gemiddelde->gem = round(round($this->somscore) / $deler);
|
||||||
|
|
||||||
$this->gemiddelde->disabled = 'F';
|
$this->gemiddelde->disabled = 'F';
|
||||||
$this->gemiddelde->disablenvt = 'F';
|
$this->gemiddelde->disablenvt = 'F';
|
||||||
|
|||||||
@@ -79,7 +79,8 @@ class Individuelescores
|
|||||||
}
|
}
|
||||||
|
|
||||||
private function setScores(){
|
private function setScores(){
|
||||||
$this->scores = $this->CI->Scores_model->calculateindividualscores($this->orgversieid, $this->orgid, $this->userid);
|
if($this->scoretype ==4 )$this->scores = $this->CI->Scores_model->calculateindividualscorestype4($this->orgversieid, $this->orgid, $this->userid);
|
||||||
|
else $this->scores = $this->CI->Scores_model->calculateindividualscores($this->orgversieid, $this->orgid, $this->userid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -141,10 +142,8 @@ class Individuelescores
|
|||||||
}
|
}
|
||||||
|
|
||||||
private function setNietVanToepassing(){
|
private function setNietVanToepassing(){
|
||||||
if(! isset($this->scores) || $this->scores == false ) return;
|
if(! isset($this->scores) || $this->scores == false || $this->scoretype != 4 ) return;
|
||||||
$this->score->disablenvt = 'F';
|
if($this->score->disablenvt == 'T'){
|
||||||
if($this->score->aantalvier> 0 && $this->score->aantalvier == $this->score->aantalnvt){
|
|
||||||
$this->score->disablenvt = 'T';
|
|
||||||
$this->aantaldisablenvt++;
|
$this->aantaldisablenvt++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -152,9 +151,12 @@ class Individuelescores
|
|||||||
|
|
||||||
private function setGem(){
|
private function setGem(){
|
||||||
if(! isset($this->scores) || $this->scores == false ) return;
|
if(! isset($this->scores) || $this->scores == false ) return;
|
||||||
$this->score->gem = 0;
|
if($this->scoretype == 4) $this->score->gem = round($this->score->somscore);
|
||||||
if(isset($this->score->somscore) && $this->score->num > 0) {
|
else {
|
||||||
$this->score->gem = round($this->score->somscore/$this->score->num);
|
$this->score->gem = 0;
|
||||||
|
if (isset($this->score->somscore) && $this->score->num > 0) {
|
||||||
|
$this->score->gem = round($this->score->somscore / $this->score->num);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -176,7 +178,7 @@ class Individuelescores
|
|||||||
}
|
}
|
||||||
|
|
||||||
private function telIJkpuntenok(){
|
private function telIJkpuntenok(){
|
||||||
if($this->score->disabled == 'F' && $this->score->disablenvt == 'F') {
|
if($this->ambities && $this->score->disabled == 'F' && $this->score->disablenvt == 'F') {
|
||||||
if ($this->score->gem >= $this->ambities->zprocent) {
|
if ($this->score->gem >= $this->ambities->zprocent) {
|
||||||
$this->ijkpuntenok++;
|
$this->ijkpuntenok++;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ class Userlijsten
|
|||||||
if(!isset($this->scores) || !$this->scores) return;
|
if(!isset($this->scores) || !$this->scores) return;
|
||||||
$bestuurid = $this->organisatie->valtonder_id;
|
$bestuurid = $this->organisatie->valtonder_id;
|
||||||
$orgid = $this->CI->Organisaties_model->get_fieldvalue(['id'=>$bestuurid], 'valtonder_id');
|
$orgid = $this->CI->Organisaties_model->get_fieldvalue(['id'=>$bestuurid], 'valtonder_id');
|
||||||
$this->vergelijkingen = (new Schoolscores($this->orgversieid, $orgid, 2, 'T'))->getResults() ;
|
$this->vergelijkingen = (new Schoolscores($this->orgversieid, $orgid, $this->lijst->orgversie->scoretype, 'T'))->getResults() ;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function setVergelijkingScores(){
|
private function setVergelijkingScores(){
|
||||||
|
|||||||
@@ -38,11 +38,6 @@ class Scores_model extends MY_Model{
|
|||||||
WHEN (SC.score = 2 OR SC.score = 0) THEN 0
|
WHEN (SC.score = 2 OR SC.score = 0) THEN 0
|
||||||
ELSE 50 * Indi.gewicht
|
ELSE 50 * Indi.gewicht
|
||||||
END
|
END
|
||||||
WHEN SC.scoretype = 4 THEN
|
|
||||||
CASE
|
|
||||||
WHEN SC.score = 1 THEN 100 * Indi.gewicht
|
|
||||||
ELSE 0
|
|
||||||
END
|
|
||||||
WHEN SC.scoretype = 6 THEN
|
WHEN SC.scoretype = 6 THEN
|
||||||
CASE
|
CASE
|
||||||
WHEN SC.score = 2 THEN 60 * Indi.gewicht
|
WHEN SC.score = 2 THEN 60 * Indi.gewicht
|
||||||
@@ -62,12 +57,8 @@ class Scores_model extends MY_Model{
|
|||||||
END) AS somscore,
|
END) AS somscore,
|
||||||
|
|
||||||
SUM( Indi.gewicht ) AS num,
|
SUM( Indi.gewicht ) AS num,
|
||||||
SUM(CASE WHEN SC.scoretype = 4 AND SC.score = 3 THEN 1
|
0 AS aantalnvt,
|
||||||
ELSE 0
|
0 AS aantalvier,
|
||||||
END) AS aantalnvt,
|
|
||||||
SUM(CASE WHEN SC.scoretype = 4 THEN 1
|
|
||||||
ELSE 0
|
|
||||||
END) AS aantalvier,
|
|
||||||
Y.nummer, Y.omschrijving, 0 AS aantalscholen, Y.toelichting
|
Y.nummer, Y.omschrijving, 0 AS aantalscholen, Y.toelichting
|
||||||
FROM tb_filledversions FV
|
FROM tb_filledversions FV
|
||||||
JOIN tb_scores SC ON SC.filledversion_id = FV.id
|
JOIN tb_scores SC ON SC.filledversion_id = FV.id
|
||||||
@@ -82,6 +73,72 @@ class Scores_model extends MY_Model{
|
|||||||
return $this->get_query_result();
|
return $this->get_query_result();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function calculateindividualscorestype4($orgversieid, $orgid, $userid){
|
||||||
|
$this->sql="SELECT
|
||||||
|
Q.id,
|
||||||
|
Q.filledversion_id,
|
||||||
|
Q.ijkpunt_id,
|
||||||
|
Q.scoretype,
|
||||||
|
Q.score,
|
||||||
|
Q.score AS gem,
|
||||||
|
Q.disabled,
|
||||||
|
Q.nummer,
|
||||||
|
Q.omschrijving,
|
||||||
|
0 AS aantalscholen,
|
||||||
|
Q.toelichting,
|
||||||
|
Q.noemer,
|
||||||
|
Q.deler AS num,
|
||||||
|
CASE WHEN Q.deler > 0 THEN
|
||||||
|
'F'
|
||||||
|
WHEN Q.disabled = 'T' THEN
|
||||||
|
'F'
|
||||||
|
ELSE
|
||||||
|
'T'
|
||||||
|
END AS disablenvt,
|
||||||
|
CASE WHEN Q.deler > 0 THEN
|
||||||
|
(Q.noemer / Q.deler) * 100
|
||||||
|
ELSE
|
||||||
|
0
|
||||||
|
END AS somscore,
|
||||||
|
Q.gewicht,
|
||||||
|
Q.aantalnvt
|
||||||
|
FROM(
|
||||||
|
SELECT SC.id, filledversion_id, SC.ijkpunt_id, scoretype, score, score AS gem, Y.disabled,
|
||||||
|
Y.nummer, Y.omschrijving, Y.toelichting, Indi.gewicht,
|
||||||
|
SUM(CASE WHEN Y.disabled = 'F' THEN
|
||||||
|
CASE WHEN SC.score = 3 THEN
|
||||||
|
0
|
||||||
|
ELSE
|
||||||
|
1
|
||||||
|
END
|
||||||
|
ELSE 0
|
||||||
|
END) AS deler,
|
||||||
|
SUM(CASE WHEN SC.score = 1 THEN 1
|
||||||
|
ELSE 0
|
||||||
|
END) AS noemer,
|
||||||
|
SUM(
|
||||||
|
CASE WHEN SC.score = 3 THEN
|
||||||
|
1
|
||||||
|
ELSE
|
||||||
|
0
|
||||||
|
END) AS aantalnvt
|
||||||
|
|
||||||
|
|
||||||
|
FROM tb_filledversions FV
|
||||||
|
JOIN tb_scores SC ON SC.filledversion_id = FV.id
|
||||||
|
JOIN tb_indicatoren Indi ON Indi.id = SC.indicator_id
|
||||||
|
JOIN tb_ijkpunten Y ON Y.id = SC.ijkpunt_id
|
||||||
|
WHERE FV.orgversie_id = {$orgversieid}
|
||||||
|
AND FV.organisatie_id = {$orgid}
|
||||||
|
AND FV.user_id ={$userid}
|
||||||
|
AND FV.meetellen = 1
|
||||||
|
GROUP BY SC.ijkpunt_id
|
||||||
|
ORDER BY Y.nummer ) AS Q ";
|
||||||
|
|
||||||
|
return $this->get_query_result();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function calculateindividualscoresoud($orgversieid, $orgid, $userid){
|
function calculateindividualscoresoud($orgversieid, $orgid, $userid){
|
||||||
$this->sql="SELECT SC.id, filledversion_id, SC.ijkpunt_id, scoretype, score,
|
$this->sql="SELECT SC.id, filledversion_id, SC.ijkpunt_id, scoretype, score,
|
||||||
@@ -637,17 +694,11 @@ class Scores_model extends MY_Model{
|
|||||||
$gevuldeversies = $this->fGetGevuldeVersies($orgversieid, $orgids);
|
$gevuldeversies = $this->fGetGevuldeVersies($orgversieid, $orgids);
|
||||||
if ($gevuldeversies) {
|
if ($gevuldeversies) {
|
||||||
$this->sql = " SELECT Q.omschrijving, Q.toelichting, Q.ijkpunt_id, Q.disabled, Q.scoretype,
|
$this->sql = " SELECT Q.omschrijving, Q.toelichting, Q.ijkpunt_id, Q.disabled, Q.scoretype,
|
||||||
CASE WHEN Q.aantalvier > 0 THEN
|
Q.sumscores/Q.sumgewicht AS gem, Q.nummer, 'F' AS disablenvt
|
||||||
CASE WHEN Q.aantalvier = Q.aantalnvt THEN
|
|
||||||
'T'
|
|
||||||
ELSE 'F'
|
|
||||||
END
|
|
||||||
ELSE 'F'
|
|
||||||
END AS disablenvt,
|
|
||||||
Q.sumscores/Q.sumgewicht AS gem, Q.nummer
|
|
||||||
FROM (
|
FROM (
|
||||||
SELECT Y.omschrijving, Y.toelichting,Y.id as ijkpunt_id,
|
SELECT Y.omschrijving, Y.toelichting,Y.id as ijkpunt_id,
|
||||||
Y.nummer, Y.disabled, SC.scoretype,
|
Y.nummer, Y.disabled, SC.scoretype,
|
||||||
|
|
||||||
|
|
||||||
SUM(CASE WHEN Y.disabled = 'T' THEN 0
|
SUM(CASE WHEN Y.disabled = 'T' THEN 0
|
||||||
WHEN Y.disabled = 'F' THEN
|
WHEN Y.disabled = 'F' THEN
|
||||||
@@ -665,13 +716,7 @@ class Scores_model extends MY_Model{
|
|||||||
THEN 0
|
THEN 0
|
||||||
WHEN SC.score = 3
|
WHEN SC.score = 3
|
||||||
THEN (50 * I.gewicht)
|
THEN (50 * I.gewicht)
|
||||||
END
|
END
|
||||||
WHEN SC.scoretype = 4
|
|
||||||
THEN
|
|
||||||
CASE WHEN SC.score = 1
|
|
||||||
THEN (100 * I.gewicht)
|
|
||||||
ELSE 0
|
|
||||||
END
|
|
||||||
WHEN SC.scoretype = 5
|
WHEN SC.scoretype = 5
|
||||||
THEN
|
THEN
|
||||||
CASE WHEN SC.score = 0
|
CASE WHEN SC.score = 0
|
||||||
@@ -708,9 +753,6 @@ class Scores_model extends MY_Model{
|
|||||||
SUM(CASE WHEN SC.scoretype = 4 AND SC.score = 3 THEN 1
|
SUM(CASE WHEN SC.scoretype = 4 AND SC.score = 3 THEN 1
|
||||||
ELSE 0
|
ELSE 0
|
||||||
END) AS aantalnvt,
|
END) AS aantalnvt,
|
||||||
SUM(CASE WHEN SC.scoretype = 4 THEN 1
|
|
||||||
ELSE 0
|
|
||||||
END) AS aantalvier,
|
|
||||||
SUM(I.gewicht) AS sumgewicht
|
SUM(I.gewicht) AS sumgewicht
|
||||||
FROM tb_scores SC
|
FROM tb_scores SC
|
||||||
JOIN tb_indicatoren I ON I.id = SC.indicator_id
|
JOIN tb_indicatoren I ON I.id = SC.indicator_id
|
||||||
@@ -726,6 +768,70 @@ class Scores_model extends MY_Model{
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function getgemscorestype4($orgversieid, $orgids){
|
||||||
|
$gevuldeversies = $this->fGetGevuldeVersies($orgversieid, $orgids);
|
||||||
|
if ($gevuldeversies) {
|
||||||
|
$this->sql = " SELECT Q.omschrijving,
|
||||||
|
Q.toelichting,
|
||||||
|
Q.ijkpunt_id,
|
||||||
|
Q.disabled,
|
||||||
|
Q.scoretype,
|
||||||
|
Q.noemer,
|
||||||
|
Q.deler,
|
||||||
|
CASE WHEN Q.deler > 0 THEN
|
||||||
|
'F'
|
||||||
|
WHEN Q.disabled = 'T' THEN
|
||||||
|
'F'
|
||||||
|
ELSE
|
||||||
|
'T'
|
||||||
|
END AS disablenvt,
|
||||||
|
CASE WHEN Q.deler > 0 THEN
|
||||||
|
(Q.noemer / Q.deler) * 100
|
||||||
|
ELSE
|
||||||
|
0
|
||||||
|
END AS gem,
|
||||||
|
Q.nummer
|
||||||
|
FROM (
|
||||||
|
SELECT Y.omschrijving,
|
||||||
|
Y.toelichting,
|
||||||
|
Y.id AS ijkpunt_id,
|
||||||
|
Y.nummer,
|
||||||
|
Y.disabled,
|
||||||
|
SC.scoretype,
|
||||||
|
SUM(
|
||||||
|
CASE WHEN Y.disabled = 'F' THEN
|
||||||
|
CASE WHEN SC.score = 3 THEN
|
||||||
|
0
|
||||||
|
ELSE
|
||||||
|
1
|
||||||
|
END
|
||||||
|
ELSE
|
||||||
|
0
|
||||||
|
END) AS deler,
|
||||||
|
SUM(
|
||||||
|
CASE WHEN SC.score = 1 THEN
|
||||||
|
1
|
||||||
|
ELSE
|
||||||
|
0
|
||||||
|
END) AS noemer
|
||||||
|
FROM
|
||||||
|
tb_scores SC
|
||||||
|
JOIN tb_indicatoren I ON I.id = SC.indicator_id
|
||||||
|
JOIN tb_ijkpunten Y ON Y.id = SC.ijkpunt_id
|
||||||
|
WHERE
|
||||||
|
SC.filledversion_id IN ({$gevuldeversies})
|
||||||
|
GROUP BY
|
||||||
|
SC.ijkpunt_id
|
||||||
|
ORDER BY
|
||||||
|
Y.nummer) AS Q ";
|
||||||
|
}
|
||||||
|
else return false;
|
||||||
|
return $this->get_query_result();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function getgemscoresoud($orgversieid, $orgid){
|
function getgemscoresoud($orgversieid, $orgid){
|
||||||
$gevuldeversies = $this->fGetGevuldeVersies($orgversieid, $orgid);
|
$gevuldeversies = $this->fGetGevuldeVersies($orgversieid, $orgid);
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ class Sopinhouden_model extends MY_Model{
|
|||||||
|
|
||||||
$versie = $result['targetversie'];
|
$versie = $result['targetversie'];
|
||||||
$mbgrafiek = $result['grafiek1'];
|
$mbgrafiek = $result['grafiek1'];
|
||||||
// print_r($mbgrafiek);
|
// $user->scores = $this->Scores_model->getgemscores($orgversieID, $user->id);
|
||||||
// exit;
|
// exit;
|
||||||
$imagemb =$this->Phantom_model->create_img($mbgrafiek, 'test.png', FALSE, FALSE, array(650, 300));
|
$imagemb =$this->Phantom_model->create_img($mbgrafiek, 'test.png', FALSE, FALSE, array(650, 300));
|
||||||
$imagedata = "<img src='data:image/png;base64,".$imagemb."' id='mod1image1'/>";
|
$imagedata = "<img src='data:image/png;base64,".$imagemb."' id='mod1image1'/>";
|
||||||
|
|||||||
@@ -180,7 +180,7 @@ ls.initIJkpuntenModel = function(){
|
|||||||
this.disablenvt = ko.observable(s.disablenvt === 'T');
|
this.disablenvt = ko.observable(s.disablenvt === 'T');
|
||||||
this.disablenvtV = ko.observable(s.disablenvtV === 'T');
|
this.disablenvtV = ko.observable(s.disablenvtV === 'T');
|
||||||
this.gem = s.disablenvt ==='T'? 'nvt' : s.disabled ==='T' ?'uitgezet': s.gem;
|
this.gem = s.disablenvt ==='T'? 'nvt' : s.disabled ==='T' ?'uitgezet': s.gem;
|
||||||
this.gemV = s.disablenvt ==='T'? 'nvt' : s.disabledV ==='T' ? 'uitgezet' : s.gemV;
|
this.gemV = s.disablenvtV ==='T'? 'nvt' : s.disabledV ==='T' ? 'uitgezet' : s.gemV;
|
||||||
this.kleur = s.disabled === 'F' && s.disablenvt === 'F'? s.kleur : 'lightgray';
|
this.kleur = s.disabled === 'F' && s.disablenvt === 'F'? s.kleur : 'lightgray';
|
||||||
this.kleurV = s.disabledV === 'F' && s.disablenvtV === 'F'? s.kleurV : 'lightgray';
|
this.kleurV = s.disabledV === 'F' && s.disablenvtV === 'F'? s.kleurV : 'lightgray';
|
||||||
|
|
||||||
|
|||||||
@@ -131,9 +131,10 @@ $(function () {
|
|||||||
// this.colorcode = '#e08885';
|
// this.colorcode = '#e08885';
|
||||||
this.colorcode = k.kleur ? k.kleur : "#cccccc";
|
this.colorcode = k.kleur ? k.kleur : "#cccccc";
|
||||||
if (k.disabled == "T" || k.disablenvt == "T") {
|
if (k.disabled == "T" || k.disablenvt == "T") {
|
||||||
this.gem='';
|
this.gem='nvt';
|
||||||
this.colorcode="#cccccc";
|
this.colorcode="#cccccc";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function fAddCriteria(c) {
|
function fAddCriteria(c) {
|
||||||
|
|||||||
Reference in New Issue
Block a user