diff --git a/application/controllers/monpas/Diversiteit.php b/application/controllers/monpas/Diversiteit.php index 410bab7..18f7895 100644 --- a/application/controllers/monpas/Diversiteit.php +++ b/application/controllers/monpas/Diversiteit.php @@ -34,7 +34,7 @@ class Diversiteit extends MY_Controller{ $groep->combi = count($groepasarray); $groep->tijden = new stdClass; - $groep->tijden = $this->Ondersteuningtijden_model->getgroeptijden($groep->id); + if($groep->ondersteuning != 'F') $groep->tijden = $this->Ondersteuningtijden_model->getgroeptijden($groep->id); } } echo json_encode($groepen); diff --git a/application/controllers/monpas/Ondersteuning.php b/application/controllers/monpas/Ondersteuning.php index 91ca6a8..b5432e3 100644 --- a/application/controllers/monpas/Ondersteuning.php +++ b/application/controllers/monpas/Ondersteuning.php @@ -13,6 +13,7 @@ class Ondersteuning extends MY_Controller{ die; };// if } + function getgroepen(){ if (!$this->userid) die; $orgid = $this->clean_input('orgID'); @@ -42,7 +43,24 @@ class Ondersteuning extends MY_Controller{ echo json_encode(['groepen'=>$groepen, 'ondersteuning'=>$ondersteuning]); } + function meldondersteuning(){ + if (!$this->userid) die; + $schoolid = $this->clean_input('schoolid'); + $schooljaarnr = $this->clean_input('schooljaar'); + $module = $this->clean_input('module'); + $ondersteuning = $this->clean_input('ondersteuning'); + if($schoolid && $schooljaarnr && $module){ + $groepsIDs = $this->Groepen_model->getgroepsids($schoolid, $schooljaarnr, $module); + if($groepsIDs){ + foreach($groepsIDs AS $groepsID){ + $this->Groepen_model->update_record(array("ondersteuning" => $ondersteuning), $groepsID->id); + } + } + } + + echo json_encode('gelukt'); + } function gettijden(){ if (!$this->userid) die; diff --git a/application/models/monpas/Groepen_model.php b/application/models/monpas/Groepen_model.php index b86447a..2b1f6c8 100644 --- a/application/models/monpas/Groepen_model.php +++ b/application/models/monpas/Groepen_model.php @@ -31,7 +31,7 @@ class Groepen_model extends MY_Model{ return $this->get_query_row(); } function getgroepenlist($orgid, $schooljaarnr, $module){ - $this->sql = "SELECT id, naam + $this->sql = "SELECT id, naam, ondersteuning FROM tb_groepen WHERE organisatie_id ={$orgid} AND schooljaarnr = {$schooljaarnr} @@ -77,7 +77,7 @@ class Groepen_model extends MY_Model{ GR.naam, GR.niveau, GR.totaantal, - + GR.ondersteuning, SUM(IF( nivo = 2, AX.aantal, 0)) AS som2, SUM(IF( nivo = 3, AX.aantal, 0)) AS som3, SUM(IF( nivo = 4, AX.aantal, 0)) AS som4, @@ -151,4 +151,13 @@ class Groepen_model extends MY_Model{ WHERE G.id = {$groepid}"; return $this->get_query_row(); } + + function getgroepsids($orgid, $schooljaarnr, $module){ + $this->sql=" SELECT id + FROM tb_groepen + WHERE schooljaarnr = {$schooljaarnr} + AND organisatie_id = {$orgid} + AND module = {$module} "; + return $this->get_query_result(); + } } \ No newline at end of file diff --git a/application/views/monpas/pages/mondiv/diversiteit.php b/application/views/monpas/pages/mondiv/diversiteit.php index 3c8fd65..0b37e6e 100644 --- a/application/views/monpas/pages/mondiv/diversiteit.php +++ b/application/views/monpas/pages/mondiv/diversiteit.php @@ -5,7 +5,6 @@
| Totaal aantal leerlingen | -+ | ||||
| Uitsplitsing extra formatie per groep | -|||||
| - | Ondersteuning | -||||
| - | Groep* | -- | Subgroep** | -- | Individueel*** | -
| - | - uur - minuten - | -- | - uur - minuten - | -- - | - uur - minuten - | -
Er zijn nog geen groepen ingevuld
+* Ondersteuning in de groep
-** Ondersteuning aan een subgroep buiten de groep
-*** Ondersteuning aan een individuele leerling buiten de groep
++ + + geen ondersteuning voor groepen +
+ +Selecteer een groep: +
+ + +| Uitsplitsing extra formatie per groep | +|||||
| + | Ondersteuning | +||||
| + | Groep* | ++ | Subgroep** | ++ | Individueel*** | +
| + | + uur + minuten + | ++ | + uur + minuten + | ++ + | + uur + minuten + | +
* Ondersteuning in de groep
+** Ondersteuning aan een subgroep buiten de groep
+*** Ondersteuning aan een individuele leerling buiten de groep
+