ijkpunten & ontwikelagenda
This commit is contained in:
@@ -100,15 +100,16 @@ class Rapontwikkel extends MY_Controller {
|
||||
if ( $schoolids )
|
||||
{
|
||||
$lijst = implode( ',', $schoolids );
|
||||
$scores = $this->Scores_model->calculateOverScholenNieuw( $orgversieid, $lijst );
|
||||
|
||||
}
|
||||
}
|
||||
if ( $organisatie->soort == 4 )
|
||||
{
|
||||
// $scores = $this->Scores_model->calculateschool( $orgversieid, $orgid );
|
||||
$scores = $this->Scores_model->getgemscores( $orgversieid, $orgid );
|
||||
$lijst = $organisatie->id;
|
||||
//
|
||||
}
|
||||
|
||||
$scores = $this->Scores_model->getgemscores( $orgversieid, $lijst);
|
||||
if ( $scores )
|
||||
{
|
||||
$gewenst = $this->Wenssituaties_model->getgewenst( $orgversieid, $orgid );
|
||||
|
||||
@@ -229,8 +229,9 @@ class Gemiddeldenafbeeldingen {
|
||||
if($deler > 0) $this->gemiddelde->score = round($this->somscore / $deler);
|
||||
|
||||
|
||||
$this->gemiddelde->nummer = 'gem';
|
||||
$this->gemiddelde->disabled = 'F';
|
||||
$this->gemiddelde->nummer = 'gem';
|
||||
$this->gemiddelde->disabled = 'F';
|
||||
$this->gemiddelde->disablenvt = 'F';
|
||||
$this->gemiddelde->kleur =$this->getKleur ($this->gemiddelde->score);
|
||||
$this->ijkpunt = $this->gemiddelde;
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
class Bestuurscores
|
||||
{
|
||||
private $CI;
|
||||
private $organisatie;
|
||||
private $scores;
|
||||
private $orgstring;
|
||||
private $metingen;
|
||||
@@ -29,15 +28,12 @@ class Bestuurscores
|
||||
|
||||
private function handle(){
|
||||
|
||||
$this->setOrg();
|
||||
|
||||
$this->setOrglist();
|
||||
$this->setScores();
|
||||
$this->setMetingen();
|
||||
}
|
||||
|
||||
private function setOrg(){
|
||||
$this->organisatie = $this->CI->Organisaties_model->get_record_by_id($this->orgid);
|
||||
}
|
||||
|
||||
private function setOrglist(){
|
||||
$orglist = $this->CI->Organisaties_model->getlistrecursief($this->orgid, []);
|
||||
|
||||
@@ -24,7 +24,8 @@ class Individuelescores
|
||||
private function handle(){
|
||||
$this->setUserid();
|
||||
$this->setScores();
|
||||
// $this->telScores();
|
||||
$this->loopScores();
|
||||
|
||||
}
|
||||
|
||||
private function setUserid(){
|
||||
@@ -35,6 +36,27 @@ class Individuelescores
|
||||
$this->scores = $this->CI->Scores_model->calculateindividualscores($this->orgversieid, $this->orgid, $this->userid);
|
||||
}
|
||||
|
||||
private function loopScores(){
|
||||
if(! isset($this->scores) || $this->scores == false ) return;
|
||||
foreach($this->scores as $this->score) {
|
||||
$this->setNietVanToepassing();
|
||||
$this->setGem();
|
||||
}
|
||||
}
|
||||
|
||||
private function setNietVanToepassing(){
|
||||
$this->score->disablenvt = 'F';
|
||||
if($this->score->aantalvier> 0 && $this->score->aantalvier == $this->score->aantalnvt)
|
||||
$this->score->disablenvt = 'T';
|
||||
|
||||
}
|
||||
|
||||
private function setGem(){
|
||||
$this->score->gem = 0;
|
||||
if(isset($this->score->somscore) && $this->score->num > 0) {
|
||||
$this->score->gem = $this->score->somscore/$this->score->num;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -232,9 +232,6 @@ 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);
|
||||
}
|
||||
@@ -244,10 +241,6 @@ 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);
|
||||
}
|
||||
@@ -257,10 +250,6 @@ 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);
|
||||
}
|
||||
@@ -343,7 +332,7 @@ class Lijsten
|
||||
if(count((array)$this->gemiddeldenAfbeeldingen) == 0) return;
|
||||
foreach($this->lijst->scores as $index => $this->score){
|
||||
$this->score->gem = 0;
|
||||
if($this->score->score) {
|
||||
if(isset($this->score->score) && $this->score->score > 0) {
|
||||
$this->score->gem = $this->score->score;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,7 +83,10 @@ class Userlijsten
|
||||
}
|
||||
|
||||
private function setLabels(){
|
||||
$this->lijst->labels = $this->CI->Labels_model->getalllabels($this->modulenr);
|
||||
// $this->lijst->labels = $this->CI->Labels_model->getalllabels($this->modulenr);
|
||||
$this->lijst->label = $this->CI->Labels_model->gettabellabel($this->modulenr);
|
||||
$this->lijst->label2 = $this->CI->Labels_model->getresultaatlabel($this->modulenr);
|
||||
|
||||
}
|
||||
|
||||
private function setAmbities(){
|
||||
@@ -134,39 +137,44 @@ class Userlijsten
|
||||
|
||||
|
||||
private function loopVergelijkingScores(){
|
||||
if( (!isset($this->lijst->vergelijkingen))) return;
|
||||
for($i = 0; $i < count($this->lijst->vergelijkingen); $i++){
|
||||
if( (!isset($this->lijst->vergelijkingen) ||$this->lijst->vergelijkingen== false )) return;
|
||||
for($i = 0; $i < count($this->lijst->scores); $i++){
|
||||
$this->setVergelijkingScores($i);
|
||||
}
|
||||
}
|
||||
|
||||
private function setVergelijkingScores($i){
|
||||
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;
|
||||
if($this->lijst->vergelijkingen[$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 setIndividueleMetingen(){
|
||||
if(!isset($this->lijst->scores)) return;
|
||||
$metingen = $this->CI->Scores_model->fCountGevuldeVersiesNieuw($this->orgversieid, $this->orgid);
|
||||
if($metingen){
|
||||
$this->lijst->metingen = $metingen->aantal;
|
||||
$this->lijst->aantalorgs = $metingen->aantalorgs;}
|
||||
if(!isset($this->lijst->scores)||$this->lijst->scores == false ) return;
|
||||
$this->lijst->metingen = 1;
|
||||
$this->lijst->aantalorgs = 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
private function setMetingenVergelijkingIndividueel(){
|
||||
if(! isset($this->lijst->vergelijkingen)) return;
|
||||
if(! isset($this->lijst->vergelijkingen)||$this->lijst->vergelijkingen == false ) return;
|
||||
foreach($this->lijst->vergelijkingen as $index => $this->lijst->vergelijking) {
|
||||
$metingenV = $this->kamerAfbeeldingen->getMetingen();
|
||||
$metingenV = $this->kamerScores->getMetingen();
|
||||
if($metingenV) {
|
||||
$this->lijst->metingen = $metingenV->aantal;
|
||||
$this->lijst->aantalorgs = $metingenV->aantalorgs;
|
||||
$this->lijst->metingenV = $metingenV->aantal;
|
||||
$this->lijst->aantalorgsV = $metingenV->aantalorgs;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
private function setVNaam(){
|
||||
$this->lijst->vNaam = $this->kamerScores->getOrgnaam();
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ class Scores_model extends MY_Model{
|
||||
return $this->get_query_result();
|
||||
}
|
||||
function calculateindividualscores($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, Y.disabled,
|
||||
SUM(CASE WHEN Y.disabled = 'T' THEN 0
|
||||
WHEN Y.disabled = 'F' THEN
|
||||
CASE
|
||||
|
||||
@@ -15,9 +15,9 @@ class Wenssituaties_model extends MY_Model{
|
||||
$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}";
|
||||
WHERE organisatie_id = {$orgid}
|
||||
AND orgversie_id = {$orgversieid}
|
||||
ORDER BY Y.nummer ";
|
||||
return $this->get_query_result();
|
||||
}
|
||||
function getgewenstvoorpartituur($orgversieid, $orgid){
|
||||
|
||||
@@ -280,7 +280,7 @@
|
||||
</th>
|
||||
|
||||
<th colspan="1"
|
||||
style="overflow: hidden; text-overflow: ellipsis; font-size: 10px; border-right: 2px solid white; padding-left: 3px;"
|
||||
style="overflow: hidden; text-overflow: ellipsis; font-size: 10px;vertical-align: top; border-right: 2px solid white; padding-left: 3px;"
|
||||
data-bind=" text: naamV">
|
||||
</th>
|
||||
</tr>
|
||||
|
||||
@@ -190,12 +190,12 @@
|
||||
<colgroup>
|
||||
<col style="width: 25px">
|
||||
<col >
|
||||
<col span='9' style="width: 35px">
|
||||
<col span='11' style="width: 35px">
|
||||
</colgroup>
|
||||
<tr>
|
||||
<td colspan=6 style="text-align:right; padding-right: 15px"> <b>huidige situatie</b><br/> </td>
|
||||
<td colspan=7 style="text-align:right; padding-right: 15px"> <b>huidige situatie</b><br/> </td>
|
||||
<td></td>
|
||||
<td colspan =4 > <b> gewenste situatie</b><br/> </td>
|
||||
<td colspan =5 > <b> gewenste situatie</b><br/> </td>
|
||||
<tr>
|
||||
<tr class="modal-header">
|
||||
<td style="width: 25px"></td>
|
||||
@@ -204,25 +204,34 @@
|
||||
<td style=" text-align:center" class="oranje"> 2</td>
|
||||
<td style=" text-align:center" class="groen"> 3</td>
|
||||
<td style=" text-align:center" class="blauw"> 4</td>
|
||||
<td style=" text-align:center; background-color: #808080;" > </td>
|
||||
<td style="background-color:#ffffff"></td>
|
||||
<td style="text-align:center" class="rood" > 1</td>
|
||||
<td style=" text-align:center" class="oranje" > 2</td>
|
||||
<td style="text-align:center" class="groen" > 3</td>
|
||||
<td style="text-align:center" class="blauw" > 4</td>
|
||||
<td style="text-align:center; background-color: #808080; " > </td>
|
||||
</tr>
|
||||
<tbody data-bind="foreach : results">
|
||||
<tr class=" fixedH" >
|
||||
<td class="allborders"
|
||||
data-bind="text: nummer" style="text-align:right; padding-right:3px; vertical-align:top"></td>
|
||||
<td style="vertical-align:top;"
|
||||
data-bind="text: nummer,
|
||||
style: {backgroundColor: disabled == 'T' || disablentv == 'T' ? '#cccccc' : ''}"
|
||||
style="text-align:right; padding-right:3px; vertical-align:top">
|
||||
</td>
|
||||
<td style="vertical-align:top; "
|
||||
class="allborders fixedH clickable"
|
||||
data-bind="text: omschrijving, click: $parent.fToonToelichting">
|
||||
data-bind=" click: $parent.fToonToelichting, style: {backgroundColor: disabled == 'T' || disablentv == 'T' ? '#cccccc' : ''}">
|
||||
<span data-bind="text: omschrijving"></span>
|
||||
<span data-bind="visible: disabled == 'T'" > (Uitgezet.)</span>
|
||||
<span data-bind="visible: disabled == 'F' && disablentv == 'T'" > (Niet van toepassing.)</span>
|
||||
|
||||
</td>
|
||||
<td class="allborders" ><div class="cirkel" data-bind="css: {'rood' : huidig() == 1}"></div></td>
|
||||
<td class="allborders"><div class="cirkel" data-bind="css: {'oranje' : huidig() == 2}"></div></td>
|
||||
<td class="allborders"><div class="cirkel" data-bind="css: {'groen' : huidig() == 3}"></div></td>
|
||||
<td class="allborders"><div class="cirkel" data-bind="css: {'blauw' : huidig() == 4}"></div></td>
|
||||
<td class="allborders"><div class="cirkel" data-bind="css: {'grijs' : huidig() == 5}"></div></td>
|
||||
|
||||
<td style="border-bottom:none; border-top:none"></td>
|
||||
|
||||
@@ -230,6 +239,7 @@
|
||||
<td class="allborders" data-bind="click: $parent.fUpdateGewenst.bind($data,2)"><div class="cirkel" data-bind="css: {'oranje' : gewenst() == 2}"> </div></td>
|
||||
<td class="allborders" data-bind="click: $parent.fUpdateGewenst.bind($data,3)"><div class="cirkel" data-bind="css: {'groen' : gewenst() == 3}"> </div></td>
|
||||
<td class="allborders" data-bind="click: $parent.fUpdateGewenst.bind($data,4)"><div class="cirkel" data-bind="css: {'blauw' : gewenst() == 4}"> </div></td>
|
||||
<td class="allborders" ><div class="cirkel" data-bind="css: {'grijs' : gewenst() == 5}"> </div></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -920,6 +920,12 @@ tr.selected, td.selected{
|
||||
.rood{
|
||||
background-color:#e08885;
|
||||
}
|
||||
|
||||
.grijs{
|
||||
background-color:#808080;
|
||||
|
||||
}
|
||||
|
||||
.submenupage{
|
||||
display:none;
|
||||
}
|
||||
|
||||
@@ -149,14 +149,14 @@ ls.initIJkpuntenModel = function(){
|
||||
|
||||
this.scores = ko.observableArray([]);
|
||||
this.erzijnscores = ko.observable(true);
|
||||
|
||||
if(l.scores){
|
||||
var meegeven = 'scores';
|
||||
$.each(l.scores, function (i, s){
|
||||
dit.scores.push(new fAddScore(i,s, meegeven))
|
||||
})
|
||||
}
|
||||
else if(l.vergelijkingen){
|
||||
else if(l.vergelijkingen){
|
||||
|
||||
var meegeven = 'vergelijkingen';
|
||||
$.each(l.vergelijkingen, function (x, v){
|
||||
dit.scores.push(new fAddScore(x,v, meegeven))
|
||||
@@ -188,22 +188,18 @@ ls.initIJkpuntenModel = function(){
|
||||
this.omschrijving = s.omschrijving;
|
||||
this.toelichting = s.toelichting;
|
||||
if (meegeven == 'vergelijkingen'){
|
||||
this.gem = s.gem;
|
||||
if(s.disablenvt =='T') dit.gem ='nvt';
|
||||
if(s.disabled =='T') dit.gem ='uitgezet';
|
||||
this.gemV = s.gem;
|
||||
this.gem = '';
|
||||
this.gemV = s.gemV;
|
||||
this.disabled = ko.observable(false);
|
||||
this.disabledV = ko.observable(false);
|
||||
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.gem ='uitgezet';
|
||||
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;
|
||||
|
||||
@@ -224,9 +220,9 @@ ls.initIJkpuntenModel = function(){
|
||||
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;
|
||||
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;
|
||||
if(s.disabledV == 'F' && s.disablenvtV == 'F')this.kleurV =s.kleurV;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -497,8 +493,6 @@ ls.initIJkpuntenModel = function(){
|
||||
self.nieuwsteVersie(nieuw);
|
||||
}
|
||||
$.each(result.lijsten, function(j,l){
|
||||
console.log(l, "l")
|
||||
|
||||
if(j == 0){
|
||||
self.label(l.label)
|
||||
|
||||
|
||||
@@ -88,21 +88,32 @@ ls.initOntwikkelModel = function(){
|
||||
,this)
|
||||
}
|
||||
function fAddResult(p){
|
||||
|
||||
console.log(p, "p result")
|
||||
var dit = this;
|
||||
this.ijkpuntid = p.ijkpunt_id;
|
||||
this.wensid = 0;
|
||||
|
||||
if (p.gewenstid) { this.wensid = p.gewenstid; }
|
||||
// if (p.gewenstid) { this.wensid = p.gewenstid; }
|
||||
this.scoretype = p.scoretype;
|
||||
|
||||
this.huidig = ko.observable( p.huidig); // observable is niet nodig maar dit was eerst een computed
|
||||
this.disabled = p.disabled;
|
||||
this.disablentv = p.disablenvt;
|
||||
this.huidig = ko.observable( p.huidig);
|
||||
if(p.disabled == 'T' || p.disablenvt == 'T') this.huidig(5)
|
||||
|
||||
|
||||
|
||||
// observable is niet nodig maar dit was eerst een computed
|
||||
this.gewenst = ko.observable(3);
|
||||
if (p.gewenst) {this.gewenst(p.gewenst)};
|
||||
if(p.disabled == 'T' || p.disablenvt == 'T') this.gewenst(5)
|
||||
|
||||
this.nummer = p.nummer;
|
||||
this.omschrijving = p.omschrijving;
|
||||
this.toelichting = p.toelichting;
|
||||
this.aantalscholen = p.aantalscholen;
|
||||
|
||||
console.log(this.disablentv, 'disablenvt')
|
||||
|
||||
}
|
||||
|
||||
if (ls.OntwikkelModel !== undefined){
|
||||
@@ -205,8 +216,7 @@ ls.initOntwikkelModel = function(){
|
||||
},
|
||||
fUpdateGewenst: function(num){
|
||||
var self=ls.OntwikkelModel;
|
||||
|
||||
this.gewenst(num);
|
||||
if(this.huidig() != 5 ) this.gewenst(num);
|
||||
},
|
||||
fSwitchOrg: function(){
|
||||
var self = ls.OntwikkelModel;
|
||||
@@ -341,27 +351,12 @@ ls.initOntwikkelModel = function(){
|
||||
self.ingevuld(false);
|
||||
if (self.selectedOrgversion() == undefined) return;
|
||||
|
||||
var submitData = {orgversieid : self.selectedOrgversion().id,
|
||||
orgid : self.selectedOrg().id
|
||||
}
|
||||
$.post("index.php/monpas/rapontwikkel/getscores", submitData, function(data){
|
||||
self.results.removeAll();
|
||||
if (data){
|
||||
$.each(data.scores, function(i,p){
|
||||
self.results.push(new fAddResult(p));
|
||||
self.ingevuld(true);
|
||||
})
|
||||
self.fGetWriteAutorisatie();
|
||||
}
|
||||
|
||||
|
||||
|
||||
},'json');
|
||||
|
||||
var submitData = {orgversieid : self.selectedOrgversion().id,
|
||||
orgid : self.selectedOrg().id
|
||||
}
|
||||
$.post("index.php/monpas/rapontwikkel/getscores", submitData, function(data){
|
||||
|
||||
self.results.removeAll();
|
||||
if (data){
|
||||
$.each(data.scores, function(i,p){
|
||||
@@ -371,8 +366,6 @@ ls.initOntwikkelModel = function(){
|
||||
self.fGetWriteAutorisatie();
|
||||
}
|
||||
|
||||
|
||||
|
||||
},'json');
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user