diff --git a/application/config/treemenu/custom/lvvw.php b/application/config/treemenu/custom/lvvw.php new file mode 100644 index 000000000..a1f270e05 --- /dev/null +++ b/application/config/treemenu/custom/lvvw.php @@ -0,0 +1,32 @@ +. + */ + +if (!defined('BASEPATH')) exit('No direct script access allowed'); + +$config['root'] = [ + 'stg' => [ + 'semester' => [ + /*'group', + 'verband' => [ + 'group' + ]*/ + ], + 'orgform' + ] +]; diff --git a/application/libraries/treemenu/LvVwLib.php b/application/libraries/treemenu/LvVwLib.php index bec66a5fb..d3c91a196 100644 --- a/application/libraries/treemenu/LvVwLib.php +++ b/application/libraries/treemenu/LvVwLib.php @@ -34,17 +34,8 @@ class LvVwLib $this->_ci =& get_instance(); // Load Tree-config - $this->config = [ - 'stg' => [ - 'semester' => [ - 'group', - 'verband' => [ - 'group' - ] - ], - 'orgform' - ] - ]; + $this->_ci->load->config('treemenu/custom/lvvw'); + $this->config = $this->_ci->config->item('root'); // Load Libraries $this->_ci->load->library('treemenu/base/StgLib'); @@ -74,13 +65,15 @@ class LvVwLib return $this->_ci->stglib->studiengang($path_template, $permittedStgs); } - public function semester($path_template, $stg) + public function semester($path_template, $has_children, $stg) { $stg = $this->getStgFromUrl($stg); if ($stg === null) return []; + if (!$has_children) + $this->_ci->StudiengangModel->db->select('TRUE AS leaf', false); $this->_ci->StudiengangModel->addSelect("ARRAY['link', FORMAT('{" . '"type": "verband",' . '"id": "lv/%1$s/%2$s",' .