/** * Insert page snippet from media pool */ function insertFromPool($a_post_cmd = "edpost", $a_submit_cmd = "create_mob") { global $ilCtrl, $ilAccess, $ilTabs, $tpl, $lng; if ($_SESSION["cont_media_pool"] != "" && $ilAccess->checkAccess("write", "", $_SESSION["cont_media_pool"]) && ilObject::_lookupType(ilObject::_lookupObjId($_SESSION["cont_media_pool"])) == "mep") { $html = ""; $tb = new ilToolbarGUI(); $ilCtrl->setParameter($this, "subCmd", "poolSelection"); $tb->addButton($lng->txt("cont_select_media_pool"), $ilCtrl->getLinkTarget($this, "insert")); $html = $tb->getHTML(); $ilCtrl->setParameter($this, "subCmd", ""); include_once "./Modules/MediaPool/classes/class.ilObjMediaPool.php"; include_once "./Modules/MediaPool/classes/class.ilMediaPoolTableGUI.php"; $pool = new ilObjMediaPool($_SESSION["cont_media_pool"]); $ilCtrl->setParameter($this, "subCmd", "insertFromPool"); $mpool_table = new ilMediaPoolTableGUI($this, "insert", $pool, "mep_folder", ilMediaPoolTableGUI::IL_MEP_SELECT_CONTENT); $mpool_table->setInsertCommand("create_incl"); $html .= $mpool_table->getHTML(); $tpl->setContent($html); } else { $this->poolSelection(); } }
/** * Insert page snippet from media pool */ function insertFromPool($a_post_cmd = "edpost", $a_submit_cmd = "create_mob") { global $ilCtrl, $ilAccess, $ilTabs, $tpl, $lng; if ($_SESSION["cont_media_pool"] != "" && $ilAccess->checkAccess("write", "", $_SESSION["cont_media_pool"]) && ilObject::_lookupType(ilObject::_lookupObjId($_SESSION["cont_media_pool"])) == "mep") { $tpl->addBlockfile("BUTTONS", "buttons", "tpl.buttons.html"); $tpl->setCurrentBlock("btn_cell"); $ilCtrl->setParameter($this, "subCmd", "poolSelection"); $tpl->setVariable("BTN_LINK", $ilCtrl->getLinkTarget($this, "insert")); $ilCtrl->setParameter($this, "subCmd", ""); $tpl->setVariable("BTN_TXT", $lng->txt("cont_select_media_pool")); $tpl->parseCurrentBlock(); // $this->getTabs($ilTabs, true); // $ilTabs->setSubTabActive("cont_mob_from_media_pool"); include_once "./Modules/MediaPool/classes/class.ilObjMediaPool.php"; include_once "./Modules/MediaPool/classes/class.ilMediaPoolTableGUI.php"; $pool = new ilObjMediaPool($_SESSION["cont_media_pool"]); $ilCtrl->setParameter($this, "subCmd", "insertFromPool"); $mpool_table = new ilMediaPoolTableGUI($this, "insert", $pool, "mep_folder", ilMediaPoolTableGUI::IL_MEP_SELECT_CONTENT); $mpool_table->setInsertCommand("create_incl"); $tpl->setContent($mpool_table->getHTML()); } else { $this->poolSelection(); } }
/** * Insert media object from pool */ function insertFromPool($a_change_obj_ref = false) { global $ilCtrl, $ilAccess, $ilTabs, $tpl, $lng, $ilToolbar; if ($_SESSION["cont_media_pool"] != "" && $ilAccess->checkAccess("write", "", $_SESSION["cont_media_pool"]) && ilObject::_lookupType(ilObject::_lookupObjId($_SESSION["cont_media_pool"])) == "mep") { $tpl->addBlockfile("BUTTONS", "buttons", "tpl.buttons.html"); $tpl->setCurrentBlock("btn_cell"); $ilCtrl->setParameter($this, "subCmd", "poolSelection"); if ($a_change_obj_ref) { $tpl->setVariable("BTN_LINK", $ilCtrl->getLinkTarget($this, "changeObjectReference")); } else { $tpl->setVariable("BTN_LINK", $ilCtrl->getLinkTarget($this, "insert")); } $ilCtrl->setParameter($this, "subCmd", ""); $tpl->setVariable("BTN_TXT", $lng->txt("cont_switch_to_media_pool")); $tpl->parseCurrentBlock(); $this->getTabs($ilTabs, true, $a_change_obj_ref); $ilTabs->setSubTabActive("cont_mob_from_media_pool"); include_once "./Modules/MediaPool/classes/class.ilObjMediaPool.php"; include_once "./Modules/MediaPool/classes/class.ilMediaPoolTableGUI.php"; $pool = new ilObjMediaPool($_SESSION["cont_media_pool"]); $ilCtrl->setParameter($this, "subCmd", "insertFromPool"); $tcmd = $a_change_obj_ref ? "changeObjectReference" : "insert"; $tmode = $a_change_obj_ref ? ilMediaPoolTableGUI::IL_MEP_SELECT_SINGLE : ilMediaPoolTableGUI::IL_MEP_SELECT; $mpool_table = new ilMediaPoolTableGUI($this, $tcmd, $pool, "mep_folder", $tmode); $tpl->setContent($mpool_table->getHTML()); } else { $this->poolSelection($a_change_obj_ref); } }
/** * list all objects */ function allMedia() { global $tree, $ilAccess, $tpl, $ilTabs, $ilCtrl, $ilUser; $ilCtrl->setParameter($this, "mep_mode", "allMedia"); if (!$ilAccess->checkAccess("read", "", $this->object->getRefId())) { $this->ilias->raiseError($this->lng->txt("permission_denied"), $this->ilias->error_obj->MESSAGE); } $ilTabs->setTabActive("mep_all_mobs"); include_once "./Modules/MediaPool/classes/class.ilMediaPoolTableGUI.php"; $mep_table_gui = new ilMediaPoolTableGUI($this, "allMedia", $this->object, "mepitem_id", ilMediaPoolTableGUI::IL_MEP_EDIT, true); if (isset($_GET['force_filter']) and $_GET['force_filter']) { $_POST['title'] = ilMediaPoolItem::lookupTitle((int) $_GET['force_filter']); include_once "./Services/Table/classes/class.ilTablePropertiesStorage.php"; $tprop = new ilTablePropertiesStorage(); $tprop->storeProperty($mep_table_gui->getId(), $ilUser->getId(), 'filter', 1); $mep_table_gui->resetFilter(); $mep_table_gui->resetOffset(); $mep_table_gui->writeFilterToSession(); // Read again $mep_table_gui = new ilMediaPoolTableGUI($this, "allMedia", $this->object, "mepitem_id", ilMediaPoolTableGUI::IL_MEP_EDIT, true); } $tpl->setContent($mep_table_gui->getHTML()); // $this->tpl->show(); }