Merge branch 'feature/oudersinmonpas' into develop
This commit is contained in:
@@ -205,26 +205,28 @@ class Portal extends MY_Controller {
|
|||||||
echo json_encode(array('scores' =>$scores));
|
echo json_encode(array('scores' =>$scores));
|
||||||
} // getscores
|
} // getscores
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function kiesCluster(){
|
function kiesCluster(){
|
||||||
$clusterId = $this->uri->segment(4);
|
$clusterId = $this->uri->segment(4);
|
||||||
|
$userniveau = $this->Autorisatienivos_model->checknivo($this->userid, $this->globorgid);
|
||||||
$ongeclusterdId = 0;
|
$ongeclusterdId = 0;
|
||||||
$isCluster = 'F';
|
$isCluster = 'F';
|
||||||
$wasniveau2 = 'F'; //hingen voor de keuze niet aan cluster
|
$wasniveau2 = 'F'; //hingen voor de keuze niet aan cluster
|
||||||
|
$keuzesarray = [];
|
||||||
|
$clusterarray = [];
|
||||||
|
$ongeclusterd = [];
|
||||||
|
|
||||||
$ongeclusterd = $this->Licenties_model->get_ongeclusterd($this->globorgid, $ongeclusterdId);
|
$results = $this->Licenties_model->get_ongeclusterd($this->globorgid, $ongeclusterdId);
|
||||||
//instrumenten die niet bij een cluster horen
|
//instrumenten die niet bij een cluster horen
|
||||||
if($ongeclusterd) {
|
if($results) {
|
||||||
foreach ($ongeclusterd as $bol) {
|
foreach ($results as $result) {
|
||||||
$bol->wasNiveau2 = $wasniveau2;
|
$pagniveau = $this->Menus_model->get_fieldvalue(['holdernaam' => 'home', 'module' => $result->sysnr], 'autorisatienivo');//nivo van de homepage van het instrument
|
||||||
$bol->isCluster = $isCluster;
|
if ($pagniveau > $userniveau) {// als de user het instrument niet mag gebruiken moet het bolletje ook niet getoond worden
|
||||||
}
|
$result->isCluster = $isCluster;//geen knop om het cluster te openen en te sluiten
|
||||||
}
|
$result->wasNiveau2 = $wasniveau2;
|
||||||
|
$ongeclusterd [] = $result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
$isCluster = 'T';
|
$isCluster = 'T';
|
||||||
$clusters = $this->Licenties_model->get_clusters_org($this->globorgid);
|
$clusters = $this->Licenties_model->get_clusters_org($this->globorgid);
|
||||||
if($clusters) {
|
if($clusters) {
|
||||||
@@ -238,33 +240,79 @@ class Portal extends MY_Controller {
|
|||||||
$wasniveau2 = 'T';
|
$wasniveau2 = 'T';
|
||||||
$keuze = $this->Licenties_model->get_ongeclusterd($this->globorgid, $clusterId); //gekozen cluster van instrumenten
|
$keuze = $this->Licenties_model->get_ongeclusterd($this->globorgid, $clusterId); //gekozen cluster van instrumenten
|
||||||
if($keuze) {
|
if($keuze) {
|
||||||
|
|
||||||
foreach ($keuze as $keus) {
|
foreach ($keuze as $keus) {
|
||||||
$keus->wasNiveau2 = $wasniveau2;// waren bollen onde cluster nu niveau hoger
|
$pagniveau = $this->Menus_model->get_fieldvalue(['holdernaam' => 'home', 'module' => $keus->sysnr], 'autorisatienivo');
|
||||||
$keus->isCluster = $isCluster;
|
if ($pagniveau > $userniveau) {
|
||||||
|
$keus->wasNiveau2 = $wasniveau2;// waren bollen onde cluster nu niveau hoger
|
||||||
|
$keus->isCluster = $isCluster;
|
||||||
|
$keuzesarray[] = $keus;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
if($clusters) {
|
if($clusters) {
|
||||||
|
$i =-1;
|
||||||
foreach ($clusters as $cluster) {
|
foreach ($clusters as $cluster) {
|
||||||
$cluster->cluster_id = $cluster->id;
|
$i++;
|
||||||
if ($cluster->cluster_id != $clusterId) { //voeg instrumenten toe aan niet-gekozen clusters
|
|
||||||
$cluster->sub = $this->Licenties_model->get_licentie_cluster($this->globorgid, $cluster->id);
|
$cluster->cluster_id = $cluster->id;
|
||||||
}
|
if ($cluster->cluster_id != $clusterId) { //voeg instrumenten toe aan niet-gekozen clusters
|
||||||
|
if ($cluster->aantalmodules > 1){
|
||||||
|
$instrumenten = $this->Licenties_model->get_licentie_cluster($this->globorgid, $cluster->id);
|
||||||
|
if ($instrumenten) {
|
||||||
|
foreach ($instrumenten as $instrument) {
|
||||||
|
$pagniveau = $this->Menus_model->get_fieldvalue(['holdernaam' => 'home', 'module' => $instrument->sysnr], 'autorisatienivo');
|
||||||
|
if ($pagniveau > $userniveau) {
|
||||||
|
$clusterarray[] = $instrument;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (count($clusterarray) > 1) {
|
||||||
|
$cluster->isCluster = $isCluster; //ivm knop om het cluster te openen en te sluiten
|
||||||
|
$cluster->sub = $clusterarray;//instrumenten bij het cluster
|
||||||
|
$cluster->cluster_id = $cluster->id; //zodat cluster en instrument eenzelfde attribuut hebben
|
||||||
|
} else if (count($clusterarray) == 1) { //toegang tot maar 1 instrument dus geen menu
|
||||||
|
$cluster->isCluster = "F";
|
||||||
|
$clusterarray[0]->kleur1 = $cluster->kleur1;
|
||||||
|
$clusterarray[0]->kleur2 = $cluster->kleur2;
|
||||||
|
|
||||||
|
$ongeclusterd = array_merge($ongeclusterd, $clusterarray);
|
||||||
|
unset($clusters[$i]);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$cluster->isCluster = "F";
|
||||||
|
unset($clusters[$i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ($cluster->aantalmodules == 1) { //1 instrument bij bolletje
|
||||||
|
$cluster->isCluster = "F";
|
||||||
|
$newitem = $this->Licenties_model->get_ongeclusterd($this->globorgid, $cluster->id);
|
||||||
|
$pagniveau = $this->Menus_model->get_fieldvalue(['holdernaam' => 'home', 'module' =>$newitem[0]->sysnr], 'autorisatienivo');
|
||||||
|
if ($pagniveau > $userniveau) {
|
||||||
|
$ongeclusterd = array_merge($ongeclusterd, $newitem);
|
||||||
|
}
|
||||||
|
unset($clusters[$i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
else{// geen toegang tot instrumenten bij cluster
|
||||||
|
unset($clusters[$i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
if(!$clusters){
|
|
||||||
$clusters =[];
|
|
||||||
};
|
|
||||||
if(!$ongeclusterd){
|
|
||||||
$ongeclusterd = [];
|
|
||||||
};
|
|
||||||
|
|
||||||
$licenties = array_merge($ongeclusterd, $clusters);
|
|
||||||
|
$licenties = array_merge( $ongeclusterd, $clusters);
|
||||||
usort($licenties, array($this, 'opAlfabet'));
|
usort($licenties, array($this, 'opAlfabet'));
|
||||||
usort($keuze, array($this, 'opAlfabet'));
|
usort($keuze, array($this, 'opAlfabet'));
|
||||||
$clusternaam = $this->Licenties_model->get_clusterNaam($clusterId);
|
$clusternaam = $this->Licenties_model->get_clusterNaam($clusterId);
|
||||||
|
|
||||||
$geselecteerd = $this->arrayinArray($licenties, $keuze, $clusterId, $clusternaam);
|
$geselecteerd = $this->arrayinArray($licenties, $keuzesarray, $clusterId, $clusternaam);
|
||||||
|
|
||||||
echo json_encode($geselecteerd);
|
echo json_encode($geselecteerd);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -71,7 +71,8 @@ class MY_Controller extends CI_Controller{
|
|||||||
// public $version = '1.17.95';// verbeteringen invullijst, fout omvang
|
// public $version = '1.17.95';// verbeteringen invullijst, fout omvang
|
||||||
// public $version = '1.17.96';// nieuwe handleidingen
|
// public $version = '1.17.96';// nieuwe handleidingen
|
||||||
// public $version = '1.17.97';// omvang geen grafiek bij 0 resultaten
|
// public $version = '1.17.97';// omvang geen grafiek bij 0 resultaten
|
||||||
public $version = '1.17.98';// instrumenten voor ouders
|
// public $version = '1.17.98';// instrumenten voor ouders
|
||||||
|
public $version = '1.17.99';// instrumenten ook voor leerlingen
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
<!-- clusters waar niet op is geklikt-->
|
<!-- clusters waar niet op is geklikt-->
|
||||||
|
|
||||||
<div class="col-sm-12 keuzecirkel "
|
<div class="col-sm-12 keuzecirkel "
|
||||||
style="postion:relative; z-index:20; "
|
style="position:relative; z-index:20; "
|
||||||
data-bind=" visible: !selectie()">
|
data-bind=" visible: !selectie()">
|
||||||
|
|
||||||
<div style="position:absolute; top: 0px; left:0px;
|
<div style="position:absolute; top: 0px; left:0px;
|
||||||
@@ -51,7 +51,7 @@
|
|||||||
|
|
||||||
<!-- gekozen cluster heeft grijze rand om cirkel-->
|
<!-- gekozen cluster heeft grijze rand om cirkel-->
|
||||||
<div class="col-sm-12 keuzecirkel2"
|
<div class="col-sm-12 keuzecirkel2"
|
||||||
style="postion:relative; z-index:20;"
|
style="position:relative; z-index:20;"
|
||||||
data-bind="visible: selectie(),
|
data-bind="visible: selectie(),
|
||||||
click: ! isCluster() ? $root.fNaarModule : '' ,
|
click: ! isCluster() ? $root.fNaarModule : '' ,
|
||||||
style: {background: k2}">
|
style: {background: k2}">
|
||||||
|
|||||||
@@ -130,7 +130,6 @@ $( function () {
|
|||||||
var self = ls.PortalModel;
|
var self = ls.PortalModel;
|
||||||
self.fToonPopup();
|
self.fToonPopup();
|
||||||
$.post( "index.php/shared/portal/getlicenties", function ( result ) {
|
$.post( "index.php/shared/portal/getlicenties", function ( result ) {
|
||||||
console.log(result, "result")
|
|
||||||
self.licenties.removeAll();
|
self.licenties.removeAll();
|
||||||
if ( result ) {
|
if ( result ) {
|
||||||
$.each( result, function ( i, p ) {
|
$.each( result, function ( i, p ) {
|
||||||
|
|||||||
Reference in New Issue
Block a user