24 require_once(
"./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php");
47 $this->multiple =
false;
48 $this->page_back_title = $lng->txt(
"cont_back");
49 if (
$_GET[
"returnCommand"] !=
"")
51 $this->mode =
"getObject";
58 $ilCtrl->setParameter($this,
"returnCommand",
59 rawurlencode(
$_GET[
"returnCommand"]));
61 $ilCtrl->saveParameter($this, array(
"clip_mob_id"));
71 return array(
"ilObjMediaObjectGUI");
81 $next_class = $ilCtrl->getNextClass($this);
82 $cmd = $ilCtrl->getCmd();
86 case "ilobjmediaobjectgui":
87 $ilCtrl->setReturn($this,
"view");
88 $ilTabs->clearTargets();
89 $ilTabs->setBackTarget($lng->txt(
"back"),
90 $ilCtrl->getLinkTarget($this,
"view"));
91 require_once(
"classes/class.ilTabsGUI.php");
93 $mob_gui->setAdminTabs();
94 $ret =& $ilCtrl->forwardCommand($mob_gui);
98 $ilUser->addObjectToClipboard(
$ret->getId(),
"mob",
$ret->getTitle());
99 $ilCtrl->redirect($this,
"view");
117 $this->multiple = $a_multiple;
125 return $this->multiple;
135 $this->insertbuttontitle = $a_insertbuttontitle;
147 if ($this->insertbuttontitle ==
"")
149 return $lng->txt(
"insert");
152 return $this->insertbuttontitle;
162 $tpl->addBlockfile(
"BUTTONS",
"buttons",
"tpl.buttons.html");
164 $tpl->setCurrentBlock(
"btn_cell");
165 $tpl->setVariable(
"BTN_LINK",
166 $ilCtrl->getLinkTargetByClass(
"ilobjmediaobjectgui",
"create"));
167 $tpl->setVariable(
"BTN_TXT", $lng->txt(
"cont_create_mob"));
168 $tpl->parseCurrentBlock();
170 include_once(
"./Services/Clipboard/classes/class.ilClipboardTableGUI.php");
172 $tpl->setContent($table_gui->getHTML());
181 $this->mode =
"getObject";
194 if (!isset($_POST[
"id"]))
196 $ilias->raiseError($lng->txt(
"no_checkbox"),$ilias->error_obj->MESSAGE);
199 foreach($_POST[
"id"] AS $obj_id)
201 $ilUser->removeObjectFromClipboard($obj_id,
"mob");
202 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
206 $ilCtrl->redirect($this,
"view");
217 if (!isset($_POST[
"id"]))
219 $ilias->raiseError($lng->txt(
"no_checkbox"),$ilias->error_obj->MESSAGE);
224 if(count($_POST[
"id"]) > 1)
226 $ilias->raiseError($lng->txt(
"cont_select_max_one_item"),$ilias->error_obj->MESSAGE);
230 $_SESSION[
"ilEditClipboard_mob_id"] = $_POST[
"id"];
232 $_GET[
"returnCommand"],
"clip_obj_type=mob&clip_obj_id=".$_POST[
"id"][0]));
237 return $_SESSION[
"ilEditClipboard_mob_id"];
248 $tpl->setTitle($lng->txt(
"clipboard"));
257 $this->page_back_title = $a_title;
270 $tabs_gui->setBackTarget($this->page_back_title,
271 $ilCtrl->getParentReturn($this));