public function showPossibleSubObjects() { $gui = new ilObjectAddNewItemGUI($this->object->getRefId()); $gui->setMode(ilObjectDefinition::MODE_ADMINISTRATION); $gui->setCreationUrl("ilias.php?ref_id=" . $_GET["ref_id"] . "&admin_mode=settings&cmd=create&baseClass=ilAdministrationGUI"); $gui->render(); }
/** * Render folder */ function render() { global $tpl, $ilUser, $ilTabs, $ilCtrl; unset($_SESSION['clipboard']['wsp2repo']); // add new item include_once "Services/Object/classes/class.ilObjectAddNewItemGUI.php"; $gui = new ilObjectAddNewItemGUI($this->node_id); $gui->setMode(ilObjectDefinition::MODE_WORKSPACE); $gui->setCreationUrl($ilCtrl->getLinkTarget($this, "create")); $gui->render(); include_once "Services/Object/classes/class.ilObjectListGUI.php"; ilObjectListGUI::prepareJsLinks("", $this->ctrl->getLinkTargetByClass(array("ilcommonactiondispatchergui", "ilnotegui"), "", "", true, false), $this->ctrl->getLinkTargetByClass(array("ilcommonactiondispatchergui", "iltagginggui"), "", "", true, false)); include_once "Modules/WorkspaceFolder/classes/class.ilObjWorkspaceFolderTableGUI.php"; $table = new ilObjWorkspaceFolderTableGUI($this, "render", $this->node_id, $this->getAccessHandler()); $tpl->setContent($table->getHTML()); include_once "Modules/WorkspaceFolder/classes/class.ilWorkspaceFolderExplorer.php"; $exp = new ilWorkspaceFolderExplorer($this->ctrl->getLinkTarget($this), $ilUser->getId()); if ($this->node_id != $exp->getRoot()) { $ilTabs->activateSubTab("content"); } $left = ""; // sub-folders if ($this->node_id != $exp->getRoot() || $exp->hasFolders($this->node_id)) { $exp->setTargetGet("wsp_id"); $exp->setSessionExpandVariable('wspexpand'); $exp->setExpand($this->node_id); $exp->setExpandTarget($this->ctrl->getLinkTarget($this)); if ($_GET["wspexpand"] != "") { $exp->setExpand($_GET["wspexpand"]); } $exp->highlightNode($this->node_id); $exp->setOutput(0); $left .= $exp->getOutput(); } $tpl->setLeftNavContent($left); }
/** * show material assignment * * @access protected * @param * @return */ public function listMaterials() { global $tree, $ilTabs, $tpl; $this->checkPermission("write"); $ilTabs->activateTab("materials"); $parent_ref_id = $tree->getParentId($this->object->getRefId()); include_once "Services/Object/classes/class.ilObjectAddNewItemGUI.php"; $gui = new ilObjectAddNewItemGUI($parent_ref_id); $gui->setDisabledObjectTypes(array("itgr", "sess")); $gui->setAfterCreationCallback($this->object->getRefId()); $gui->render(); include_once "./Modules/ItemGroup/classes/class.ilItemGroupItemsTableGUI.php"; $tab = new ilItemGroupItemsTableGUI($this, "listMaterials"); $tpl->setContent($tab->getHTML()); }
/** * show material assignment * * @access protected * @param * @return */ public function materialsObject() { global $tree, $objDefinition; $this->tabs_gui->setTabActive('crs_materials'); // #11337 - support ANY parent container (crs, grp, fld) $parent_ref_id = $tree->getParentId($this->object->getRefId()); include_once "Services/Object/classes/class.ilObjectAddNewItemGUI.php"; $gui = new ilObjectAddNewItemGUI($parent_ref_id); $gui->setDisabledObjectTypes(array("itgr", "sess")); $gui->setAfterCreationCallback($this->ref_id); $gui->render(); include_once 'Modules/Session/classes/class.ilEventItems.php'; $this->event_items = new ilEventItems($this->object->getId()); $items = $this->event_items->getItems(); $this->tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.sess_materials.html', 'Modules/Session'); #$this->tpl->addBlockfile("BUTTONS", "buttons", "tpl.buttons.html"); $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this, 'materials')); $this->tpl->setVariable("COLL_TITLE_IMG", ilUtil::getImagePath('icon_sess.png')); $this->tpl->setVariable("COLL_TITLE_IMG_ALT", $this->lng->txt('events')); $this->tpl->setVariable("TABLE_TITLE", $this->lng->txt('event_assign_materials_table')); $this->tpl->setVariable("TABLE_INFO", $this->lng->txt('event_assign_materials_info')); $materials = array(); $nodes = $tree->getSubTree($tree->getNodeData($parent_ref_id)); foreach ($nodes as $node) { // No side blocks here if ($node['child'] == $parent_ref_id || $objDefinition->isSideBlock($node['type']) || in_array($node['type'], array('sess', 'itgr', 'rolf'))) { continue; } if ($node['type'] == 'rolf') { continue; } $node["sorthash"] = (int) (!in_array($node['ref_id'], $items)) . $node["title"]; $materials[] = $node; } $materials = ilUtil::sortArray($materials, "sorthash", "ASC"); $counter = 1; foreach ($materials as $node) { $counter++; $this->tpl->setCurrentBlock("material_row"); $this->tpl->setVariable('TYPE_IMG', ilUtil::getImagePath('icon_' . $node['type'] . '_s.png')); $this->tpl->setVariable('IMG_ALT', $this->lng->txt('obj_' . $node['type'])); $this->tpl->setVariable("ROW_CLASS", ilUtil::switchColor($counter, 'tblrow1', 'tblrow2')); $this->tpl->setVariable("CHECK_COLL", ilUtil::formCheckbox(in_array($node['ref_id'], $items) ? 1 : 0, 'items[]', $node['ref_id'])); $this->tpl->setVariable("COLL_TITLE", $node['title']); if (strlen($node['description'])) { $this->tpl->setVariable("COLL_DESC", $node['description']); } $this->tpl->setVariable("ASSIGNED_IMG_OK", in_array($node['ref_id'], $items) ? ilUtil::getImagePath('icon_ok.png') : ilUtil::getImagePath('icon_not_ok.png')); $this->tpl->setVariable("ASSIGNED_STATUS", $this->lng->txt('event_material_assigned')); $this->tpl->setVariable("COLL_PATH", $this->formatPath($node['ref_id'])); $this->tpl->parseCurrentBlock(); } $this->tpl->setVariable("SELECT_ROW", ilUtil::switchColor(++$counter, 'tblrow1', 'tblrow2')); $this->tpl->setVariable("SELECT_ALL", $this->lng->txt('select_all')); $this->tpl->setVariable("IMG_ARROW", ilUtil::getImagePath('arrow_downright.png')); $this->tpl->setVariable("BTN_SAVE", $this->lng->txt('save')); }
/** * show possible sub objects selection list */ function showPossibleSubObjects() { include_once "Services/Object/classes/class.ilObjectAddNewItemGUI.php"; $gui = new ilObjectAddNewItemGUI($this->object->getRefId()); $gui->render(); }
protected function materials() { $GLOBALS['ilTabs']->activateSubTab('materials'); include_once "Services/Object/classes/class.ilObjectAddNewItemGUI.php"; $gui = new ilObjectAddNewItemGUI($this->getParentObject()->getRefId()); $gui->setDisabledObjectTypes(array("itgr")); #$gui->setAfterCreationCallback($this->getParentObject()->getRefId()); $gui->render(); include_once './Services/Object/classes/class.ilObjectTableGUI.php'; $obj_table = new ilObjectTableGUI($this, 'materials', $this->getParentObject()->getRefId()); $obj_table->init(); $obj_table->setObjects($GLOBALS['tree']->getChildIds($this->getParentObject()->getRefId())); $obj_table->parse(); $GLOBALS['tpl']->setContent($obj_table->getHTML()); $this->showStatus(ilLOEditorStatus::SECTION_MATERIALS); }
/** * show material assignment * * @access protected * @param * @return */ public function materialsObject() { global $tree, $objDefinition; $this->tabs_gui->setTabActive('crs_materials'); // #11337 - support ANY parent container (crs, grp, fld) $parent_ref_id = $tree->getParentId($this->object->getRefId()); include_once "Services/Object/classes/class.ilObjectAddNewItemGUI.php"; $gui = new ilObjectAddNewItemGUI($parent_ref_id); $gui->setDisabledObjectTypes(array("itgr", "sess")); $gui->setAfterCreationCallback($this->ref_id); $gui->render(); include_once 'Modules/Session/classes/class.ilEventItems.php'; $this->event_items = new ilEventItems($this->object->getId()); include_once 'Modules/Session/classes/class.ilSessionMaterialsTableGUI.php'; $tbl = new ilSessionMaterialsTableGUI($this, "materials"); $tbl->setTitle($this->lng->txt("event_assign_materials_table")); $tbl->setDescription($this->lng->txt('event_assign_materials_info')); $tbl->setMaterialItems($this->event_items->getItems()); $tbl->setContainerRefId($this->getContainerRefId()); $tbl->getDataFromDb(); $this->tpl->setContent($tbl->getHTML()); }