4 require_once(
"./Modules/LearningModule/classes/class.ilLMPageObject.php");
 
    5 require_once(
"./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php");
 
   35                 if ((
$_SESSION[
"il_link_cont_obj"] != 
"" && !$tree->isInTree(
$_SESSION[
"il_link_cont_obj"])) ||
 
   36                         (
$_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();
 
   62                 $this->ltypes = array(
 
   63                         "StructureObject" => $lng->txt(
"cont_lk_chapter"),
 
   64                         "StructureObject_New" => $lng->txt(
"cont_lk_chapter_new"),
 
   65                         "PageObject" => $lng->txt(
"cont_lk_page"),
 
   66                         "PageObject_FAQ" => $lng->txt(
"cont_lk_page_faq"),
 
   67                         "PageObject_New" => $lng->txt(
"cont_lk_page_new"),
 
   68                         "GlossaryItem" => $lng->txt(
"cont_lk_term"),
 
   69                         "GlossaryItem_New" => $lng->txt(
"cont_lk_term_new"),
 
   70                         "Media" => $lng->txt(
"cont_lk_media_inline"),
 
   71                         "Media_Media" => $lng->txt(
"cont_lk_media_media"),
 
   72                         "Media_FAQ" => $lng->txt(
"cont_lk_media_faq"),
 
   73                         "Media_New" => $lng->txt(
"cont_lk_media_new"),
 
   74                         "WikiPage" => $lng->txt(
"cont_wiki_page"),
 
   75                         "File" => $lng->txt(
"cont_lk_file"),
 
   76                         "RepositoryItem" => $lng->txt(
"cont_repository_item")
 
   86                 $ltype = (
$_SESSION[
"il_link_type"] == 
"")
 
   89                 $ltype_arr = explode(
"_", $ltype);
 
   91                 if (!isset($this->ltypes[$ltype_arr[0]]) &&
 
   92                         !isset($this->ltypes[$ltype]))
 
   98                         $this->link_type = ($ltype_arr[0] == 
"")
 
  101                         $this->link_target = $ltype_arr[1];
 
  110                 $this->mode = $a_mode;
 
  115                 $this->set_link_script = $a_script;
 
  120                 $this->
return = $a_return;
 
  130                 $this->filter_link_types[] = $a_link_type;
 
  140                 $this->filter_white_list = $a_white_list;
 
  146                 $next_class = $this->ctrl->getNextClass($this);
 
  148                 $cmd = $this->ctrl->getCmd(
"showLinkHelp");
 
  175                 if ($this->
return == 
"")
 
  177                         $this->ctrl->returnToParent($this);
 
  192                 include_once(
"./Services/COPage/classes/class.ilPageEditorGUI.php");
 
  193                 if (self::_doJSEditing())
 
  195                         $str = htmlspecialchars($str, ENT_QUOTES);
 
  209                 if (!$this->filter_white_list)
 
  211                         foreach($this->filter_link_types as 
$link_type)
 
  213                                 unset($this->ltypes[$link_type]);
 
  219                         foreach($this->ltypes as $k => $l)
 
  221                                 if (in_array($k, $this->filter_link_types))
 
  233                 $ltype = ($this->link_target != 
"")
 
  234                         ? $this->link_type.
"_".$this->link_target
 
  240                 switch($this->link_type)
 
  243                         case "StructureObject":
 
  244                                 if  (empty(
$_SESSION[
"il_link_cont_obj"]) &&
 
  245                                         ($def_type != 
"mep" && $def_type != 
"glo"))
 
  252                                 if  (empty(
$_SESSION[
"il_link_glossary"]) && $def_type == 
"glo")
 
  259                                 if  (empty(
$_SESSION[
"il_link_mep"]) && $def_type == 
"mep")
 
  266                                 if  (empty(
$_SESSION[
"il_link_wiki"]) && $def_type == 
"wiki")
 
  280                 $target_str = ($this->link_target == 
"")
 
  282                         : 
" target=\"".$this->link_target.
"\"";
 
  284                 if(($this->link_type == 
"GlossaryItem") &&
 
  291                 if(($this->link_type == 
"WikiPage") &&
 
  298                 if(($this->link_type == 
"PageObject" || $this->link_type == 
"StructureObject") &&
 
  301                                 array(
"lm", 
"dbk"))))
 
  305                 if ($ilCtrl->isAsynch())
 
  307                         $tpl = 
new ilTemplate(
"tpl.link_help_asynch.html", 
true, 
true, 
"Modules/LearningModule");
 
  311                         $tpl =& 
new ilTemplate(
"tpl.link_help.html", 
true, 
true, 
"Modules/LearningModule");
 
  315                 switch($this->link_type)
 
  318                                 $this->ctrl->setParameter($this, 
"target_type", 
"glo");
 
  322                         case "StructureObject":
 
  323                                 $this->ctrl->setParameter($this, 
"target_type", 
"cont_obj");
 
  327                                 $this->ctrl->setParameter($this, 
"target_type", 
"mep");
 
  331                                 $this->ctrl->setParameter($this, 
"target_type", 
"wiki");
 
  342                 $tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this, 
"changeLinkType", 
"", 
true));
 
  343                 $tpl->setVariable(
"FORMACTION2", $this->ctrl->getFormAction($this));
 
  344                 $tpl->setVariable(
"TXT_HELP_HEADER", $this->lng->txt(
"cont_link_select"));
 
  345                 $tpl->setVariable(
"TXT_TYPE", $this->lng->txt(
"cont_link_type"));
 
  351                         "ltype", $this->ltypes, 
false, 
true, 
"0", 
"", array(
"id" => 
"ilIntLinkTypeSelector"));
 
  352                 $tpl->setVariable(
"SELECT_TYPE", $select_ltype);
 
  353                 $tpl->setVariable(
"CMD_CHANGETYPE", 
"changeLinkType");
 
  354                 $tpl->setVariable(
"BTN_CHANGETYPE", $this->lng->txt(
"cont_change_type"));
 
  362                         $tpl->setVariable(
"CMD_CLOSE", 
"closeLinkHelp");
 
  363                         $tpl->setVariable(
"BTN_CLOSE", $this->lng->txt(
"close"));
 
  366                 $chapterRowBlock = 
