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"])
86 $ilCtrl->setParameter($this,
"subCmd",
"poolSelection");
88 $tb->addButton($lng->txt(
"cont_select_media_pool"),
89 $ilCtrl->getLinkTarget($this,
"insert"));
90 $html = $tb->getHTML();
92 $ilCtrl->setParameter($this,
"subCmd",
"");
94 include_once(
"./Modules/MediaPool/classes/class.ilObjMediaPool.php");
95 include_once(
"./Modules/MediaPool/classes/class.ilMediaPoolTableGUI.php");
97 $ilCtrl->setParameter($this,
"subCmd",
"insertFromPool");
100 $mpool_table->setInsertCommand(
"create_incl");
102 $html.= $mpool_table->getHTML();
104 $tpl->setContent($html);
122 include_once
"./Services/COPage/classes/class.ilPoolSelectorGUI.php";
123 $ilCtrl->setParameter($this,
"subCmd",
"poolSelection");
127 $exp->setTypeWhiteList(array(
"root",
"cat",
"grp",
"fold",
"crs",
"mep"));
128 $exp->setClickableTypes(array(
'mep'));
130 if (!$exp->handleCommand())
132 $tpl->setContent($exp->getHTML());
143 if (is_array(
$_POST[
"id"]))
145 for($i = count(
$_POST[
"id"]) - 1; $i>=0; $i--)
148 include_once(
"./Modules/MediaPool/classes/class.ilMediaPoolItem.php");
149 include_once(
"./Services/COPage/classes/class.ilPCMediaObject.php");
151 $this->content_obj->create($this->pg_obj,
$_GET[
"hier_id"], $this->pc_id);
152 $this->content_obj->setContentType(
"mep");
153 $this->content_obj->setContentId(
$_POST[
"id"][$i]);
155 $this->updated = $this->pg_obj->update();
157 if ($this->updated ===
true)
159 $this->ctrl->returnToParent($this,
"jump".$this->hier_id);
175 $ilCtrl->setParameter($this,
"subCmd",
"insertFromPool");
176 $ilCtrl->redirect($this,
"insert");