4 include_once(
"./Services/Object/classes/class.ilObject2GUI.php");
5 include_once(
"./Modules/MediaPool/classes/class.ilObjMediaPool.php");
6 include_once(
"./Services/Table/classes/class.ilTableGUI.php");
7 include_once(
"./Modules/Folder/classes/class.ilObjFolderGUI.php");
8 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php");
9 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
10 include_once(
"./Services/Clipboard/classes/class.ilEditClipboardGUI.php");
33 function __construct($a_data,$a_id = 0,$a_call_by_reference =
true, $a_prepare_output =
false)
45 $lng->loadLanguageModule(
"mep");
47 if ($this->ctrl->getCmd() ==
"explorer")
49 $this->ctrl->saveParameter($this, array(
"ref_id"));
53 $this->ctrl->saveParameter($this, array(
"ref_id",
"mepitem_id"));
55 $this->ctrl->saveParameter($this, array(
"mep_mode"));
57 $lng->loadLanguageModule(
"content");
75 if ($this->ctrl->getRedirectSource() ==
"ilinternallinkgui")
81 $next_class = $this->ctrl->getNextClass($this);
82 $cmd = $this->ctrl->getCmd();
84 $new_type =
$_POST[
"new_type"]
88 if ($new_type !=
"" && (
$cmd !=
"confirmRemove" &&
$cmd !=
"copyToClipboard"
89 &&
$cmd !=
"pasteFromClipboard"))
96 $tree =& $this->
object->getTree();
97 if (
$_GET[
"mepitem_id"] ==
"")
103 if (
$cmd ==
"create")
105 switch(
$_POST[
"new_type"])
108 $this->ctrl->redirectByClass(
"ilobjmediaobjectgui",
"create");
113 $this->ctrl->redirectByClass(
"ilobjfoldergui",
"create");
120 case 'ilmediapoolpagegui':
123 include_once(
"./Modules/MediaPool/classes/class.ilMediaPoolPageGUI.php");
126 if (!$ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
128 $mep_page_gui->setEnableEditing(
false);
130 $ret = $this->ctrl->forwardCommand($mep_page_gui);
133 $tpl->setContent(
$ret);
138 case "ilobjmediaobjectgui":
141 if (
$cmd ==
"create" ||
$cmd ==
"save" ||
$cmd ==
"cancel")
143 $ret_obj =
$_GET[
"mepitem_id"];
145 $ilObjMediaObjectGUI->setWidthPreset($this->object->getDefaultWidth());
146 $ilObjMediaObjectGUI->setHeightPreset($this->object->getDefaultHeight());
150 $ret_obj =
$tree->getParentId(
$_GET[
"mepitem_id"]);
153 $ilTabs->setBackTarget($lng->txt(
"back"),
154 $this->ctrl->getLinkTarget($this,
155 $_GET[
"mep_mode"] ?
$_GET[
"mep_mode"] :
"listMedia"));
157 if ($this->ctrl->getCmdClass() ==
"ilinternallinkgui")
159 $this->ctrl->setReturn($this,
"explorer");
163 $this->ctrl->setParameter($this,
"mepitem_id", $ret_obj);
164 $this->ctrl->setReturn($this,
165 $_GET[
"mep_mode"] ?
$_GET[
"mep_mode"] :
"listMedia");
166 $this->ctrl->setParameter($this,
"mepitem_id", $_GET[
"mepitem_id"]);
169 $ilObjMediaObjectGUI->setTabs();
173 $ret =& $this->ctrl->forwardCommand($ilObjMediaObjectGUI);
179 $mep_item->setTitle(
$ret->getTitle());
180 $mep_item->setType(
"mob");
181 $mep_item->setForeignId(
$ret->getId());
184 $parent = (
$_GET[
"mepitem_id"] ==
"")
186 :
$_GET[
"mepitem_id"];
187 $tree->insertNode($mep_item->getId(), $parent);
188 ilUtil::redirect(
"ilias.php?baseClass=ilMediaPoolPresentationGUI&cmd=listMedia&ref_id=".
189 $_GET[
"ref_id"].
"&mepitem_id=".
$_GET[
"mepitem_id"]);
198 case "ilobjfoldergui":
201 $this->ctrl->setReturn($this,
"listMedia");
208 $folder_gui->setFormAction(
"save",
209 $this->ctrl->getFormActionByClass(
"ilobjfoldergui"));
210 $folder_gui->createObject();
216 $parent = (
$_GET[
"mepitem_id"] ==
"")
218 :
$_GET[
"mepitem_id"];
219 $folder_gui->setFolderTree(
$tree);
220 $folder_gui->saveObject($parent);
227 $this->ctrl->setParameter($this,
"foldereditmode",
"1");
228 $folder_gui->setFormAction(
"update", $this->ctrl->getFormActionByClass(
"ilobjfoldergui"));
229 $folder_gui->editObject();
236 $this->ctrl->setReturn($this,
"listMedia");
237 $folder_gui->updateObject(
true);
241 if (
$_GET[
"foldereditmode"])
245 $this->ctrl->redirect($this,
"listMedia");
250 case "ileditclipboardgui":
252 $this->ctrl->setReturn($this,
$_GET[
"mep_mode"] ?
$_GET[
"mep_mode"] :
"listMedia");
254 $clip_gui->setMultipleSelections(
true);
255 $clip_gui->setInsertButtonTitle($lng->txt(
"mep_copy_to_mep"));
256 $ilTabs->setTabActive(
"clipboard");
258 $ret =& $this->ctrl->forwardCommand($clip_gui);
262 case 'ilinfoscreengui':
268 case 'ilpermissiongui':
270 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
272 $ret =& $this->ctrl->forwardCommand($perm_gui);
278 $cmd = $this->ctrl->getCmd(
"frameset");
291 $this->ctrl->redirectByClass(
"ilobjmediaobjectgui",
"create");
309 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
311 if ($a_mode !=
"edit")
313 $this->form->setTarget(
"_top");
320 $ti->setRequired(
true);
321 $this->form->addItem($ti);
327 $this->form->addItem($ta);
329 if ($a_mode ==
"edit")
332 $ni =
new ilNumberInputGUI($this->lng->txt(
"mep_default_width"),
"default_width");
334 $ni->setMaxLength(5);
336 $this->form->addItem($ni);
339 $ni =
new ilNumberInputGUI($this->lng->txt(
"mep_default_height"),
"default_height");
341 $ni->setMaxLength(5);
343 $ni->setInfo($this->lng->txt(
"mep_default_width_height_info"));
344 $this->form->addItem($ni);
348 if ($a_mode ==
"create")
350 $this->form->addCommandButton(
"save", $lng->txt($a_new_type.
"_add"));
351 $this->form->addCommandButton(
"cancelCreation", $lng->txt(
"cancel"));
352 $this->form->setTitle($lng->txt($a_new_type.
"_new"));
356 $this->form->addCommandButton(
"update", $lng->txt(
"save"));
358 $this->form->setTitle($lng->txt(
"edit"));
361 $this->form->setFormAction($ilCtrl->getFormAction($this));
370 $values[
"title"] = $this->
object->getTitle();
371 $values[
"desc"] = $this->
object->getDescription();
372 if ($this->object->getDefaultWidth() > 0)
374 $values[
"default_width"] = $this->
object->getDefaultWidth();
376 if ($this->object->getDefaultHeight() > 0)
378 $values[
"default_height"] = $this->
object->getDefaultHeight();
380 $this->form->setValuesByArray($values);
393 ilUtil::redirect(
"ilias.php?baseClass=ilMediaPoolPresentationGUI&ref_id=".$newObj->getRefId().
"&cmd=edit");
405 if (!$ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
407 $this->ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
411 $this->tpl->addBlockfile(
"BUTTONS",
"buttons",
"tpl.buttons.html");
430 $this->ctrl->redirect($this,
$_GET[
"mep_mode"] ?
$_GET[
"mep_mode"] :
"listMedia");
440 if (!$ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
442 $this->ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
458 if ($this->form->checkInput())
460 $this->
object->setTitle(
$_POST[
"title"]);
461 $this->
object->setDescription(
$_POST[
"desc"]);
462 $this->
object->setDefaultWidth(
$_POST[
"default_width"]);
463 $this->
object->setDefaultHeight(
$_POST[
"default_height"]);
464 $this->
update = $this->
object->update();
469 $this->form->setValuesByPost();
470 $tpl->setContent($this->form->getHtml());
475 $this->ctrl->redirect($this,
"edit");
485 $ilCtrl->setParameter($this,
"mep_mode",
"listMedia");
487 if (!$ilAccess->checkAccess(
"read",
"", $this->object->getRefId()))
489 $this->ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
491 $ilTabs->setTabActive(
"objs_fold");
492 include_once(
"./Modules/MediaPool/classes/class.ilMediaPoolTableGUI.php");
494 $tpl->setContent($mep_table_gui->getHTML());
505 $ilCtrl->setParameter($this,
"mep_mode",
"allMedia");
507 if (!$ilAccess->checkAccess(
"read",
"", $this->object->getRefId()))
509 $this->ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
511 $ilTabs->setTabActive(
"mep_all_mobs");
512 include_once(
"./Modules/MediaPool/classes/class.ilMediaPoolTableGUI.php");
515 $tpl->setContent($mep_table_gui->getHTML());
524 include_once(
"./Modules/MediaPool/classes/class.ilMediaPoolTableGUI.php");
527 $mtab->writeFilterToSession();
528 $mtab->resetOffset();
537 include_once(
"./Modules/MediaPool/classes/class.ilMediaPoolTableGUI.php");
540 $mtab->resetFilter();
541 $mtab->resetOffset();
550 $this->tpl->getStandardTemplate();
559 if (
$_GET[
"mepitem_id"] ==
"")
563 $par_id = $this->
object->tree->getParentId(
$_GET[
"mepitem_id"]);
564 if ($par_id != $this->object->tree->getRootId())
608 include_once(
"Services/Frameset/classes/class.ilFramesetGUI.php");
610 $fs_gui->setMainFrameName(
"content");
611 $fs_gui->setSideFrameName(
"tree");
612 $fs_gui->setMainFrameSource(
613 $this->ctrl->getLinkTarget($this,
"listMedia"));
614 $this->ctrl->setParameter($this,
"expand",
"1");
615 $fs_gui->setSideFrameSource(
616 $this->ctrl->getLinkTarget($this,
"explorer"));
617 $fs_gui->setFramesetTitle($this->object->getTitle());
629 include_once(
"Services/Frameset/classes/class.ilFramesetGUI.php");
631 $fs_gui->setMainFrameName(
"content");
632 $fs_gui->setSideFrameName(
"tree");
633 $fs_gui->setMainFrameSource(
634 $this->ctrl->getLinkTargetByClass(
"ilinfoscreengui",
"showSummary"));
635 $this->ctrl->setParameter($this,
"expand",
"1");
636 $fs_gui->setSideFrameSource(
637 $this->ctrl->getLinkTarget($this,
"explorer"));
638 $fs_gui->setFramesetTitle($this->object->getTitle());
650 $ilCtrl->setParameter($this,
"obj_id",
"");
651 $ilCtrl->setParameter($this,
"mepitem_id",
"");
653 if (!$ilAccess->checkAccess(
"read",
"", $this->object->getRefId()) ||
654 !$ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
659 require_once (
"./Modules/MediaPool/classes/class.ilMediaPoolExplorer.php");
662 $exp->setTargetGet(
"mepitem_id");
663 $exp->setExpandTarget($this->ctrl->getLinkTarget($this,
"explorer"));
664 $exp->setTitle($this->lng->txt(
"cont_mep_structure"));
666 $exp->addFilter(
"dummy");
667 $exp->addFilter(
"fold");
668 $exp->setFiltered(
true);
672 if (
$_GET[
"mepexpand"] ==
"")
674 $mep_tree =& $this->
object->getTree();
675 $expanded = $mep_tree->readRootId();
679 $expanded =
$_GET[
"mepexpand"];
682 $exp->setExpand($expanded);
686 $output = $exp->getOutput();
708 if (!$ilAccess->checkAccess(
"read",
"", $this->object->getRefId()))
710 $this->ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
713 $this->tpl =&
new ilTemplate(
"tpl.fullscreen.html",
true,
true,
"Services/COPage");
714 include_once(
"Services/Style/classes/class.ilObjStyleSheet.php");
716 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
727 require_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
738 $xsl = file_get_contents(
"./Services/COPage/xsl/page.xsl");
739 $args = array(
'/_xml' => $xml,
'/_xsl' => $xsl );
744 $mode = (
$_GET[
"cmd"] !=
"showMedia")
749 $this->ctrl->getLinkTarget($this,
"showFullscreen");
750 $params = array (
'mode' => $mode,
'enlarge_path' => $enlarge_path,
751 'link_params' =>
"ref_id=".
$_GET[
"ref_id"],
'fullscreen_link' => $fullscreen_link,
752 'ref_id' =>
$_GET[
"ref_id"],
'pg_frame' => $pg_frame,
'webspace_path' => $wb_path);
758 $this->tpl->setVariable(
"MEDIA_CONTENT", $output);
760 $this->tpl->parseCurrentBlock();
779 if (!$ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
781 $this->ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
786 $this->ilias->raiseError($this->lng->txt(
"no_checkbox"),$this->ilias->error_obj->MESSAGE);
794 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.confirm_deletion.html",
"Modules/MediaPool");
798 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
801 $this->tpl->setCurrentBlock(
"table_header");
802 $this->tpl->setVariable(
"TEXT",$this->lng->txt(
"objects"));
803 $this->tpl->parseCurrentBlock();
815 include_once(
"./Services/COPage/classes/class.ilPageContentUsage.php");
817 if (count($usages) > 0)
820 $ilCtrl->redirect($this,
"listMedia");
824 $this->tpl->setCurrentBlock(
"table_row");
826 $this->tpl->setVariable(
"TEXT_CONTENT",
$title);
828 $this->tpl->parseCurrentBlock();
833 $buttons = array(
"cancelRemove" => $this->lng->txt(
"cancel"),
834 "remove" => $this->lng->txt(
"confirm"));
835 foreach ($buttons as
$name => $value)
837 $this->tpl->setCurrentBlock(
"operation_btn");
838 $this->tpl->setVariable(
"BTN_NAME",
$name);
839 $this->tpl->setVariable(
"BTN_VALUE",$value);
840 $this->tpl->parseCurrentBlock();
852 if (!$ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
854 $this->ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
857 $ilCtrl->setParameterByClass(
"ileditclipboardgui",
"returnCommand",
858 rawurlencode($ilCtrl->getLinkTarget($this,
859 "insertFromClipboard")));
860 $ilCtrl->redirectByClass(
"ilEditClipboardGUI",
"getObject");
871 if (!$ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
873 $this->ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
876 include_once(
"./Services/Clipboard/classes/class.ilEditClipboardGUI.php");
878 $not_inserted = array();
881 foreach ($ids as $id2)
883 $id = explode(
":", $id2);
889 if (ilObjMEdiaPool::isForeignIdInTree($this->object->getId(), $id))
897 $item->setType(
"mob");
898 $item->setForeignId($id);
901 if ($item->getId() > 0)
903 $this->
object->insertInTree($item->getId(),
$_GET[
"mepitem_id"]);
909 include_once(
"./Modules/MediaPool/classes/class.ilMediaPoolPage.php");
910 include_once(
"./Modules/MediaPool/classes/class.ilMediaPoolItem.php");
911 if (ilObjMEdiaPool::isItemIdInTree($this->object->getId(), $id))
922 $item->setType(
"pg");
925 if ($item->getId() > 0)
927 $this->
object->insertInTree($item->getId(),
$_GET[
"mepitem_id"]);
930 include_once(
"./Modules/MediaPool/classes/class.ilMediaPoolPage.php");
932 $page->setId($item->getId());
936 $page->setXMLContent($original->copyXMLContent());
944 if (count($not_inserted) > 0)
947 implode($not_inserted,
"<br>"),
true);
949 $this->ctrl->redirect($this,
$_GET[
"mep_mode"] ?
$_GET[
"mep_mode"] :
"listMedia");
958 session_unregister(
"ilMepRemove");
959 $this->ctrl->redirect($this,
$_GET[
"mep_mode"] ?
$_GET[
"mep_mode"] :
"listMedia");
969 if (!$ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
971 $this->ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
976 $this->
object->deleteChild($obj_id);
980 session_unregister(
"ilMepRemove");
981 $this->ctrl->redirect($this,
$_GET[
"mep_mode"] ?
$_GET[
"mep_mode"] :
"listMedia");
990 global $ilUser, $ilAccess;
997 $this->ctrl->redirect($this,
$_GET[
"mep_mode"] ?
$_GET[
"mep_mode"] :
"listMedia");
1003 if (
$type ==
"fold")
1006 $this->ctrl->redirect($this,
$_GET[
"mep_mode"] ?
$_GET[
"mep_mode"] :
"listMedia");
1009 foreach (
$_POST[
"id"] as $obj_id)
1015 $ilUser->addObjectToClipboard($fid,
"mob",
"");
1019 $ilUser->addObjectToClipboard($obj_id,
"incl",
"");
1023 $this->ctrl->redirect($this,
$_GET[
"mep_mode"] ?
$_GET[
"mep_mode"] :
"listMedia");
1035 $tree =& $this->
object->getTree();
1037 ?
$tree->getRootId()
1038 :
$_GET[
"mepitem_id"];
1040 foreach($path as $node)
1042 if ($node[
"child"] ==
$tree->getRootId())
1044 $this->ctrl->setParameter($this,
"mepitem_id",
"");
1045 $link = $this->ctrl->getLinkTarget($this,
"listMedia");
1046 $title = $this->
object->getTitle();
1047 $this->ctrl->setParameter($this,
"mepitem_id",
$_GET[
"mepitem_id"]);
1048 $ilLocator->addItem(
$title, $link,
"",
$_GET[
"ref_id"]);
1052 $this->ctrl->setParameter($this,
"mepitem_id", $node[
"child"]);
1053 $link = $this->ctrl->getLinkTarget($this,
"listMedia");
1055 $this->ctrl->setParameter($this,
"mepitem_id",
$_GET[
"mepitem_id"]);
1056 $ilLocator->addItem(
$title, $link);
1071 global $ilAccess,
$tpl;
1073 if (!$ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
1075 $this->ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
1079 $tpl->setContent($this->form->getHTML());
1101 $tpl->setContent($this->form->getHTML());
1113 $this->form->setValuesByArray($values);
1124 if ($this->form->checkInput())
1128 $mep_item->setTitle(
$_POST[
"title"]);
1129 $mep_item->setType(
"fold");
1130 $mep_item->create();
1131 if ($mep_item->getId() > 0)
1133 $tree = $this->
object->getTree();
1134 $parent =
$_GET[
"mepitem_id"] > 0
1135 ?
$_GET[
"mepitem_id"]
1136 :
$tree->getRootId();
1137 $this->
object->insertInTree($mep_item->getId(), $parent);
1141 $ilCtrl->redirect($this,
"listMedia");
1144 $this->form->setValuesByPost();
1145 $tpl->setContent($this->form->getHtml());
1156 if ($this->form->checkInput())
1159 $item->setTitle(
$_POST[
"title"]);
1162 $ilCtrl->setParameter($this,
"mepitem_id",
1163 $this->object->getTree()->getParentId(
$_GET[
"mepitem_id"]));
1164 $ilCtrl->redirect($this,
"listMedia");
1167 $this->form->setValuesByPost();
1168 $tpl->setContent($this->form->getHtml());
1180 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
1186 $ti->setRequired(
true);
1187 $this->form->addItem($ti);
1190 if ($a_mode ==
"create")
1192 $this->form->addCommandButton(
"saveFolder", $lng->txt(
"save"));
1193 $this->form->addCommandButton(
"cancelSave", $lng->txt(
"cancel"));
1194 $this->form->setTitle($lng->txt(
"mep_new_folder"));
1198 $this->form->addCommandButton(
"updateFolder", $lng->txt(
"save"));
1199 $this->form->addCommandButton(
"cancelFolderUpdate", $lng->txt(
"cancel"));
1200 $this->form->setTitle($lng->txt(
"mep_edit_folder"));
1203 $this->form->setFormAction($ilCtrl->getFormAction($this));
1212 $ilCtrl->setParameter($this,
"mepitem_id",
1213 $this->object->getTree()->getParentId(
$_GET[
"mepitem_id"]));
1214 $ilCtrl->redirect($this,
"listMedia");
1223 $ilCtrl->redirect($this,
"listMedia");
1237 $tpl->setContent($this->form->getHTML());
1252 include_once(
"./Modules/MediaPool/classes/class.ilMediaPoolPageGUI.php");
1254 $mep_page_gui->getTabs();
1258 $tpl->setContent($this->form->getHTML());
1269 if ($this->form->checkInput())
1272 include_once(
"./Modules/MediaPool/classes/class.ilMediaPoolItem.php");
1274 $item->setTitle(
$_POST[
"title"]);
1275 $item->setType(
"pg");
1278 if ($item->getId() > 0)
1281 $tree = $this->
object->getTree();
1282 $parent =
$_GET[
"mepitem_id"] > 0
1283 ?
$_GET[
"mepitem_id"]
1284 :
$tree->getRootId();
1285 $this->
object->insertInTree($item->getId(), $parent);
1288 include_once(
"./Modules/MediaPool/classes/class.ilMediaPoolPage.php");
1290 $page->setId($item->getId());
1295 $ilCtrl->redirect($this,
"listMedia");
1298 $this->form->setValuesByPost();
1299 $tpl->setContent($this->form->getHtml());
1310 if ($this->form->checkInput())
1313 $item->setTitle(
$_POST[
"title"]);
1316 $ilCtrl->redirect($this,
"editMediaPoolPage");
1319 $this->form->setValuesByPost();
1320 $tpl->setContent($this->form->getHtml());
1331 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
1337 $ti->setRequired(
true);
1338 $this->form->addItem($ti);
1341 if ($a_mode ==
"create")
1343 $this->form->addCommandButton(
"saveMediaPoolPage", $lng->txt(
"save"));
1344 $this->form->addCommandButton(
"cancelSave", $lng->txt(
"cancel"));
1345 $this->form->setTitle($lng->txt(
"mep_new_content_snippet"));
1349 $this->form->addCommandButton(
"updateMediaPoolPage", $lng->txt(
"save"));
1350 $this->form->setTitle($lng->txt(
"mep_edit_content_snippet"));
1353 $this->form->setFormAction($ilCtrl->getFormAction($this));
1363 include_once(
"./Modules/MediaPool/classes/class.ilMediaPoolItem.php");
1366 $this->form->setValuesByArray($values);
1379 $ilTabs->clearTargets();
1382 $ilTabs->addTarget(
"mep_page_properties", $ilCtrl->getLinkTarget($this,
"editMediaPoolPage"),
1383 "editMediaPoolPage", get_class($this));
1384 $ilTabs->addTarget(
"cont_usage", $ilCtrl->getLinkTarget($this,
"showMediaPoolPageUsages"),
1385 "showMediaPoolPageUsages", get_class($this));
1386 $ilCtrl->setParameter($this,
"mepitem_id", $this->object->tree->getParentId(
$_GET[
"mepitem_id"]));
1387 $ilTabs->setBackTarget($lng->txt(
"mep_folder"), $ilCtrl->getLinkTarget($this,
"listMedia"));
1388 $ilCtrl->setParameter($this,
"mepitem_id",
$_GET[
"mepitem_id"]);
1400 include_once(
"./Modules/MediaPool/classes/class.ilMediaPoolPageGUI.php");
1402 $mep_page_gui->getTabs();
1404 include_once(
"./Modules/MediaPool/classes/class.ilMediaPoolPage.php");
1407 include_once(
"./Modules/MediaPool/classes/class.ilMediaPoolPageUsagesTableGUI.php");
1410 $tpl->setContent($table->getHTML());
1424 global $ilAccess, $ilTabs,
$ilCtrl;
1426 if ($ilAccess->checkAccess(
'read',
'', $this->ref_id) ||
1427 $ilAccess->checkAccess(
'write',
'', $this->ref_id))
1429 $ilTabs->addTarget(
"objs_fold", $this->ctrl->getLinkTarget($this,
""),
1430 "listMedia",
"",
"_top");
1432 $ilCtrl->setParameter($this,
"mepitem_id",
"");
1433 $ilTabs->addTarget(
"mep_all_mobs", $this->ctrl->getLinkTarget($this,
"allMedia"),
1434 "allMedia",
"",
"_top");
1435 $ilCtrl->setParameter($this,
"mepitem_id",
$_GET[
"mepitem_id"]);
1439 if ($ilAccess->checkAccess(
'visible',
'', $this->ref_id))
1441 $force_active = ($this->ctrl->getNextClass() ==
"ilinfoscreengui"
1442 || strtolower(
$_GET[
"cmdClass"]) ==
"ilnotegui")
1446 $ilTabs->addTarget(
"info_short",
1447 $this->ctrl->getLinkTargetByClass(
1448 array(
"ilobjmediapoolgui",
"ilinfoscreengui"),
"showSummary"),
1449 array(
"showSummary",
"infoScreen"),
1450 "",
"", $force_active);
1453 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
1455 $ilTabs->addTarget(
"edit_properties", $this->ctrl->getLinkTarget($this,
"edit"),
1456 "edit", array(
"",
"ilobjmediapoolgui"));
1459 if ($ilAccess->checkAccess(
"edit_permission",
"", $this->object->getRefId()))
1461 $ilTabs->addTarget(
"perm_settings",
1462 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"), array(
"perm",
"info",
"owner"),
'ilpermissiongui');
1465 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
1467 $ilTabs->addTarget(
"clipboard", $this->ctrl->getLinkTarget($this,
"openClipboard"),
1468 "view",
"ileditclipboardgui");
1480 if ($ilAccess->checkAccess(
"read",
"", $a_target))
1482 $_GET[
"cmd"] =
"frameset";
1483 $_GET[
"baseClass"] =
"ilMediaPoolPresentationGUI";
1484 $_GET[
"ref_id"] = $a_target;
1485 include(
"ilias.php");
1487 }
else if ($ilAccess->checkAccess(
"read",
"", ROOT_FOLDER_ID))
1489 $_GET[
"cmd"] =
"frameset";
1490 $_GET[
"target"] =
"";
1491 $_GET[
"ref_id"] = ROOT_FOLDER_ID;
1494 include(
"repository.php");
1498 $ilErr->raiseError($lng->txt(
"msg_no_perm_read"), $ilErr->FATAL);
1508 $this->ctrl->setCmd(
"showSummary");
1509 $this->ctrl->setCmdClass(
"ilinfoscreengui");
1520 if (!$ilAccess->checkAccess(
"visible",
"", $this->ref_id))
1522 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
1525 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
1528 $info->enablePrivateNotes();
1530 if ($ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"]))
1537 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"]))
1551 $info->addMetaDataSections($this->object->getId(),0, $this->
object->getType());
1554 $this->ctrl->forwardCommand($info);