"chapter_row";
 
  367                 $anchor_row_block = 
"anchor_link";
 
  370                         $chapterRowBlock .= 
"_js";
 
  371                         $anchor_row_block .= 
"_js";
 
  378                 switch($this->link_type)
 
  382                                 require_once(
"./Modules/LearningModule/classes/class.ilObjLearningModule.php");
 
  383                                 include_once(
"./Modules/LearningModule/classes/class.ilLMPage.php");
 
  388                                 $ctree = $cont_obj->getLMTree();
 
  389                                 $nodes = $ctree->getSubtree($ctree->getNodeData($ctree->getRootId()));
 
  390                                 $tpl->setCurrentBlock(
"chapter_list");
 
  391                                 $tpl->setVariable(
"TXT_CONTENT_OBJECT", $this->lng->txt(
"cont_content_obj"));
 
  392                                 $tpl->setVariable(
"TXT_CONT_TITLE", $cont_obj->getTitle());
 
  393                                 $tpl->setCurrentBlock(
"change_cont_obj");
 
  394                                 $tpl->setVariable(
"CMD_CHANGE_CONT_OBJ", 
"changeTargetObject");
 
  395                                 $tpl->setVariable(
"BTN_CHANGE_CONT_OBJ", $this->lng->txt(
"change"));
 
  396                                 $tpl->parseCurrentBlock();
 
  398                                 foreach($nodes as $node)
 
  400                                         if($node[
"type"] == 
"st")
 
  402                                                 $tpl->setCurrentBlock(
"chapter_row");
 
  403                                                 $tpl->setVariable(
"TXT_CHAPTER", $node[
"title"]);
 
  404                                                 $tpl->setVariable(
"ROWCLASS", 
"tblrow1");
 
  407                                                 $tpl->parseCurrentBlock();
 
  408                                                 $tpl->setCurrentBlock(
"row");
 
  409                                                 $tpl->parseCurrentBlock();
 
  412                                         if($node[
"type"] == 
"pg")
 
  414                                                 include_once(
"./Services/COPage/classes/class.ilPCParagraph.php");
 
  416                                                         "PageObject", 
