Merge branch 'develop'

This commit is contained in:
Monique
2021-11-22 11:44:02 +01:00
55 changed files with 2210 additions and 1393 deletions
@@ -138,4 +138,13 @@ class Beheer extends MY_Controller{
"gewicht" => $this->clean_input("gewicht"));
$this->Indicatoren_model->update_record($data, $indicatorid);
}
function disableijkpunt(){
if (!$this->userid ) die;
$ijkpuntid = $this->clean_input("id");
$disabled = $this->clean_input("disabled");
$this->Ijkpunten_model->update_record(['disabled' => $disabled ], $ijkpuntid);
}
}
@@ -301,7 +301,8 @@ class Rapijkpunten extends MY_Controller{
$userLijsten = new Userlijsten($orguserid, $orgid, $orgversies);
$lijsten = $userLijsten->getLijsten();
$nieuwsteversie = $userLijsten->getNieuwsteVersie();
//LS matrixmodel.js verwacht een variable vorm die aangeeft of het een individuele versie is
$lijsten[0]->vorm=2;
$data =[
'lijsten' => $lijsten,
'aantal' => $aantal,
@@ -387,16 +387,19 @@ private function getGemiddeldenSchool($labels, $aantalY, $orgversieID, $kleuren)
$aantalrijen = $aantalrijen + 1;
for ($i = 0; $i < $aantalY; $i++) {
if(isset($user->scores[$i])) {
if($user->scores[$i]->disabled == 'F' && $user->scores[$i]->disablenvt == 'F') {
// if ($user->scores[$i]->gem == '' || $user->scores[$i]->gem == null) {
// // doe niks
// } else {
$aantalscores++;
$sumscore[$i] = $sumscore[$i] + $user->scores[$i]->gem;
$aantalresults[$i] = $aantalresults[$i] + 1;
$sumscorerij = $sumscorerij + $user->scores[$i]->gem;
if ($sumscorerij > 0) {
$waarden++;
}
}
// }
$user->scores[$i]->kleur = $this->getkleur($user->scores[$i]->gem, $kleuren);
@@ -624,6 +627,10 @@ private function getGemiddeldeScores($labels, $aantalY, $kleuren){
$aantalrijen = $aantalrijen + 1;
for ($i = 0; $i < $aantalY; $i++) {
if(isset($user->scores[$i])) {
if($user->scores[$i]->disabled == 'F' &&
($user->scores[$i]->aantalvier == 0 ||
($user->scores[$i]->aantalvier > 0 &&
$user->scores[$i]->aantalnvt != $user->scores[$i]->aantalvier ))){
// if ($user->scores[$i]->gem == '' || $user->scores[$i]->gem == null) {
// // doe niks
// } else {
@@ -634,6 +641,7 @@ private function getGemiddeldeScores($labels, $aantalY, $kleuren){
if ($sumscorerij > 0) {
$waarden++;
// }
}
}
$user->scores[$i]->kleur = $this->getkleur($user->scores[$i]->gem, $kleuren);
}
@@ -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 );
+1 -1
View File
@@ -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){
+2 -1
View File
@@ -55,7 +55,8 @@ class MY_Controller extends CI_Controller{
// public $version = '1.17.70'; // bopropswop
// public $version = '1.17.72'; // data2mysql fout
// public $version = '1.17.73'; // 0-waarden aantal tlvs in omvang extra ondersteuning
public $version = '1.17.74'; // mogelijkheid tot uitzetten extra ondersteuning in divmeters
// public $version = '1.17.74'; // mogelijkheid tot uitzetten extra ondersteuning in divmeters
public $version = '1.17.75'; // uitzetten ijpunten en in lijst nvt niet meetellen
public $partituurid;
public $globProfielVersieID = 1;
@@ -34,6 +34,7 @@ class Gemiddeldenafbeeldingen {
private $resultaten;
private $kolombreedte;
private $orgbreedte;
private $disablenvt = 0;
private $gemiddeldenafbeeldingen;
@@ -180,13 +181,14 @@ 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->telScoresOp();
$this->setAantalScores();
}
$this->setGemiddeldeScore(); // gemiddelde ga je niet in de loop berekenen
}
private function telScoresOp(){
$this->somscore = $this->somscore + $this->ijkpunt->score;
}
@@ -223,11 +225,13 @@ 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->nummer = 'gem';
$this->gemiddelde->disabled = 'F';
$this->gemiddelde->disablenvt = 'F';
$this->gemiddelde->kleur =$this->getKleur ($this->gemiddelde->score);
$this->ijkpunt = $this->gemiddelde;
}
@@ -322,8 +326,13 @@ class Gemiddeldenafbeeldingen {
}
private function setAdvies(){
if(isset($this->ijkpunt->wens) && $this->ijkpunt->huidig < $this->ijkpunt->wens &&
$this->ijkpunt->huidig != 0 && $this->ijkpunt->wens!= 0 && isset($this->ijkpunt->omschrijving)){
if(isset($this->ijkpunt->wens) &&
$this->ijkpunt->huidig < $this->ijkpunt->wens &&
$this->ijkpunt->wens!= 0 &&
isset($this->ijkpunt->omschrijving ) &&
$this->ijkpunt->disabled == 'F' &&
$this->ijkpunt->disablenvt == 'F'){
array_push($this->adviezen, [
"nummer"=> $this->ijkpunt->nummer,
"omschrijving" =>$this->ijkpunt->omschrijving
@@ -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()
@@ -88,20 +87,28 @@ 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->disablenvt = 'F';
$this->ijkpunt->totaal = 0;
$this->ijkpunt->aantallkrtn = 0;
$this->loopLeerkrachten();
$this->setIJkpuntGemiddeldeScores();
if($this->ijkpunt->disabled == 'F') {
$this->loopLeerkrachten();
$this->setNietvanToepassing();
$this->setIJkpuntGemiddeldeScores();
}
}
}
@@ -128,6 +135,7 @@ class Gemiddeldescores
$this->setAantalScores();
if ($this->slaover == false) {
$this->setIJkpuntTotaal();
$this->telNietVanToepassing();
}
}
}
@@ -152,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){
@@ -159,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;
@@ -35,6 +31,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();
@@ -121,7 +118,6 @@ class Schoolafbeeldingen {
$this->setLabels();
$this->telIJkpunten();
$this->setPeriode();
$this->setKleurcodes();
$this->setKleuren();
$this->loopScores1();
$this->setGemiddeldeScore();
@@ -145,7 +141,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++;
}
}
}
}
@@ -155,9 +155,6 @@ class Schoolafbeeldingen {
}
private function setKleurcodes(){
$this->kleurcodes = new Kleurcodes();
}
private function setKleuren(){
@@ -191,26 +188,30 @@ 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->disabled = 'F';
$this->gemiddelde->disablenvt = 'F';
$this->gemiddelde->nummer = 'gem';
$this->score = $this->gemiddelde;
}
@@ -286,6 +287,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 +310,11 @@ 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->wens!= 0 &&
$this->score->disabled == 'F' &&
$this->score->disablenvt == 'F'){
$omschrijving = "";
if(isset($this->score->omschrijving)){
$omschrijving = $this->score->omschrijving;
@@ -317,20 +325,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->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(){
@@ -20,6 +20,9 @@ class Afbeeldingen {
private $welkelaagste = 0;
private $laagstescore = 101;
private $resultaten;
private $disablenvt = 0;
private $ijkpunten;
private $aantalY = 0;
public function __construct($scoresObject, $modulenr, $orgversieid, $clusterid, $orgid, $zprocent){
$this->CI = & get_instance();
@@ -59,6 +62,8 @@ class Afbeeldingen {
}
private function handle(){
$this->setIJkpunten();
$this->telIJkpunten();
$this->setScores();
$this->setSWVid();
$this->setOrgversie();
@@ -70,6 +75,20 @@ class Afbeeldingen {
$this->loopScores2();
}
private function setIJkpunten(){
$this->ijkpunten = $this->CI->Ijkpunten_model->getijkpuntenMetIndicatoren($this->orgversieid);
}
private function telIJkpunten(){
if($this->ijkpunten){
foreach($this->ijkpunten as $ijkpunt){
if($ijkpunt->disabled == 'F'){
$this->aantalY++;
}
}
}
}
private function setScores(){
$this->scores = $this->scoresobject->getScores();
}
@@ -115,20 +134,26 @@ class Afbeeldingen {
private function loopScores1(){
if(!$this->scores) return;
foreach ($this->scores as $index => $this->score) {
$this->berekenGemiddelden();
$this->setScoreSom();
$this->setAantalScores($index);
if($this->score->disabled == 'F' && $this->score->disablenvt == 'F') {
// $this->berekenGemiddelden();
$this->setScoreSom();
$this->setAantalScores($index);
}
if($this->score->disabled == 'F' && $this->score->disablenvt == 'T'){
$this->disablenvt++;
}
}
}
private function berekenGemiddelden(){
if(!$this->scores) return;
$this->score->gem = 0;
if($this->score->num > 0 ){
// $this->score->gem = round((($this->score->somscore/ $this->score->num)* 10)/10);
$this->score->gem = $this->score->somscore/ $this->score->num;
}
}
// private function berekenGemiddelden(){
// if(!$this->scores) return;
// $this->score->gem = 0;
// if($this->score->num > 0 ){
//// $this->score->gem = round((($this->score->somscore/ $this->score->num)* 10)/10);
// $this->score->gem = $this->score->somscore/ $this->score->num;
// }
// }
private function setScoreSom(){
@@ -137,13 +162,18 @@ class Afbeeldingen {
}
private function setAantalScores($index){
$this->aantalscores = $index + 1;
$this->aantalscores++;
}
private function setGemiddeldeScore(){
if(!$this->scores || $this->aantalscores == 0) return;
$this->gemiddelde = new stdClass();
$this->gemiddelde->gem = $this->somscore / $this->aantalscores;
$this->gemiddelde->gem = 0;
$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;
}
@@ -196,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++;
}
}
}
}
@@ -3,8 +3,9 @@
class Bestuurscores
{
private $CI;
private $organisatie;
private $scores;
private $orgstring;
private $metingen;
public function __construct( $orgversieid, $orgid, $vorm)
@@ -20,20 +21,33 @@ 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(){
$this->organisatie = $this->CI->Organisaties_model->get_record_by_id($this->orgid);
}
private function setOrglist(){
$orglist = $this->CI->Organisaties_model->getlistrecursief($this->orgid, []);
if($orglist) {
$this->orgstring = implode(',', $orglist);
}
}
private function setScores(){
$this->scores = $this->CI->Scores_model->calculateBG($this->orgversieid, $this->orgid);
$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);
}
}
@@ -24,7 +24,8 @@ class Individuelescores
private function handle(){
$this->setUserid();
$this->setScores();
$this->telScores();
$this->loopScores();
}
private function setUserid(){
@@ -34,11 +35,28 @@ class Individuelescores
private function setScores(){
$this->scores = $this->CI->Scores_model->calculateindividualscores($this->orgversieid, $this->orgid, $this->userid);
}
private function telScores(){
foreach($this->scores as $index => $this->score){
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;
}
}
}
@@ -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();
}
@@ -63,8 +68,12 @@ class Kamerscores
private function setScores(){
if(!$this->orgids) return;
$this->scores = $this->CI->Scores_model->calculateOverScholen($this->orgversieid, $this->orgids);
$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);
}
}
@@ -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();
@@ -196,10 +197,17 @@ 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);
}
@@ -207,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()
@@ -248,6 +260,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();
@@ -270,12 +283,56 @@ 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;
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;
}
}
@@ -318,100 +375,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(){
@@ -64,7 +70,11 @@ class Swvscores
}
private function setScores(){
$this->scores = $this->CI->Scores_model->calculateOverScholen($this->orgversieid, $this->orgids);
$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);
}
}
@@ -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,33 +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;
$this->lijst->metingen = $this->gemiddeldeScores->getAantalLeerkrachten();
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) {
$this->lijst->metingenV = $this->lijst->vergelijking->aantallijsten;
return;
$metingenV = $this->kamerScores->getMetingen();
if($metingenV) {
$this->lijst->metingenV = $metingenV->aantal;
$this->lijst->aantalorgsV = $metingenV->aantalorgs;
}
}
}
private function setVNaam(){
$this->lijst->vNaam = $this->kamerScores->getOrgnaam();
}
+1
View File
@@ -55,6 +55,7 @@ class Phantom_model extends CI_Model{
if( $margins ) $data['margins'] = serialize($margins);
curl_setopt_array($curl, array(
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0),
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_URL => 'https://print.pensare-services.nl/test/1',
CURLOPT_POST => 1,
+7 -2
View File
@@ -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){
+13 -2
View File
@@ -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();
}
@@ -27,12 +37,13 @@ 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');
}
function getijkpunten1($versieid){
$this->sql="SELECT Y.id, Y.nummer,Y.omschrijving,Y.toelichting
$this->sql="SELECT Y.id, Y.nummer,Y.omschrijving,Y.toelichting, Y.disabled
FROM tb_ijkpunten Y
WHERE Y.versie_id ={$versieid}
ORDER BY Y.nummer ";
@@ -0,0 +1,29 @@
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**Scorekleuren_model november 2031 */
class Scorekleuren_model extends MY_Model{
protected $tablename = 'tb_scorekleuren';
function __construct(){
parent::__construct();
$models = array('');
$this->load->model($models);
}
function getGemiddeldeKleur($scoretype, $gemiddelde){
$this->sql="SELECT kleurcode, nummer, ondergrens, bovengrens
FROM tb_scorekleuren
WHERE scoretype = {$scoretype}
AND bovengrens > {$gemiddelde}
AND ondergrens <= {$gemiddelde}
AND disabled = 'F' ";
return $this->get_query_row();
}
}
+175 -4
View File
@@ -25,9 +25,65 @@ 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, Y.disabled,
SUM(CASE WHEN Y.disabled = 'T' THEN 0
WHEN Y.disabled = 'F' THEN
CASE
WHEN SC.scoretype = 1 THEN SC.score * 10 * Indi.gewicht
WHEN SC.scoretype = 2 THEN SC.score * Indi.gewicht
WHEN (SC.scoretype = 3 OR SC.scoretype = 5) THEN
CASE
WHEN SC.score = 1 THEN 100 * Indi.gewicht
WHEN (SC.score = 2 OR SC.score = 0) THEN 0
ELSE 50 * Indi.gewicht
END
WHEN SC.scoretype = 4 THEN
CASE
WHEN SC.score = 1 THEN 100 * Indi.gewicht
ELSE 0
END
WHEN SC.scoretype = 6 THEN
CASE
WHEN SC.score = 2 THEN 60 * Indi.gewicht
WHEN SC.score = 3 THEN 100 * Indi.gewicht
ELSE 0
END
WHEN SC.scoretype = 7 THEN
CASE
WHEN SC.score = 1 THEN 100 * Indi.gewicht
WHEN SC.score = 2 THEN 66.6 * Indi.gewicht
WHEN SC.score = 3 THEN 33.3 * Indi.gewicht
ELSE 0
END
ELSE 0
END
ELSE 0
END) AS somscore,
SUM( Indi.gewicht ) AS num,
SUM(CASE WHEN SC.scoretype = 4 AND SC.score = 3 THEN 1
ELSE 0
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
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 ";
return $this->get_query_result();
}
function calculateindividualscoresoud($orgversieid, $orgid, $userid){
$this->sql="SELECT SC.id, filledversion_id, SC.ijkpunt_id, scoretype, score,
SUM(CASE
WHEN SC.scoretype = 1 THEN SC.score * 10 * Indi.gewicht
@@ -419,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
@@ -460,6 +516,25 @@ class Scores_model extends MY_Model{
return $this->get_query_row();
}
function fCountGevuldeVersiesNieuw($orgversieid, $orgids){
$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();
}
function fGetGevuldeBestuurVersie($orgversieid, $bgid){
@@ -558,8 +633,104 @@ class Scores_model extends MY_Model{
return $lijst;
}
function getgemscores($orgversieid, $orgids){
$gevuldeversies = $this->fGetGevuldeVersies($orgversieid, $orgids);
if ($gevuldeversies) {
$this->sql = " SELECT Q.omschrijving, Q.toelichting, Q.ijkpunt_id, Q.kleurnummer, Q.disabled, Q.scoretype,
CASE WHEN Q.aantalvier > 0 THEN
CASE WHEN Q.aantalvier = Q.aantalnvt THEN
'T'
ELSE 'F'
END
ELSE 'F'
END AS disablenvt,
Q.sumscores/Q.sumgewicht AS gem, Q.kleurcode, Q.nummer, Q.ondergrens, Q.bovengrens
FROM (
SELECT Y.omschrijving, Y.toelichting,Y.id as ijkpunt_id,
Y.nummer, Y.disabled, SC.scoretype, SK.nummer AS kleurnummer,
SK.kleurcode, SK.ondergrens, SK.bovengrens,
SUM(CASE WHEN Y.disabled = 'T' THEN 0
WHEN Y.disabled = 'F' THEN
CASE WHEN SC.scoretype = 1
THEN (SC.score * I.gewicht * 10)
WHEN SC.scoretype = 2
THEN (SC.score * I.gewicht)
WHEN SC.scoretype = 3
THEN
CASE WHEN SC.score = 0
THEN 0
WHEN SC.score = 1
THEN (100 * I.gewicht)
WHEN SC.score = 2
THEN 0
WHEN SC.score = 3
THEN (50 * I.gewicht)
END
WHEN SC.scoretype = 4
THEN
CASE WHEN SC.score = 1
THEN (100 * I.gewicht)
ELSE 0
END
WHEN SC.scoretype = 5
THEN
CASE WHEN SC.score = 0
THEN 0
WHEN SC.score = 1
THEN (100 * I.gewicht)
WHEN SC.score = 2
THEN 0
WHEN SC.score = 3
THEN (50 * I.gewicht)
END
WHEN SC.scoretype = 6
THEN
CASE WHEN SC.score = 2
THEN (50 * I.gewicht)
WHEN SC.score = 3
THEN (100 * I.gewicht)
ELSE 0
END
WHEN SC.scoretype = 7
THEN
CASE WHEN SC.score = 1
THEN (100 * I.gewicht)
WHEN SC.score = 2
THEN (66.6 * I.gewicht)
WHEN SC.score = 3
THEN (33.3 * I.gewicht)
ELSE 0
END
ELSE 0
END
ELSE 0
END)AS sumscores,
SUM(CASE WHEN SC.scoretype = 4 AND SC.score = 3 THEN 1
ELSE 0
END) AS aantalnvt,
SUM(CASE WHEN SC.scoretype = 4 THEN 1
ELSE 0
END) AS aantalvier,
SUM(I.gewicht) AS sumgewicht
FROM tb_scores SC
JOIN tb_indicatoren I ON I.id = SC.indicator_id
JOIN tb_ijkpunten Y ON Y.id = SC.ijkpunt_id
JOIN tb_scorekleuren SK ON SK.scoretype = SC.scoretype
WHERE SC.filledversion_id IN ({$gevuldeversies})
AND SK.disabled = Y.disabled
GROUP BY SC.ijkpunt_id, SK.id
ORDER BY Y.nummer ) AS Q
HAVING Q.ondergrens <= gem AND Q.bovengrens > gem ";
}
else return false;
return $this->get_query_result();
}
function getgemscores($orgversieid, $orgid){
function getgemscoresoud($orgversieid, $orgid){
$gevuldeversies = $this->fGetGevuldeVersies($orgversieid, $orgid);
$p = "SC.scoretype = 7";
+86 -42
View File
@@ -79,6 +79,8 @@ class Sopinhouden_model extends MY_Model{
$versie = $result['targetversie'];
$mbgrafiek = $result['grafiek1'];
// print_r($mbgrafiek);
// exit;
$imagemb =$this->Phantom_model->create_img($mbgrafiek, 'test', FALSE, FALSE, array(650, 300));
$imagedata = "<img src='data:image/png;base64,".$imagemb."' id='mod1image1'/>";
$pos = strpos($content,'mbgrafiek1');
@@ -552,7 +554,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 +571,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) {
$score->gem = round($score->gem);
//
// if ($score->num > 0) {
// $gem=$score->somscore / $score->num;
// };
//LS ACTIEF GEMAAKT
$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 ($totaantal > 0) {
$totgem = round($totgem / $totaantal, 0);
}
$totgemkleur = $this->kleurcodes->getkleur($totgem);
// foreach scores bereken som en dus totgem en ijkpuntenok
}
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='';
$tabelid='';
switch ($module){
case 1: $tabelid = "tabelmb1"; break;
case 3: $tabelid = "tabeltv1"; break;
@@ -616,7 +626,7 @@ class Sopinhouden_model extends MY_Model{
"labels" => $labels,
"scores" => $scores,
'totgem' => $totgem,
'totgemkleur' =>$totgem,
'totgemkleur' =>$totgemkleur,
'ijkpuntenok' => $ijkpuntenok,
'welkehoogste' => $welkehoogste,
'hoogstescore' => round($hoogstescore,1),
@@ -668,16 +678,33 @@ class Sopinhouden_model extends MY_Model{
$lks = $this->Filledversions_model->getlks($orgid, $orgversieid);
if ($lks){
foreach($lks as $lk){
$lk->scores = $this->Scores_model->getlkscores($lk->filledversionid);
$lk->scores = $this->Scores_model->calculateindividualscores($orgversieid, $orgid, $lk->user_id);
$som = 0;
if ($lk->scores){
foreach($lk->scores as $score){
foreach($lk->scores as $index => $score){
$aftrek = 0;
$score->gem = new stdClass();
$score->gem = $score->somcore / $score->num;
$score->colorcode = $this->kleurcodes->getkleur($score->gem);
$som = $som + $score->gem;
$score->gem = 0;
$score->colorcode = '#808080';
$score->disablenvt = 'F';
if($score->aantalvier > 0 && $score->aantalvier == $score->aantalnvt) $score->disablenvt = 'T';
if($score->disabled == 'F' && $score->disablenvt == 'F') {
$score->gem = $score->somscore / $score->num;
$score->colorcode = $this->kleurcodes->getkleur($score->gem);
$som = $som + $score->gem;
}
if($score->disabled == 'T') $aftrek++;
if($score->disablenvt == 'T') $aftrek++;
}
$lk->lkgem = round($som / $aantalijkpunten, 0);
$deler = $aantalijkpunten - $aftrek;
if ($deler > 0) $lk->lkgem = round($som / $aantalijkpunten, 0);
else $lk->gem = 0;
$lk->colorcode = $this->kleurcodes->getkleur($lk->lkgem);
}
}
@@ -696,11 +723,21 @@ class Sopinhouden_model extends MY_Model{
if ($lks[0]->scores){
$som = 0;
$aftrek = 0;
foreach($lks[0]->scores as $score){
$score->colorcode = $this->kleurcodes->getkleur($score->gem);
$som = $som + $score->gem;
$score->colorcode = '#808080';
if($score->disabled == 'F' && $score->disablenvt == 'F') {
$score->colorcode = $this->kleurcodes->getkleur($score->gem);
$som = $som + $score->gem;
}
if($score->disabled =='T' || $score->disablenvt =='T' ) $aftrek++;
}
$lks[0]->lkgem = round($som / $aantalijkpunten, 0);
if($aantalijkpunten - $aftrek > 0) {
$lks[0]->lkgem = round($som / ($aantalijkpunten - $aftrek), 0);
}
else{
$lks[0]->lkgem = 0;
}
$lks[0]->colorcode = $this->kleurcodes->getkleur($lks[0]->lkgem);
}
return $lks;
@@ -719,7 +756,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){
@@ -743,10 +780,12 @@ class Sopinhouden_model extends MY_Model{
foreach($scores as $score){
$score->gem = 0;
if ($score->num > 0) {
$score->gem= round($score->somscore / $score->num,1);
if (isset($score->gem)) {
$score->gem= round($score->gem);
}
$score->huidig = $this->kleurcodes->getnummer($score->gem);
$score->kleur = '#808080';
if(isset($score->kleurcode)) $score->kleur = $score->kleurcode;
$score->huidig = $score->kleurnummer;
if($targetversie->scoretype == 7){
if($score->gem == $grens3) $score->huidig = 4;
if($score->gem < $grens3) $score->huidig = 3;
@@ -754,10 +793,15 @@ class Sopinhouden_model extends MY_Model{
if($score->gem < $grens1) $score->huidig = 1;
}
if ($gewenst){
if ($gewenst){
$score->wens = $gewenst[$i]->wens;
$i = $i + 1;
};
}
else{
$score->wens = 3;
$score->wenskleur = '#9fdf9f';
}
}; //foreach
$labels = $this->Labels_model->getalllabels($module);
@@ -12,10 +12,12 @@ class Wenssituaties_model extends MY_Model{
$this->load->model($models);
}
function getgewenst($orgversieid, $orgid){
$this->sql = "SELECT id, ijkpunt_id, wens
FROM tb_wenssituaties
WHERE organisatie_id = {$orgid}
AND orgversie_id = {$orgversieid}";
$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 orgversie_id = {$orgversieid}
ORDER BY Y.nummer ";
return $this->get_query_result();
}
function getgewenstvoorpartituur($orgversieid, $orgid){
+10
View File
@@ -0,0 +1,10 @@
### Send POST request with json body
POST https://print.pensare-services.nl/test/1
Content-Type: application/json
{
"html":"<h1>test</h1>",
"file":"test.png",
"app": "MONPAS"
}
@@ -45,12 +45,15 @@
if(isset($score->omschrijving)){
$omschrijving = $score->omschrijving;
};
$kleur = '#808080';
if(isset($score->kleur) && $score->disabled == 'F' && $score->disablenvt =='F') $kleur = $score->kleur;
?>
labels.push(<?php $score->nummer ?>);
scores.push({
y: <?= $score->gem ?>,
color: '<?=$score->kleur ?>',
color: '<?=$kleur ?>',
name: '<?= $score->nummer ?>',
soort: 'score',
versie: <?= $lijst->periodenummer ?>,
@@ -235,9 +238,9 @@
<?php echo isset($score->omschrijving) ? $score->omschrijving: 'Gemiddelde'?>
</td>
<?php foreach ($data['lijsten'] as $lijst){
$kleur = isset($lijst->scores[$i]->kleur) ? $lijst->scores[$i]->kleur : '';
$gem = isset($lijst->scores[$i]->gem) ? $lijst->scores[$i]->gem : ''; ?>
<td style="background-color: <?=$kleur ?> !important;
$kleur = $lijst->scores[$i]->disabled == 'T' || $lijst->scores[$i]->disablenvt == 'T' ? '' : (isset($lijst->scores[$i]->kleur) ? $lijst->scores[$i]->kleur : '');
$gem = $lijst->scores[$i]->disabled == 'T' ? 'uit' : ($lijst->scores[$i]->disablenvt == 'T' ? 'nvt' : (isset($lijst->scores[$i]->gem) ? $lijst->scores[$i]->gem : '')); ?>
<td style="background-color: <?=$kleur ?> !important;
padding-right: 3px;
text-align: right" >
<?=$gem?>
@@ -235,9 +235,9 @@
<?php echo isset($score->omschrijving) ? $score->omschrijving: 'Gemiddelde'?>
</td>
<?php foreach ($data['lijsten'] as $lijst){
$kleur = isset($lijst->scores[$i]->kleur) ? $lijst->scores[$i]->kleur : '';
$gem = isset($lijst->scores[$i]->gem) ? $lijst->scores[$i]->gem : ''; ?>
<td style="background-color: <?=$kleur ?> !important;
$kleur = $lijst->scores[$i]->disabled == 'T' || $lijst->scores[$i]->disablenvt == 'T' ? '' : (isset($lijst->scores[$i]->kleur) ? $lijst->scores[$i]->kleur : '');
$gem = $lijst->scores[$i]->disabled == 'T' ? 'uit' : ($lijst->scores[$i]->disablenvt == 'T' ? 'nvt' : (isset($lijst->scores[$i]->gem) ? $lijst->scores[$i]->gem : '')); ?>
<td style="background-color: <?=$kleur ?> !important;
padding-right: 3px;
text-align: right" >
<?=$gem?>
@@ -233,9 +233,9 @@
white-space: nowrap;" ><?php echo isset($score->omschrijving) ? $score->omschrijving: 'Gemiddelde'?>
</td>
<?php foreach ($data['lijsten'] as $lijst){
$kleur = isset($lijst->scores[$i]->kleur) ? $lijst->scores[$i]->kleur : '';
$gem = isset($lijst->scores[$i]->gem) ? $lijst->scores[$i]->gem : ''; ?>
<td style="background-color: <?=$kleur ?> !important;
$kleur = $lijst->scores[$i]->disabled == 'T' || $lijst->scores[$i]->disablenvt == 'T' ? '' : (isset($lijst->scores[$i]->kleur) ? $lijst->scores[$i]->kleur : '');
$gem = $lijst->scores[$i]->disabled == 'T' ? 'uit' : ($lijst->scores[$i]->disablenvt == 'T' ? 'nvt' : (isset($lijst->scores[$i]->gem) ? $lijst->scores[$i]->gem : '')); ?>
<td style="background-color: <?=$kleur ?> !important;
padding-right: 3px;
text-align: right" >
<?=$gem?>
@@ -45,13 +45,15 @@
$omschrijving = "gemiddelde";
if(isset($score->omschrijving)){
$omschrijving = $score->omschrijving;
$kleur = '#808080';
if(isset($score->kleur) && $score->disabled == 'F' && $score->disablenvt =='F') $kleur = $score->kleur;
};
?>
labels.push(<?php $score->nummer ?>);
scores.push({
y: <?= $score->gem ?>,
color: '<?=$score->kleur ?>',
color: '<?=$kleur ?>',
name: '<?= $score->nummer ?>',
soort: 'score',
versie: <?= $lijst->periodenummer ?>,
@@ -234,8 +236,8 @@
<?php echo isset($score->omschrijving) ? $score->omschrijving: 'Gemiddelde'?>
</td>
<?php foreach ($data['lijsten'] as $lijst){
$kleur = isset($lijst->scores[$i]->kleur) ? $lijst->scores[$i]->kleur : '';
$gem = isset($lijst->scores[$i]->gem) ? $lijst->scores[$i]->gem : ''; ?>
$kleur = $lijst->scores[$i]->disabled == 'T' || $lijst->scores[$i]->disablenvt == 'T' ? '' : (isset($lijst->scores[$i]->kleur) ? $lijst->scores[$i]->kleur : '');
$gem = $lijst->scores[$i]->disabled == 'T' ? 'uit' : ($lijst->scores[$i]->disablenvt == 'T' ? 'nvt' : (isset($lijst->scores[$i]->gem) ? $lijst->scores[$i]->gem : '')); ?>
<td style="background-color: <?=$kleur ?> !important;
padding-right: 3px;
text-align: right" >
@@ -227,8 +227,8 @@
<td style="overflow-x: hidden; overflow-y: hidden; text-overflow: ellipsis; white-space: nowrap;" ><?php echo isset($score->omschrijving) ? $score->omschrijving: 'Gemiddelde'?>
</td>
<?php foreach ($data['lijsten'] as $lijst){
$kleur = isset($lijst->scores[$i]->kleur) ? $lijst->scores[$i]->kleur : '';
$gem = isset($lijst->scores[$i]->gem) ? $lijst->scores[$i]->gem : ''; ?>
$kleur = $lijst->scores[$i]->disabled == 'T' || $lijst->scores[$i]->disablenvt == 'T' ? '' : (isset($lijst->scores[$i]->kleur) ? $lijst->scores[$i]->kleur : '');
$gem = $lijst->scores[$i]->disabled == 'T' ? 'uit' : ($lijst->scores[$i]->disablenvt == 'T' ? 'nvt' : (isset($lijst->scores[$i]->gem) ? $lijst->scores[$i]->gem : '')); ?>
<td style="background-color: <?=$kleur ?> !important;
padding-right: 3px;
text-align: right" >
@@ -227,8 +227,9 @@
<td style="overflow-x: hidden; overflow-y: hidden; text-overflow: ellipsis; white-space: nowrap; " ><?php echo isset($score->omschrijving) ? $score->omschrijving: 'Gemiddelde'?>
</td>
<?php foreach ($data['lijsten'] as $lijst){
$kleur = isset($lijst->scores[$i]->kleur) ? $lijst->scores[$i]->kleur : '';
$gem = isset($lijst->scores[$i]->gem) ? $lijst->scores[$i]->gem : ''; ?>
$kleur = $lijst->scores[$i]->disabled == 'T' || $lijst->scores[$i]->disablenvt == 'T' ? '' : (isset($lijst->scores[$i]->kleur) ? $lijst->scores[$i]->kleur : '');
$gem = $lijst->scores[$i]->disabled == 'T' ? 'uit' : ($lijst->scores[$i]->disablenvt == 'T' ? 'nvt' : (isset($lijst->scores[$i]->gem) ? $lijst->scores[$i]->gem : '')); ?>
<td style="background-color: <?=$kleur ?> !important;
padding-right: 3px;
text-align: right" >
+4 -3
View File
@@ -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>
@@ -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>
+2 -1
View File
@@ -190,8 +190,9 @@
<!-- ko foreach: ijkpunten -->
<th class="clickable"
data-bind="click: $parent.fToonToelichting"
style=" text-align:center; font-size: x-small; padding: 3px; border: 2px solid white; width: 30px;">
<span data-bind="text: nummer, attr:{'title' : omschrijving}, click: $parent.fToonToelichting">
<span data-bind="text: nummer, attr:{'title' : omschrijving}">
</span>
</th>
<!-- /ko -->
+169 -118
View File
@@ -1,148 +1,199 @@
<div class="col-sm-12 mainpagina" id ="pagmonitor">
<div data-bind="visible: soort() !=4">
Invullen kan alleen op schoolniveau
</div>
<div data-bind="visible: erzijnperiodes()== false && soort() ==4">
Er zijn geen periodes voor uw organisatie. Neem contact op met de helpdesk.
</div>
<div data-bind="visible: erzijnperiodes() && soort() == 4">
<h4>Selecteer een periode
<select data-bind=" options : orgversions,
<div data-bind="visible: soort() !=4">
Invullen kan alleen op schoolniveau
</div>
<div data-bind="visible: erzijnperiodes()== false && soort() ==4">
Er zijn geen periodes voor uw organisatie. Neem contact op met de helpdesk.
</div>
<div data-bind="visible: erzijnperiodes() && soort() == 4">
<h4>Selecteer een periode
<select data-bind=" options : orgversions,
optionsText : 'info',
value : selectedOrgversion,
event : {change: fChangeVersion}">
</select>
<!-- <span style="display: inline-block; float:right"-->
<!-- class="glyphicon glyphicon-print"-->
<!-- data-bind="click: fPrint">-->
<!-- </span>-->
</select>
<span style="display: inline-block; float:right"
class="glyphicon glyphicon-print"
data-bind="click: fPrint">
</span>
</h4>
<div class="row">
<div class="col-sm-8">
<p>De lijst wordt automatisch opgeslagen.
</h4>
<div class="row">
<div class="col-sm-8">
<p>De lijst wordt automatisch opgeslagen.
</p>
<p style="margin-bottom: 20px;">Klik op een donkerrode balk van een ijkpunt voor inhoudelijke toelichting.
<p style="margin-bottom: 20px;">Klik op een donkerrode balk van een ijkpunt voor inhoudelijke toelichting.
</p>
</div>
</div>
</div>
</div>
<div id ="invultabel">
<table>
<div id ="invultabel">
<table>
<tbody data-bind="foreach:listitems">
<tr class="clickable" data-bind="click: $parent.fToonToelichting">
<td style="width:30px; background-color:#6f0b3d; color:#ffffff" data-bind="text:nummer"> </td>
<td style="background-color:#6f0b3d; color:#ffffff" data-bind="text: omschrijving"> </td>
</tr>
<tr>
<td colspan = 2>
<!-- ko if: $parent.selectedOrgversion() && $parent.selectedOrgversion().toonOmschrijving()== false -->
<table style="width:100%">
<thead>
<tr>
<th class="header2" style="width: 3%;padding-left: 2px;text-align:right"> nr </th>
<th class="header2" style="width: 60%;padding-left: 2px">indicator</th>
<th class="header2" style="width: 30%;padding-left: 2px;text-align:left"> score</th>
</tr>
</thead>
<tbody data-bind="foreach:listitems">
<tr class="clickable" data-bind="click: $parent.fToonToelichting">
<td style="width:30px; "
data-bind= "text:nummer,
style: {color: disabled()? '#262626' : '#ffffff' ,
backgroundColor: disabled()? '#d9d9d9' : '#6f0b3d' }" >
</td>
<td data-bind= "text: disabled() ? omschrijving + ' (uitgezet)' : omschrijving,
style: {color: disabled()? '#262626' : '#ffffff',
backgroundColor: disabled() ? '#d9d9d9' : '#6f0b3d' }">
</td>
</tr>
<tr>
<td colspan = 2>
<!-- ko if: $parent.selectedOrgversion() && $parent.selectedOrgversion().toonOmschrijving()== false -->
<table style="width:100%">
<thead>
<tr>
<th class="header2" style="width: 3%;padding-left: 2px;text-align:right"
data-bind="style: {backgroundColor: disabled() ? '#d9d9d9' : '#e7e2e5'}"> nr
</th>
<th class="header2" style="width: 60%;padding-left: 2px"
data-bind="style: {backgroundColor: disabled() ? '#d9d9d9' : '#e7e2e5'}">indicator
</th>
<th class="header2" style="width: 30%;padding-left: 2px;text-align:left"
data-bind="style: {backgroundColor: disabled() ? '#d9d9d9' : '#e7e2e5'}"> score
</th>
</tr>
</thead>
<tbody data-bind="foreach: indicatorscores">
<tr style="border-bottom: 1px solid #ebebeb">
<td style="text-align:right;vertical-align:top" data-bind="text: nummer">
</td>
<td data-bind="text: omschrijving" style="vertical-align:top">
</td>
<td>
<tbody data-bind="foreach: indicatorscores">
<tr style="border-bottom: 1px solid #ebebeb">
<td style="text-align:right;vertical-align:top" data-bind="text: nummer,
style: {color: $parent.disabled()? '#d9d9d9' : '#262626' }">
</td>
<td data-bind="text: omschrijving,
style: {color: $parent.disabled()? '#d9d9d9' : '#262626' }" style="vertical-align:top">
</td>
<td>
<span data-bind="visible: scoretype==1">
<input class="rapport"
data-bind="textInput: score,
event:{input: $root.fUpdateScoretype12},
enable: $root.editok(),
enable: $root.editok() && $parent.disabled() == false,
attr:{'id' : $index}" />
</span>
<span data-bind="visible: scoretype == 2">
<span data-bind="visible: scoretype == 2">
<input class="integer"
data-bind="textInput: score,
event:{input: $root.fUpdateScoretype12},
visible: scoretype==2,
enable: $root.editok()" /> %
enable: $root.editok() && $parent.disabled() == false" /> %
</span>
<div data-bind="visible: scoretype==3 || scoretype == 4 || scoretype == 5 || scoretype == 6 || scoretype==7 ">
<!-- ko foreach: $root.scoreopties -->
<!-- ko if: $parent.scoretype == type -->
<input type='radio'
data-bind="checked: $parent.score(), event:{click: $root.fUpdateScoretypeVanaf3.bind($data, $parent.id)}, attr: {'name': $parent.id , 'value': value}, enable: $root.editok()" />
<span style="vertical-align:top; display: inline-block; margin-left:5px;" data-bind="text: optie"> </span>
<!-- /ko -->
<!-- /ko -->
</td>
</tr>
</tbody>
<div data-bind="visible: scoretype==3 || scoretype == 4 || scoretype == 5 || scoretype == 6 || scoretype==7 ">
<!-- ko if: $parent.disabled() == false -->
<!-- ko foreach: $root.scoreopties -->
<!-- ko if: $parent.scoretype == type -->
<input type='radio'
data-bind="checked: $parent.score(),
event:{click: $root.fUpdateScoretypeVanaf3.bind($data, $parent.id)},
attr: {'name': $parent.id , 'value': value},
enable: $root.editok() " />
<span style="vertical-align:top; display: inline-block; margin-left:5px;" data-bind="text: optie"> </span>
<!-- /ko -->
<!-- /ko -->
<!-- /ko -->
<!-- ko if: $parent.disabled() == true -->
<!-- ko foreach: $root.scoreopties -->
<!-- ko if: $parent.scoretype == type -->
<input type='radio'
data-bind="checked: $parent.score(),
enable: false " />
<span style="vertical-align:top; display: inline-block; margin-left:5px;" data-bind="text: optie"> </span>
<!-- /ko -->
<!-- /ko -->
<!-- /ko -->
</td>
</tr>
</tbody>
</table>
<!-- /ko -->
<!-- ko if: $parent.selectedOrgversion() && $parent.selectedOrgversion().toonOmschrijving()== true -->
<table style="width:100%">
<thead>
<tr>
<th class="header2" style="width: 3%;padding-left: 2px;text-align:right"> nr </th>
<th class="header2" data-bind="attr: {'colspan': $parent.optieslengte()}" style="width: 97%;padding-left: 2px">indicator</th>
<!-- <th class="header2" style="width: 7%;padding-left: 2px;">insp.</th>-->
</table>
<!-- /ko -->
<!-- ko if: $parent.selectedOrgversion() && $parent.selectedOrgversion().toonOmschrijving()== true -->
<table style="width:100%">
<thead>
<tr>
<th class="header2" style="width: 3%;padding-left: 2px;text-align:right"> nr </th>
<th class="header2" data-bind="attr: {'colspan': $parent.optieslengte()}" style="width: 97%;padding-left: 2px">indicator</th>
<!-- <th class="header2" style="width: 7%;padding-left: 2px;">insp.</th>-->
</tr>
</thead>
</tr>
</thead>
<tbody data-bind="foreach: indicatorscores">
<tr style="border-bottom: 1px solid #ebebeb">
<td style="text-align:right;vertical-align:top; border-left: 1px solid #ebebeb;"
data-bind="text: nummer">
</td>
<td data-bind="text: omschrijving, attr: {'colspan': $root.optieslengte()}" style="vertical-align:top; border-right: 1px solid #ebebeb;">
</td>
</tr>
<tr style="border-bottom: 1px solid #ebebeb">
<td style="border-left: 1px solid #ebebeb;">
</td>
<tbody data-bind="foreach: indicatorscores">
<tr style="border-bottom: 1px solid #ebebeb">
<td style="text-align:right;vertical-align:top; border-left: 1px solid #ebebeb;"
data-bind="text: nummer,
style: {color: $parent.disabled()? '#d9d9d9' : '#262626' } ">
</td>
<td data-bind="text: omschrijving,
attr: {'colspan': $root.optieslengte()},
style: {color: $parent.disabled()? '#d9d9d9' : '#262626' }" style="vertical-align:top; border-right: 1px solid #ebebeb;">
</td>
</tr>
<tr style="border-bottom: 1px solid #ebebeb">
<td style="border-left: 1px solid #ebebeb;">
</td>
<!-- ko if: $parent.disabled() == false -->
<!-- ko foreach: $root.scoreopties -->
<td style="border-right: 1px solid #ebebeb;vertical-align:top">
<input style="vertical-align:top; padding-left: 5px;" type='radio'
data-bind="checked: $parent.score(),
event:{click: $root.fUpdateScoretypeVanaf3.bind($data, $parent.id)},
attr: {'name': $parent.id , 'value': value},
enable: $root.editok()" />
<p style="vertical-align:top; padding-left: 5px;"
data-bind="text: scoretekst">
</p>
</td>
<!-- /ko -->
<!-- /ko -->
<!-- ko if: $parent.disabled() == true -->
<!-- ko foreach: $root.scoreopties -->
<td style="border-right: 1px solid #ebebeb;vertical-align:top">
<input style="vertical-align:top; padding-left: 5px;" type='radio'
data-bind="checked: $parent.score(),
enable: false" />
<p style="vertical-align:top; padding-left: 5px;"
data-bind="text: scoretekst">
</p>
</td>
<!-- /ko -->
<!-- /ko -->
</tr>
</tbody>
<!-- ko foreach: $root.scoreopties -->
<td style="border-right: 1px solid #ebebeb;vertical-align:top">
<input style="vertical-align:top; padding-left: 5px;" type='radio'
data-bind="checked: $parent.score(), event:{click: $root.fUpdateScoretypeVanaf3.bind($data, $parent.id)}, attr: {'name': $parent.id , 'value': value}, enable: $root.editok()" />
<p style="vertical-align:top; padding-left: 5px;" data-bind="text: scoretekst"> </p>
</td>
<!-- /ko -->
</tr>
</tbody>
</table>
<!-- /ko -->
</td>
</tr>
</tbody>
</table>
<!-- /ko -->
</td>
</tr>
</tbody>
</table>
</div>
<div>
<p>Notitie</p>
<textarea style="width: 100%; min-height: 70px"
data-bind="textInput: notitie, event:{'input' : fUpdateNotitie}"></textarea>
</div>
<div class="row">
<div class="col-sm-8">
<div style="background-color: #e7e2e5; padding:10px;">
<p>
<span class="glyphicon glyphicon-unchecked" data-bind="visible: !meetellen(), click: fTelMee"></span>
<span class="glyphicon glyphicon-check" style="margin-right: 5px;" data-bind="visible: meetellen(), click: fTelMee"></span>
Zichtbaar maken bij de tabbladen ijkpunten, resultaatmatrix, ontwikkelagenda & lijsten.<sup>*</sup>
</p>
</table>
</div>
<div>
<p>Notitie</p>
<textarea style="width: 100%; min-height: 70px"
data-bind="textInput: notitie, event:{'input' : fUpdateNotitie}"></textarea>
</div>
<div class="row">
<div class="col-sm-8">
<div style="background-color: #e7e2e5; padding:10px;">
<p>
<span class="glyphicon glyphicon-unchecked" data-bind="visible: !meetellen(), click: fTelMee"></span>
<span class="glyphicon glyphicon-check" style="margin-right: 5px;" data-bind="visible: meetellen(), click: fTelMee"></span>
Zichtbaar maken bij de tabbladen ijkpunten, resultaatmatrix, ontwikkelagenda & lijsten.<sup>*</sup>
</p>
</div>
<p style="font-size: small"><sup>*</sup>Vul de gehele lijst in voordat u deze zichtbaar maakt. Niet ingevulde indicatoren worden ook meegenomen bij de berekening van het gemiddelde.</p>
</div>
</div>
</div>
<p style="font-size: small"><sup>*</sup>Vul de gehele lijst in voordat u deze zichtbaar maakt. Niet ingevulde indicatoren worden ook meegenomen bij de berekening van het gemiddelde.</p>
</div>
</div>
</div> <!-- regelen visibility -->
</div> <!-- regelen visibility -->
</div>
+16 -6
View File
@@ -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/> &nbsp;</td>
<td colspan=7 style="text-align:right; padding-right: 15px"> <b>huidige situatie</b><br/> &nbsp;</td>
<td></td>
<td colspan =4 > <b> gewenste situatie</b><br/> &nbsp;</td>
<td colspan =5 > <b> gewenste situatie</b><br/> &nbsp;</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>
+235 -218
View File
@@ -1,231 +1,248 @@
<div class="col-sm-12 mainpagina submenupage" id ="pagVersies">
<div class='row'>
<div class="col-sm-12 col-md-3" style="border:1px solid #f2f2f2">
<h3>Instrument</h3>
<select style="font-size:1em"
data-bind=" options : modules,
<div class="col-sm-12 mainpagina submenupage" id ="pagVersies">
<div class='row'>
<div class="col-sm-12 col-md-3" style="border:1px solid #f2f2f2">
<h3>Instrument</h3>
<select style="font-size:1em; max-width: 250px;"
data-bind=" options : modules,
optionsText : 'naam',
value : selectedModule,
event : {change: fChangeModule}">
</select>
<button data-bind="click: fMaakNieuweVersie" style="margin-left: 0px; margin-top:20px">nieuwe versie </button>
<div data-bind= "visible: versies().length > 0">
<p> of </p>
<p>Selecteer een versie </p>
<select data-bind=" options : versies,
</select>
<button data-bind="click: fMaakNieuweVersie" style="margin-left: 0px; margin-top:20px">nieuwe versie </button>
<div data-bind= "visible: versies().length > 0">
<p> of </p>
<p>Selecteer een versie </p>
<select data-bind=" options : versies,
optionsText : 'naam',
value : selectedVersie,
event : {change: fChangeVersie}">
</select>
</div>
<hr />
<div data-bind="with: selectedVersie">
<h4>Versie-kenmerken</h4>
<table>
<tr> <td>naam</td></tr>
<tr>
<td><input data-bind="textInput: naam, event: {input: $parent.fUpdateVersie}" style="width:80%"/>
<button class="delete klikbaar"
data-bind="click: $parent.fDeleteVersie, visible: deleteok()"></button> </td>
</tr>
<tr> <td>ingangsdatum</td> </tr>
<tr>
<td> <input class="datum"
data-bind="datepicker{}, value: ingang, event: {change: $parent.fUpdateVersie}"/> </td>
</tr>
<tr> <td>streefwaarde</td> </tr>
<tr>
<td><input class="decimal" data-bind="textInput: systemnorm, event: {input: $parent.fUpdateVersie}"/>%</td>
</tr>
</table>
</div>
</div> <!-- column left -->
</select>
</div>
<hr />
<div data-bind="with: selectedVersie">
<h4>Versie-kenmerken</h4>
<table>
<tr> <td>naam</td></tr>
<tr>
<td><input data-bind="textInput: naam, event: {input: $parent.fUpdateVersie}" style="width:80%"/>
<button class="delete klikbaar"
data-bind="click: $parent.fDeleteVersie, visible: deleteok()"></button> </td>
</tr>
<tr> <td>ingangsdatum</td> </tr>
<tr>
<td> <input class="datum"
data-bind="datepicker{}, value: ingang, event: {change: $parent.fUpdateVersie}"/> </td>
</tr>
<tr> <td>streefwaarde</td> </tr>
<tr>
<td><input class="decimal" data-bind="textInput: systemnorm, event: {input: $parent.fUpdateVersie}"/>%</td>
</tr>
</table>
</div>
</div> <!-- column left -->
<div class="col-sm-12 col-md-9">
<button data-bind="click: fNieuwIJkpunt" style="float:right ; margin-top:10px;margin-bottom: 10px">nieuw ijkpunt </button>
<table style="width: 100%">
<thead>
<tr>
<th style="width:5%;padding-left:3px">i</th>
<th style="width:5%"> nr </th>
<th style="width:40%"> omschrijving</th>
<th style="width: 40%">toelichting</th>
<th style="width: 5%"> del</th>
<th style="widht: 5%">add</th>
</tr>
</thead>
<tbody data-bind="foreach: ijkpunten">
<tr>
<td style="vertical-align: top">
<button class= " noshow"
data-bind="click: $parent.fToggleIndicatoren, css:{ 'closebutton' : toonindics(), 'openbutton': !toonindics()}"></button>
</td>
<td style="vertical-align: top">
<input class= 'integer' data-bind="textInput:nummer, event:{input:$parent.fUpdateIJkpunt}"/>
</td>
<td><textarea style="width:99%" data-bind="textInput:omschrijving, event:{input: $parent.fUpdateIJkpunt}" ></textarea>
</td>
<td><textarea style="width:99%" data-bind="textInput:toelichting, event:{input: $parent.fUpdateIJkpunt}" ></textarea>
</td>
<td style="vertical-align: top">
<button class="delete noshow" data-bind="click: $parent.fDeleteIJkpunt, visible: indicatoren().length == 0"></button>
</td>
<td style="vertical-align: top" data-bind="click: $parent.fNieuweIndicator">
<button class="plus noshow"></button>
</td>
</tr>
<tr data-bind="visible: toonindics() && indicatoren().length > 0">
<td></td>
<td colspan=4>
<table style="width: 100%">
<thead>
<tr>
<th class="header2" style="width4%;padding-left: 2px;text-align:center"> nr </th>
<!-- <th class="header2" style="width:7%;padding-left: 2px;text-align:center">insp.</th>-->
<th class="header2" style="width:6%;padding-left: 2px;text-align:center">w.</th>
<th class="header2" style="width:40%;padding-left: 2px"> schoolvorm</th>
<th class="header2" style="width:40%;padding-left: 2px"> ik-vorm</th>
<th class="header2" style="width: 3%;padding-left: 2px;text-align:center"> del</th>
</tr>
</thead>
<tbody data-bind="foreach: indicatoren">
<tr>
<td style="vertical-align: top">
<input class= 'integer'
style="width: 100%"
data-bind="textInput: nummer, event:{input: $root.fUpdateIndicator}" /></td>
<!-- <td style="vertical-align: top">-->
<!-- <input style="width: 100%"-->
<!-- data-bind="textInput: inspectie, event:{input: $root.fUpdateIndicator}" /></td>-->
<td style="vertical-align: top">
<input class= 'decimal'
style="width: 100%"
data-bind="textInput: gewicht, event:{input: $root.fUpdateIndicator}" /></td>
<td><textarea data-bind="textInput: omschrijving1, event:{input: $root.fUpdateIndicator}"
style="width:99%">
<div class="col-sm-12 col-md-9">
<button data-bind="click: fNieuwIJkpunt" style="float:right ; margin-top:10px;margin-bottom: 10px">nieuw ijkpunt </button>
<table style="width: 100%">
<thead>
<tr>
<th style="width:5%;padding-left:3px">i</th>
<th style="width:5%"> nr </th>
<th style="width:25%"> omschrijving</th>
<th style="width: 35%">toelichting</th>
<th style="width: 4%"> del</th>
<th style="width: 6%"> disable</th>
<th style="width: 5%"> add</th>
</tr>
</thead>
<tbody data-bind="foreach: ijkpunten">
<tr>
<td style="vertical-align: top">
<button class= " noshow"
data-bind="click: $parent.fToggleIndicatoren, css:{ 'closebutton' : toonindics(), 'openbutton': !toonindics()}"></button>
</td>
<td style="vertical-align: top">
<input class= 'integer' data-bind="textInput:nummer,
event:{input:$parent.fUpdateIJkpunt},
style: {color: disabled()? '#d9d9d9' : '#262626' }"/>
</td>
<td><textarea style="width:99%" data-bind="textInput: omschrijving,
event:{input: $parent.fUpdateIJkpunt},
style: {color: disabled()? '#d9d9d9' : '#262626' }" ></textarea>
</td>
<td><textarea style="width:99%" data-bind="textInput:toelichting,
event:{input: $parent.fUpdateIJkpunt},
style: {color: disabled()? '#d9d9d9' : '#262626' }" ></textarea>
</td>
<td style="vertical-align: top">
<button class="delete noshow" data-bind="click: $parent.fDeleteIJkpunt, visible: indicatoren().length == 0"></button>
</td>
<td style="vertical-align: top" data-bind="click: $parent.fDisableIJkpunt">
<button class="fa fa-ban noshow" data-bind="style: {color: disabled() ? 'red' : 'black' }"></button>
</td>
<td style="vertical-align: top" data-bind="click: $parent.fNieuweIndicator ">
<button class=" noshow fa fa-plus " data-bind=" style: {color: disabled()? '#d9d9d9' : '#262626' }" ></button>
</td>
</tr>
<tr data-bind="visible: toonindics() && indicatoren().length > 0">
<td></td>
<td colspan=5>
<table style="width: 100%">
<thead>
<tr>
<th class="header2" style="width4%;padding-left: 2px;text-align:center"> nr </th>
<!-- <th class="header2" style="width:7%;padding-left: 2px;text-align:center">insp.</th>-->
<th class="header2" style="width:6%;padding-left: 2px;text-align:center">w.</th>
<th class="header2" style="width:40%;padding-left: 2px"> schoolvorm</th>
<th class="header2" style="width:40%;padding-left: 2px"> ik-vorm</th>
<th class="header2" style="width: 3%;padding-left: 2px;text-align:center"> del</th>
</tr>
</thead>
<tbody data-bind="foreach: indicatoren">
<tr>
<td style="vertical-align: top">
<input class= 'integer'
style="width: 100%"
data-bind="textInput: nummer,
event:{input: $root.fUpdateIndicator},
style: {color: $parent.disabled()? '#d9d9d9' : '#262626' }" /></td>
<!-- <td style="vertical-align: top">-->
<!-- <input style="width: 100%"-->
<!-- data-bind="textInput: inspectie, event:{input: $root.fUpdateIndicator}" /></td>-->
<td style="vertical-align: top">
<input class= 'decimal'
style="width: 100%"
data-bind="textInput : gewicht,
event :{input: $root.fUpdateIndicator},
style : {color: $parent.disabled()? '#d9d9d9' : '#262626' }" /></td>
<td><textarea data-bind="textInput: omschrijving1,
event : {input: $root.fUpdateIndicator},
style : {color: $parent.disabled()? '#d9d9d9' : '#262626' }"
style="width:99%">
</textarea>
</td>
<td><textarea data-bind="textInput: omschrijving2, event:{input: $root.fUpdateIndicator}"
style="width: 99% ">
</td>
<td><textarea data-bind="textInput : omschrijving2,
event :{input: $root.fUpdateIndicator},
style : {color: $parent.disabled()? '#d9d9d9' : '#262626' }"
style="width: 99% ">
</textarea>
</td>
<td style="vertical-align: top">
<button class="delete" data-bind="click: $root.fDeleteIndicator.bind($data,$parents[0]), visible: deleteok== true "></button></td>
</tr>
</tbody>
<tr>
<td colspan=6> <hr></td>
</tr>
</table>
</td> <!-- td voor de tabel met indicatoren -->
</td>
<td style="vertical-align: top">
<button class="delete" data-bind="click: $root.fDeleteIndicator.bind($data,$parents[0]), visible: deleteok== true "></button></td>
</tr>
</tbody>
<tr>
<td colspan=6> <hr></td>
</tr>
</table>
</td> <!-- td voor de tabel met indicatoren -->
</tr>
</tbody>
</table>
</div> <!-- column right -->
</div><!-- row -->
<!-- ******************** popups ************************** -->
<div class="modal fade" id="modNieuweVersie" role="dialog" >
<div class="modal-dialog ">
<div class="modal-content">
<div class="modal-header">
<h4 data-bind="with: selectedModule()">Nieuwe versie <span data-bind="text: naam"></span></h4>
</div>
<div class="modal-body">
<table class="lstable" style="width: 100%" >
<tbody>
<tr>
<td style="width:20%"> naam </td>
<td > <input style="width: 100%" data-bind="textInput: newVersieNaam"></td>
</tr>
</tbody>
</table>
</div>
<div class="modal-footer">
<button style="width: 80px;" data-dismiss="modal" data-bind="click: fSaveVersie, visible: newVersieNaam().length > 3">opslaan</button>
<button style="width: 80px;" data-dismiss="modal" >annuleren</button>
</div>
</div>
</div>
</div> <!-- popup-->
</tr>
</tbody>
</table>
</div> <!-- column right -->
<!-- ******************** popup nieuw ijkpunt ************************** -->
<div class="modal fade" id="modNieuwIJkpunt" role="dialog" >
<div class="modal-dialog ">
<div class="modal-content">
<div class="modal-header">
<h4>Nieuw ijkpunt</h4>
</div>
<div class="modal-body">
<table class="lstable" style="width: 100%" >
<tbody>
<tr>
<td style="width:20%"> nummer</td>
<td > <input class="integer" data-bind="textInput: newIJkpunt().nummer"></td>
</tr>
<tr>
<td style="width:20%"> omschrijving </td>
<td > <textarea style="width: 99%; height:50px;" data-bind="textInput: newIJkpunt().naam"></textarea></td>
</tr>
<tr>
<td style="width:20%"> toelichting </td>
<td > <textarea style="width: 99%; height:50px;" data-bind="textInput: newIJkpunt().toelichting"></textarea></td>
</tr>
</tbody>
</table>
</div>
<div class="modal-footer">
<button style="width: 80px;" data-dismiss="modal" data-bind="click: fSaveIJkpunt, visible: newIJkpunt().naam().length > 3">opslaan</button>
<button style="width: 80px;" data-dismiss="modal" >annuleren</button>
</div>
</div>
</div>
</div>
<!-- ************ pop nieuw indicator -->
<div class="modal fade" id="modNieuwIndicator" role="dialog" >
<div class="modal-dialog modal-lg ">
<div class="modal-content">
<div class="modal-header">
<h4>Nieuwe indicator</h4>
</div>
<div class="modal-body">
<table class="lstable" style="width: 100%" >
<tbody data-bind="with: newIndicator">
<tr >
<td style="width:20%"> volgnummer </td>
<td > <input class="integer" data-bind="textInput: nummer" /></td>
</tr>
<tr >
<td style="width:20%"> gewicht</td>
<td > <input class="decimal" data-bind="textInput: gewicht" /></td>
</tr>
<!-- <tr >-->
<!-- <td style="width:20%">inspectie indicator (nummer)</td>-->
<!-- <td > <input data-bind="textInput: inspectie" /></td>-->
<!-- </tr>-->
<tr>
<td style="width:20%">school omschrijving </td>
<td > <textarea style="width: 100%" data-bind="textInput: omschrijving1"></textarea></td>
</tr>
<tr>
<td style="width:20%">ik-vorm omschrijving </td>
<td > <textarea style="width: 100%" data-bind="textInput: omschrijving2"></textarea></td>
</tr>
</tbody>
</table>
</div>
<div class="modal-footer">
<button style="width: 80px;" data-dismiss="modal" data-bind="click: fSaveIndicator">opslaan</button>
<button style="width: 80px;" data-dismiss="modal" >annuleren</button>
</div>
</div>
</div>
</div>
</div><!-- row -->
<!-- ******************** popups ************************** -->
<div class="modal fade" id="modNieuweVersie" role="dialog" >
<div class="modal-dialog ">
<div class="modal-content">
<div class="modal-header">
<h4 data-bind="with: selectedModule()">Nieuwe versie <span data-bind="text: naam"></span></h4>
</div>
<div class="modal-body">
<table class="lstable" style="width: 100%" >
<tbody>
<tr>
<td style="width:20%"> naam </td>
<td > <input style="width: 100%" data-bind="textInput: newVersieNaam"></td>
</tr>
</tbody>
</table>
</div>
<div class="modal-footer">
<button style="width: 80px;" data-dismiss="modal" data-bind="click: fSaveVersie, visible: newVersieNaam().length > 3">opslaan</button>
<button style="width: 80px;" data-dismiss="modal" >annuleren</button>
</div>
</div>
</div>
</div> <!-- popup-->
<!-- ******************** popup nieuw ijkpunt ************************** -->
<div class="modal fade" id="modNieuwIJkpunt" role="dialog" >
<div class="modal-dialog ">
<div class="modal-content">
<div class="modal-header">
<h4>Nieuw ijkpunt</h4>
</div>
<div class="modal-body">
<table class="lstable" style="width: 100%" >
<tbody>
<tr>
<td style="width:20%"> nummer</td>
<td > <input class="integer" data-bind="textInput: newIJkpunt().nummer"></td>
</tr>
<tr>
<td style="width:20%"> omschrijving </td>
<td > <textarea style="width: 99%; height:50px;" data-bind="textInput: newIJkpunt().naam"></textarea></td>
</tr>
<tr>
<td style="width:20%"> toelichting </td>
<td > <textarea style="width: 99%; height:50px;" data-bind="textInput: newIJkpunt().toelichting"></textarea></td>
</tr>
</tbody>
</table>
</div>
<div class="modal-footer">
<button style="width: 80px;" data-dismiss="modal" data-bind="click: fSaveIJkpunt, visible: newIJkpunt().naam().length > 3">opslaan</button>
<button style="width: 80px;" data-dismiss="modal" >annuleren</button>
</div>
</div>
</div>
</div>
<!-- ************ pop nieuw indicator -->
<div class="modal fade" id="modNieuwIndicator" role="dialog" >
<div class="modal-dialog modal-lg ">
<div class="modal-content">
<div class="modal-header">
<h4>Nieuwe indicator</h4>
</div>
<div class="modal-body">
<table class="lstable" style="width: 100%" >
<tbody data-bind="with: newIndicator">
<tr >
<td style="width:20%"> volgnummer </td>
<td > <input class="integer" data-bind="textInput: nummer" /></td>
</tr>
<tr >
<td style="width:20%"> gewicht</td>
<td > <input class="decimal" data-bind="textInput: gewicht" /></td>
</tr>
<!-- <tr >-->
<!-- <td style="width:20%">inspectie indicator (nummer)</td>-->
<!-- <td > <input data-bind="textInput: inspectie" /></td>-->
<!-- </tr>-->
<tr>
<td style="width:20%">school omschrijving </td>
<td > <textarea style="width: 100%" data-bind="textInput: omschrijving1"></textarea></td>
</tr>
<tr>
<td style="width:20%">ik-vorm omschrijving </td>
<td > <textarea style="width: 100%" data-bind="textInput: omschrijving2"></textarea></td>
</tr>
</tbody>
</table>
</div>
<div class="modal-footer">
<button style="width: 80px;" data-dismiss="modal" data-bind="click: fSaveIndicator">opslaan</button>
<button style="width: 80px;" data-dismiss="modal" >annuleren</button>
</div>
</div>
</div>
</div>
</div>
@@ -1,84 +1,116 @@
<table style="width: 100%; font-size:0.7em; border-collapse: collapse; line-height:1.6em"
id="mod<?=$module?>tabel1">
<colgroup>
<col style="width: 25px">
<col >
<col span='9' style="width: 22px">
</colgroup>
<tr>
<td colspan=2></td>
<td colspan=4 style="text-align:center"> <b>huidige situatie</b></td>
<td></td>
<td colspan =4 style="text-align:center"> <b> gewenste situatie</b></td>
<tr>
<tr style="background-color: #6F0B3D; color:#ffffff">
<td style="width: 25px"></td>
<td ><?=ucfirst($labels['ijkpunten'])?></td>
<td style=" text-align:center; background-color: #fe2219; color:#ffffff"> 1</td>
<td style=" text-align:center; background-color: #fea719; color:#ffffff" > 2</td>
<td style=" text-align:center; background-color:#15d029 ; color:#ffffff" > 3</td>
<td style=" text-align:center; background-color: #1558d0; color:#ffffff;" > 4</td>
<td style="background-color:#ffffff"></td>
<td style="text-align:center; background-color: #fe2219; color:#ffffff"> 1</td>
<td style="text-align:center; background-color: #fea719; color:#ffffff"> 2</td>
<td style="text-align:center; background-color:#15d029 ; color:#ffffff"> 3</td>
<td style="text-align:center; background-color: #1558d0; color:#ffffff"> 4</td>
</tr>
<?php
if ($scores){
foreach ($scores as $score){ ?>
<tr>
<td style="border:1px solid #dddddd; text-align:right; padding-right:3px"><?=$score->nummer?></td>
<td style="border:1px solid #dddddd;padding-left:2px;"><?=$score->omschrijving?></td>
<td style="border:1px solid #dddddd" >
<?php if ($score->huidig == 1){
echo "<div style='width: 12px; height: 12px;border-radius: 12px;margin-left: 5px;background-color:#fe2219;'></div>";
};?>
</td>
<td style="border:1px solid #dddddd" >
<?php if ($score->huidig == 2){
echo "<div style='width: 12px; height: 12px;border-radius: 12px;margin-left: 5px;background-color:#fea719;'></div>";
};?>
</td>
<td style="border:1px solid #dddddd" >
<?php if ($score->huidig == 3){
echo "<div style='width: 12px; height: 12px;border-radius: 12px;margin-left: 5px;background-color:#15d029;'></div>";
};?>
</td>
<td style="border:1px solid #dddddd" >
<?php if ($score->huidig == 4){
echo "<div style='width: 12px; height: 12px;border-radius: 12px;margin-left: 5px;background-color:#1558d0;'></div>";
};?>
</td>
<colgroup>
<col style="width: 25px">
<col >
<col span='12' style="width: 22px">
</colgroup>
<tr>
<td colspan=2></td>
<td colspan=5 style="text-align:center"> <b>huidige situatie</b></td>
<td></td>
<td colspan =5 style="text-align:center"> <b> gewenste situatie</b></td>
<tr>
<tr style="background-color: #6F0B3D; color:#ffffff">
<td style="width: 25px"></td>
<td ><?=ucfirst($labels['ijkpunten'])?></td>
<td style=" text-align:center; background-color: #e08885; color:#ffffff"> 1</td>
<td style=" text-align:center; background-color: #ffcc80; color:#ffffff" > 2</td>
<td style=" text-align:center; background-color:#9fdf9f ; color:#ffffff" > 3</td>
<td style=" text-align:center; background-color: #99d6ff; color:#ffffff;" > 4</td>
<td style=" text-align:center; background-color: #99d6ff; color:#ffffff;" > </td>
<td style="background-color:#ffffff"></td>
<td style="text-align:center; background-color: #e08885; color:#ffffff"> 1</td>
<td style="text-align:center; background-color: #ffcc80; color:#ffffff"> 2</td>
<td style="text-align:center; background-color:#9fdf9f ; color:#ffffff"> 3</td>
<td style="text-align:center; background-color: #99d6ff; color:#ffffff"> 4</td>
<td style=" text-align:center; background-color: #99d6ff; color:#ffffff;" ></td>
</tr>
<?php
if ($scores){
foreach ($scores as $score){ ?>
<tr>
<td style="border:1px solid #dddddd; text-align:right; padding-right:3px"><?=$score->nummer?></td>
<td style="border:1px solid #dddddd;padding-left:2px;"><?=$score->omschrijving?>
<span><?=$score->omschrijving?></span>
<span><?php if ($score->disabled == 'T'){echo ' (uit)';} ?></span>
<span><?php if ($score->disabled == 'F' && $score->disablenvt == 'T'){echo ' (nvt)';} ?></span>
<td style="border-bottom:none; border-top:none"></td>
</td>
<td style="border:1px solid #dddddd;padding-left:2px;">
<span> <?php if (isset($score->omschrijving)){echo $score->omschrijving;} ?></span>
<span><?php if ($score->disabled == 'T'){echo ' (uit)';} ?></span>
<span><?php if ($score->disabled == 'F' && $score->disablenvt == 'T'){echo ' (nvt)';} ?></span>
</td>
<td style="border:1px solid #dddddd" >
<?php if ($score->huidig == 1){ ?>
<div style="width: 12px; height: 12px;border-radius: 12px;margin-left: 5px;
background-color:<?php {echo $score->disabled == 'T' || $score->disablenvt == 'T' ? '': $score->kleur;} ?>"></div>
<?php }; ?>
</td>
<td style="border:1px solid #dddddd" >
<?php if ($score->huidig == 2){ ?>
<div style= "width: 12px; height: 12px;border-radius: 12px;margin-left: 5px;
background-color:<?php {echo $score->disabled == 'T' || $score->disablenvt == 'T' ? '': $score->kleur;} ?>"></div>
<?php };?>
</td>
<td style="border:1px solid #dddddd" >
<?php if ($score->huidig == 3){ ?>
<div style="width: 12px; height: 12px;border-radius: 12px;margin-left: 5px;
background-color:<?php {echo $score->disabled == 'T' || $score->disablenvt == 'T' ? '': $score->kleur;} ?>"></div>
<?php };?>
</td>
<td style="border:1px solid #dddddd" >
<?php if ($score->huidig == 4){ ?>
<div style="width: 12px; height: 12px;border-radius: 12px;margin-left: 5px;
background-color:<?php {echo $score->disabled == 'T' || $score->disablenvt == 'T' ? '': $score->kleur;} ?>"></div>
<?php }; ?>
</td>
<td style="border:1px solid #dddddd" >
<?php if ($score->disabled == 'T' || $score->disablenvt == 'T'){ ?>
<div style="width: 12px; height: 12px;border-radius: 12px;margin-left: 5px;
background-color: #808080;"></div>
<?php }; ?>
</td>
<td style="border:1px solid #dddddd" >
<?php if (isset($score->wens) && $score->wens == 1){
echo "<div style='width: 12px; height: 12px;border-radius: 12px;margin-left: 5px;background-color:#fe2219;'></div>";
};?>
</td>
<td style="border:1px solid #dddddd" >
<?php if (isset($score->wens) && $score->wens == 2){
echo "<div style='width: 12px; height: 12px;border-radius: 12px;margin-left: 5px;background-color:#fea719;'></div>";
};?>
</td>
<td style="border:1px solid #dddddd" >
<?php if (isset($score->wens) && $score->wens == 3){
echo "<div style='width: 12px; height: 12px;border-radius: 12px;margin-left: 5px;background-color:#15d029;'></div>";
};?>
</td>
<td style="border:1px solid #dddddd" >
<?php if (isset($score->wens) && $score->wens == 4){
echo "<div style='width: 12px; height: 12px;border-radius: 12px;margin-left: 5px;background-color:#1558d0;'></div>";
};?>
</td>
</tr>
<?php ;};}; ?>
</table>
<p> </p>
<?=$kleurtabel?>
<td style="border-bottom:none; border-top:none"></td>
<td style="border:1px solid #dddddd" >
<?php if (isset($score->wens) && $score->wens == 1){ ?>
<div style="width: 12px; height: 12px;border-radius: 12px;margin-left: 5px;
background-color:<?php {echo $score->disabled == 'T' || $score->disablenvt == 'T' ? '': $score->wenskleur;} ?>"></div>
<?php };?>
</td>
<td style="border:1px solid #dddddd" >
<?php if (isset($score->wens) && $score->wens == 2){ ?>
<div style="width: 12px; height: 12px;border-radius: 12px;margin-left: 5px;
background-color:<?php {echo $score->disabled == 'T' || $score->disablenvt == 'T' ? '': $score->wenskleur;} ?>"></div>
<?php };?>
</td>
<td style="border:1px solid #dddddd" >
<?php if (isset($score->wens) && $score->wens == 3){ ?>
<div style="width: 12px; height: 12px;border-radius: 12px;margin-left: 5px;
background-color:<?php {echo $score->disabled == 'T' || $score->disablenvt == 'T' ? '': $score->wenskleur;} ?>"></div>
<?php };?>
</td>
<td style="border:1px solid #dddddd" >
<?php if (isset($score->wens) && $score->wens == 4){ ?>
<div style="width: 12px; height: 12px;border-radius: 12px;margin-left: 5px;
background-color:<?php {echo $score->disabled == 'T' || $score->disablenvt == 'T' ? '': $score->wenskleur;} ?>"></div>
<?php };?>
</td>
<td style="border:1px solid #dddddd" >
<?php if ($score->disabled == 'T' || $score->disablenvt == 'T'){ ?>
<div style="width: 12px; height: 12px;border-radius: 12px;margin-left: 5px;
background-color: #808080;"></div>
<?php }; ?>
</td>
</tr>
<?php ;};}; ?>
</table>
<p> </p>
<?=$kleurtabel?>
+25 -17
View File
@@ -16,26 +16,34 @@
var ambitiescore= <?php echo $ambitie->gemscore; ?>;
var lijnAt = (((100 - parseFloat(ambitiescore)) / 10 ) * 25 ) +12;
var j=0;
$.each(results, function(i,p){
// scores[i] = p.gem();
if (p.num > 0){
scores[i]=p.somscore / p.num;
}
else {scores[i]= 0;};
slabels[i] = p.nummer;
tekstlabels[i] = p.omschrijving;
j ++;
}); // each
slabels[j]='gem';
scores[j]=<?php echo $totgem;?> ;
var ctxSchoolijkpunt2=$("#schoolijkpunt2").get(0).getContext("2d");
var colors=[]
<?php foreach($scores as $index => $score){ ?>
slabels.push('<?= $score->nummer ?>');
tekstlabels.push('<?= $score->omschrijving ?>');
// scores.push({
// y: <?= $score->gem ?>,
// color: '<?= isset($score->kleur)? $score->kleur : "#808080" ?>',
// name: '<?= $score->nummer ?>',
// });
scores.push(<?=$score->gem ?>)
colors.push('<?= isset($score->kleurcode) ? $score->kleurcode : "#808080" ?>')
<?php } ?>
slabels.push('gem')
scores.push(<?= $totgem ?>)
colors.push('<?= isset($totgemkleur) ? $totgemkleur : "#808080" ?>')
var ctxSchoolijkpunt2=$("#schoolijkpunt2").get(0).getContext("2d");
var data5 = {labels :slabels,
datasets: [{ label: tekstlabels,
fillColor: "rgba(147,15,80,0.9)",
strokeColor: "rgba(111,11,61,1)",
highlightStroke: "rgba(222,22,123,1)",
data: scores},
fillColor: "rgba(147,15,80,0.9)",
strokeColor: "rgba(111,11,61,1)",
highlightStroke: "rgba(222,22,123,1)",
data: scores
},
]}
Chart.types.Bar.extend({
+10 -7
View File
@@ -33,21 +33,24 @@
</tr>
</thead>
<tbody >
<?php foreach($scores as $score){
$gem =round($score->somscore / $score->num,1);
<?php foreach($scores as $score){
$kleur = $score->disabled == 'T' || $score->disablenvt == 'T' ? '#808080' : $score->kleurcode; ?>
<!-- // $gem =round($score->somscore / $score->num,1);
//$backgroundcolor =$score->kleurcode;
// if ($gem >50 )$backgroundcolor = "#fea719";
// if ($gem > 70) $backgroundcolor = "#15d029";
// if ($gem > 90) $backgroundcolor = "#1558d0";
?>
-->
<tr style="border-bottom: 1px solid #ebebeb" >
<td style="vertical-align:top" ><?=$score->nummer?></td>
<td style="vertical-align:top" ><?=$score->omschrijving?></td>
<td style="text-align:right; vertical-align:top; padding-right: 5px; color:#ffffff; background-color:<?=$score->kleurcode?> ">
<?=number_format($gem,1);?>
</td>
<td style="text-align:right; vertical-align:top; padding-right: 5px; color:#ffffff; background-color:<?=$kleur?> ">
<?php echo $score->disabled == 'T' ? 'uit' : ($score->disablenvt == 'T' ? 'nvt' : (isset($score->gem) ? $score->gem : '')) ?>
</td>
<?php ;} ; ?>
</tbody>
@@ -24,8 +24,11 @@
</td>
<?php
if ($lk->scores) {
foreach($lk->scores as $result){
echo "<td style='background-color:".$result->colorcode." ; color:#ffffff;text-align:right; padding-right:1px '>".number_format($result->gem,0)."</td>";
foreach($lk->scores as $result){
$tekst = number_format($result->gem,0);
if($result->disablenvt == 'T') $tekst = 'nvt';
if($result->disabled == 'T') $tekst = 'uit';
echo "<td style='background-color:".$result->colorcode." ; color:#ffffff;text-align:right; padding-right:1px '>".$tekst."</td>";
};?>
<td style="background-color: <?=$lk->colorcode?>; color:#ffffff;text-align:right; padding-right:1px" ><?=$lk->lkgem?></td>
<?php }; // if scores ?>
+106 -46
View File
@@ -3,13 +3,13 @@
<colgroup>
<col style="width: 25px">
<col >
<col span='9' style="width: 22px">
<col span='11' style="width: 22px">
</colgroup>
<tr>
<td colspan=2></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></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: #6F0B3D; color:#ffffff">
<td style="width: 25px"></td>
@@ -18,62 +18,122 @@
<td style=" text-align:center; background-color: #ffcc80; color:#ffffff" > 2</td>
<td style=" text-align:center; background-color:#9fdf9f ; color:#ffffff" > 3</td>
<td style=" text-align:center; background-color: #99d6ff; color:#ffffff;" > 4</td>
<td style=" text-align:center; background-color: #808080; color:#ffffff;" > </td>
<td style="background-color:#ffffff"></td>
<td style="text-align:center; background-color: #e08885; color:#ffffff"> 1</td>
<td style="text-align:center; background-color: #ffcc80; color:#ffffff"> 2</td>
<td style="text-align:center; background-color:#9fdf9f ; color:#ffffff"> 3</td>
<td style="text-align:center; background-color: #99d6ff; color:#ffffff"> 4</td>
<td style=" text-align:center; background-color: #808080; color:#ffffff;" ></td>
</tr>
<?php
if ($scores){
foreach ($scores as $score){ ?>
<tr>
<td style="border:1px solid #dddddd; text-align:right; padding-right:3px"><?=$score->nummer?></td>
<td style="border:1px solid #dddddd;padding-left:2px;"><?=$score->omschrijving?></td>
<td style="border:1px solid #dddddd" >
<?php if ($score->huidig == 1){
echo "<div style='width: 12px; height: 12px;border-radius: 12px;margin-left: 5px;background-color:#e08885;'></div>";
};?>
</td>
<td style="border:1px solid #dddddd" >
<?php if ($score->huidig == 2){
echo "<div style='width: 12px; height: 12px;border-radius: 12px;margin-left: 5px;background-color:#ffcc80;'></div>";
};?>
</td>
<td style="border:1px solid #dddddd" >
<?php if ($score->huidig == 3){
echo "<div style='width: 12px; height: 12px;border-radius: 12px;margin-left: 5px;background-color:#9fdf9f;'></div>";
};?>
</td>
<td style="border:1px solid #dddddd" >
<?php if ($score->huidig == 4){
echo "<div style='width: 12px; height: 12px;border-radius: 12px;margin-left: 5px;background-color:#99d6ff;'></div>";
};?>
</td>
<td style="border:1px solid #dddddd;padding-left:2px;">
<span><?=$score->omschrijving?></span>
<span><?php if ($score->disabled == 'T'){echo ' (uit)';} ?></span>
<span><?php if ($score->disabled == 'F' && $score->disablenvt == 'T'){echo ' (nvt)';} ?></span>
<td style="border-bottom:none; border-top:none"></td>
</td>
<td style="border:1px solid #dddddd" >
<?php if ($score->kleurnummer == 1){
$kleur = '';
if($score->disabled == 'F' && $score->disablenvt == 'F') $kleur = '#e08885';
<td style="border:1px solid #dddddd" >
<?php if (isset($score->wens) && $score->wens == 1){
echo "<div style='width: 12px; height: 12px;border-radius: 12px;margin-left: 5px;background-color:#e08885;'></div>";
};?>
</td>
<td style="border:1px solid #dddddd" >
<?php if (isset($score->wens) && $score->wens == 2){
echo "<div style='width: 12px; height: 12px;border-radius: 12px;margin-left: 5px;background-color:#ffcc80;'></div>";
};?>
</td>
<td style="border:1px solid #dddddd" >
<?php if (isset($score->wens) && $score->wens == 3){
echo "<div style='width: 12px; height: 12px;border-radius: 12px;margin-left: 5px;background-color:#9fdf9f;'></div>";
};?>
</td>
<td style="border:1px solid #dddddd" >
<?php if (isset($score->wens) && $score->wens == 4){
echo "<div style='width: 12px; height: 12px;border-radius: 12px;margin-left: 5px;background-color:#99d6ff;'></div>";
};?>
</td>
?>
<div style="width: 12px; height: 12px;border-radius: 12px;margin-left: 5px;
background-color:<?php {echo $kleur;} ?>"></div>
<?php }; ?>
</td>
<td style="border:1px solid #dddddd" >
<?php if ($score->kleurnummer == 2){
$kleur = '';
if($score->disabled == 'F' && $score->disablenvt == 'F') $kleur = '#ffcc80';
?>
<div style= "width: 12px; height: 12px;border-radius: 12px;margin-left: 5px;
background-color:<?php {echo $kleur;} ?>"></div>
<?php };?>
</td>
<td style="border:1px solid #dddddd" >
<?php if ($score->kleurnummer == 3){
$kleur = '';
if($score->disabled == 'F' && $score->disablenvt == 'F') $kleur = '#9fdf9f';
?>
<div style="width: 12px; height: 12px;border-radius: 12px;margin-left: 5px;
background-color:<?php {echo $kleur;} ?>"></div>
<?php };?>
</td>
<td style="border:1px solid #dddddd" >
<?php if ($score->kleurnummer == 4){
$kleur = '';
if($score->disabled == 'F' && $score->disablenvt == 'F') $kleur = '#99d6ff';
?>
<div style="width: 12px; height: 12px;border-radius: 12px;margin-left: 5px;
background-color:<?php {echo $kleur;} ?>"></div>
<?php }; ?>
</td>
<td style="border:1px solid #dddddd" >
<?php if ($score->disabled == 'T' || $score->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>
<td style="border:1px solid #dddddd" >
<?php if (isset($score->wens) && $score->wens == 1){
$kleur = '';
if($score->disabled == 'F' && $score->disablenvt == 'F') $kleur = '#e08885';
?>
<div style="width: 12px; height: 12px;border-radius: 12px;margin-left: 5px;
background-color:<?php {echo $kleur;} ?>"></div>
<?php };?>
</td>
<td style="border:1px solid #dddddd" >
<?php if (isset($score->wens) && $score->wens == 2){
$kleur = '';
if($score->disabled == 'F' && $score->disablenvt == 'F') $kleur = '#ffcc80';
?>
<div style="width: 12px; height: 12px;border-radius: 12px;margin-left: 5px;
background-color:<?php {echo $kleur;} ?>"></div>
<?php };?>
</td>
<td style="border:1px solid #dddddd" >
<?php if (isset($score->wens) && $score->wens == 3){
$kleur = '';
if($score->disabled == 'F' && $score->disablenvt == 'F') $kleur = '#99d6ff';
?>
<div style="width: 12px; height: 12px;border-radius: 12px;margin-left: 5px;
background-color:<?php {echo $kleur;} ?>"></div>
<?php };?>
</td>
<td style="border:1px solid #dddddd" >
<?php if (isset($score->wens) && $score->wens == 4){
$kleur = '';
if($score->disabled == 'F' && $score->disablenvt == 'F') $kleur = '#99d6ff';
?>
<div style="width: 12px; height: 12px;border-radius: 12px;margin-left: 5px;
background-color:<?php {echo $kleur;} ?>"></div>
<?php };?>
</td>
<td style="border:1px solid #dddddd" >
<?php if ($score->disabled == 'T' || $score->disablenvt == 'T'){ ?>
<div style="width: 12px; height: 12px;border-radius: 12px;margin-left: 5px;
background-color: #808080;"></div>
<?php }; ?>
</td>
</tr>
<?php ;};}; ?>
</table>
@@ -1,7 +1,12 @@
<table style="border-collapse: collapse; cellspacing:0px; font-size:0.8em; line-height:1.5em"
id="mod<?=$module?>tabel2">
<?php foreach($scores as $score){
if (isset($score->wens) && $score->huidig < $score->wens){?>
if (isset($score->wens) &&
$score->huidig < $score->wens &&
$score->wens!= 0 &&
isset($score->omschrijving ) &&
$score->disabled == 'F' &&
$score->disablenvt == 'F'){?>
<tr>
<td style="text-align:right; padding-right:3px"><?=$score->nummer?></td>
<td><?=$score->omschrijving?></td>
@@ -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,63 +31,93 @@
<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){
foreach ($data['lijsten'][0]->scores as $ijkpunt){
if($ijkpunt->nummer != 'gem'){?>
foreach ($data['lijsten'][0]->scores as $score){
if($score->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; text-align:right; padding-right:3px"><?php echo $score->nummer;?></td>
<td style="border:1px solid #dddddd;padding-left:2px;"><?php if (isset($score->omschrijving)){echo $score->omschrijving;}?>
<span><?php if (isset($score->omschrijving)){echo $score->omschrijving;}?></span>
<span><?php if ($score->disabled == 'T'){echo ' (uit)';} ?></span>
<span><?php if ($score->disabled == 'F' && $score->disablenvt == 'T'){echo ' (nvt)';} ?></span>
</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 if (isset($score->huidig) && $score->huidig == 1){ ?>
<div style="width: 12px; height: 12px;border-radius: 12px;margin-left: 5px;
background-color:<?php {echo $score->disabled == 'T' || $score->disablenvt == 'T' ? '': $score->kleur;} ?>"></div>
<?php }; ?>
</td>
<td style="border:1px solid #dddddd" >
<?php if (isset($score->huidig) && $score->huidig == 2){ ?>
<div style= "width: 12px; height: 12px;border-radius: 12px;margin-left: 5px;
background-color:<?php {echo $score->disabled == 'T' || $score->disablenvt == 'T' ? '': $score->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 if (isset($score->huidig) && $score->huidig == 3){ ?>
<div style="width: 12px; height: 12px;border-radius: 12px;margin-left: 5px;
background-color:<?php {echo $score->disabled == 'T' || $score->disablenvt == 'T' ? '': $score->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 };?>
<?php if (isset($score->huidig) && $score->huidig == 4){ ?>
<div style="width: 12px; height: 12px;border-radius: 12px;margin-left: 5px;
background-color:<?php {echo $score->disabled == 'T' || $score->disablenvt == 'T' ? '': $score->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 };?>
<?php if ($score->disabled == 'T' || $score->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>
<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>
<?php };?>
<?php if (isset($score->wens) && $score->wens == 1){ ?>
<div style="width: 12px; height: 12px;border-radius: 12px;margin-left: 5px;
background-color:<?php {echo $score->disabled == 'T' || $score->disablenvt == 'T' ? '': $score->wenskleur;} ?>"></div>
<?php };?>
</td>
<td style="border:1px solid #dddddd" >
<?php if (isset($ijkpunt->wens) && $ijkpunt->wens == 2){ ?>
<div style='width: 12px; height: 12px;border-radius: 12px;margin-left: 5px;background-color:<?php if(isset($ijkpunt->wenskleur)){echo $ijkpunt->wenskleur;} ?>'></div>
<?php if (isset($score->wens) && $score->wens == 2){ ?>
<div style="width: 12px; height: 12px;border-radius: 12px;margin-left: 5px;
background-color:<?php {echo $score->disabled == 'T' || $score->disablenvt == 'T' ? '': $score->wenskleur;} ?>"></div>
<?php };?>
</td>
<td style="border:1px solid #dddddd" >
<?php if (isset($ijkpunt->wens) && $ijkpunt->wens == 3){ ?>
<div style='width: 12px; height: 12px;border-radius: 12px;margin-left: 5px;background-color:<?php if(isset($ijkpunt->wenskleur)){echo $ijkpunt->wenskleur;} ?>'></div>
<?php };?>
<?php if (isset($score->wens) && $score->wens == 3){ ?>
<div style="width: 12px; height: 12px;border-radius: 12px;margin-left: 5px;
background-color:<?php {echo $score->disabled == 'T' || $score->disablenvt == 'T' ? '': $score->wenskleur;} ?>"></div>
<?php };?>
</td>
<td style="border:1px solid #dddddd" >
<?php if (isset($ijkpunt->wens) && $ijkpunt->wens == 4){ ?>
<div style='width: 12px; height: 12px;border-radius: 12px;margin-left: 5px;background-color:<?php if(isset($ijkpunt->wenskleur)){echo $ijkpunt->wenskleur;} ?>'></div>
<?php };?>
<?php if (isset($score->wens) && $score->wens == 4){ ?>
<div style="width: 12px; height: 12px;border-radius: 12px;margin-left: 5px;
background-color:<?php {echo $score->disabled == 'T' || $score->disablenvt == 'T' ? '': $score->wenskleur;} ?>"></div>
<?php };?>
</td>
<td style="border:1px solid #dddddd" >
<?php if ($score->disabled == 'T' || $score->disablenvt == 'T'){ ?>
<div style="width: 12px; height: 12px;border-radius: 12px;margin-left: 5px;
background-color: #808080;"></div>
<?php }; ?>
</td>
</tr>
<?php ;}};}; ?>
</table>
@@ -48,12 +48,17 @@
var xastitel = '<?php echo $lijst->label ?>';
<?php } ?>
<?php foreach($lijst->scores as $index2 => $score){ ?>
<?php foreach($lijst->scores as $index2 => $score){
$kleur = '#808080';
if($score->disabled == 'F' && $score->disablenvt == 'F' && isset($score->kleur)) $kleur = $score->kleur;
?>
labels.push(<?php $score->nummer ?>);
scores.push({
y: <?= $score->gem ?>,
color: '<?=$score->kleur ?>',
color: '<?=$kleur ?>',
name: '<?= $score->nummer ?>',
soort: 'score',
versie: <?= $lijst->periodenummer ?>
@@ -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>
@@ -22,11 +22,12 @@
</tr>
</thead>
<tbody >
<?php foreach($data['lijsten'][0]->scores ? $data['lijsten'][0]->scores : [] as $ijkpunt){
<?php foreach($data['lijsten'][0]->scores ? $data['lijsten'][0]->scores : [] as $score){
?>
<tr style="border: 1px solid grey" >
<td style="vertical-align:top; border-right: 1px solid grey" ><?php if($ijkpunt->nummer != 'gem'){ echo $ijkpunt->nummer;}?></td>
<td style="vertical-align:top; border-right: 1px solid grey; overflow-x: hidden; overflow-y: hidden; text-overflow: ellipsis; white-space: nowrap;"><?php echo isset($ijkpunt->omschrijving) ? $ijkpunt->omschrijving: 'Gemiddelde'?></td>
<td style="vertical-align:top; border-right: 1px solid grey" ><?php if($score->nummer != 'gem'){ echo $score->nummer;}?></td>
<td style="vertical-align:top; border-right: 1px solid grey; overflow-x: hidden; overflow-y: hidden; text-overflow: ellipsis; white-space: nowrap;">
<?php echo isset($score->omschrijving) ? $score->omschrijving: 'Gemiddelde'?></td>
<?php ;} ; ?>
</tr>
</tbody>
@@ -42,12 +43,19 @@
</thead>
<tbody>
<?php if ($lijst->scores)
foreach($lijst->scores as $ijkpunt){?>
foreach($lijst->scores as $score){
$kleur = '#808080';
if(isset($score->kleur) && $score->disabled == 'F' && $score->disablenvt== 'F')
$kleur = $score->kleur;
$gem = $score->gem;
if($score->disablenvt == 'T') $gem = 'nvt';
if($score->disabled == 'T') $gem = 'uit';
?>
<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 ?>" >
<?php echo $ijkpunt->gem ?>
<td style="vertical-align:top; text-align: right: border-right: 1px solid grey; padding-left: 3px; background-color: <?php echo $kleur ?>" >
<?php echo $gem ?>
</td>
</tr>
<?php } ?>
+10 -3
View File
@@ -42,10 +42,17 @@
<?php
if($data['lijsten'][0]->scores){
foreach($data['lijsten'][0]->scores as $score){ ?>
<td style=" color:white; text-align:center; width: 30px; border-left: 1px solid grey; background-color:<?=$score->kleur?>">
foreach($data['lijsten'][0]->scores as $score){
$kleur = '#808080';
if($score->disabled == 'F' && $score->disablenvt == 'F') $kleur = $score->kleur;
$gem = number_format($score->gem);
if($score->disablenvt == 'T') $gem = 'nvt';
if($score->disabled == 'T') $gem = 'uit';
?>
<td style=" color:white; text-align:center; width: 30px; border-left: 1px solid grey; background-color:<?=$kleur?>">
<div>
<?php echo number_format($score->gem);
<?php echo $gem;
?>
</div>
</td>
@@ -20,9 +20,9 @@
<?php
if($data['lijsten'][0]->scores){
foreach($data['lijsten'][0]->scores as $ijkpunt){ ?>
foreach($data['lijsten'][0]->scores as $score){ ?>
<td style="text-align:center; ">
<?php echo $ijkpunt->nummer;
<?php echo $score->nummer;
?>
</td>
<?php };
@@ -42,10 +42,15 @@
<?php
if($data['lijsten'][0]->scores){
foreach($data['lijsten'][0]->scores as $ijkpunt){ ?>
<td style=" color:white; width: 30px; text-align:center; border-left: 1px solid grey; background-color:<?=$ijkpunt->kleur?>">
foreach($data['lijsten'][0]->scores as $score){
$kleur = '#808080';
if($score->disabled == 'F' && $score->disablenvt == 'F' && isset($score->kleur)) $kleur = $score->kleur;
$gem = number_format($score->gem);
if($score->disablenvt == 'T') $gem = 'nvt';
if($score->disabled == 'T') $gem = 'uit';?>
<td style=" color:white; width: 30px; text-align:center; border-left: 1px solid grey; background-color:<?=$kleur?>">
<div >
<?php echo number_format($ijkpunt->score);
<?php echo $gem;
?>
</div>
</td>
@@ -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: 1px; solid grey; 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-left: 1px solid grey;border-top: none; border-bottom: 1px solid grey; border-right:none;font-weight: bold">nr</td>
@@ -31,73 +31,91 @@
<td style=" border-bottom: 1px solid grey;text-align:center; background-color: #ffcc80; color:#ffffff"> 2</td>
<td style=" border-bottom: 1px solid grey;text-align:center; background-color: #9fdf9f; color:#ffffff"> 3</td>
<td style=" border-bottom: 1px solid grey;text-align:center; background-color: #99d6ff; color:#ffffff"> 4</td>
<td style=" border-bottom: 1px solid grey;text-align:center; background-color: #808080; color:#ffffff"> </td>
<td style="border-bottom: 1px solid grey;background-color:#ded0d7"></td>
<td style="border-bottom: 1px solid grey;text-align:center; background-color: #e08885; color:#ffffff"> 1</td>
<td style="border-bottom: 1px solid grey;text-align:center; background-color: #ffcc80; color:#ffffff"> 2</td>
<td style="border-bottom: 1px solid grey;text-align:center; background-color: #9fdf9f; color:#ffffff"> 3</td>
<td style="border-bottom: 1px solid grey; border-right: 1px solid grey;text-align:center; background-color: #99d6ff; color:#ffffff"> 4</td>
<td style=" border-bottom: 1px solid grey;text-align:center; background-color: #808080; color:#ffffff"> </td>
</tr>
<?php
if ($data['lijsten'][0]->scores){
foreach ($data['lijsten'][0]->scores as $score){
if($score->nummer != 'gem'){?>
if($score->nummer != 'gem'){?>
<tr style="border:1px solid #dddddd;">
<td style="border:1px solid #dddddd; text-align:right; padding-right:3px">
<?php if($score->nummer!= 'gem') echo $score->nummer;?></td>
<?php if($score->nummer!= 'gem') echo $score->nummer;?>
</td>
<td style="border:1px solid #dddddd;padding-left:2px;">
<?php if (isset($score->omschrijving)){echo $score->omschrijving;} ?></td>
<span> <?php if (isset($score->omschrijving)){echo $score->omschrijving;} ?></span>
<span><?php if ($score->disabled == 'T'){echo ' (uit)';} ?></span>
<span><?php if ($score->disabled == 'F' && $score->disablenvt == 'T'){echo ' (nvt)';} ?></span>
</td>
<td style="border:1px solid #dddddd" >
<?php if ($score->huidig == 1){ ?>
<div style="width: 12px; height: 12px;border-radius: 12px;margin-left: 5px;
background-color:<?php if(isset($score->kleur)){echo $score->kleur;} ?>"></div>
background-color:<?php {echo $score->disabled == 'T' || $score->disablenvt == 'T' ? '': $score->kleur;} ?>"></div>
<?php }; ?>
</td>
<td style="border:1px solid #dddddd" >
<?php if ($score->huidig == 2){ ?>
<div style= "width: 12px; height: 12px;border-radius: 12px;margin-left: 5px;
background-color:<?php if(isset($score->kleur)){echo $score->kleur;} ?>"></div>
background-color:<?php {echo $score->disabled == 'T' || $score->disablenvt == 'T' ? '': $score->kleur;} ?>"></div>
<?php };?>
</td>
<td style="border:1px solid #dddddd" >
<?php if ($score->huidig == 3){ ?>
<div style="width: 12px; height: 12px;border-radius: 12px;margin-left: 5px;
background-color:<?php if(isset($score->kleur)){echo $score->kleur;} ?>"></div>
background-color:<?php {echo $score->disabled == 'T' || $score->disablenvt == 'T' ? '': $score->kleur;} ?>"></div>
<?php };?>
</td>
<td style="border:1px solid #dddddd" >
<?php if ($score->huidig == 4){ ?>
<div style="width: 12px; height: 12px;border-radius: 12px;margin-left: 5px;
background-color:<?php if(isset($score->kleur)){echo $score->kleur;} ?>"></div>
background-color:<?php {echo $score->disabled == 'T' || $score->disablenvt == 'T' ? '': $score->kleur;} ?>"></div>
<?php }; ?>
</td>
<td style="border:1px solid #dddddd" >
<?php if ($score->disabled == 'T' || $score->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>
<td style="border:1px solid #dddddd" >
<?php if (isset($score->wens) && $score->wens == 1){ ?>
<div style="width: 12px; height: 12px;border-radius: 12px;margin-left: 5px;
background-color:<?php if(isset($score->wenskleur)){echo $score->wenskleur;} ?>"></div>
background-color:<?php {echo $score->disabled == 'T' || $score->disablenvt == 'T' ? '': $score->wenskleur;} ?>"></div>
<?php };?>
</td>
<td style="border:1px solid #dddddd" >
<?php if (isset($score->wens) && $score->wens == 2){ ?>
<div style="width: 12px; height: 12px;border-radius: 12px;margin-left: 5px;
background-color:<?php if(isset($score->wenskleur)){echo $score->wenskleur;} ?>"></div>
background-color:<?php {echo $score->disabled == 'T' || $score->disablenvt == 'T' ? '': $score->wenskleur;} ?>"></div>
<?php };?>
</td>
<td style="border:1px solid #dddddd" >
<?php if (isset($score->wens) && $score->wens == 3){ ?>
<div style="width: 12px; height: 12px;border-radius: 12px;margin-left: 5px;
background-color:<?php if(isset($score->wenskleur)){echo $score->wenskleur;} ?>"></div>
background-color:<?php {echo $score->disabled == 'T' || $score->disablenvt == 'T' ? '': $score->wenskleur;} ?>"></div>
<?php };?>
</td>
<td style="border:1px solid #dddddd" >
<?php if (isset($score->wens) && $score->wens == 4){ ?>
<div style="width: 12px; height: 12px;border-radius: 12px;margin-left: 5px;
background-color:<?php if(isset($score->wenskleur)){echo $score->wenskleur;} ?>"></div>
background-color:<?php {echo $score->disabled == 'T' || $score->disablenvt == 'T' ? '': $score->wenskleur;} ?>"></div>
<?php };?>
</td>
<td style="border:1px solid #dddddd" >
<?php if ($score->disabled == 'T' || $score->disablenvt == 'T'){ ?>
<div style="width: 12px; height: 12px;border-radius: 12px;margin-left: 5px;
background-color: #808080;"></div>
<?php }; ?>
</td>
</tr>
<?php ;}};}; ?>
</table>
+6
View File
@@ -920,6 +920,12 @@ tr.selected, td.selected{
.rood{
background-color:#e08885;
}
.grijs{
background-color:#808080;
}
.submenupage{
display:none;
}
+35 -12
View File
@@ -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,17 +188,42 @@ ls.initIJkpuntenModel = function(){
this.omschrijving = s.omschrijving;
this.toelichting = s.toelichting;
if (meegeven == 'vergelijkingen'){
this.gem = 'nvt';
this.gemV = s.gem;
this.kleur = 'lightgray'
this.kleurV = s.kleur;
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';
if(s.disabledV =='T') dit.gem ='uitgezet';
if(s.disabledV == 'T') dit.disabledV(true)
this.disablenvt = ko.observable(false);
this.disablenvtV = ko.observable(false);
if(s.disablenvtV == 'T') dit.disablenvtV(true);
this.kleur = 'lightgray';
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.disabledV == 'F' && s.disablenvtV == 'F')this.kleurV =s.kleurV;
this.kleur = s.kleur;
this.kleurV = s.kleurV;
}
}
@@ -468,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)
+5 -2
View File
@@ -119,7 +119,6 @@ $(function () {
}
function fAddResult(k) {
var dit = this;
if (k.gem === '' || isNaN(k.gem) || k.gem === null) {
this.gem = 0;
}
@@ -128,7 +127,11 @@ $(function () {
}
this.num = k.nummer;
this.colorcode = '#e08885';
if(k.kleur) dit.colorcode = k.kleur;
if(k.kleurcode) this.colorcode = k.kleurcode;
if (k.disabled == "T" || k.disablenvt == "T") {
this.gem='';
this.colorcode="#cccccc";
}
}
function fAddCriteria(c) {
+242 -239
View File
@@ -1,243 +1,246 @@
$(function(){
ls.initMonitorModel = function(){
var timer;
ls.initMonitorModel = function(){
var timer;
function fAddOrgversion(p){
function fAddOrgversion(p){
var dit = this;
this.id = p.id; //orgversion id
this.periodenummer = p.periodenummer;
this.versie_id = p.versie_id;
this.vorm = p.vorm;
this.scoretype = p.scoretype;
this.toonOmschrijving = ko.observable(false);
if(p.score_omschrijving == 'T') this.toonOmschrijving(true);
this.naam = p.naam;
// this.meetellen = ko.observable(false);
// if(p.meetellen == 1){
// dit.meetellen(true);
// }
var dit = this;
this.id = p.id; //orgversion id
this.periodenummer = p.periodenummer;
this.versie_id = p.versie_id;
this.vorm = p.vorm;
this.scoretype = p.scoretype;
this.toonOmschrijving = ko.observable(false);
if(p.score_omschrijving == 'T') this.toonOmschrijving(true);
this.naam = p.naam;
// this.meetellen = ko.observable(false);
// if(p.meetellen == 1){
// dit.meetellen(true);
// }
this.geldigvanaf = p.geldigvanaf;
this.geldigtm = p.geldigtm;
this.invullentm = p.invullentm;
this.info = ko.computed(function(){
var infostr=this.naam + " - periode " + this.periodenummer ;
infostr += " van " + this.geldigvanaf + " t/m " + this.geldigtm;
return infostr;
},this);
}
this.geldigvanaf = p.geldigvanaf;
this.geldigtm = p.geldigtm;
this.invullentm = p.invullentm;
this.info = ko.computed(function(){
var infostr=this.naam + " - periode " + this.periodenummer ;
infostr += " van " + this.geldigvanaf + " t/m " + this.geldigtm;
return infostr;
},this);
}
function fAddListitem(p){
var dit = this;
this.id = p.id
this.nummer = p.nummer
this.omschrijving = p.omschrijving;
this.toelichting = p.toelichting;
this.indicatorscores = ko.observableArray([]);
$.each(p.indicatorscores, function(j,k){
dit.indicatorscores.push(new fAddIndicatorscore(k));
});
function fAddListitem(p){
var dit = this;
this.id = p.id
this.nummer = p.nummer
this.omschrijving = p.omschrijving;
this.toelichting = p.toelichting;
this.disabled = ko.observable(false);
if(p.disabled == 'T')dit.disabled(true);
this.indicatorscores = ko.observableArray([]);
$.each(p.indicatorscores, function(j,k){
dit.indicatorscores.push(new fAddIndicatorscore(k));
});
}
}
function fAddIndicatorscore(k){
var dit = this;
this.id = k.id
this.nummer = k.nummer
this.omschrijving = k.omschrijving
this.inspectie = k.inspectie
this.score = ko.observable(k.score)
this.scoretype = k.scoretype;
function fAddIndicatorscore(k){
var dit = this;
this.id = k.id
this.nummer = k.nummer
this.omschrijving = k.omschrijving
this.inspectie = k.inspectie
this.score = ko.observable(k.score)
this.scoretype = k.scoretype;
// this.jatext = ko.computed(function(){
// switch (parseFloat(dit.scoretype)){
// case 3:
// case 4:
// case 5: return 'ja'; break;
// case 6: return "onvol."; break;
// case 7: return "included"; break;
// default: return 'ja';
// }
// })
// this.neetext = ko.computed(function(){
// switch (parseFloat(dit.scoretype)){
// case 3:
// case 4:
// case 5: return 'nee'; break;
// case 6: return "vol."; break;
// case 7: return "involved"; break;
// default: return 'nee';
// }
// })
// this.thirdoptiontext = ko.computed(function(){
// switch (parseFloat(dit.scoretype)){
// case 3: return "bezig"; break;
// case 4: return "nvt"; break;
// case 5: return "i.o."; break;
// case 6: return "goed"; break;
// case 7: return "present"; break;
// default: return "";
// }
// });
// this.fourthoptiontext = ko.computed(function(){
// return 'absent'
// });
}
// this.jatext = ko.computed(function(){
// switch (parseFloat(dit.scoretype)){
// case 3:
// case 4:
// case 5: return 'ja'; break;
// case 6: return "onvol."; break;
// case 7: return "included"; break;
// default: return 'ja';
// }
// })
// this.neetext = ko.computed(function(){
// switch (parseFloat(dit.scoretype)){
// case 3:
// case 4:
// case 5: return 'nee'; break;
// case 6: return "vol."; break;
// case 7: return "involved"; break;
// default: return 'nee';
// }
// })
// this.thirdoptiontext = ko.computed(function(){
// switch (parseFloat(dit.scoretype)){
// case 3: return "bezig"; break;
// case 4: return "nvt"; break;
// case 5: return "i.o."; break;
// case 6: return "goed"; break;
// case 7: return "present"; break;
// default: return "";
// }
// });
// this.fourthoptiontext = ko.computed(function(){
// return 'absent'
// });
}
function fAddScoreoptie(o){
this.scoreID = o.id;
this.type = o.type_nr;
this.optie = o.optie;
this.value = parseInt(o.score_value);
this.scoretekst = o.omschrijving;
function fAddScoreoptie(o){
this.scoreID = o.id;
this.type = o.type_nr;
this.optie = o.optie;
this.value = parseInt(o.score_value);
this.scoretekst = o.omschrijving;
}
}
if (ls.MonitorModel !== undefined){
ls.MonitorModel.initModel();
}
else {
ls.MonitorModel = {
orgversions : ko.observableArray([]),
selectedOrgversion : ko.observable(''),
listitems : ko.observableArray([]),
scoreopties : ko.observableArray(),
editok : ko.observable(false),
soort : ko.observable(4),
erzijnperiodes : ko.observable(false),
notitie : ko.observable(''),
fvid : ko.observable(null),
bezig : ko.observable(false),
meetellen : ko.observable(false),
optieslengte : ko.observable(0),
if (ls.MonitorModel !== undefined){
ls.MonitorModel.initModel();
}
else {
ls.MonitorModel = {
orgversions : ko.observableArray([]),
selectedOrgversion : ko.observable(''),
listitems : ko.observableArray([]),
scoreopties : ko.observableArray(),
editok : ko.observable(false),
soort : ko.observable(4),
erzijnperiodes : ko.observable(false),
notitie : ko.observable(''),
fvid : ko.observable(null),
bezig : ko.observable(false),
meetellen : ko.observable(false),
optieslengte : ko.observable(0),
initBindings :function(){
var self = ls.MonitorModel;
if (!ko.dataFor(document.getElementById('pagmonitor')) ) {
ko.applyBindings(ls.MonitorModel, document.getElementById("pagmonitor"));
}
self.initModel();
},
initModel: function(){
var self=ls.MonitorModel;
initBindings :function(){
var self = ls.MonitorModel;
if (!ko.dataFor(document.getElementById('pagmonitor')) ) {
ko.applyBindings(ls.MonitorModel, document.getElementById("pagmonitor"));
}
self.initModel();
},
initModel: function(){
var self=ls.MonitorModel;
self.orgversions.removeAll();
self.listitems.removeAll();
showAjaxLoader();
$.post("index.php/monpas/monitor/getperiodesperschool", function(data){
// get de reeds ingevulde versies of start een nieuwe versie voor de laatste periode
self.orgversions.removeAll();
self.listitems.removeAll();
showAjaxLoader();
$.post("index.php/monpas/monitor/getperiodesperschool", function(data){
// get de reeds ingevulde versies of start een nieuwe versie voor de laatste periode
self.orgversions.removeAll();
if (data.versies){
$.each(data.versies, function(i,p){
self.orgversions.push(new fAddOrgversion(p));
});//each
self.selectedOrgversion(self.orgversions()[0]);
self.erzijnperiodes(true);
if (data.versies){
$.each(data.versies, function(i,p){
self.orgversions.push(new fAddOrgversion(p));
});//each
self.selectedOrgversion(self.orgversions()[0]);
self.erzijnperiodes(true);
}; // if
self.soort(data.soort);
hideAjaxLoader();
},'json');
},
}; // if
self.soort(data.soort);
hideAjaxLoader();
},'json');
},
fChangeVersion: function(){
var self = ls.MonitorModel;
self.listitems.removeAll();
self.scoreopties.removeAll();
self.editok(false)
if (self.selectedOrgversion() == undefined) return;
fChangeVersion: function(){
var self = ls.MonitorModel;
self.listitems.removeAll();
self.scoreopties.removeAll();
self.editok(false)
if (self.selectedOrgversion() == undefined) return;
var tm = self.selectedOrgversion().invullentm;
var Dtm = new Date(tm.substring(6,10), parseInt(tm.substring(3,5)) -1, tm.substring(0,2),23,59,59,99);
var heden= new Date()
if (heden.getTime() <= Dtm.getTime() ) self.editok(true);
$.post("index.php/monpas/monitor/getlistitems/" + self.selectedOrgversion().id, function(data){
if (data.ijkpunten){
$.each(data.ijkpunten,function(i,p){
self.listitems.push(new fAddListitem(p));
});// each
}; //if
var tm = self.selectedOrgversion().invullentm;
var Dtm = new Date(tm.substring(6,10), parseInt(tm.substring(3,5)) -1, tm.substring(0,2),23,59,59,99);
var heden= new Date()
if (heden.getTime() <= Dtm.getTime() ) self.editok(true);
$.post("index.php/monpas/monitor/getlistitems/" + self.selectedOrgversion().id, function(data){
if (data.ijkpunten){
$.each(data.ijkpunten,function(i,p){
self.listitems.push(new fAddListitem(p));
});// each
}; //if
if(data.scoreopties){
$.each(data.scoreopties,function(x,o){
self.scoreopties.push(new fAddScoreoptie(o));
});// each
self.optieslengte(self.scoreopties().length);
if(data.scoreopties){
$.each(data.scoreopties,function(x,o){
self.scoreopties.push(new fAddScoreoptie(o));
});// each
self.optieslengte(self.scoreopties().length);
}
self.notitie(data.notitie);
if(data.meetellen && data.meetellen == 1) {
self.meetellen(true);
}
else{
self.meetellen(false);
}
self.fvid(data.fvid);
// als de versie een schoolversie is, dan mag alleen het management invullen
// maar ook het management mag niet invullen voorbij de invuldatum
if (self.editok() && self.selectedOrgversion().vorm==1) {self.editok(data.writer)}
},'json');
},
fUpdateScoretype12: function(){
var self= ls.MonitorModel
if (this.scoretype == 1 && (parseFloat(this.score().replace(',','.') ) > 10 ||
parseFloat(this.score().replace(',','.')) < 0)){
ls.MsgAutoFade("U moet een rapportcijfer tussen 0 en 10 invullen.",1000);
this.score(0);
};
if (this.scoretype ==2 && (parseInt(this.score())> 100 || parseInt(this.score()) < 0)){
ls.MsgAutoFade("U moet hier een percentage tussen 0 en 100 invullen.",1000);
this.score(0);
}
var submitData = {indicatorscoreid : this.id,
score : this.score()}
$.post("index.php/monpas/monitor/updatescore", submitData);
return true ; // nodig voor de eventuele radioset
},
self.notitie(data.notitie);
if(data.meetellen && data.meetellen == 1) {
self.meetellen(true);
fUpdateScoretypeVanaf3: function(data){
var self= ls.MonitorModel
var indicatorscoreID = data;
console.log(this, "this")
var submitData = {
indicatorscoreid : indicatorscoreID,
score : this.value }
$.post("index.php/monpas/monitor/updatescore", submitData);
return true ; // nodig voor de eventuele radioset
},
fToonToelichting: function(){
var self = ls.MonitorModel;
var dit = this;
var toelichting = '';
if (dit.toelichting != undefined) toelichting = dit.toelichting;
apprise(dit.nummer + '. ' + dit.omschrijving + '<br/>Toelichting: ' + toelichting);
},
fUpdateNotitie: function(){
var self = ls.MonitorModel;
if (timer){
clearTimeout(timer);
timeout = null;
}
else{
self.meetellen(false);
}
self.fvid(data.fvid);
// als de versie een schoolversie is, dan mag alleen het management invullen
// maar ook het management mag niet invullen voorbij de invuldatum
if (self.editok() && self.selectedOrgversion().vorm==1) {self.editok(data.writer)}
},'json');
},
fUpdateScoretype12: function(){
var self= ls.MonitorModel
if (this.scoretype == 1 && (parseFloat(this.score().replace(',','.') ) > 10 ||
parseFloat(this.score().replace(',','.')) < 0)){
ls.MsgAutoFade("U moet een rapportcijfer tussen 0 en 10 invullen.",1000);
this.score(0);
};
if (this.scoretype ==2 && (parseInt(this.score())> 100 || parseInt(this.score()) < 0)){
ls.MsgAutoFade("U moet hier een percentage tussen 0 en 100 invullen.",1000);
this.score(0);
}
var submitData = {indicatorscoreid : this.id,
score : this.score()}
$.post("index.php/monpas/monitor/updatescore", submitData);
return true ; // nodig voor de eventuele radioset
},
fUpdateScoretypeVanaf3: function(data){
var self= ls.MonitorModel
var indicatorscoreID = data;
var submitData = {
indicatorscoreid : indicatorscoreID,
score : this.value }
$.post("index.php/monpas/monitor/updatescore", submitData);
return true ; // nodig voor de eventuele radioset
},
fToonToelichting: function(){
var self = ls.MonitorModel;
var dit = this;
var toelichting = '';
if (dit.toelichting != undefined) toelichting = dit.toelichting;
apprise(dit.nummer + '. ' + dit.omschrijving + '<br/>Toelichting: ' + toelichting);
},
fUpdateNotitie: function(){
var self = ls.MonitorModel;
if (timer){
clearTimeout(timer);
timeout = null;
}
timer = setTimeout(function(){
var submitData= {notitie : self.notitie(),
fvID : self.fvid()}
$.post('index.php/monpas/monitor/savenotitie', submitData);
}, 600);
},
timer = setTimeout(function(){
var submitData= {notitie : self.notitie(),
fvID : self.fvid()}
$.post('index.php/monpas/monitor/savenotitie', submitData);
}, 600);
},
fTelMee: function(){
var self = ls.MonitorModel;
@@ -248,30 +251,30 @@ ls.initMonitorModel = function(){
meetellen = 0;
}
var submitData = {
meetellen: meetellen,
fvID: self.fvid(),
}
$.post("index.php/monpas/monitor/lijstmeetellen", submitData);
},
var submitData = {
meetellen: meetellen,
fvID: self.fvid(),
}
$.post("index.php/monpas/monitor/lijstmeetellen", submitData);
},
fPrint:function(){
var self =ls.MonitorModel;
if (self.bezig()) return;
self.bezig(true);
var items = ko.toJSON(self.listitems());
var data ={ 'orgversie' : self.selectedOrgversion().info(),
'tabelinfo' : items,
'notitie' : self.notitie()}
data=JSON.stringify(data);
var $form = $("<form method='post' action='index.php/monpas/monitor/printlijst' target='_blank'>").append($('<input type = "hidden" name="data" id ="data">').val(data) );
$form.appendTo("body").submit();
self.bezig(false);
}
} ; // definition van model
ls.MonitorModel.initBindings();
}; // else
}// function initMonitorModel
var self =ls.MonitorModel;
if (self.bezig()) return;
self.bezig(true);
var items = ko.toJSON(self.listitems());
var data ={ 'orgversie' : self.selectedOrgversion().info(),
'tabelinfo' : items,
'notitie' : self.notitie()}
data=JSON.stringify(data);
var $form = $("<form method='post' action='index.php/monpas/monitor/printlijst' target='_blank'>").append($('<input type = "hidden" name="data" id ="data">').val(data) );
$form.appendTo("body").submit();
self.bezig(false);
}
} ; // definition van model
ls.MonitorModel.initBindings();
}; // else
}// function initMonitorModel
});
+15 -24
View File
@@ -88,21 +88,30 @@ ls.initOntwikkelModel = function(){
,this)
}
function fAddResult(p){
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;
}
if (ls.OntwikkelModel !== undefined){
@@ -205,8 +214,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 +349,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 +364,6 @@ ls.initOntwikkelModel = function(){
self.fGetWriteAutorisatie();
}
},'json');
+314 -289
View File
@@ -1,315 +1,340 @@
$(function(){
ls.initVersiesModel = function(){
var timeout;
ls.initVersiesModel = function(){
var timeout;
function fAddModule(p){
this.sysnr = p.sysnr;
this.naam = p.naam;
}
function fAddVersie(p){
this.id = p.id;
this.naam = ko.observable(p.naam);
this.ingang = ko.observable(p.ingangsdatum);
this.systemnorm = ko.observable(p.systemnorm);
this.deleteok = ko.observable(p.deleteok);
}
function fAddIJkpunt(p){
var dit = this;
this.id = p.id;
this.nummer = ko.observable(p.nummer);
this.omschrijving = ko.observable(p.omschrijving);
this.toelichting = ko.observable(p.toelichting);
this.indicatoren = ko.observableArray([]);
if (p.indicatoren){
$.each(p.indicatoren, function(j,k){
dit.indicatoren.push(new fAddIndicator(k));
});
function fAddModule(p){
this.sysnr = p.sysnr;
this.naam = p.naam;
}
function fAddVersie(p){
this.id = p.id;
this.naam = ko.observable(p.naam);
this.ingang = ko.observable(p.ingangsdatum);
this.systemnorm = ko.observable(p.systemnorm);
this.deleteok = ko.observable(p.deleteok);
}
function fAddIJkpunt(p){
var dit = this;
this.id = p.id;
this.nummer = ko.observable(p.nummer);
this.omschrijving = ko.observable(p.omschrijving);
this.toelichting = ko.observable(p.toelichting);
this.indicatoren = ko.observableArray([]);
if (p.indicatoren){
$.each(p.indicatoren, function(j,k){
dit.indicatoren.push(new fAddIndicator(k));
});
}
this.toonindics = ko.observable(false);
this.disabled = ko.observable(false)
if(p.disabled == 'T') this.disabled(true);
}
function fAddIndicator(k){
this.id = k.id;
this.nummer = ko.observable(k.nummer);
this.gewicht = ko.observable(k.gewicht);
this.omschrijving1 = ko.observable(k.omschrijving1);
this.omschrijving2 = ko.observable(k.omschrijving2);
this.inspectie = ko.observable(k.inspectie);
this.deleteok = k.deleteok;
}
this.toonindics = ko.observable(false);
}
function fAddIndicator(k){
this.id = k.id;
this.nummer = ko.observable(k.nummer);
this.gewicht = ko.observable(k.gewicht);
this.omschrijving1 = ko.observable(k.omschrijving1);
this.omschrijving2 = ko.observable(k.omschrijving2);
this.inspectie = ko.observable(k.inspectie);
this.deleteok = k.deleteok;
}
if (ls.VersiesModel !== undefined){
ls.VersiesModel.initModel();
}
else {
ls.VersiesModel = {
if (ls.VersiesModel !== undefined){
ls.VersiesModel.initModel();
}
else {
ls.VersiesModel = {
autonivo : ko.observable(0),
versies : ko.observableArray([]),
selectedVersie : ko.observable(''),
newVersieNaam : ko.observable(''),
ijkpunten : ko.observableArray([]),
newIJkpunt : ko.observable({nummer: ko.observable(0), naam:ko.observable(''), toelichting: ko.observable('')}),
selectedIJkpunt : ko.observable(''),
newIndicator : ko.observable({id : null,
ijkpunt_id : null,
nummer : ko.observable(0),
gewicht : ko.observable(1),
omschrijving1 : ko.observable(),
omschrijving2 : ko.observable(),
inspectie : ko.observable(),
deleteok : ko.observable(true) }),
modules : ko.observableArray([]),
selectedModule : ko.observable(''),
autonivo : ko.observable(0),
initBindings :function(){
var self = ls.VersiesModel;
if (!ko.dataFor(document.getElementById('pagVersies')) ) {
ko.applyBindings(ls.VersiesModel, document.getElementById("pagVersies"));
}
$.post("index.php/monpas/beheer/getmodules", function(result){
self.modules.removeAll();
versies : ko.observableArray([]),
selectedVersie : ko.observable(''),
newVersieNaam : ko.observable(''),
ijkpunten : ko.observableArray([]),
newIJkpunt : ko.observable({nummer: ko.observable(0), naam:ko.observable(''), toelichting: ko.observable('')}),
selectedIJkpunt : ko.observable(''),
newIndicator : ko.observable({id : null,
ijkpunt_id : null,
nummer : ko.observable(0),
gewicht : ko.observable(1),
omschrijving1 : ko.observable(),
omschrijving2 : ko.observable(),
inspectie : ko.observable(),
deleteok : ko.observable(true) }),
modules : ko.observableArray([]),
selectedModule : ko.observable(''),
if (result){
$.each(result, function(i,p){
self.modules.push(new fAddModule(p));
});
self.selectedModule(self.modules[0]);
}; // if rsult
self.initModel();
},'json');
},
initModel: function(){
var self = ls.VersiesModel;
$.post("index.php/shared/autorisatienivos/getautorisatie", function(result){
self.autonivo(result)
// self.fGetVersies();
},'json');
},
initBindings :function(){
var self = ls.VersiesModel;
fGetVersies : function(){
var self =ls.VersiesModel;
$.post("index.php/monpas/beheer/getversies/" + self.selectedModule().sysnr, function(data){
self.versies.removeAll();
self.ijkpunten.removeAll();
if (data) {
$.each(data,function(i,p){
self.versies.push(new fAddVersie(p));
});
self.selectedVersie(self.versies()[0] );
if (!ko.dataFor(document.getElementById('pagVersies')) ) {
ko.applyBindings(ls.VersiesModel, document.getElementById("pagVersies"));
}
},'json');
},
fChangeModule: function(){
var self =ls.VersiesModel;
self.fGetVersies();
},
fMaakNieuweVersie: function(){
var self = ls.VersiesModel;
self.newVersieNaam('');
$("#modNieuweVersie").modal('show');
},
fUpdateVersie: function(){
var self = ls.VersiesModel;
var dit = this;
if (timeout){
clearTimeout(timeout)
timeout ==null;
}
timeout=setTimeout(function(){
var submitData = { id : dit.id,
naam : dit.naam(),
ingangsdatum : dit.ingang(),
systemnorm : dit.systemnorm()}
$.post("index.php/monpas/beheer/updateversie",submitData, function(){})
},700);
},
fSaveVersie: function(){
var self = ls.VersiesModel;
if (!self.selectedModule()) {
apprise("Er is geen instrument geselecteerd. De lijst kan niet worden aangemaakt.");
return;
}
var submitData= {nieuwnaam : self.newVersieNaam(),
module : self.selectedModule().sysnr}
$.post("index.php/monpas/beheer/insertversie/" ,submitData, function(result){
if (result) {
self.versies.push(new fAddVersie(result));
$.each(self.versies(), function(i,p){
if (p.id == result.id){self.selectedVersie(p); return false;}
})
} ; // if result
$.post("index.php/monpas/beheer/getmodules", function(result){
self.modules.removeAll();
if (result){
$.each(result, function(i,p){
self.modules.push(new fAddModule(p));
});
self.selectedModule(self.modules[0]);
}; // if rsult
self.initModel();
},'json');
},
initModel: function(){
var self = ls.VersiesModel;
$.post("index.php/shared/autorisatienivos/getautorisatie", function(result){
self.autonivo(result)
// self.fGetVersies();
},'json');
},
fGetVersies : function(){
var self =ls.VersiesModel;
$.post("index.php/monpas/beheer/getversies/" + self.selectedModule().sysnr, function(data){
self.versies.removeAll();
self.ijkpunten.removeAll();
if (data) {
$.each(data,function(i,p){
self.versies.push(new fAddVersie(p));
});
self.selectedVersie(self.versies()[0] );
}
},'json');
},
fChangeModule: function(){
var self =ls.VersiesModel;
self.fGetVersies();
},
fMaakNieuweVersie: function(){
var self = ls.VersiesModel;
self.newVersieNaam('');
$("#modNieuweVersie").modal('show');
},
fUpdateVersie: function(){
var self = ls.VersiesModel;
var dit = this;
if (timeout){
clearTimeout(timeout)
timeout ==null;
}
timeout=setTimeout(function(){
var submitData = { id : dit.id,
naam : dit.naam(),
ingangsdatum : dit.ingang(),
systemnorm : dit.systemnorm()}
$.post("index.php/monpas/beheer/updateversie",submitData, function(){})
},700);
},
fSaveVersie: function(){
var self = ls.VersiesModel;
if (!self.selectedModule()) {
apprise("Er is geen instrument geselecteerd. De lijst kan niet worden aangemaakt.");
return;
}
var submitData= {nieuwnaam : self.newVersieNaam(),
module : self.selectedModule().sysnr}
$.post("index.php/monpas/beheer/insertversie/" ,submitData, function(result){
if (result) {
self.versies.push(new fAddVersie(result));
$.each(self.versies(), function(i,p){
if (p.id == result.id){self.selectedVersie(p); return false;}
})
} ; // if result
self.ijkpunten.removeAll();
},'json');
},
fDeleteVersie: function(){
var self=ls.VersiesModel;
$.post("index.php/monpas/beheer/deleteversie/" + self.selectedVersie().id, function(result){
if (result.length > 0){
apprise(resulterrortekst);
}
else{
self.versies.remove(self.selectedVersie());
}
},'json')
},
fChangeVersie: function(){
var self=ls.VersiesModel;
self.ijkpunten.removeAll();
},'json');
},
fDeleteVersie: function(){
var self=ls.VersiesModel;
$.post("index.php/monpas/beheer/deleteversie/" + self.selectedVersie().id, function(result){
if (result.length > 0){
apprise(resulterrortekst);
if (self.selectedVersie() == undefined) return;
$.post("index.php/monpas/beheer/getijkpunten/"+ self.selectedVersie().id, function(data){
self.ijkpunten.removeAll();
if (data){
$.each(data, function(i,p){
self.ijkpunten.push(new fAddIJkpunt(p));
});
}
},'json');
},
fNieuwIJkpunt: function(){
var self = ls.VersiesModel;
var num = 0;
var i=self.ijkpunten().length;
var i = parseInt(i) - 1;
if (i >= 0) {
num = self.ijkpunten()[i].nummer();
};
self.newIJkpunt().nummer(parseInt(num)+ 1);
self.newIJkpunt().naam('');
self.newIJkpunt().toelichting('');
$("#modNieuwIJkpunt").modal('show');
},
fSaveIJkpunt: function(){
var self=ls.VersiesModel;
var submitData={versie_id : self.selectedVersie().id,
nummer : self.newIJkpunt().nummer(),
omschrijving : self.newIJkpunt().naam(),
toelichting : self.newIJkpunt().toelichting()};
$.post("index.php/monpas/beheer/insertijkpunt", submitData, function(data){
if (data){
self.ijkpunten.push(new fAddIJkpunt(data));
$.each(self.ijkpunten(), function(i,p){
if (p.id == data.id){
self.selectedIJkpunt(p);
return false;
}
});
}
else { apprise("Er is een fout opgetreden bij opslaan."); };
},'json');
},
fToggleIndicatoren: function(){
var self= ls.VersiesModel;
self.selectedIJkpunt(null);
self.selectedIJkpunt(this);
this.toonindics(!this.toonindics());
},
fUpdateIJkpunt: function(){
var self= ls.VersiesModel;
var dit = this;
if(dit.disabled()) return;
if (timeout){
clearTimeout(timeout)
timeout ==null;
}
timeout=setTimeout(function(){
var submitData={id : dit.id,
nummer : dit.nummer(),
versie_id : self.selectedVersie().id,
omschrijving : dit.omschrijving(),
toelichting : dit.toelichting()}
$.post("index.php/monpas/beheer/updateijkpunt",submitData, function(){})
},800);
},
fDisableIJkpunt: function(){
var self = ls.VersiesModel;
var dit = this;
dit.disabled(! dit.disabled())
var disabled = 'F';
if(dit.disabled()) disabled = 'T';
var submitData = {
'id' : dit.id,
'disabled' : disabled
}
$.post("index.php/monpas/beheer/disableijkpunt", submitData, function(){
});
},
fDeleteIJkpunt:function(){
var self =ls.VersiesModel;
var id = this.id;
var dit = this;
if ( self.ijkpunten().indicatoren !== undefined && self.ijkpunten().indicatoren().length > 0) {
apprise('Er zijn nog indicatoren. IJkpunt mag niet verwijderd worden');
return;
}
else{
self.versies.remove(self.selectedVersie());
}
},'json')
},
fChangeVersie: function(){
var self=ls.VersiesModel;
self.ijkpunten.removeAll();
if (self.selectedVersie() == undefined) return;
$.post("index.php/monpas/beheer/getijkpunten/"+ self.selectedVersie().id, function(data){
self.ijkpunten.removeAll();
if (data){
$.each(data, function(i,p){
self.ijkpunten.push(new fAddIJkpunt(p));
});
}
},'json');
},
fNieuwIJkpunt: function(){
var self = ls.VersiesModel;
var num = 0;
var i=self.ijkpunten().length;
var i = parseInt(i) - 1;
if (i >= 0) {
num = self.ijkpunten()[i].nummer();
};
self.newIJkpunt().nummer(parseInt(num)+ 1);
self.newIJkpunt().naam('');
self.newIJkpunt().toelichting('');
$("#modNieuwIJkpunt").modal('show');
},
fSaveIJkpunt: function(){
var self=ls.VersiesModel;
var submitData={versie_id : self.selectedVersie().id,
nummer : self.newIJkpunt().nummer(),
omschrijving : self.newIJkpunt().naam(),
toelichting : self.newIJkpunt().toelichting()};
$.post("index.php/monpas/beheer/insertijkpunt", submitData, function(data){
if (data){
self.ijkpunten.push(new fAddIJkpunt(data));
$.each(self.ijkpunten(), function(i,p){
if (p.id == data.id){
self.selectedIJkpunt(p);
return false;
}
});
}
else { apprise("Er is een fout opgetreden bij opslaan."); };
},'json');
},
fToggleIndicatoren: function(){
var self= ls.VersiesModel;
self.selectedIJkpunt(null);
self.selectedIJkpunt(this);
this.toonindics(!this.toonindics());
},
fUpdateIJkpunt: function(){
var self= ls.VersiesModel;
var dit = this;
if (timeout){
clearTimeout(timeout)
timeout ==null;
}
timeout=setTimeout(function(){
var submitData={id : dit.id,
nummer : dit.nummer(),
versie_id : self.selectedVersie().id,
omschrijving : dit.omschrijving(),
toelichting : dit.toelichting()}
$.post("index.php/monpas/beheer/updateijkpunt",submitData, function(){})
},800);
},
fDeleteIJkpunt:function(){
var self =ls.VersiesModel;
var id = this.id;
var dit = this;
if ( self.ijkpunten().indicatoren !== undefined && self.ijkpunten().indicatoren().length > 0) {
apprise('Er zijn nog indicatoren. IJkpunt mag niet verwijderd worden');
return;
}
else{
apprise("Weet u zeker dat u " + this.omschrijving() + " wilt verwijderen? " ,
apprise("Weet u zeker dat u " + this.omschrijving() + " wilt verwijderen? " ,
{verify: true, textYes: 'ja', textNo: 'nee'}, function(ans){
if (ans){
$.post("index.php/monpas/beheer/deleteijkpunt/" + id);
self.ijkpunten.remove(dit);
}
}); // apprise
}
},
fNieuweIndicator: function(){
var self = ls.VersiesModel;
var num =0
self.selectedIJkpunt(this);
$.each(self.selectedIJkpunt().indicatoren(), function(j,k){
num=k.nummer();
})
self.newIndicator().nummer(parseInt(num) + 1);
self.newIndicator().gewicht(1);
self.newIndicator().ijkpunt_id= self.selectedIJkpunt().id;
self.newIndicator().omschrijving1('');
self.newIndicator().omschrijving2('');
self.newIndicator().inspectie('');
self.newIndicator().deleteok(true);
$("#modNieuwIndicator").modal('show');
},
fSaveIndicator: function(){
var self=ls.VersiesModel;
var submitData={ ijkpunt_id : self.newIndicator().ijkpunt_id,
nummer : self.newIndicator().nummer(),
omschrijving1 : self.newIndicator().omschrijving1(),
omschrijving2 : self.newIndicator().omschrijving2(),
inspectie : self.newIndicator().inspectie(),
gewicht : self.newIndicator().gewicht};
$.post("index.php/monpas/beheer/insertindicator", submitData, function(data){
if (data){
self.selectedIJkpunt().indicatoren.push(new fAddIndicator(data));
}); // apprise
}
else { apprise("Er is een fout opgetreden bij opslaan."); };
},'json');
},
fUpdateIndicator: function(){
var self = ls.VersiesModel;
var dit =this;
if (timeout){
clearTimeout(timeout);
timeout = null;
}
timeout = setTimeout(function(){
var submitData ={ id : dit.id,
nummer : dit.nummer(),
omschrijving1 : dit.omschrijving1(),
omschrijving2 : dit.omschrijving2(),
inspectie : dit.inspectie(),
gewicht : dit.gewicht()}
$.post("index.php/monpas/beheer/updateindicator", submitData);
},700);
},
fDeleteIndicator: function($parent, $data){
var self = ls.VersiesModel;
var dit = $data;
apprise ("Weet u zeker dat u <i>" + dit.omschrijving1() + "</i> wilt verwijderen?",
},
fNieuweIndicator: function(){
var self = ls.VersiesModel;
var num =0
var dit = this;
if(dit.disabled()) return;
self.selectedIJkpunt(this);
$.each(self.selectedIJkpunt().indicatoren(), function(j,k){
num=k.nummer();
})
self.newIndicator().nummer(parseInt(num) + 1);
self.newIndicator().gewicht(1);
self.newIndicator().ijkpunt_id= self.selectedIJkpunt().id;
self.newIndicator().omschrijving1('');
self.newIndicator().omschrijving2('');
self.newIndicator().inspectie('');
self.newIndicator().deleteok(true);
$("#modNieuwIndicator").modal('show');
},
fSaveIndicator: function(){
var self=ls.VersiesModel;
var submitData={ ijkpunt_id : self.newIndicator().ijkpunt_id,
nummer : self.newIndicator().nummer(),
omschrijving1 : self.newIndicator().omschrijving1(),
omschrijving2 : self.newIndicator().omschrijving2(),
inspectie : self.newIndicator().inspectie(),
gewicht : self.newIndicator().gewicht};
$.post("index.php/monpas/beheer/insertindicator", submitData, function(data){
if (data){
self.selectedIJkpunt().indicatoren.push(new fAddIndicator(data));
}
else { apprise("Er is een fout opgetreden bij opslaan."); };
},'json');
},
fUpdateIndicator: function(){
var self = ls.VersiesModel;
var dit =this;
if (timeout){
clearTimeout(timeout);
timeout = null;
}
timeout = setTimeout(function(){
var submitData ={ id : dit.id,
nummer : dit.nummer(),
omschrijving1 : dit.omschrijving1(),
omschrijving2 : dit.omschrijving2(),
inspectie : dit.inspectie(),
gewicht : dit.gewicht()}
$.post("index.php/monpas/beheer/updateindicator", submitData);
},700);
},
fDeleteIndicator: function($parent, $data){
var self = ls.VersiesModel;
var dit = $data;
apprise ("Weet u zeker dat u <i>" + dit.omschrijving1() + "</i> wilt verwijderen?",
{verify:true, textYes:'ja',textNo:'nee'}, function(ans){
if (ans){
$.post('index.php/monpas/beheer/deleteindicator/' + dit.id,function(result){
$.post('index.php/monpas/beheer/deleteindicator/' + dit.id,function(result){
$parent.indicatoren.remove(dit);
},'json');
}
}); // apprise
}
}); // apprise
}
} ; // definition van model
ls.VersiesModel.initBindings();
}; // else
}// function initVersiesModel
} ; // definition van model
ls.VersiesModel.initBindings();
}; // else
}// function initVersiesModel
});