tussenopslag
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,6 @@
|
||||
<div class="row" data-bind="visible: groepen().length > 0">
|
||||
<h4>Diversiteitomvang
|
||||
<button class="printer" style="margin-left: 30px" data-bind="click: fPrintDiversiteitMatrix"></button>
|
||||
|
||||
</h4>
|
||||
<table>
|
||||
<tr class="kopje">
|
||||
@@ -19,7 +18,7 @@
|
||||
<tr>
|
||||
<td> Totaal aantal leerlingen</td>
|
||||
<!-- ko foreach: groepen -->
|
||||
<td style="text-align:right" data-bind="text:totaantal"></td>
|
||||
<td style="text-align:right" data-bind="text: totaantal"></td>
|
||||
<!-- /ko-->
|
||||
<td style= "text-align: right; " data-bind="text: schooltotaal"></td>
|
||||
</tr>
|
||||
@@ -229,7 +228,10 @@
|
||||
</div>
|
||||
<hr/>
|
||||
<div class="row">
|
||||
<div class="col-sm-12 ">
|
||||
<div class="col-sm-12" data-bind="visible: ondersteuningSchool() == false">
|
||||
<p>Geen ondersteuning voor groepen</p>
|
||||
</div>
|
||||
<div class="col-sm-12 " data-bind="visible: ondersteuningSchool() ">
|
||||
<h4>Ondersteuningsmatrix
|
||||
<button class="printer" style="margin-left: 30px" data-bind="click: fPrintOndersteuningsmatrix"></button>
|
||||
</h4>
|
||||
@@ -307,7 +309,7 @@
|
||||
</div>
|
||||
<hr/>
|
||||
<div class= "row">
|
||||
<div class="col-sm-12">
|
||||
<div class="col-sm-12" data-bind="visible: ondersteuningSchool() " >
|
||||
<h4>Totalen per soort ondersteuning
|
||||
<button class="printer" style="margin-left: 30px" data-bind="click: fPrintOndersteuningstotalen"></button>
|
||||
</h4>
|
||||
|
||||
@@ -1,52 +1,69 @@
|
||||
<div class="col-sm-12 mainpagina" id ="pagondersteuning">
|
||||
Selecteer een groep:
|
||||
<select data-bind=" options : groepen,
|
||||
optionsText : 'naam',
|
||||
value : selectedGroep,
|
||||
event : {change: fGetUren}">
|
||||
</select>
|
||||
|
||||
|
||||
<table style="margin-top:20px; border: 1px solid #ebebeb">
|
||||
<tr class="kopje" style="border: 1px solid #ebebeb">
|
||||
<td colspan = 6 style="text-align: center"> Uitsplitsing extra formatie per groep</td>
|
||||
</tr>
|
||||
<tr style="border: 1px solid #ebebeb">
|
||||
<td> </td>
|
||||
<td colspan = 5 style="text-align: center"> Ondersteuning</td>
|
||||
</tr>
|
||||
<tr style="border: 1px solid #ebebeb">
|
||||
<td style= "border-right: 1px solid #ebebeb"> </td>
|
||||
<td style="text-align: center; background-color:#e7e3e3">Groep*</td>
|
||||
<td style="width:10px"></td>
|
||||
<td style="text-align: center;background-color:#e7e3e3"> Subgroep**</td>
|
||||
<td style="width:10px"></td>
|
||||
<td style="text-align: center;background-color:#e7e3e3"> Individueel***</td>
|
||||
</tr>
|
||||
<!-- ko foreach: dagen-->
|
||||
<tr>
|
||||
<td style="border: 1px solid #ebebeb" data-bind = "text : dag"></td>
|
||||
<td style="border: 1px solid #ebebeb">
|
||||
<input class="integer" data-bind ="textInput: uurG , event:{input: $parent.fSavetijd.bind($data,'G','u')}, enable: $parent.writer()" /> uur
|
||||
<input class="integer" data-bind = "textInput: minutenG, event:{input: $parent.fSavetijd.bind($data,'G','m')}, enable: $parent.writer()" /> minuten
|
||||
</td>
|
||||
<td></td>
|
||||
<td style="border: 1px solid #ebebeb;">
|
||||
<input class="integer" data-bind ="textInput: uurS, event:{input: $parent.fSavetijd.bind($data,'S','u')}, enable: $parent.writer() " /> uur
|
||||
<input class="integer" data-bind = "textInput: minutenS, event:{input: $parent.fSavetijd.bind($data,'S','m')}, enable: $parent.writer()" /> minuten
|
||||
</td>
|
||||
<td></td>
|
||||
|
||||
<td style="border: 1px solid #ebebeb">
|
||||
<input class="integer" data-bind ="textInput: uurI ,event:{input: $parent.fSavetijd.bind($data,'I','u')}, enable: $parent.writer()" /> uur
|
||||
<input class="integer" data-bind ="textInput: minutenI,event:{input: $parent.fSavetijd.bind($data,'I','m')}, enable: $parent.writer()" /> minuten
|
||||
</td>
|
||||
</tr>
|
||||
<!-- /ko -->
|
||||
</table>
|
||||
<div data-bind="visible: groepen().length == 0">
|
||||
<p>Er zijn nog geen groepen ingevuld</p>
|
||||
</div>
|
||||
|
||||
<p style="font-size: 0.8em; margin-top:20px">* Ondersteuning in de groep</p>
|
||||
<p style="font-size: 0.8em">** Ondersteuning aan een subgroep buiten de groep </p>
|
||||
<p style="font-size: 0.8em">*** Ondersteuning aan een individuele leerling buiten de groep</p>
|
||||
<div data-bind="visible: groepen().length > 0">
|
||||
|
||||
<p>
|
||||
<span class="glyphicon glyphicon-unchecked" data-bind="visible: !geenOndersteuning(), click: fMeldOndersteuning" style="display: none;"></span>
|
||||
<span class="glyphicon glyphicon-check" style="margin-right: 5px;" data-bind="visible: geenOndersteuning(), click: fMeldOndersteuning"></span>
|
||||
geen ondersteuning voor groepen
|
||||
</p>
|
||||
|
||||
<div style="margin-top: 20px; " data-bind="visible: !geenOndersteuning() ">
|
||||
<p>Selecteer een groep:
|
||||
<select data-bind=" options : groepen,
|
||||
optionsText : 'naam',
|
||||
value : selectedGroep,
|
||||
event : {change: fGetUren}">
|
||||
</select></p>
|
||||
|
||||
|
||||
<table style="margin-top:20px; border: 1px solid #ebebeb">
|
||||
<tr class="kopje" style="border: 1px solid #ebebeb">
|
||||
<td colspan = 6 style="text-align: center"> Uitsplitsing extra formatie per groep</td>
|
||||
</tr>
|
||||
<tr style="border: 1px solid #ebebeb">
|
||||
<td> </td>
|
||||
<td colspan = 5 style="text-align: center"> Ondersteuning</td>
|
||||
</tr>
|
||||
<tr style="border: 1px solid #ebebeb">
|
||||
<td style= "border-right: 1px solid #ebebeb"> </td>
|
||||
<td style="text-align: center; background-color:#e7e3e3">Groep*</td>
|
||||
<td style="width:10px"></td>
|
||||
<td style="text-align: center;background-color:#e7e3e3"> Subgroep**</td>
|
||||
<td style="width:10px"></td>
|
||||
<td style="text-align: center;background-color:#e7e3e3"> Individueel***</td>
|
||||
</tr>
|
||||
<!-- ko foreach: dagen-->
|
||||
<tr>
|
||||
<td style="border: 1px solid #ebebeb" data-bind = "text : dag"></td>
|
||||
<td style="border: 1px solid #ebebeb">
|
||||
<input class="integer" data-bind ="textInput: uurG , event:{input: $parent.fSavetijd.bind($data,'G','u')}, enable: $parent.writer()" /> uur
|
||||
<input class="integer" data-bind = "textInput: minutenG, event:{input: $parent.fSavetijd.bind($data,'G','m')}, enable: $parent.writer()" /> minuten
|
||||
</td>
|
||||
<td></td>
|
||||
<td style="border: 1px solid #ebebeb;">
|
||||
<input class="integer" data-bind ="textInput: uurS, event:{input: $parent.fSavetijd.bind($data,'S','u')}, enable: $parent.writer() " /> uur
|
||||
<input class="integer" data-bind = "textInput: minutenS, event:{input: $parent.fSavetijd.bind($data,'S','m')}, enable: $parent.writer()" /> minuten
|
||||
</td>
|
||||
<td></td>
|
||||
|
||||
<td style="border: 1px solid #ebebeb">
|
||||
<input class="integer" data-bind ="textInput: uurI ,event:{input: $parent.fSavetijd.bind($data,'I','u')}, enable: $parent.writer()" /> uur
|
||||
<input class="integer" data-bind ="textInput: minutenI,event:{input: $parent.fSavetijd.bind($data,'I','m')}, enable: $parent.writer()" /> minuten
|
||||
</td>
|
||||
</tr>
|
||||
<!-- /ko -->
|
||||
</table>
|
||||
|
||||
<p style="font-size: 0.8em; margin-top:20px">* Ondersteuning in de groep</p>
|
||||
<p style="font-size: 0.8em">** Ondersteuning aan een subgroep buiten de groep </p>
|
||||
<p style="font-size: 0.8em">*** Ondersteuning aan een individuele leerling buiten de groep</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -276,7 +276,7 @@ mh.initInvulModel = function(){
|
||||
|
||||
fSaveSO: function(){
|
||||
var self = mh.InvulModel;
|
||||
console.log("in functie SO")
|
||||
|
||||
var message = false;
|
||||
|
||||
if(isNaN(self.laag())){
|
||||
@@ -315,7 +315,6 @@ mh.initInvulModel = function(){
|
||||
|
||||
};
|
||||
|
||||
console.log(submitData, "submitData SO")
|
||||
$.post("index.php/monpas/omvang/saveTlvsSO", submitData, function (result) {
|
||||
if(result){
|
||||
if(result.laag) self.laagID(result.laag);
|
||||
@@ -356,7 +355,6 @@ console.log(submitData, "submitData SO")
|
||||
'zwaarID' : self.zwaarID(),
|
||||
'schooljaarnr': self.selectedSchooljaar().nummer,
|
||||
};
|
||||
console.log(submitData, "submit")
|
||||
$.post("index.php/monpas/omvang/saveTlvsSBO", submitData, function (result) {
|
||||
if(result){
|
||||
if(result.licht) self.lichtID(result.licht);
|
||||
|
||||
@@ -95,10 +95,8 @@ ls.initMenuModel = function(){
|
||||
self.menuitems.removeAll();
|
||||
$.post("index.php/shared/menu/get_menu",function(data){
|
||||
self.organisatie(data.organisatie);
|
||||
console.log(data.organisatie, "data organisatie")
|
||||
self.menuitems.removeAll();
|
||||
if (data.menu){
|
||||
console.log(data.menu, "data menu")
|
||||
$.each(data.menu, function(i,p){
|
||||
|
||||
self.menuitems.push(new fAddMenuitem(p));
|
||||
|
||||
@@ -4,9 +4,10 @@ ls.initDiversiteitModel = function(module){
|
||||
|
||||
function fAddGroep(p){
|
||||
var dit = this;
|
||||
this.id = p.id;
|
||||
this.naam = p.naam;
|
||||
this.niveau = p.niveau;
|
||||
this.id = p.id;
|
||||
this.naam = p.naam;
|
||||
this.niveau = p.niveau;
|
||||
this.ondersteuning = p.ondersteuning;
|
||||
this.factor = ls.DiversiteitModel.normaantallen()[1];
|
||||
if (this.niveau.indexOf('1') >= 0 || this.niveau.indexOf('2') >=0) { this.factor = ls.DiversiteitModel.normaantallen()[0]; }
|
||||
this.totaantal = p.totaantal;
|
||||
@@ -97,14 +98,15 @@ ls.initDiversiteitModel = function(module){
|
||||
groepstijden : ko.observableArray([]),
|
||||
schoolTijd : ko.observable(0),
|
||||
schoolTijdstring : ko.observable(''),
|
||||
totGstring : ko.observable(''),
|
||||
totSstring : ko.observable(''),
|
||||
totIstring : ko.observable(''),
|
||||
totGstring : ko.observable(''),
|
||||
totSstring : ko.observable(''),
|
||||
totIstring : ko.observable(''),
|
||||
normaantallen : ko.observableArray([22,24]),
|
||||
combifactor2 : ko.observable(1.5),
|
||||
combifactor3 : ko.observable(2.5),
|
||||
addtoschool : ko.observable(false),
|
||||
module : ko.observable(),
|
||||
ondersteuningSchool : ko.observable(true),
|
||||
|
||||
initBindings :function(){
|
||||
var self = ls.DiversiteitModel;
|
||||
@@ -154,7 +156,9 @@ ls.initDiversiteitModel = function(module){
|
||||
|
||||
|
||||
$.post("index.php/monpas/diversiteit/getgroepen", submitData , function(data){
|
||||
console.log(data, 'data diversiteit')
|
||||
self.groepen.removeAll();
|
||||
self.ondersteuningSchool(true);
|
||||
self.schooltotaal(0);
|
||||
self.schoolsom1(0);
|
||||
self.schoolsom2(0);
|
||||
@@ -166,6 +170,11 @@ ls.initDiversiteitModel = function(module){
|
||||
self.ondersteuningsvormen.removeAll();
|
||||
if (data){
|
||||
$.each(data, function(i,p){
|
||||
console.log(p.ondersteuning, "ondersteuning" )
|
||||
if(p.ondersteuning == 'F'){
|
||||
self.ondersteuningSchool(false);
|
||||
}
|
||||
console.log(self.ondersteuningSchool())
|
||||
self.groepen.push(new fAddGroep(p));
|
||||
});//each
|
||||
var combiwaarde = 0;
|
||||
|
||||
@@ -86,7 +86,6 @@ ls.initMonDivModel = function(module){
|
||||
|
||||
$.post("index.php/monpas/groepen/getlabels/"+ self.module(), function(data){
|
||||
showAjaxLoader();
|
||||
console.log(data, "data")
|
||||
if (data){
|
||||
self.label1(data.label1)
|
||||
self.label2(data.label2);
|
||||
|
||||
@@ -25,13 +25,14 @@ ls.initOndersteuningModel = function(module){
|
||||
}
|
||||
else {
|
||||
ls.OndersteuningModel = {
|
||||
schoolid : ko.observable(null),
|
||||
schooljaarnr : ko.observable(null),
|
||||
groepen : ko.observableArray([]),
|
||||
selectedGroep : ko.observable(),
|
||||
dagen : ko.observableArray([]),
|
||||
writer : ko.observable(false),
|
||||
module : ko.observable(),
|
||||
schoolid : ko.observable(null),
|
||||
schooljaarnr : ko.observable(null),
|
||||
groepen : ko.observableArray([]),
|
||||
selectedGroep : ko.observable(),
|
||||
dagen : ko.observableArray([]),
|
||||
writer : ko.observable(false),
|
||||
module : ko.observable(),
|
||||
geenOndersteuning : ko.observable(false),
|
||||
|
||||
initBindings :function(){
|
||||
var self = ls.OndersteuningModel;
|
||||
@@ -65,12 +66,36 @@ ls.initOndersteuningModel = function(module){
|
||||
if (result){
|
||||
$.each(result, function(i,p){
|
||||
self.groepen.push(new fAddGroep(p));
|
||||
if(p.ondersteuning == 'F') self.geenOndersteuning(true);
|
||||
});//each
|
||||
self.selectedGroep(self.groepen()[0]);
|
||||
// self.fGetUren();
|
||||
}
|
||||
},'json');
|
||||
},
|
||||
|
||||
fMeldOndersteuning(){
|
||||
var self = ls.OndersteuningModel;
|
||||
self.geenOndersteuning(! self.geenOndersteuning())
|
||||
var ondersteuning = 'T';
|
||||
if(self.geenOndersteuning()) ondersteuning = 'F'
|
||||
|
||||
var submitData = {
|
||||
'schoolid' : self.schoolid(),
|
||||
'schooljaar' : self.schooljaarnr(),
|
||||
'module' : self.module(),
|
||||
'ondersteuning' : ondersteuning,
|
||||
}
|
||||
console.log(submitData)
|
||||
|
||||
$.post("index.php/monpas/ondersteuning/meldondersteuning", submitData , function(result){
|
||||
console.log(result, "result")
|
||||
},'json');
|
||||
|
||||
|
||||
|
||||
},
|
||||
|
||||
fGetUren : function(){
|
||||
var self = ls.OndersteuningModel;
|
||||
if (!self.selectedGroep()) return;
|
||||
|
||||
@@ -169,7 +169,6 @@ mh.initSopOverzichtModel = function(){
|
||||
'orgid' : 0
|
||||
};
|
||||
$.post("index.php/monpas/overzichtsop/getoverzicht", submitData , function(data){
|
||||
console.log(data, "data")
|
||||
self.toporg('');
|
||||
if (data.organisatie){
|
||||
self.orgsoort(data.soort);
|
||||
|
||||
Reference in New Issue
Block a user