"pg", 
"page",
 
  423                                 $free_pages = array();
 
  424                                 foreach ($pages as $page)
 
  426                                         if (!$ctree->isInTree($page[
"obj_id"]))
 
  428                                                 $free_pages[] = $page;
 
  431                                 if(count($free_pages) > 0)
 
  433                                         $tpl->setCurrentBlock(str_replace(
"_js",
"",$chapterRowBlock));
 
  434                                         $tpl->setVariable(
"TXT_CHAPTER", $this->lng->txt(
"cont_free_pages"));
 
  435                                         $tpl->setVariable(
"ROWCLASS", 
"tblrow1");
 
  436                                         $tpl->parseCurrentBlock();
 
  438                                         foreach ($free_pages as $node)
 
  440                                                 include_once(
"./Services/COPage/classes/class.ilPCParagraph.php");
 
  442                                                         "PageObject", 
"pg", 
"page",
 
  447                                 $tpl->setCurrentBlock(
"chapter_list");
 
  448                                 $tpl->parseCurrentBlock();
 
  453                         case "StructureObject":
 
  464                                         require_once(
"./Modules/LearningModule/classes/class.ilObjLearningModule.php");
 
  467                                 else if ($type == 
"dbk")
 
  469                                         require_once(
"./Modules/LearningModule/classes/class.ilObjDlBook.php");
 
  474                                 $ctree =& $cont_obj->getLMTree();
 
  475                                 $nodes = $ctree->getSubtree($ctree->getNodeData($ctree->getRootId()));
 
  476                                 $tpl->setCurrentBlock(
"chapter_list");
 
  477                                 $tpl->setVariable(
"TXT_CONTENT_OBJECT", $this->lng->txt(
"cont_content_obj"));
 
  478                                 $tpl->setVariable(
"TXT_CONT_TITLE", $cont_obj->getTitle());
 
  479                                 $tpl->setCurrentBlock(
"change_cont_obj");
 
  480                                 $tpl->setVariable(
"CMD_CHANGE_CONT_OBJ", 
"changeTargetObject");
 
  481                                 $tpl->setVariable(
"BTN_CHANGE_CONT_OBJ", $this->lng->txt(
"change"));
 
  482                                 $tpl->parseCurrentBlock();
 
  484                                 foreach($nodes as $node)
 
  486                                         if($node[
"type"] == 
"st")
 
  489                                                         "StructureObject", 
"st", 
"chap");
 
  492                                 $tpl->setCurrentBlock(
"chapter_list");
 
  493                                 $tpl->parseCurrentBlock();
 
  498                                 require_once(
"./Modules/Glossary/classes/class.ilObjGlossary.php");
 
  502                                 $terms = $glossary->getTermList();
 
  503                                 $tpl->setCurrentBlock(
"chapter_list");
 
  504                                 $tpl->setVariable(
"TXT_CONTENT_OBJECT", $this->lng->txt(
"glossary"));
 
  505                                 $tpl->setVariable(
"TXT_CONT_TITLE", $glossary->getTitle());
 
  506                                 $tpl->setCurrentBlock(
"change_cont_obj");
 
  507                                 $tpl->setVariable(
"CMD_CHANGE_CONT_OBJ", 
"changeTargetObject");
 
  508                                 $tpl->setVariable(
"BTN_CHANGE_CONT_OBJ", $this->lng->txt(
"change"));
 
  509                                 $tpl->parseCurrentBlock();
 
  511                                 foreach($terms as $term)
 
  514                                                 "GlossaryItem", 
