4 require_once(
"./Services/COPage/classes/class.ilPCContentInclude.php");
 
    5 require_once(
"./Services/COPage/classes/class.ilPageContentGUI.php");
 
   35                 $next_class = $this->ctrl->getNextClass($this);
 
   38                 $cmd = $this->ctrl->getCmd();
 
   55                 switch (
$_GET[
"subCmd"])
 
   74         function insertFromPool($a_post_cmd = 
"edpost", $a_submit_cmd = 
"create_mob")
 
   80                         $ilAccess->checkAccess(
"write", 
"", 
$_SESSION[
"cont_media_pool"])
 
   83                         $tpl->addBlockfile(
"BUTTONS", 
"buttons", 
"tpl.buttons.html");
 
   84                         $tpl->setCurrentBlock(
"btn_cell");
 
   85                         $ilCtrl->setParameter($this, 
"subCmd", 
"poolSelection");
 
   86                         $tpl->setVariable(
"BTN_LINK",
 
   87                                 $ilCtrl->getLinkTarget($this, 
"insert"));
 
   88                         $ilCtrl->setParameter($this, 
"subCmd", 
"");
 
   89                         $tpl->setVariable(
"BTN_TXT", $lng->txt(
"cont_select_media_pool"));
 
   90                         $tpl->parseCurrentBlock();
 
   95                         include_once(
"./Modules/MediaPool/classes/class.ilObjMediaPool.php");
 
   96                         include_once(
"./Modules/MediaPool/classes/class.ilMediaPoolTableGUI.php");
 
   98                         $ilCtrl->setParameter($this, 
"subCmd", 
"insertFromPool");
 
  101                         $mpool_table->setInsertCommand(
"create_incl");
 
  103                         $tpl->setContent($mpool_table->getHTML());
 
  121                 include_once 
"./Services/COPage/classes/class.ilPoolSelectorGUI.php";
 
  124                 if (
$_GET[
"expand"] == 
"")
 
  126                         $expanded = $tree->readRootId();
 
  130                         $expanded = 
$_GET[
"expand"];
 
  132                 $exp->setExpand($expanded);
 
  134                 $exp->setTargetGet(
"sel_id");
 
  135                 $this->ctrl->setParameter($this, 
"target_type", $a_type);
 
  136                 $ilCtrl->setParameter($this, 
"subCmd", 
"poolSelection");
 
  137                 $exp->setParamsGet($this->ctrl->getParameterArray($this, 
"insert"));
 
  140                 $exp->setFiltered(
true);
 
  142                 $exp->addFilter(
"root");
 
  143                 $exp->addFilter(
"cat");
 
  144                 $exp->addFilter(
"grp");
 
  145                 $exp->addFilter(
"fold");
 
  146                 $exp->addFilter(
"crs");
 
  147                 $exp->addFilter(
"mep");
 
  149                 $sel_types = array(
'mep');
 
  153                 $tpl->setContent($exp->getOutput());
 
  163                 if (is_array(
$_POST[
"id"]))
 
  165                         for($i = count(
$_POST[
"id"]) - 1; $i>=0; $i--)
 
  168                                 include_once(
"./Modules/MediaPool/classes/class.ilMediaPoolItem.php");
 
  169                                 include_once(
"./Services/COPage/classes/class.ilPCMediaObject.php");
 
  171                                 $this->content_obj->create($this->pg_obj, 
$_GET[
"hier_id"], $this->pc_id);
 
  172                                 $this->content_obj->setContentType(
"mep");
 
  173                                 $this->content_obj->setContentId(
$_POST[
"id"][$i]);
 
  175                         $this->updated = $this->pg_obj->update();
 
  177                 if ($this->updated === 
true)
 
  179                         $this->ctrl->returnToParent($this, 
"jump".$this->hier_id);
 
  195                 $ilCtrl->setParameter($this, 
"subCmd", 
"insertFromPool");
 
  196                 $ilCtrl->redirect($this, 
"insert");