4 require_once(
"./Modules/LearningModule/classes/class.ilLMPageObject.php");
5 require_once(
"./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php");
36 if ((
$_SESSION[
"il_link_cont_obj"] !=
"" && !$tree->isInTree(
$_SESSION[
"il_link_cont_obj"])) ||
37 (
$_SESSION[
"il_link_glossary"] !=
"" && !$tree->isInTree(
$_SESSION[
"il_link_glossary"])) ||
45 $this->ilias =& $ilias;
47 $this->ctrl->saveParameter($this, array(
"linkmode",
"target_type"));
48 $this->default_type = $a_default_type;
49 $this->default_obj = $a_default_obj;
50 $this->filter_link_types = array();
59 switch($this->link_type)
62 case "StructureObject":
63 if (empty(
$_SESSION[
"il_link_cont_obj"]) &&
64 ($def_type !=
"mep" && $def_type !=
"glo"))
71 if (empty(
$_SESSION[
"il_link_glossary"]) && $def_type ==
"glo")
78 if (empty(
$_SESSION[
"il_link_mep"]) && $def_type ==
"mep")
98 $this->ltypes = array(
99 "StructureObject" => $lng->txt(
"cont_lk_chapter"),
100 "StructureObject_New" => $lng->txt(
"cont_lk_chapter_new"),
101 "PageObject" => $lng->txt(
"cont_lk_page"),
102 "PageObject_FAQ" => $lng->txt(
"cont_lk_page_faq"),
103 "PageObject_New" => $lng->txt(
"cont_lk_page_new"),
104 "GlossaryItem" => $lng->txt(
"cont_lk_term"),
105 "GlossaryItem_New" => $lng->txt(
"cont_lk_term_new"),
106 "Media" => $lng->txt(
"cont_lk_media_inline"),
107 "Media_Media" => $lng->txt(
"cont_lk_media_media"),
108 "Media_FAQ" => $lng->txt(
"cont_lk_media_faq"),
109 "Media_New" => $lng->txt(
"cont_lk_media_new"),
110 "File" => $lng->txt(
"cont_lk_file"),
111 "RepositoryItem" => $lng->txt(
"cont_repository_item")
121 $ltype = (
$_SESSION[
"il_link_type"] ==
"")
122 ? $this->default_type
124 $ltype_arr = explode(
"_", $ltype);
125 $this->link_type = ($ltype_arr[0] ==
"")
126 ? $this->default_type
128 $this->link_target = $ltype_arr[1];
136 $this->mode = $a_mode;
141 $this->set_link_script = $a_script;
146 $this->
return = $a_return;
156 $this->filter_link_types[] = $a_link_type;
161 $next_class = $this->ctrl->getNextClass($this);
163 $cmd = $this->ctrl->getCmd(
"showLinkHelp");
190 if ($this->
return ==
"")
192 $this->ctrl->returnToParent($this);
207 include_once(
"./Services/COPage/classes/class.ilPageEditorGUI.php");
210 $str = htmlspecialchars($str, ENT_QUOTES);
223 $target_str = ($this->link_target ==
"")
225 :
" target=\"".$this->link_target.
"\"";
227 if(($this->link_type ==
"GlossaryItem") &&
232 if(($this->link_type ==
"PageObject" || $this->link_type ==
"StructureObject") &&
238 $tpl =&
new ilTemplate(
"tpl.link_help.html",
true,
true,
"Modules/LearningModule");
241 switch($this->link_type)
244 $this->ctrl->setParameter($this,
"target_type",
"glo");
248 case "StructureObject":
249 $this->ctrl->setParameter($this,
"target_type",
"cont_obj");
253 $this->ctrl->setParameter($this,
"target_type",
"mep");
263 $tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
264 $tpl->setVariable(
"FORMACTION2", $this->ctrl->getFormAction($this));
265 $tpl->setVariable(
"TXT_HELP_HEADER", $this->lng->txt(
"cont_link_select"));
266 $tpl->setVariable(
"TXT_TYPE", $this->lng->txt(
"cont_link_type"));
269 foreach($this->filter_link_types as
$link_type)
271 unset($this->ltypes[$link_type]);
274 $ltype = ($this->link_target !=
"")
275 ? $this->link_type.
"_".$this->link_target
281 "ltype", $this->ltypes,
false,
true);
282 $tpl->setVariable(
"SELECT_TYPE", $select_ltype);
283 $tpl->setVariable(
"CMD_CHANGETYPE",
"changeLinkType");
284 $tpl->setVariable(
"BTN_CHANGETYPE", $this->lng->txt(
"cont_change_type"));
292 $tpl->setVariable(
"CMD_CLOSE",
"closeLinkHelp");
293 $tpl->setVariable(
"BTN_CLOSE", $this->lng->txt(
"close"));
296 $chapterRowBlock =
"chapter_row";
297 $anchor_row_block =
"anchor_link";
300 $chapterRowBlock .=
"_js";
301 $anchor_row_block .=
"_js";
308 switch($this->link_type)
314 require_once(
"./Modules/LearningModule/classes/class.ilObjLearningModule.php");
317 else if (
$type ==
"dbk")
319 require_once(
"./Modules/LearningModule/classes/class.ilObjDlBook.php");
324 $ctree =& $cont_obj->getLMTree();
325 $nodes = $ctree->getSubtree($ctree->getNodeData($ctree->getRootId()));
326 $tpl->setCurrentBlock(
"chapter_list");
327 $tpl->setVariable(
"TXT_CONTENT_OBJECT", $this->lng->txt(
"cont_content_obj"));
328 $tpl->setVariable(
"TXT_CONT_TITLE", $cont_obj->getTitle());
329 $tpl->setCurrentBlock(
"change_cont_obj");
330 $tpl->setVariable(
"CMD_CHANGE_CONT_OBJ",
"changeTargetObject");
331 $tpl->setVariable(
"BTN_CHANGE_CONT_OBJ", $this->lng->txt(
"change"));
332 $tpl->parseCurrentBlock();
334 foreach($nodes as $node)
336 if($node[
"type"] ==
"st")
338 $tpl->setCurrentBlock(
"chapter_row");
339 $tpl->setVariable(
"TXT_CHAPTER", $node[
"title"]);
340 $tpl->setVariable(
"ROWCLASS",
"tblrow1");
343 $tpl->parseCurrentBlock();
346 if($node[
"type"] ==
"pg")
351 require_once(
"./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php");
352 require_once(
"./Services/MediaObjects/classes/class.ilImageMapEditorGUI.php");
354 $tpl->setCurrentBlock(
"link_row");
355 $tpl->setVariable(
"ROWCLASS",
"tblrow2");
356 $tpl->setVariable(
"TXT_CHAPTER", $node[
"title"]);
357 $tpl->setVariable(
"LINK_TARGET",
"content");
358 $tpl->setVariable(
"LINK",
360 "linktype=PageObject".
361 "&linktarget=il__pg_".$node[
"obj_id"].
362 "&linktargetframe=".$this->link_target));
363 $tpl->parseCurrentBlock();
368 if (count($anchors) > 0)
370 foreach ($anchors as $anchor)
372 $tpl->setCurrentBlock($anchor_row_block);
373 $tpl->setVariable(
"TXT_LINK",
"#".$anchor);
374 $tpl->setVariable(
"HREF_LINK",
375 $this->
prepareJavascriptOutput(
"[iln page=\"".$node[
"obj_id"].
"\"".$target_str.
" anchor=\"$anchor\"] [/iln]"));
376 $tpl->parseCurrentBlock();
379 $tpl->setCurrentBlock($chapterRowBlock);
380 $tpl->setVariable(
"TXT_CHAPTER", $node[
"title"]);
383 $tpl->setVariable(
"TXT_CHAPTER_JS", htmlspecialchars(str_replace(
"'",
"\'", $node[
"title"])));
385 $tpl->setVariable(
"ROWCLASS",
"tblrow2");
386 $tpl->setVariable(
"LINK_CHAPTER",
388 $tpl->parseCurrentBlock();
392 $tpl->setCurrentBlock(
"row");
393 $tpl->parseCurrentBlock();
398 $free_pages = array();
399 foreach ($pages as $page)
401 if (!$ctree->isInTree($page[
"obj_id"]))
403 $free_pages[] = $page;
406 if(count($free_pages) > 0)
408 $tpl->setCurrentBlock(str_replace(
"_js",
"",$chapterRowBlock));
409 $tpl->setVariable(
"TXT_CHAPTER", $this->lng->txt(
"cont_free_pages"));
410 $tpl->setVariable(
"ROWCLASS",
"tblrow1");
411 $tpl->parseCurrentBlock();
413 foreach ($free_pages as $node)
418 require_once(
"./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php");
419 require_once(
"./Services/MediaObjects/classes/class.ilImageMapEditorGUI.php");
421 $tpl->setCurrentBlock(
"link_row");
422 $tpl->setVariable(
"ROWCLASS",
"tblrow2");
423 $tpl->setVariable(
"TXT_CHAPTER", $node[
"title"]);
424 $tpl->setVariable(
"LINK_TARGET",
"content");
425 $tpl->setVariable(
"LINK",
427 "linktype=PageObject".
428 "&linktarget=il__pg_".$node[
"obj_id"].
429 "&linktargetframe=".$this->link_target));
430 $tpl->parseCurrentBlock();
434 $tpl->setCurrentBlock($chapterRowBlock);
435 $tpl->setVariable(
"TXT_CHAPTER", $node[
"title"]);
438 $tpl->setVariable(
"TXT_CHAPTER_JS", htmlspecialchars(str_replace(
"'",
"\'", $node[
"title"])));
440 $tpl->setVariable(
"ROWCLASS",
"tblrow2");
441 $tpl->setVariable(
"LINK_CHAPTER",
443 $tpl->parseCurrentBlock();
449 $tpl->setCurrentBlock(
"chapter_list");
450 $tpl->parseCurrentBlock();
455 case "StructureObject":
467 require_once(
"./Modules/LearningModule/classes/class.ilObjLearningModule.php");
470 else if (
$type ==
"dbk")
472 require_once(
"./Modules/LearningModule/classes/class.ilObjDlBook.php");
477 $ctree =& $cont_obj->getLMTree();
478 $nodes = $ctree->getSubtree($ctree->getNodeData($ctree->getRootId()));
479 $tpl->setCurrentBlock(
"chapter_list");
480 $tpl->setVariable(
"TXT_CONTENT_OBJECT", $this->lng->txt(
"cont_content_obj"));
481 $tpl->setVariable(
"TXT_CONT_TITLE", $cont_obj->getTitle());
482 $tpl->setCurrentBlock(
"change_cont_obj");
483 $tpl->setVariable(
"CMD_CHANGE_CONT_OBJ",
"changeTargetObject");
484 $tpl->setVariable(
"BTN_CHANGE_CONT_OBJ", $this->lng->txt(
"change"));
485 $tpl->parseCurrentBlock();
487 foreach($nodes as $node)
489 if($node[
"type"] ==
"st")
491 $css_row = ($css_row ==
"tblrow1")
498 require_once(
"./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php");
499 require_once(
"./Services/MediaObjects/classes/class.ilImageMapEditorGUI.php");
501 $tpl->setCurrentBlock(
"link_row");
502 $tpl->setVariable(
"ROWCLASS", $css_row);
503 $tpl->setVariable(
"TXT_CHAPTER", $node[
"title"]);
504 $tpl->setVariable(
"LINK_TARGET",
"content");
505 $tpl->setVariable(
"LINK",
507 "linktype=StructureObject".
508 "&linktarget=il__st_".$node[
"obj_id"].
509 "&linktargetframe=".$this->link_target));
510 $tpl->parseCurrentBlock();
514 $tpl->setCurrentBlock($chapterRowBlock);
515 $tpl->setVariable(
"ROWCLASS", $css_row);
516 $tpl->setVariable(
"TXT_CHAPTER", $node[
"title"]);
519 $tpl->setVariable(
"TXT_CHAPTER_JS", htmlspecialchars(str_replace(
"'",
"\'", $node[
"title"])));
521 $tpl->setVariable(
"LINK_CHAPTER",
523 $tpl->parseCurrentBlock();
527 $tpl->setCurrentBlock(
"row");
528 $tpl->parseCurrentBlock();
530 $tpl->setCurrentBlock(
"chapter_list");
531 $tpl->parseCurrentBlock();
536 require_once(
"./Modules/Glossary/classes/class.ilObjGlossary.php");
540 $terms = $glossary->getTermList();
541 $tpl->setCurrentBlock(
"chapter_list");
542 $tpl->setVariable(
"TXT_CONTENT_OBJECT", $this->lng->txt(
"glossary"));
543 $tpl->setVariable(
"TXT_CONT_TITLE", $glossary->getTitle());
544 $tpl->setCurrentBlock(
"change_cont_obj");
545 $tpl->setVariable(
"CMD_CHANGE_CONT_OBJ",
"changeTargetObject");
546 $tpl->setVariable(
"BTN_CHANGE_CONT_OBJ", $this->lng->txt(
"change"));
547 $tpl->parseCurrentBlock();
549 foreach($terms as $term)
551 $css_row = ($css_row ==
"tblrow1")
558 require_once(
"./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php");
559 require_once(
"./Services/MediaObjects/classes/class.ilImageMapEditorGUI.php");
561 $tpl->setCurrentBlock(
"link_row");
562 $tpl->setVariable(
"ROWCLASS",
"tblrow2");
563 $tpl->setVariable(
"TXT_CHAPTER", $term[
"term"]);
564 $tpl->setVariable(
"LINK_TARGET",
"content");
565 $tpl->setVariable(
"LINK",
567 "linktype=GlossaryItem".
568 "&linktarget=il__git_".$term[
"id"].
569 "&linktargetframe=".$this->link_target));
570 $tpl->parseCurrentBlock();
574 $tpl->setCurrentBlock($chapterRowBlock);
575 $tpl->setVariable(
"ROWCLASS", $css_row);
576 $tpl->setVariable(
"TXT_CHAPTER", $term[
"term"]);
579 $tpl->setVariable(
"TXT_CHAPTER_JS", htmlspecialchars(str_replace(
"'",
"\'", $term[
"term"])));
582 $tpl->setVariable(
"LINK_CHAPTER",
584 $tpl->parseCurrentBlock();
585 $tpl->setCurrentBlock(
"row");
586 $tpl->parseCurrentBlock();
591 $tpl->setCurrentBlock(
"chapter_list");
592 $tpl->parseCurrentBlock();
597 include_once(
"./Modules/MediaPool/classes/class.ilMediaPoolItem.php");
602 $tpl->setCurrentBlock(
"change_cont_obj");
603 $tpl->setVariable(
"CMD_CHANGE_CONT_OBJ",
"changeTargetObject");
604 $tpl->setVariable(
"BTN_CHANGE_CONT_OBJ", $this->lng->txt(
"change"));
605 $tpl->parseCurrentBlock();
606 $mobjs = $this->ilias->account->getClipboardObjects(
"mob");
609 foreach ($mobjs as $obj)
611 $objs[$obj[
"title"].
":".$obj[
"id"]] = $obj;
614 $tpl->setCurrentBlock(
"chapter_list");
615 $tpl->setVariable(
"TXT_CONTENT_OBJECT", $this->lng->txt(
"cont_media_source"));
616 $tpl->setVariable(
"TXT_CONT_TITLE", $this->lng->txt(
"cont_personal_clipboard"));
617 $tpl->setVariable(
"COLSPAN",
"2");
619 foreach($objs as $obj)
624 require_once(
"./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php");
625 require_once(
"./Services/MediaObjects/classes/class.ilImageMapEditorGUI.php");
627 $tpl->setCurrentBlock(
"link_row");
629 $tpl->setCurrentBlock(
"link_row");
631 $tpl->setCurrentBlock(
"link_row");
632 $tpl->setVariable(
"ROWCLASS",
"tblrow2");
633 $tpl->setVariable(
"TXT_CHAPTER", $obj[
"title"]);
634 $tpl->setVariable(
"LINK_TARGET",
"content");
635 $tpl->setVariable(
"LINK",
637 "linktype=MediaObject".
638 "&linktarget=il__mob_".$obj[
"id"].
639 "&linktargetframe=".$this->link_target));
640 $tpl->parseCurrentBlock();
644 $tpl->setCurrentBlock($chapterRowBlock);
646 $tpl->setCurrentBlock($chapterRowBlock);
647 $tpl->setVariable(
"TXT_CHAPTER", $obj[
"title"]);
650 $tpl->setVariable(
"TXT_CHAPTER_JS", htmlspecialchars(str_replace(
"'",
"\'", $obj[
"title"])));
652 $tpl->setVariable(
"ROWCLASS",
"tblrow1");
653 if (!empty($target_str))
655 $tpl->setVariable(
"LINK_CHAPTER",
660 $tpl->setVariable(
"LINK_CHAPTER",
663 $tpl->parseCurrentBlock();
664 $tpl->setCurrentBlock(
"row");
665 $tpl->parseCurrentBlock();
669 $tpl->setCurrentBlock(
"chapter_list");
670 $tpl->parseCurrentBlock();
674 require_once(
"./Modules/MediaPool/classes/class.ilObjMediaPool.php");
677 $fobjs = $med_pool->getChilds(
$_SESSION[
"il_link_mep_obj"],
"fold");
679 foreach ($fobjs as $obj)
681 $f2objs[$obj[
"title"].
":".$obj[
"child"]] = $obj;
685 $mobjs = $med_pool->getChilds(
$_SESSION[
"il_link_mep_obj"],
"mob");
687 foreach ($mobjs as $obj)
689 $m2objs[$obj[
"title"].
":".$obj[
"child"]] = $obj;
694 $objs = array_merge($f2objs, $m2objs);
696 $tpl->setCurrentBlock(
"chapter_list");
697 $tpl->setVariable(
"TXT_CONTENT_OBJECT", $this->lng->txt(
"mep"));
698 $tpl->setVariable(
"TXT_CONT_TITLE", $med_pool->getTitle());
699 $tpl->setCurrentBlock(
"change_cont_obj");
700 $tpl->setVariable(
"CMD_CHANGE_CONT_OBJ",
"changeTargetObject");
701 $tpl->setVariable(
"BTN_CHANGE_CONT_OBJ", $this->lng->txt(
"change"));
702 $tpl->setVariable(
"COLSPAN",
"2");
703 $tpl->parseCurrentBlock();
704 if ($parent_id = $med_pool->getParentId(
$_SESSION[
"il_link_mep_obj"]))
706 $css_row =
"tblrow1";
707 $tpl->setCurrentBlock(
"icon");
709 $tpl->parseCurrentBlock();
710 $tpl->setCurrentBlock(
"link_row");
711 $tpl->setVariable(
"ROWCLASS", $css_row);
712 $tpl->setVariable(
"TXT_CHAPTER",
"..");
713 $this->ctrl->setParameter($this,
"mep_fold", $parent_id);
714 $tpl->setVariable(
"LINK",
715 $this->ctrl->getLinkTarget($this,
"setMedPoolFolder"));
716 $tpl->parseCurrentBlock();
717 $tpl->setCurrentBlock(
"row");
718 $tpl->parseCurrentBlock();
720 foreach($objs as $obj)
722 if($obj[
"type"] ==
"fold")
724 $css_row = ($css_row ==
"tblrow2")
727 $tpl->setCurrentBlock(
"icon");
729 $tpl->parseCurrentBlock();
730 $tpl->setCurrentBlock(
"link_row");
731 $tpl->setVariable(
"ROWCLASS", $css_row);
732 $tpl->setVariable(
"TXT_CHAPTER", $obj[
"title"]);
733 $this->ctrl->setParameter($this,
"mep_fold", $obj[
"child"]);
734 $tpl->setVariable(
"LINK",
735 $this->ctrl->getLinkTarget($this,
"setMedPoolFolder"));
736 $tpl->parseCurrentBlock();
743 $css_row = ($css_row ==
"tblrow2")
749 require_once(
"./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php");
750 require_once(
"./Services/MediaObjects/classes/class.ilImageMapEditorGUI.php");
752 $tpl->setCurrentBlock(
"link_row");
754 $tpl->setCurrentBlock(
"link_row");
755 $tpl->setVariable(
"ROWCLASS", $css_row);
756 $tpl->setVariable(
"TXT_CHAPTER", $obj[
"title"]);
757 $tpl->setVariable(
"LINK_TARGET",
"content");
758 $tpl->setVariable(
"LINK",
760 "linktype=MediaObject".
761 "&linktarget=il__mob_".$fid.
762 "&linktargetframe=".$this->link_target));
763 $tpl->parseCurrentBlock();
767 $tpl->setCurrentBlock($chapterRowBlock);
769 $tpl->setCurrentBlock($chapterRowBlock);
770 $tpl->setVariable(
"ROWCLASS", $css_row);
771 $tpl->setVariable(
"TXT_CHAPTER", $obj[
"title"]);
774 $tpl->setVariable(
"TXT_CHAPTER_JS", htmlspecialchars(str_replace(
"'",
"\'", $obj[
"title"])));
776 if ($target_str !=
"")
778 $tpl->setVariable(
"LINK_CHAPTER",
783 $tpl->setVariable(
"LINK_CHAPTER",
786 $tpl->parseCurrentBlock();
791 $tpl->setCurrentBlock(
"row");
792 $tpl->parseCurrentBlock();
794 $tpl->setCurrentBlock(
"chapter_list");
795 $tpl->parseCurrentBlock();
800 case "RepositoryItem":
824 if (!is_object($this->uploaded_file))
826 $tpl =
new ilTemplate(
"tpl.link_file.html",
true,
true,
"Modules/LearningModule");
827 $tpl->setCurrentBlock(
"form");
828 $tpl->setVariable(
"FORM_ACTION",
829 $ilCtrl->getFormAction($this));
830 $tpl->setVariable(
"TXT_SELECT_FILE", $lng->txt(
"cont_select_file"));
831 $tpl->setVariable(
"TXT_SAVE_LINK", $lng->txt(
"cont_create_link"));
832 $tpl->setVariable(
"CMD_SAVE_LINK",
"saveFileLink");
833 include_once(
"./Services/Form/classes/class.ilFileInputGUI.php");
836 $tpl->setVariable(
"INPUT", $fi->getToolbarHTML());
837 $tpl->parseCurrentBlock();
842 $tpl =
new ilTemplate(
"tpl.link_file.html",
true,
true,
"Modules/LearningModule");
843 $tpl->setCurrentBlock(
"link_js");
844 $tpl->setVariable(
"LINK_FILE",
847 $tpl->setVariable(
"LINK_FILE_SCR",
848 "[iln dfile=\"".$this->uploaded_file->getId().
"\"] [/iln]");
849 $tpl->setVariable(
"TXT_FILE",
850 $this->uploaded_file->getTitle());
851 $tpl->parseCurrentBlock();
861 $mtpl =&
new ilTemplate(
"tpl.link_help.html",
true,
true,
"Modules/LearningModule");
864 if ($_FILES[
"link_file"][
"name"] !=
"")
866 include_once(
"./Modules/File/classes/class.ilObjFile.php");
868 $fileObj->setType(
"file");
869 $fileObj->setTitle($_FILES[
"link_file"][
"name"]);
870 $fileObj->setDescription(
"");
871 $fileObj->setFileName($_FILES[
"link_file"][
"name"]);
872 $fileObj->setFileType($_FILES[
"link_file"][
"type"]);
873 $fileObj->setFileSize($_FILES[
"link_file"][
"size"]);
874 $fileObj->setMode(
"filelist");
877 $fileObj->createDirectory();
878 $fileObj->raiseUploadError(
false);
879 $fileObj->getUploadFile($_FILES[
"link_file"][
"tmp_name"],
880 $_FILES[
"link_file"][
"name"]);
881 $this->uploaded_file = $fileObj;
894 $med =& $mob->getMediaItem(
"Standard");
895 $target = $med->getThumbnailTarget(
"small");
896 if ($a_mode ==
"link")
898 $tpl->setCurrentBlock(
"thumbnail_link");
902 $tpl->setCurrentBlock(
"thumbnail_js");
906 $tpl->setCurrentBlock(
"thumbnail");
910 $tpl->setCurrentBlock(
"thumb");
911 $tpl->setVariable(
"SRC_THUMB", $target);
912 $tpl->parseCurrentBlock();
916 $tpl->setVariable(
"NO_THUMB",
" ");
919 if ($a_mode ==
"link")
921 $tpl->setCurrentBlock(
"thumbnail_link");
926 $tpl->setCurrentBlock(
"thumbnail_js");
930 $tpl->setCurrentBlock(
"thumbnail");
932 $tpl->parseCurrentBlock();
962 if(
$_GET[
"do"] ==
"set")
964 switch (
$_GET[
"target_type"])
984 $a_type =
$_GET[
"target_type"];
987 $tpl =&
new ilTemplate(
"tpl.link_help_explorer.html",
true,
true,
"Modules/LearningModule");
990 require_once
"classes/class.ilExplorer.php";
996 $this->ctrl->getTargetScript(),
"do=set"));
997 if (
$_GET[
"expand"] ==
"")
999 $expanded = $this->tree->readRootId();
1003 $expanded =
$_GET[
"expand"];
1005 $exp->setExpand($expanded);
1008 $exp->setTargetGet(
"sel_id");
1009 $this->ctrl->setParameter($this,
"target_type", $a_type);
1010 $exp->setParamsGet($this->ctrl->getParameterArray($this,
"changeTargetObject"));
1016 $exp->addFilter(
"root");
1017 $exp->addFilter(
"cat");
1018 $exp->addFilter(
"grp");
1019 $exp->addFilter(
"fold");
1020 $exp->addFilter(
"crs");
1025 $exp->addFilter(
"glo");
1029 $exp->addFilter(
"mep");
1033 $exp->addFilter(
"lm");
1034 $exp->addFilter(
"dbk");
1037 $exp->setFiltered(
true);
1040 $exp->setClickable(
"cat",
false);
1041 $exp->setClickable(
"grp",
false);
1042 $exp->setClickable(
"fold",
false);
1043 $exp->setClickable(
"crs",
false);
1045 $exp->setFrameTarget(
"");
1048 $output = $exp->getOutput();
1052 if ($a_type ==
"glo")
1054 $tpl->setVariable(
"TXT_EXPLORER_HEADER", $this->lng->txt(
"cont_choose_glossary"));
1056 else if ($a_type ==
"mep")
1058 $tpl->setVariable(
"TXT_EXPLORER_HEADER", $this->lng->txt(
"cont_choose_media_source"));
1062 $tpl->setVariable(
"TXT_EXPLORER_HEADER", $this->lng->txt(
"cont_choose_cont_obj"));
1064 $tpl->setVariable(
"EXPLORER",$output);
1065 $tpl->setVariable(
"ACTION", $this->ctrl->getFormAction($this));
1066 $tpl->setVariable(
"BTN_REFRESH",
"changeTargetObject");
1067 $tpl->setVariable(
"TXT_REFRESH", $this->lng->txt(
"refresh"));
1068 $tpl->setVariable(
"BTN_RESET",
"resetLinkList");
1069 $tpl->setVariable(
"TXT_RESET", $this->lng->txt(
"reset"));
1071 if ($a_type ==
"mep")
1073 $tpl->setCurrentBlock(
"sel_clipboard");
1074 $this->ctrl->setParameter($this,
"do",
"set");
1079 $tpl->setVariable(
"LINK_CLIPBOARD", $this->ctrl->getLinkTarget($this,
"changeTargetObject"));
1080 $tpl->setVariable(
"TXT_PERS_CLIPBOARD", $this->lng->txt(
"clipboard"));
1081 $tpl->parseCurrentBlock();
1087 $tpl->parseCurrentBlock();
1102 $a_type =
$_GET[
"target_type"];
1105 include_once
"./Modules/LearningModule/classes/class.ilIntLinkRepItemExplorer.php";
1107 $this->ctrl->getTargetScript(),
"do=set"));
1108 if (
$_GET[
"expand"] ==
"")
1110 $expanded = $this->tree->readRootId();
1114 $expanded =
$_GET[
"expand"];
1116 $exp->setMode($this->mode);
1118 $exp->setExpand($expanded);
1120 $exp->setTargetGet(
"sel_id");
1121 $this->ctrl->setParameter($this,
"target_type", $a_type);
1122 $exp->setParamsGet($this->ctrl->getParameterArray($this,
"showLinkHelp"));
1125 $exp->setFiltered(
true);
1127 $exp->addFilter(
"root");
1128 $exp->addFilter(
"cat");
1129 $exp->addFilter(
"grp");
1130 $exp->addFilter(
"fold");
1131 $exp->addFilter(
"crs");
1132 $exp->addFilter(
"lm");
1133 $exp->addFilter(
"htlm");
1134 $exp->addFilter(
"dbk");
1135 $exp->addFilter(
"glo");
1136 $exp->addFilter(
"exc");
1137 $exp->addFilter(
"tst");
1138 $exp->addFilter(
"svy");
1139 $exp->addFilter(
"webr");
1140 $exp->addFilter(
"file");
1141 $exp->addFilter(
"sahs");
1142 $exp->addFilter(
"mcst");
1143 $exp->addFilter(
"wiki");
1144 $exp->addFilter(
"mep");
1146 $sel_types = array(
'lm',
'dbk',
'htlm',
'glo',
'exc',
'tst',
'svy',
'webr',
1147 'cat',
'crs',
'grp',
'file',
'fold',
'sahs',
'mcst',
'wiki',
'mep');
1148 $exp->setSelectableTypes($sel_types);
1151 $exp->setFrameTarget(
"");
1154 $output = $exp->getOutput();
1168 include_once(
"./Services/COPage/classes/class.ilPageEditorGUI.php");
1169 if($ilias->getSetting(
"enable_js_edit"))