"git", 
"term");
 
  517                                 $tpl->setCurrentBlock(
"chapter_list");
 
  518                                 $tpl->parseCurrentBlock();
 
  523                                 include_once(
"./Modules/MediaPool/classes/class.ilMediaPoolItem.php");
 
  528                                         $tpl->setCurrentBlock(
"change_cont_obj");
 
  529                                         $tpl->setVariable(
"CMD_CHANGE_CONT_OBJ", 
"changeTargetObject");
 
  530                                         $tpl->setVariable(
"BTN_CHANGE_CONT_OBJ", $this->lng->txt(
"change"));
 
  531                                         $tpl->parseCurrentBlock();
 
  532                                         $mobjs = $this->ilias->account->getClipboardObjects(
"mob");
 
  535                                         foreach ($mobjs as $obj)
 
  537                                                 $objs[$obj[
"title"].
":".$obj[
"id"]] = $obj;
 
  540                                         $tpl->setCurrentBlock(
"chapter_list");
 
  541                                         $tpl->setVariable(
"TXT_CONTENT_OBJECT", $this->lng->txt(
"cont_media_source"));
 
  542                                         $tpl->setVariable(
"TXT_CONT_TITLE", $this->lng->txt(
"cont_personal_clipboard"));
 
  543                                         $tpl->setVariable(
"COLSPAN", 
"2");
 
  545                                         foreach($objs as $obj)
 
  548                                                         "MediaObject", 
"mob", 
"media");
 
  550                                         $tpl->setCurrentBlock(
"chapter_list");
 
  551                                         $tpl->parseCurrentBlock();
 
  555                                         require_once(
"./Modules/MediaPool/classes/class.ilObjMediaPool.php");
 
  558                                         $fobjs = $med_pool->getChilds(
$_SESSION[
"il_link_mep_obj"], 
"fold");
 
  560                                         foreach ($fobjs as $obj)
 
  562                                                 $f2objs[$obj[
"title"].
":".$obj[
"child"]] = $obj;
 
  566                                         $mobjs = $med_pool->getChilds(
$_SESSION[
"il_link_mep_obj"], 
"mob");
 
  568                                         foreach ($mobjs as $obj)
 
  570                                                 $m2objs[$obj[
"title"].
":".$obj[
"child"]] = $obj;
 
  575                                         $objs = array_merge($f2objs, $m2objs);
 
  577                                         $tpl->setCurrentBlock(
"chapter_list");
 
  578                                         $tpl->setVariable(
"TXT_CONTENT_OBJECT", $this->lng->txt(
"mep"));
 
  579                                         $tpl->setVariable(
"TXT_CONT_TITLE", $med_pool->getTitle());
 
  580                                         $tpl->setCurrentBlock(
"change_cont_obj");
 
  581                                         $tpl->setVariable(
"CMD_CHANGE_CONT_OBJ", 
"changeTargetObject");
 
  582                                         $tpl->setVariable(
"BTN_CHANGE_CONT_OBJ", $this->lng->txt(
"change"));
 
  583                                         $tpl->setVariable(
"COLSPAN", 
"2");
 
  584                                         $tpl->parseCurrentBlock();
 
  585                                         if ($parent_id = $med_pool->getParentId(
$_SESSION[
"il_link_mep_obj"]))
 
  587                                                 $css_row = 
