name."_".$page[0].'.html') && get_logged_in_user()->getId()) { $this->setTemplate($this->name."_".$page[0]); } else { $this->setTemplate("index"); } } public function setNavigation() { global $TeKe; $this->navigation []= array('title'=>_('Assessments'), 'url'=>"assessments/view", 'current'=>$this->is_current_page($this->page[0], "view")); //if ($TeKe->is_admin()) { if ($TeKe->plugin->context) { $actions = $TeKe->plugin->context->getActions(); $obj_id = $TeKe->plugin->context->getId(); $current_context = "edit"; if (isset($this->page[2])) { $current_context = $this->page[2]; } foreach ($actions as $action => $item) { $this->navigation []= array( 'title'=>$item["title"], 'disabled'=>$item["disabled"], 'url'=>"assessments/assessment/".$obj_id."/".$action, 'current'=>$this->is_current_page($current_context, $action) ); } } else { if ($TeKe->plugin->is_test_constructor()) { $this->navigation []= array('title'=>_('Add New'), 'url'=>"assessments/assessment/add", 'current'=>$this->is_current_page($this->page[0], "add")); } } //} /*if ($TeKe->plugin->is_test_constructor()) { var_dump($TeKe->plugin->context);exit; if ($TeKe->plugin->context) { $id = $TeKe->plugin->context->getId(); $this->navigation []= array('title'=>_('General Information'), 'url'=>"assessments/assessment/add", 'current'=>$this->is_current_page($this->page[1], "add")); } }*/ } } ?>