/** * called by prepare output */ function setTitleAndDescription() { parent::setTitleAndDescription(); if ($_GET["q_id"] > 0) { include_once "./Modules/TestQuestionPool/classes/class.assQuestionGUI.php"; $q_gui = assQuestionGUI::_getQuestionGUI("", $_GET["q_id"]); if ($q_gui->object instanceof assQuestion) { $q_gui->object->setObjId($this->object->getId()); $title = $q_gui->object->getTitle(); if (!$title) { $title = $this->lng->txt('new') . ': ' . assQuestion::_getQuestionTypeName($q_gui->object->getQuestionType()); } $this->tpl->setTitle($title); $this->tpl->setDescription($q_gui->object->getComment()); if ($this->object instanceof ilObjectPlugin) { $this->tpl->setTitleIcon($this->object->plugin->getImagePath("icon_" . $this->object->getType() . ".svg"), $this->lng->txt("obj_" . $this->object->getType())); } else { $this->tpl->setTitleIcon(ilObject::_getIcon("", "big", $this->object->getType())); } } else { // Workaround for context issues: If no object was found, redirect without q_id parameter $this->ctrl->setParameter($this, 'q_id', ''); $this->ctrl->redirect($this); } } else { $this->tpl->setTitle($this->object->getTitle()); $this->tpl->setDescription($this->object->getLongDescription()); $this->tpl->setTitleIcon(ilObject::_getIcon("", "big", $this->object->getType())); } }