"tblrow1";
 
  588                                                 $tpl->setCurrentBlock(
"icon");
 
  590                                                 $tpl->parseCurrentBlock();
 
  591                                                 $tpl->setCurrentBlock(
"link_row");
 
  592                                                 $tpl->setVariable(
"ROWCLASS", $css_row);
 
  593                                                 $tpl->setVariable(
"TXT_CHAPTER", 
"..");
 
  594                                                 $this->ctrl->setParameter($this, 
"mep_fold", $parent_id);
 
  595                                                 if ($ilCtrl->isAsynch())
 
  597                                                         $tpl->setVariable(
"LINK", 
"#");
 
  598                                                         $tpl->setVariable(
"LR_ONCLICK",
 
  599                                                                 " onclick=\"return il.IntLink.setMepPoolFolder('".$parent_id.
"');\" ");
 
  604                                                         $tpl->setVariable(
"LINK",
 
  605                                                                 $this->ctrl->getLinkTarget($this, 
"setMedPoolFolder"));
 
  607                                                 $tpl->parseCurrentBlock();
 
  608                                                 $tpl->setCurrentBlock(
"row");
 
  609                                                 $tpl->parseCurrentBlock();
 
  611                                         foreach($objs as $obj)
 
  613                                                 if($obj[
"type"] == 
"fold")
 
  615                                                         $css_row = ($css_row == 
"tblrow2")
 
  618                                                         $tpl->setCurrentBlock(
"icon");
 
  620                                                         $tpl->parseCurrentBlock();
 
  621                                                         $tpl->setCurrentBlock(
"link_row");
 
  622                                                         $tpl->setVariable(
"ROWCLASS", $css_row);
 
  623                                                         $tpl->setVariable(
"TXT_CHAPTER", $obj[
"title"]);
 
  624                                                         $this->ctrl->setParameter($this, 
"mep_fold", $obj[
"child"]);
 
  625                                                         if ($ilCtrl->isAsynch())
 
  627                                                                 $tpl->setVariable(
"LINK", 
"#");
 
  628                                                                 $tpl->setVariable(
"LR_ONCLICK",
 
  629                                                                         " onclick=\"return il.IntLink.setMepPoolFolder('".$obj[
"child"].
"');\" ");
 
  634                                                                 $tpl->setVariable(
"LINK",
 
  635                                                                         $this->ctrl->getLinkTarget($this, 
"setMedPoolFolder"));
 
  637                                                         $tpl->parseCurrentBlock();
 
  645                                                                         "MediaObject", 
"mob", 
"media");
 
  648                                                 $tpl->setCurrentBlock(
"row");
 
  649                                                 $tpl->parseCurrentBlock();
 
  651                                         $tpl->setCurrentBlock(
"chapter_list");
 
  652                                         $tpl->parseCurrentBlock();
 
  659                                 require_once(
"./Modules/Wiki/classes/class.ilWikiPage.php");
 
  663                                 $tpl->setCurrentBlock(
"chapter_list");
 
  664                                 $tpl->setVariable(
"TXT_CONTENT_OBJECT", $this->lng->txt(
"obj_wiki"));
 
  666                                 $tpl->setCurrentBlock(
"change_cont_obj");
 
  667                                 $tpl->setVariable(
"CMD_CHANGE_CONT_OBJ", 
"changeTargetObject");
 
  668                                 $tpl->setVariable(
"BTN_CHANGE_CONT_OBJ", $this->lng->txt(
"change"));
 
  669                                 $tpl->parseCurrentBlock();
 
  671                                 foreach($wpages as $wpage)
 
  674                                                 "WikiPage", 
"wpage", 
"wpage");
 
  677                                 $tpl->setCurrentBlock(
"chapter_list");
 
  678                                 $tpl->parseCurrentBlock();
 
  682                         case "RepositoryItem":
 
  688                                 if (!is_object($this->uploaded_file))
 
  701                 if ($ilCtrl->isAsynch())
 
  718                 if (!is_object($this->uploaded_file))
 
  720                         $tpl = 
new ilTemplate(
"tpl.link_file.html", 
true, 
true, 
"Modules/LearningModule");
 
  721                         $tpl->setCurrentBlock(
"form");
 
  722                         $tpl->setVariable(
"FORM_ACTION",
 
  723                                 $ilCtrl->getFormAction($this, 
"saveFileLink", 
"", 
true));
 
  724                         $tpl->setVariable(
"TXT_SELECT_FILE", $lng->txt(
"cont_select_file"));
 
  725                         $tpl->setVariable(
"TXT_SAVE_LINK", $lng->txt(
"cont_create_link"));
 
  726                         $tpl->setVariable(
"CMD_SAVE_LINK", 
"saveFileLink");
 
  727                         include_once(
"./Services/Form/classes/class.ilFileInputGUI.php");
 
  730                         $tpl->setVariable(
"INPUT", $fi->getToolbarHTML());
 
  731                         $tpl->parseCurrentBlock();
 
  736                         $tpl = 
