tussenstand
This commit is contained in:
@@ -117,7 +117,7 @@ class Sop extends MY_Controller{
|
||||
$nieuweInhoud = $this->Sopinhouden_model->get(['id' => $newID], false, true);
|
||||
// om de vergelijkende versies bij te houden dient
|
||||
// per versie een record in de tabel tb_flexsop_gebruikteversies
|
||||
// te worden gemaakt.
|
||||
// te worden gemaakt.
|
||||
// de originele versie staat in de tabel tb_sopinhouden
|
||||
$index = 1;
|
||||
foreach ($vergelijkingen ? $vergelijkingen : [] as $vergelijking){
|
||||
|
||||
@@ -34,10 +34,15 @@ class Ambities_model extends MY_Model{
|
||||
return $this->get_query_row();
|
||||
}
|
||||
function getambitie($orgversieid, $orgid){
|
||||
$this->sql="SELECT A.id, gem_score AS gemscore, x_ijkpunten AS xijkpunten , z_procent AS zprocent
|
||||
$this->sql="SELECT A.id, gem_score AS gemscore, x_ijkpunten AS xijkpuntenoud, COUNT(Y.id) AS xijkpunten, z_procent AS zprocent
|
||||
FROM tb_ambities A
|
||||
JOIN tb_orgversies OV ON A.orgversie_id = OV.id
|
||||
JOIN tb_versies V ON OV.versie_id = V.id
|
||||
JOIN tb_ijkpunten Y ON Y.versie_id = V.id
|
||||
WHERE A.organisatie_id = {$orgid}
|
||||
AND A.orgversie_id = {$orgversieid}";
|
||||
AND A.orgversie_id = {$orgversieid}
|
||||
AND Y.disabled = 'F'
|
||||
GROUP BY A.id ";
|
||||
return $this->get_query_row();
|
||||
}
|
||||
function getdefault($aantalY){
|
||||
|
||||
@@ -37,7 +37,8 @@ class Ijkpunten_model extends MY_Model{
|
||||
$this->sql="SELECT COUNT(Y.id) AS aantalY
|
||||
FROM tb_orgversies OV
|
||||
JOIN tb_ijkpunten Y ON Y.versie_id = OV.versie_id
|
||||
WHERE OV.id ={$orgversieid} ";
|
||||
WHERE OV.id ={$orgversieid}
|
||||
AND Y.disabled = 'F' ";
|
||||
return $this->get_query_row('aantalY');
|
||||
}
|
||||
|
||||
|
||||
@@ -552,7 +552,7 @@ class Sopinhouden_model extends MY_Model{
|
||||
$targetversieid = $this->gettargetversie($profielid, $orgid,$chapterid);
|
||||
}
|
||||
if ($targetversieid) {
|
||||
$scores = $this->Scores_model->calculateschool($targetversieid, $orgid);
|
||||
$scores = $this->Scores_model->getgemscores($targetversieid, $orgid);
|
||||
$ambitie = $this->Ambities_model->getOrgAmbities($targetversieid, $orgid);
|
||||
}
|
||||
|
||||
@@ -569,34 +569,42 @@ class Sopinhouden_model extends MY_Model{
|
||||
$hoogstescore = -1;
|
||||
$welkelaagste = 0;
|
||||
$laagstescore = 101;
|
||||
if ($scores){
|
||||
foreach($scores as $score){
|
||||
$gem = 0;
|
||||
if ($scores) {
|
||||
foreach ($scores as $score) {
|
||||
// $gem = 0;
|
||||
//
|
||||
// if ($score->num > 0) {
|
||||
// $gem=$score->somscore / $score->num;
|
||||
// };
|
||||
// $score->kleurcode = $this->kleurcodes->getkleur($score->gem);
|
||||
|
||||
if ($score->num > 0) {
|
||||
$gem=$score->somscore / $score->num;
|
||||
};
|
||||
$totgem= $totgem + $gem;
|
||||
$totaantal=$totaantal + 1;
|
||||
if ($score->disabled == 'F' && $score->disablenvt == 'F') {
|
||||
$totgem = $totgem + $score->gem;
|
||||
$totaantal = $totaantal + 1;
|
||||
|
||||
$score->kleurcode=$this->kleurcodes->getkleur($gem);
|
||||
if ($score->gem > $hoogstescore) {
|
||||
$hoogstescore = $score->gem;
|
||||
$welkehoogste = $score->nummer;
|
||||
}
|
||||
if ($score->gem <= $laagstescore) {
|
||||
$laagstescore = $score->gem;
|
||||
$welkelaagste = $score->nummer;
|
||||
}
|
||||
if ($ambitie && $score->gem >= $ambitie->zprocent) {
|
||||
$ijkpuntenok = $ijkpuntenok + 1;
|
||||
};
|
||||
|
||||
if ($gem > $hoogstescore){
|
||||
$hoogstescore = $gem;
|
||||
$welkehoogste = $score->nummer;
|
||||
}
|
||||
if ($gem <= $laagstescore){
|
||||
$laagstescore = $gem;
|
||||
$welkelaagste = $score->nummer;
|
||||
}
|
||||
if ($ambitie && $gem >= $ambitie->zprocent) {$ijkpuntenok = $ijkpuntenok + 1;};
|
||||
|
||||
}
|
||||
if ($totaantal >0){ $totgem= round($totgem/ $totaantal, 2);}
|
||||
}
|
||||
$totgemkleur= $this->kleurcodes->getkleur($totgem);
|
||||
// foreach scores bereken som en dus totgem en ijkpuntenok
|
||||
$tabelid='';
|
||||
if ($totaantal > 0) {
|
||||
$totgem = round($totgem / $totaantal, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
$totgemkleur = $this->kleurcodes->getkleur($totgem);
|
||||
// foreach scores bereken som en dus totgem en ijkpuntenok
|
||||
}
|
||||
|
||||
$tabelid='';
|
||||
switch ($module){
|
||||
case 1: $tabelid = "tabelmb1"; break;
|
||||
case 3: $tabelid = "tabeltv1"; break;
|
||||
@@ -719,7 +727,7 @@ class Sopinhouden_model extends MY_Model{
|
||||
}
|
||||
if ($targetversieid){
|
||||
$targetversie = $this->Orgversies_model->get_record_by_id($targetversieid);
|
||||
$scores = $this->Scores_model->calculateschool($targetversieid, $orgid);
|
||||
$scores = $this->Scores_model->getgemscores($targetversieid, $orgid);
|
||||
$ambitie = $this->Ambities_model->getOrgAmbities($targetversieid, $orgid);
|
||||
|
||||
if($targetversie->scoretype == 7){
|
||||
@@ -742,11 +750,11 @@ class Sopinhouden_model extends MY_Model{
|
||||
$scores = $scores ? $scores : [];
|
||||
|
||||
foreach($scores as $score){
|
||||
$score->gem = 0;
|
||||
// $score->gem = 0;
|
||||
if ($score->num > 0) {
|
||||
$score->gem= round($score->somscore / $score->num,1);
|
||||
$score->gem= round($score->gem);
|
||||
}
|
||||
$score->huidig = $this->kleurcodes->getnummer($score->gem);
|
||||
$score->huidig = $score->nummer;
|
||||
if($targetversie->scoretype == 7){
|
||||
if($score->gem == $grens3) $score->huidig = 4;
|
||||
if($score->gem < $grens3) $score->huidig = 3;
|
||||
|
||||
@@ -16,13 +16,13 @@
|
||||
<colgroup>
|
||||
<col style="width: 25px; ">
|
||||
<col >
|
||||
<col span='9' style="width: 22px">
|
||||
<col span='11' style="width: 22px">
|
||||
</colgroup>
|
||||
<tr style="background-color: #ded0d7; border: 1px solid grey; border-bottom: none">
|
||||
<td colspan=2 style=" border-bottom: none; "></td>
|
||||
<td colspan=4 style="text-align:center; "> <b>huidige situatie</b></td>
|
||||
<td colspan=5 style="text-align:center; "> <b>huidige situatie</b></td>
|
||||
<td style="border: 1px; solid grey;"></td>
|
||||
<td colspan =4 style="text-align:center; "> <b> gewenste situatie</b></td>
|
||||
<td colspan =5 style="text-align:center; "> <b> gewenste situatie</b></td>
|
||||
<tr>
|
||||
<tr style="background-color: #ded0d7; border: 1px; solid grey; border-top: none">
|
||||
<td style="width: 25px; border-bottom: 1px solid grey;border-left: 1px solid grey;font-weight: bold;">nr</td>
|
||||
@@ -31,11 +31,14 @@
|
||||
<td style=" border-bottom: 1px solid grey;text-align:center; background-color: <?=$data['kleuren']->kleur2?>; color:#ffffff"> 2</td>
|
||||
<td style=" border-bottom: 1px solid grey;text-align:center; background-color: <?=$data['kleuren']->kleur3?>; color:#ffffff"> 3</td>
|
||||
<td style=" border-bottom: 1px solid grey;text-align:center; background-color: <?=$data['kleuren']->kleur4?>; color:#ffffff"> 4</td>
|
||||
<td style=" border-bottom: 1px solid grey;text-align:center; background-color: #808080"> </td>
|
||||
|
||||
<td style="border-bottom: 1px solid grey;background-color:#ded0d7"></td>
|
||||
<td style="border-bottom: 1px solid grey;text-align:center; background-color: <?=$data['kleuren']->kleur1?>; color:#ffffff"> 1</td>
|
||||
<td style="border-bottom: 1px solid grey;text-align:center; background-color: <?=$data['kleuren']->kleur2?>; color:#ffffff"> 2</td>
|
||||
<td style="border-bottom: 1px solid grey;text-align:center; background-color: <?=$data['kleuren']->kleur3?>; color:#ffffff"> 3</td>
|
||||
<td style="border-bottom: 1px solid grey; border-right: 1px solid grey;text-align:center; background-color: <?=$data['kleuren']->kleur4?>; color:#ffffff"> 4</td>
|
||||
<td style="border-bottom: 1px solid grey; text-align:center; background-color: <?=$data['kleuren']->kleur4?>; color:#ffffff"> 4</td>
|
||||
<td style="border-bottom: 1px solid grey;text-align:center; background-color: #808080; border-right: 1px solid grey; "> </td>
|
||||
</tr>
|
||||
<?php
|
||||
if ($data['lijsten'][0]->scores){
|
||||
@@ -43,30 +46,43 @@
|
||||
if($ijkpunt->nummer != 'gem'){?>
|
||||
<tr style="border:1px solid #dddddd;">
|
||||
<td style="border:1px solid #dddddd; text-align:right; padding-right:3px"><?php echo $ijkpunt->nummer;?></td>
|
||||
<td style="border:1px solid #dddddd;padding-left:2px;"><?php if (isset($ijkpunt->omschrijving)){echo $ijkpunt->omschrijving;}?></td>
|
||||
<td style="border:1px solid #dddddd" >
|
||||
<?php if ($ijkpunt->huidig == 1){?>
|
||||
<div style="width: 12px; height: 12px;border-radius: 12px;margin-left: 5px;background-color:<?php if(isset($ijkpunt->kleur)){echo $ijkpunt->kleur;} ?>"></div>
|
||||
<?php };?>
|
||||
<td style="border:1px solid #dddddd;padding-left:2px;"><?php if (isset($ijkpunt->omschrijving)){echo $ijkpunt->omschrijving;}?>
|
||||
<span><?php if (isset($ijkpunt->omschrijving)){echo $ijkpunt->omschrijving;}?></span>
|
||||
<span><?php if ($ijkpunt->disabled== 'T'){echo '(uit)';} ?></span>
|
||||
<span><?php if ($ijkpunt->disablenvt == 'T' &&$ijkpunt->disabled== 'F' ){echo '(nvt)';} ?></span>
|
||||
</td>
|
||||
|
||||
<?php if ($ijkpunt->disabled == 'F' && $ijkpunt->disablenvt == 'F'){?>
|
||||
<td style="border:1px solid #dddddd" >
|
||||
<?php if ($ijkpunt->huidig == 1 ){?>
|
||||
<div style="width: 12px; height: 12px;border-radius: 12px;margin-left: 5px;background-color:<?php if(isset($ijkpunt->kleur)){echo $ijkpunt->kleur;} ?>"></div>
|
||||
<?php };?>
|
||||
</td>
|
||||
<td style="border:1px solid #dddddd" >
|
||||
<?php if ($ijkpunt->huidig == 2){?>
|
||||
<div style="width: 12px; height: 12px;border-radius: 12px;margin-left: 5px;background-color:<?php if(isset($ijkpunt->kleur)){echo $ijkpunt->kleur;} ?>"></div>
|
||||
<?php };?>
|
||||
</td>
|
||||
<td style="border:1px solid #dddddd" >
|
||||
<?php if ($ijkpunt->huidig == 3){?>
|
||||
<div style="width: 12px; height: 12px;border-radius: 12px;margin-left: 5px;background-color:<?php if(isset($ijkpunt->kleur)){echo $ijkpunt->kleur;} ?>"></div>
|
||||
<?php };?>
|
||||
</td>
|
||||
<td style="border:1px solid #dddddd" >
|
||||
<?php if ($ijkpunt->huidig == 4){?>
|
||||
<div style="width: 12px; height: 12px;border-radius: 12px;margin-left: 5px;background-color:<?php if(isset($ijkpunt->kleur)){echo $ijkpunt->kleur;} ?>"></div>
|
||||
<?php };?>
|
||||
</td>
|
||||
<?php };?>
|
||||
<td style="border:1px solid #dddddd" >
|
||||
<?php if ($ijkpunt->huidig == 2){?>
|
||||
<div style="width: 12px; height: 12px;border-radius: 12px;margin-left: 5px;background-color:<?php if(isset($ijkpunt->kleur)){echo $ijkpunt->kleur;} ?>"></div>
|
||||
<?php };?>
|
||||
</td>
|
||||
<td style="border:1px solid #dddddd" >
|
||||
<?php if ($ijkpunt->huidig == 3){?>
|
||||
<div style="width: 12px; height: 12px;border-radius: 12px;margin-left: 5px;background-color:<?php if(isset($ijkpunt->kleur)){echo $ijkpunt->kleur;} ?>"></div>
|
||||
<?php };?>
|
||||
</td>
|
||||
<td style="border:1px solid #dddddd" >
|
||||
<?php if ($ijkpunt->huidig == 4){?>
|
||||
<div style="width: 12px; height: 12px;border-radius: 12px;margin-left: 5px;background-color:<?php if(isset($ijkpunt->kleur)){echo $ijkpunt->kleur;} ?>"></div>
|
||||
<?php if ($ijkpunt->disabled == 'T' || $ijkpunt->disablenvt == 'T' ){?>
|
||||
<div style="width: 12px; height: 12px;border-radius: 12px; margin-left: 5px;background-color: #808080 "></div>
|
||||
<?php };?>
|
||||
</td>
|
||||
|
||||
<td style="border-bottom:none; border-top:none"></td>
|
||||
|
||||
<?php if ($ijkpunt->disabled == 'F' && $ijkpunt->disablenvt == 'F'){?>
|
||||
<td style="border:1px solid #dddddd" >
|
||||
<?php if (isset($ijkpunt->wens) && $ijkpunt->wens == 1){ ?>
|
||||
<div style='width: 12px; height: 12px;border-radius: 12px;margin-left: 5px;background-color:<?php if(isset($ijkpunt->wenskleur)){echo $ijkpunt->wenskleur;} ?>'></div>
|
||||
@@ -88,6 +104,12 @@
|
||||
<div style='width: 12px; height: 12px;border-radius: 12px;margin-left: 5px;background-color:<?php if(isset($ijkpunt->wenskleur)){echo $ijkpunt->wenskleur;} ?>'></div>
|
||||
<?php };?>
|
||||
</td>
|
||||
<?php };?>
|
||||
<td style="border:1px solid #dddddd" >
|
||||
<?php if ($ijkpunt->disabled == 'T' || $ijkpunt->disablenvt == 'T' ){ ?>
|
||||
<div style='width: 12px; height: 12px;border-radius: 12px;margin-left: 5px;background-color: #808080'></div>
|
||||
<?php };?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php ;}};}; ?>
|
||||
</table>
|
||||
|
||||
@@ -41,12 +41,11 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($lijst->scores as $score){?>
|
||||
<?php foreach($lijst->scores as $score){
|
||||
$kleur = $score->disabled == 'T' || $score->disablenvt == 'T' ? '#808080' : $score->kleur; ?>
|
||||
<tr style="border: 1px solid grey">
|
||||
|
||||
|
||||
<td style="vertical-align:top; text-align: right; border-right: 1px solid grey; padding-left: 3px; background-color: <?php echo $score->kleur ?>" >
|
||||
<?php echo $score->gem ?>
|
||||
<td style="vertical-align:top; text-align: right; border-right: 1px solid grey; padding-left: 3px; background-color: <?= $kleur ?>">
|
||||
<?php echo $score->disabled == 'T' ? 'uit' : ($score->disablenvt == 'T' ? 'nvt' : (isset($score->gem) ? $score->gem : '')) ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
@@ -54,7 +53,7 @@
|
||||
|
||||
</table>
|
||||
<?php } ?>
|
||||
<p style="clear: both;">Scores in procenten.</p>
|
||||
<p style=" clear: both;">Scores in procenten.</p>
|
||||
</div>
|
||||
<?php ;} ;?>
|
||||
</body>
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
<tr style="border: 1px solid grey">
|
||||
|
||||
|
||||
<td style="vertical-align:top; text-align: right: border-right: 1px solid grey; padding-left: 3px; background-color: <?php echo $ijkpunt->kleur ?>" >
|
||||
<td style="vertical-align:top; text-align: right: border-right: 1px solid grey; padding-left: 3px; background-color: <?php echo $ijkpunt->disable== 'F' || $ijkpunt->kleur ?>" >
|
||||
<?php echo $ijkpunt->gem ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -88,7 +88,6 @@ ls.initOntwikkelModel = function(){
|
||||
,this)
|
||||
}
|
||||
function fAddResult(p){
|
||||
console.log(p, "p result")
|
||||
var dit = this;
|
||||
this.ijkpuntid = p.ijkpunt_id;
|
||||
this.wensid = 0;
|
||||
@@ -112,7 +111,6 @@ ls.initOntwikkelModel = function(){
|
||||
this.toelichting = p.toelichting;
|
||||
this.aantalscholen = p.aantalscholen;
|
||||
|
||||
console.log(this.disablentv, 'disablenvt')
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user