/**
  * 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);
     }
 }
 /**
  * Reset filter
  */
 function resetFilter()
 {
     include_once "./Modules/MediaPool/classes/class.ilMediaPoolTableGUI.php";
     $mtab = new ilMediaPoolTableGUI($this, "allMedia", $this->object, "mepitem_id", ilMediaPoolTableGUI::IL_MEP_EDIT, true);
     $mtab->resetFilter();
     $mtab->resetOffset();
     $this->allMedia();
 }