new ilTemplate(
"tpl.link_file.html", 
true, 
true, 
"Modules/LearningModule");
 
  737                         $tpl->setCurrentBlock(
"link_js");
 
  741                         $tpl->setVariable(
"TAG_B",
 
  742                                 '[iln dfile=\x22'.$this->uploaded_file->getId().
'\x22]');
 
  743                         $tpl->setVariable(
"TAG_E",
 
  745                         $tpl->setVariable(
"TXT_FILE",
 
  746                                 $this->uploaded_file->getTitle());
 
  757                 $mtpl =& 
new ilTemplate(
"tpl.link_help.html", 
true, 
true, 
"Modules/LearningModule");
 
  760                 if ($_FILES[
"link_file"][
"name"] != 
"")
 
  762                         include_once(
"./Modules/File/classes/class.ilObjFile.php");
 
  764                         $fileObj->setType(
"file");
 
  765                         $fileObj->setTitle($_FILES[
"link_file"][
"name"]);
 
  766                         $fileObj->setDescription(
"");
 
  767                         $fileObj->setFileName($_FILES[
"link_file"][
"name"]);
 
  768                         $fileObj->setFileType($_FILES[
"link_file"][
"type"]);
 
  769                         $fileObj->setFileSize($_FILES[
"link_file"][
"size"]);
 
  770                         $fileObj->setMode(
"filelist");
 
  773                         $fileObj->createDirectory();
 
  774                         $fileObj->raiseUploadError(
false);
 
  775                         $fileObj->getUploadFile($_FILES[
"link_file"][
"tmp_name"],
 
  776                                 $_FILES[
"link_file"][
"name"]);
 
  777                         $this->uploaded_file = $fileObj;
 
  790                 $med =& $mob->getMediaItem(
"Standard");
 
  791                 $target = $med->getThumbnailTarget(
"small");
 
  795                         $tpl->setCurrentBlock(
"thumbnail_link");
 
  800                         $tpl->setCurrentBlock(
"thumbnail_js");
 
  805                         $tpl->setCurrentBlock(
"thumbnail");
 
  810                         $tpl->setCurrentBlock(
"thumb".$suff);
 
  811                         $tpl->setVariable(
"SRC_THUMB", $target);
 
  812                         $tpl->parseCurrentBlock();
 
  816                         $tpl->setVariable(
"NO_THUMB", 
" ");
 
  821                         $tpl->setCurrentBlock(
"thumbnail_link");
 
  826                         $tpl->setCurrentBlock(
"thumbnail_js");
 
  830                         $tpl->setCurrentBlock(
"thumbnail");
 
  832                 $tpl->parseCurrentBlock();
 
  862                 include_once(
"./Services/Link/classes/class.ilLinkTargetObjectExplorer.php");
 
  864                         $ilCtrl->getTargetScript(), 
"do=set"));
 
  865                 if (
$_GET[
"expand"] == 
"")
 
  867                         $expanded = $this->tree->readRootId();
 
  871                         $expanded = 
$_GET[
"expand"];
 
  873                 $exp->setExpand($expanded);
 
  874                 $exp ->setAsynchExpanding(
true);
 
  876                 $exp->setTargetGet(
"sel_id");
 
  877                 $ilCtrl->setParameter($this, 
"target_type", $a_type);
 
  878                 $exp->setParamsGet($this->ctrl->getParameterArray($this, 
"refreshTargetExplorer"));
 
  880                 $exp->addFilter(
"root");
 
  881                 $exp->addFilter(
"cat");
 
  882                 $exp->addFilter(
"grp");
 
  883                 $exp->addFilter(
"fold");
 
  884                 $exp->addFilter(
"crs");
 
  889                                 $exp->addFilter(
"glo");
 
  893                                 $exp->addFilter(
"wiki");
 
  897                                 $exp->addFilter(
"mep");
 
  901                                 $exp->addFilter(
"lm");
 
  902                                 $exp->addFilter(
"dbk");
 
  905                 $exp->setFiltered(
true);
 
  908                 $exp->setClickable(
"cat", 
false);
 
  909                 $exp->setClickable(
"grp", 
false);
 
  910                 $exp->setClickable(
"fold", 
false);
 
  911                 $exp->setClickable(
"crs", 
false);
 
  913                 $exp->setFrameTarget(
"");
 
  916                 return $exp->getOutput();
 
  927                 if(
$_GET[
"do"] == 
"set")
 
  929                         switch (
$_GET[
"target_type"])
 
  953                         if (!empty(
$_GET[
"target_type"]))
 
  955                                 $a_type = 
