tussenopslag
This commit is contained in:
@@ -34,6 +34,7 @@ class Gemiddeldenafbeeldingen {
|
||||
private $resultaten;
|
||||
private $kolombreedte;
|
||||
private $orgbreedte;
|
||||
private $disablenvt = 0;
|
||||
|
||||
private $gemiddeldenafbeeldingen;
|
||||
|
||||
@@ -180,13 +181,22 @@ class Gemiddeldenafbeeldingen {
|
||||
|
||||
private function loopIJkpunten(){
|
||||
foreach($this->ijkpunten as $index =>$this->ijkpunt){
|
||||
if(! isset($this->ijkpunt->score) || ! $this->ijkpunt->score) {continue;};
|
||||
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;
|
||||
}
|
||||
@@ -223,11 +233,12 @@ class Gemiddeldenafbeeldingen {
|
||||
private function setGemiddeldeScore(){
|
||||
$this->gemiddelde = new stdClass();
|
||||
$this->gemiddelde->score = 0;
|
||||
if ($this->aantalscores > 0) {
|
||||
$this->gemiddelde->score = round($this->somscore / $this->aantalY);
|
||||
}
|
||||
$deler = $this->aantalY - $this->disablenvt;
|
||||
if($deler > 0) $this->gemiddelde->score = round($this->somscore / $deler);
|
||||
|
||||
|
||||
$this->gemiddelde->nummer = 'gem';
|
||||
$this->gemiddelde->disabled = 'F';
|
||||
$this->gemiddelde->kleur =$this->getKleur ($this->gemiddelde->score);
|
||||
$this->ijkpunt = $this->gemiddelde;
|
||||
}
|
||||
|
||||
@@ -88,20 +88,26 @@ class Gemiddeldescores
|
||||
}
|
||||
}
|
||||
|
||||
private function telIJkpunten()
|
||||
{
|
||||
if ($this->ijkpunten) {
|
||||
$this->aantalY = count($this->ijkpunten);
|
||||
private function telIJkpunten(){
|
||||
if($this->ijkpunten){
|
||||
foreach($this->ijkpunten as $ijkpunt){
|
||||
if($ijkpunt->disabled == 'F'){
|
||||
$this->aantalY++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private function loopIJkpunten()
|
||||
{
|
||||
foreach ($this->ijkpunten as $index => $this->ijkpunt) {
|
||||
$this->ijkpunt->totaal = 0;
|
||||
$this->ijkpunt->aantallkrtn = 0;
|
||||
$this->loopLeerkrachten();
|
||||
$this->setIJkpuntGemiddeldeScores();
|
||||
if($this->ijkpunt->disabled == 'F') {
|
||||
$this->loopLeerkrachten();
|
||||
$this->setIJkpuntGemiddeldeScores();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@ class Schoolafbeeldingen {
|
||||
private $laagstescore = 101;
|
||||
private $schoolafbeeldingen;
|
||||
private $resultaten;
|
||||
private $disablenvt;
|
||||
|
||||
public function __construct(Schoolscores $schoolscores, $modulenr, $orgversieid, $clusterid, $orgid){
|
||||
$this->CI = & get_instance();
|
||||
@@ -145,7 +146,11 @@ class Schoolafbeeldingen {
|
||||
|
||||
private function telIJkpunten(){
|
||||
if($this->ijkpunten){
|
||||
$this->aantalY = count($this->ijkpunten);
|
||||
foreach($this->ijkpunten as $ijkpunt){
|
||||
if($ijkpunt->disabled == 'F'){
|
||||
$this->aantalY++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -191,26 +196,28 @@ class Schoolafbeeldingen {
|
||||
|
||||
|
||||
private function loopScores1(){
|
||||
|
||||
if(!$this->scores) return;
|
||||
foreach ($this->scores as $index => $this->score) {
|
||||
$this->setScoreSom();
|
||||
$this->setAantalScores($index);
|
||||
if($this->score->disabled == 'F' && $this->score->disablenvt == 'F') {
|
||||
|
||||
$this->somscore = $this->somscore + $this->score->gem;
|
||||
|
||||
$this->aantalscores++;
|
||||
}
|
||||
if($this->score->disabled == 'F' && $this->score->disablenvt == 'T'){
|
||||
$this->disablenvt++;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private function setScoreSom(){
|
||||
$this->somscore = $this->somscore + $this->score->gem;
|
||||
}
|
||||
|
||||
private function setAantalScores($index){
|
||||
$this->aantalscores = $index + 1;
|
||||
}
|
||||
|
||||
private function setGemiddeldeScore(){
|
||||
if(!$this->scores || $this->aantalscores == 0) return;
|
||||
$this->gemiddelde = new stdClass();
|
||||
$this->gemiddelde->gem = $this->somscore / $this->aantalY;
|
||||
$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;
|
||||
}
|
||||
@@ -286,6 +293,9 @@ class Schoolafbeeldingen {
|
||||
private function setWensKleuren(){
|
||||
if(! isset($this->wensen)) return;
|
||||
if(!isset($this->score->wens)) return;
|
||||
if($this->score->disabled == 'T')
|
||||
{$this->score->wenskleur = '#ffffff';
|
||||
return;}
|
||||
switch ($this->score->wens) {
|
||||
case 1:
|
||||
$this->score->wenskleur = $this->kleuren->kleur1;
|
||||
@@ -306,7 +316,7 @@ class Schoolafbeeldingen {
|
||||
|
||||
private function setAdvies(){
|
||||
|
||||
if(isset($this->score->wens) && $this->score->huidig < $this->score->wens && $this->score->huidig != 0 && $this->score->wens!= 0){
|
||||
if(isset($this->score->wens) && $this->score->huidig < $this->score->wens && $this->score->huidig != 0 && $this->score->wens!= 0 && $this->score->disabled == 'F'){
|
||||
$omschrijving = "";
|
||||
if(isset($this->score->omschrijving)){
|
||||
$omschrijving = $this->score->omschrijving;
|
||||
@@ -329,7 +339,7 @@ class Schoolafbeeldingen {
|
||||
|
||||
private function telIJkpuntenok()
|
||||
{
|
||||
if ($this->ambities && $this->score->gem >= $this->ambities->zprocent) {
|
||||
if ($this->ambities && $this->score->gem >= $this->ambities->zprocent && $this->score->disabled == 'F') {
|
||||
$this->ijkpuntenok++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,7 +54,8 @@ class Schoolscores
|
||||
}
|
||||
|
||||
private function setScores(){
|
||||
$this->scores = $this->CI->Scores_model->getgemscores($this->orgversieid, $this->orgid);
|
||||
$orglist [] = $this->orgid;
|
||||
$this->scores = $this->CI->Scores_model->getgemscores($this->orgversieid, $orglist);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -12,9 +12,11 @@ class Wenssituaties_model extends MY_Model{
|
||||
$this->load->model($models);
|
||||
}
|
||||
function getgewenst($orgversieid, $orgid){
|
||||
$this->sql = "SELECT id, ijkpunt_id, wens
|
||||
FROM tb_wenssituaties
|
||||
$this->sql = "SELECT W.id, W.ijkpunt_id, W.wens, Y.disabled
|
||||
FROM tb_wenssituaties W
|
||||
JOIN tb_ijkpunten Y ON W.ijkpunt_id = Y.id
|
||||
WHERE organisatie_id = {$orgid}
|
||||
AND Y.disabled = 'F'
|
||||
AND orgversie_id = {$orgversieid}";
|
||||
return $this->get_query_result();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user