diff --git a/application/controllers/monpas/Omvang.php b/application/controllers/monpas/Omvang.php index 6718c14..66b3272 100644 --- a/application/controllers/monpas/Omvang.php +++ b/application/controllers/monpas/Omvang.php @@ -468,7 +468,7 @@ class Omvang extends MY_Controller{ $schooljaar->naam = $omvang->naam; $schooljaar->aantal = $omvang->aantal; $aantal = $this->Arrangementen_model->getAantalLeerlingenMetArrangement($nummer, $schoolIDs); - $schooljaar->aantalllnarr = $aantal->aantal; + $schooljaar->aantalllnarr = $aantal ? $aantal->aantal: 0; $schooljaar->tlvs = $this->Tlvs_model->getAantalLeerlingenMetTLV($nummer, $schoolIDs); if($organisatie->soort == 4){ $schooljaar->arrangementen = $this->Arrangementen_model->getArrangementenMetAantallen($organisatie->id,$nummer ); diff --git a/application/controllers/shared/Menu.php b/application/controllers/shared/Menu.php index 507f779..a83230c 100644 --- a/application/controllers/shared/Menu.php +++ b/application/controllers/shared/Menu.php @@ -1,43 +1,49 @@ -load->model($models); - $this->load->helper('string'); - if ( ! $this->check_online_status() ) { - echo json_encode( array('offline' => TRUE) ); - die; - };// if - } +session->userdata['module']; - $modulenaam = ''; - if ($module >=0){ +class Menu extends MY_Controller +{ - if (0 == $module) {$modulenaam = "Instrumenten";} - else {$modulenaam= $this->Modules_model->get_fieldvalue(array("sysnr" => $module), 'naamkort'); } + function __construct() + { + parent::__construct(); + $models = array("shared/Users_model", + 'shared/Organisaties_model', + "monpas/Menus_model", + "monpas/Modules_model", + "monpas/Documenten_model", + "shared/Licenties_model", + "ijkpartituur/pages_model"); + $this->load->model($models); + $this->load->helper('string'); + if (!$this->check_online_status()) { + echo json_encode(array('offline' => TRUE)); + die; + };// if + } + + public function get_menu() + { + $user = new stdClass; + $organisatie = new stdClass; + $module = $this->session->userdata['module']; + $modulenaam = ''; + if ($module >= 0) { + + if (0 == $module) { + $modulenaam = "Instrumenten"; + } else { + $modulenaam = $this->Modules_model->get_fieldvalue(array("sysnr" => $module), 'naamkort'); + } $org = $this->Organisaties_model->get_record_by_id($this->globorgid); - if ($org){ - $menu = $this->Menus_model->getmenu($module,$this->userrole, $org->soort); - $aangepastmenu = []; - foreach ($menu as $menuitem){ - $menuitem->subpaginas = $this->Menus_model->getsubmenus($menuitem->id, $this->userrole, $org->soort); + if ($org) { + $menu = $this->Menus_model->getmenu($module, $this->userrole, $org->soort); + $aangepastmenu = []; + foreach ($menu as $menuitem) { + $menuitem->subpaginas = $this->Menus_model->getsubmenus($menuitem->id, $this->userrole, $org->soort); $aangepastmenu [] = $menuitem; }; // foreach - }; //if organisatie // @@ -48,69 +54,78 @@ class Menu extends MY_Controller{ // } // } - $licenties = null; - $licenties = $this->Licenties_model->get_licentie($this->orgid); - // als licenties voor 1 module, disable de portal knop - if ($licenties && $menu && (count($licenties) <= 1)) { - $i = 0; - $target = -1; - foreach($menu as $item){ - if ($item->naam == "stop") $target = $i; - $i ++; - } - if ($target > -1) unset($menu[$target]); - } + $licenties = null; + $licenties = $this->Licenties_model->get_licentie($this->orgid); + // als licenties voor 1 module, disable de portal knop + if ($licenties && $menu && (count($licenties) <= 1)) { + $i = 0; + $target = -1; + foreach ($menu as $item) { + if ($item->naam == "stop") $target = $i; + $i++; + } + if ($target > -1) unset($menu[$target]); + } - $user = $this->Users_model->get_fullname($this->userid); - $organisatie = $this->Organisaties_model->get_orgnaam($this->globorgid); - } + $user = $this->Users_model->get_fullname($this->userid); + $organisatie = $this->Organisaties_model->get_orgnaam($this->globorgid); + } - - echo json_encode(array( 'module' =>$module, - 'modulenaam' => $modulenaam, - 'menu' => $aangepastmenu, - 'user' => $user, - 'organisatie' => $organisatie)); - } - function gethandleidingen(){ - $handleidingen = $this->Documenten_model->gethandleidingen($this->globorgid, $this->userrole); - echo json_encode($handleidingen); - } - function downloadhandleiding(){ - if( ! $this->userid ) return; + echo json_encode(array('module' => $module, + 'modulenaam' => $modulenaam, + 'menu' => $aangepastmenu, + 'user' => $user, + 'organisatie' => $organisatie)); + } + + function gethandleidingen() + { + $handleidingen = $this->Documenten_model->gethandleidingen($this->globorgid, $this->userrole); + echo json_encode($handleidingen); + } + + function downloadhandleiding() + { + if (!$this->userid) return; $handleidingid = $this->uri->segment(4); $handleiding = $this->Documenten_model->get_record_by_id($handleidingid); $this->load->helper('download'); - // $data = file_get_contents($this->rootpath ."/documents/".$handleiding->documentnaam); - $data = file_get_contents("/home/monpas/prod/documents/".$handleiding->documentnaam);//TW: rootpath is verkeerd door symlink +// $data = file_get_contents($this->rootpath ."/documents/".$handleiding->documentnaam); + + $data = file_get_contents(MYROOTPATH . '/documents/' . $handleiding->documentnaam); + force_download($handleiding->documentnaam, $data); - } - function getsubmenu(){ - //TODO clean input - $pageid = $this->uri->segment(4); + } + + function getsubmenu() + { + //TODO clean input + $pageid = $this->uri->segment(4); $org = $this->Organisaties_model->get_record_by_id($this->globorgid); - $submenus = $this->Menus_model->getsubmenus($pageid, $this->userrole, $org->soort); - echo json_encode($submenus); - } - function getmodule(){ - echo json_encode($this->module); - } + $submenus = $this->Menus_model->getsubmenus($pageid, $this->userrole, $org->soort); + echo json_encode($submenus); + } + + function getmodule() + { + echo json_encode($this->module); + } + + // function scriptSetModules(){ + // $organisaties = $this->Organisaties_model->getall(); + // foreach($organisaties as $organisatie){ + // if ($organisatie->monbas == 1){ + // $data=array('orgid' =>$organisatie->id, 'modulenr'=>1); + // $this->Licenties_model->insert_record($data); + // } + // if ($organisatie->mondiv == 1){ + // $data=array('orgid' =>$organisatie->id, 'modulenr'=>2); + // $this->Licenties_model->insert_record($data); + // } + // }; // foreach + // echo 'klaar'; + // } - // function scriptSetModules(){ - // $organisaties = $this->Organisaties_model->getall(); - // foreach($organisaties as $organisatie){ - // if ($organisatie->monbas == 1){ - // $data=array('orgid' =>$organisatie->id, 'modulenr'=>1); - // $this->Licenties_model->insert_record($data); - // } - // if ($organisatie->mondiv == 1){ - // $data=array('orgid' =>$organisatie->id, 'modulenr'=>2); - // $this->Licenties_model->insert_record($data); - // } - // }; // foreach - // echo 'klaar'; - // } - } \ No newline at end of file diff --git a/application/core/MY_Controller.php b/application/core/MY_Controller.php index 9952dc9..89d8b20 100644 --- a/application/core/MY_Controller.php +++ b/application/core/MY_Controller.php @@ -67,8 +67,13 @@ class MY_Controller extends CI_Controller{ // public $version = '1.17.90'; // sops ordenen per eigen criterium // public $version = '1.17.91'; // grafieken in 3d // public $version = '1.17.92'; // Scan en Verbeteraanpak Pa.O.in Compact Sop - public $version = '1.17.93';// stuur bijlage bij new wachtwoord - +// public $version = '1.17.93';// stuur bijlage bij new wachtwoord +// public $version = '1.17.95';// verbeteringen invullijst, fout omvang +// public $version = '1.17.96';// nieuwe handleidingen + public $version = '1.17.97';// omvang geen grafiek bij 0 resultaten + + + public $partituurid; public $globProfielVersieID = 1; public $userid; //id of the user that is logged in diff --git a/application/views/monpas/mainheader.php b/application/views/monpas/mainheader.php index 7cd3b7d..4b94ec7 100644 --- a/application/views/monpas/mainheader.php +++ b/application/views/monpas/mainheader.php @@ -324,45 +324,47 @@ data-bind="foreach: handleidingen">
-2. Onderwijskwaliteit; Inspectie
+2. Passend Onderwijs
3. Basisondersteuning
+3. Inclusief Onderwijs
4. Extra Ondersteuning
+4. Basisondersteuning
5. Extra Ondersteuning
+5. Expertise
+ +6. Expertise
6. Tevredenheid
-7. Financiƫn
Extra
+8. Algemeen