$_GET[
"target_type"];
 
  960                                 if ($this->link_type == 
"GlossaryItem")
 
  964                                 if ($this->link_type == 
"Media")
 
  968                                 if ($this->link_type == 
"WikiPage")
 
  975                 $tpl =& 
new ilTemplate(
"tpl.link_help_explorer.html", 
true, 
true, 
"Modules/LearningModule");
 
  979                 if ($a_type == 
"glo")
 
  981                         $tpl->setVariable(
"TXT_EXPLORER_HEADER", $this->lng->txt(
"cont_choose_glossary"));
 
  983                 if ($a_type == 
"wiki")
 
  985                         $tpl->setVariable(
"TXT_EXPLORER_HEADER", $this->lng->txt(
"cont_choose_wiki"));
 
  987                 else if ($a_type == 
"mep")
 
  989                         $tpl->setVariable(
"TXT_EXPLORER_HEADER", $this->lng->txt(
"cont_choose_media_source"));
 
  993                         $tpl->setVariable(
"TXT_EXPLORER_HEADER", $this->lng->txt(
"cont_choose_cont_obj"));
 
  995                 $tpl->setVariable(
"EXPLORER",$output);
 
  996                 $tpl->setVariable(
"ACTION", $this->ctrl->getFormAction($this, 
"resetLinkList", 
"", 
true));
 
  997                 $tpl->setVariable(
"BTN_RESET", 
"resetLinkList");
 
  998                 $tpl->setVariable(
"TXT_RESET", $this->lng->txt(
"back"));
 
 1000                 if ($a_type == 
"mep")
 
 1002                         $tpl->setCurrentBlock(
"sel_clipboard");
 
 1003                         $this->ctrl->setParameter($this, 
"do", 
"set");
 
 1004                         if ($ilCtrl->isAsynch())
 
 1006                                 $tpl->setVariable(
"LINK_CLIPBOARD", 
"#");
 
 1007                                 $tpl->setVariable(
"CLIPBOARD_ONCLICK",
 
 1008                                         " onclick=\"return il.IntLink.selectLinkTargetObject('mep', 0);\" ");
 
 1013                                 $tpl->setVariable(
"LINK_CLIPBOARD", $this->ctrl->getLinkTarget($this, 
"changeTargetObject"));
 
 1015                         $tpl->setVariable(
"TXT_PERS_CLIPBOARD", $this->lng->txt(
"clipboard"));
 
 1016                         $tpl->parseCurrentBlock();
 
 1019                 $tpl->parseCurrentBlock();
 
 1047                         $a_type = 
$_GET[
"target_type"];
 
 1050                 include_once 
"./Modules/LearningModule/classes/class.ilIntLinkRepItemExplorer.php";
 
 1052                         $this->ctrl->getTargetScript(), 
"do=set"));
 
 1053                 if (
$_GET[
"expand"] == 
"")
 
 1055                         if((
int)
$_GET[
"ref_id"])
 
 1058                                 $expanded = (int)$_GET[
"ref_id"];
 
 1062                                 $expanded = $this->tree->readRootId();
 
 1067                         $expanded = 
$_GET[
"expand"];
 
 1069                 $exp->setMode($this->mode);
 
 1071                 $exp->setExpand($expanded);
 
 1073                 $exp->setTargetGet(
"sel_id");
 
 1074                 $this->ctrl->setParameter($this, 
"target_type", $a_type);
 
 1075                 $exp->setParamsGet($this->ctrl->getParameterArray($this, 
"refreshRepositorySelector"));
 
 1078                 $exp->setFiltered(
true);
 
 1081                 global $objDefinition;
 
 1083                 $rtypes = $objDefinition->getAllRepositoryTypes();
 
 1085                 $exp->addFilter(
"root");
 
 1086                 foreach ($rtypes as 
$t)
 
 1088                         $exp->addFilter($t);
 
 1091                 $sel_types = $rtypes;
 
 1092                 $exp->setSelectableTypes($sel_types);
 
 1095                 $exp->setFrameTarget(
"");
 
 1097                 $output = $exp->getOutput();
 
 1132                 include_once(
"./Services/COPage/classes/class.ilPageEditorGUI.php");
 
 1134                 if (self::_doJSEditing())
 
 1150                 include_once(
"./Services/YUI/classes/class.ilYuiUtil.php");
 
 1154                 $tpl->addJavaScript(
"./Services/UIComponent/Explorer/js/ilExplorer.js");
 
 1155                 $tpl->addJavascript(
"./Services/Link/js/ilIntLink.js");
 
 1157                 $ltpl = 
new ilTemplate(
"tpl.int_link_panel.html", 
true, 
true, 
"Services/Link");
 
 1158                 if ($a_move_to_body)
 
 1160                         $ltpl->touchBlock(
"move_to_body");
 
 1162                 $ltpl->setVariable(
"IL_INT_LINK_URL", $a_url);
 
 1164                 return $ltpl->get();
 
 1171                 $a_anchors = array())
 
 1173                 $chapterRowBlock = 
"chapter_row";
 
 1174                 $anchor_row_block = 
"anchor_link";
 
 1178                         $chapterRowBlock .= 
"_js";
 
 1179                         $anchor_row_block .= 
"_js";
 
 1182                 $target_str = ($this->link_target == 
"")
 
 1184                         : 
" target=\"".$this->link_target.
"\"";
 
 1186                 if (count($a_anchors) > 0)
 
 1188                         foreach ($a_anchors as $anchor)
 
 1190                                 $tpl->setCurrentBlock($anchor_row_block);
 
 1191                                 $tpl->setVariable(
"ALINK_BEGIN",
 
 1193                                 $tpl->setVariable(
"ALINK_END", 
"[/iln]");
 
 1194                                 $tpl->setVariable(
"TXT_LINK", 
"#".$anchor);
 
 1195                                 $tpl->parseCurrentBlock();
 
 1199                 $this->css_row = ($this->css_row == 
"tblrow1")
 
 1205                         require_once(
"./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php");
 
 1206                         require_once(
"./Services/MediaObjects/classes/class.ilImageMapEditorGUI.php");
 
 1208                         if ($a_type == 
"MediaObject")
 
 1212                         $tpl->setCurrentBlock(
"link_row");
 
 1213                         $tpl->setVariable(
"ROWCLASS", $this->css_row);
 
 1214                         $tpl->setVariable(
"TXT_CHAPTER", $a_title);
 
 1216                         $tpl->setVariable(
"LINK",
 
 1218                                 "linktype=".$a_type.
 
 1219                                 "&linktarget=il__".$a_type_short.
"_".$a_obj_id.
 
 1220                                 "&linktargetframe=".$this->link_target));
 
 1221                         $tpl->parseCurrentBlock();
 
 1225                         $tpl->setCurrentBlock($chapterRowBlock);
 
 1226                         if ($a_type == 
"MediaObject")
 
 1229                                 $tpl->setCurrentBlock($chapterRowBlock);
 
 1231                         $tpl->setVariable(
"ROWCLASS", $this->css_row);
 
 1232                         $tpl->setVariable(
"TXT_CHAPTER", $a_title);
 
 1237                         if ($a_type == 
"MediaObject" && empty($target_str))
 
 1239                                 $tpl->setVariable(
"LINK_BEGIN",
 
 1241                                 $tpl->setVariable(
"LINK_END", 
"");
 
 1245                                 $tpl->setVariable(
"LINK_BEGIN",
 
 1247                                 $tpl->setVariable(
"LINK_END", 
"[/iln]");
 
 1249                         $tpl->parseCurrentBlock();
 
 1252                 $tpl->setCurrentBlock(
"row");
 
 1253                 $tpl->parseCurrentBlock();