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"])) ||
 
   44                 $this->ilias =& $ilias;
 
   46                 $this->ctrl->saveParameter($this, array(
"linkmode", 
"target_type"));
 
   47                 $this->default_type = $a_default_type;
 
   48                 $this->default_obj = $a_default_obj;
 
   49                 $this->filter_link_types = array();
 
   61                 $this->ltypes = array(
 
   62                         "StructureObject" => $lng->txt(
"cont_lk_chapter"),
 
   63                         "StructureObject_New" => $lng->txt(
"cont_lk_chapter_new"),
 
   64                         "PageObject" => $lng->txt(
"cont_lk_page"),
 
   65                         "PageObject_FAQ" => $lng->txt(
"cont_lk_page_faq"),
 
   66                         "PageObject_New" => $lng->txt(
"cont_lk_page_new"),
 
   67                         "GlossaryItem" => $lng->txt(
"cont_lk_term"),
 
   68                         "GlossaryItem_New" => $lng->txt(
"cont_lk_term_new"),
 
   69                         "Media" => $lng->txt(
"cont_lk_media_inline"),
 
   70                         "Media_Media" => $lng->txt(
"cont_lk_media_media"),
 
   71                         "Media_FAQ" => $lng->txt(
"cont_lk_media_faq"),
 
   72                         "Media_New" => $lng->txt(
"cont_lk_media_new"),
 
   73                         "File" => $lng->txt(
"cont_lk_file"),
 
   74                         "RepositoryItem" => $lng->txt(
"cont_repository_item")
 
   84                 $ltype = (
$_SESSION[
"il_link_type"] == 
"")
 
   87                 $ltype_arr = explode(
"_", $ltype);
 
   89                 if (!isset($this->ltypes[$ltype_arr[0]]) &&
 
   90                         !isset($this->ltypes[$ltype]))
 
   96                         $this->link_type = ($ltype_arr[0] == 
"")
 
   99                         $this->link_target = $ltype_arr[1];
 
  108                 $this->mode = $a_mode;
 
  113                 $this->set_link_script = $a_script;
 
  118                 $this->
return = $a_return;
 
  128                 $this->filter_link_types[] = $a_link_type;
 
  138                 $this->filter_white_list = $a_white_list;
 
  144                 $next_class = $this->ctrl->getNextClass($this);
 
  146                 $cmd = $this->ctrl->getCmd(
"showLinkHelp");
 
  173                 if ($this->
return == 
"")
 
  175                         $this->ctrl->returnToParent($this);
 
  190                 include_once(
"./Services/COPage/classes/class.ilPageEditorGUI.php");
 
  191                 if (self::_doJSEditing())
 
  193                         $str = htmlspecialchars($str, ENT_QUOTES);
 
  207                 if (!$this->filter_white_list)
 
  209                         foreach($this->filter_link_types as 
$link_type)
 
  211                                 unset($this->ltypes[$link_type]);
 
  217                         foreach($this->ltypes as $k => $l)
 
  219                                 if (in_array($k, $this->filter_link_types))
 
  231                 $ltype = ($this->link_target != 
"")
 
  232                         ? $this->link_type.
"_".$this->link_target
 
  238                 switch($this->link_type)
 
  241                         case "StructureObject":
 
  242                                 if  (empty(
$_SESSION[
"il_link_cont_obj"]) &&
 
  243                                         ($def_type != 
"mep" && $def_type != 
"glo"))
 
  250                                 if  (empty(
$_SESSION[
"il_link_glossary"]) && $def_type == 
"glo")
 
  257                                 if  (empty(
$_SESSION[
"il_link_mep"]) && $def_type == 
"mep")
 
  271                 $target_str = ($this->link_target == 
"")
 
  273                         : 
" target=\"".$this->link_target.
"\"";
 
  275                 if(($this->link_type == 
"GlossaryItem") &&
 
  282                 if(($this->link_type == 
"PageObject" || $this->link_type == 
"StructureObject") &&
 
  285                                 array(
"lm", 
"dbk"))))
 
  289                 if ($ilCtrl->isAsynch())
 
  291                         $tpl = 
new ilTemplate(
"tpl.link_help_asynch.html", 
true, 
true, 
"Modules/LearningModule");
 
  295                         $tpl =& 
new ilTemplate(
"tpl.link_help.html", 
true, 
true, 
"Modules/LearningModule");
 
  299                 switch($this->link_type)
 
  302                                 $this->ctrl->setParameter($this, 
"target_type", 
"glo");
 
  306                         case "StructureObject":
 
  307                                 $this->ctrl->setParameter($this, 
"target_type", 
"cont_obj");
 
  311                                 $this->ctrl->setParameter($this, 
"target_type", 
"mep");
 
  322                 $tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this, 
"changeLinkType", 
"", 
true));
 
  323                 $tpl->setVariable(
"FORMACTION2", $this->ctrl->getFormAction($this));
 
  324                 $tpl->setVariable(
"TXT_HELP_HEADER", $this->lng->txt(
"cont_link_select"));
 
  325                 $tpl->setVariable(
"TXT_TYPE", $this->lng->txt(
"cont_link_type"));
 
  331                         "ltype", $this->ltypes, 
false, 
true, 
"0", 
"", array(
"id" => 
"ilIntLinkTypeSelector"));
 
  332                 $tpl->setVariable(
"SELECT_TYPE", $select_ltype);
 
  333                 $tpl->setVariable(
"CMD_CHANGETYPE", 
"changeLinkType");
 
  334                 $tpl->setVariable(
"BTN_CHANGETYPE", $this->lng->txt(
"cont_change_type"));
 
  342                         $tpl->setVariable(
"CMD_CLOSE", 
"closeLinkHelp");
 
  343                         $tpl->setVariable(
"BTN_CLOSE", $this->lng->txt(
"close"));
 
  346                 $chapterRowBlock = 
"chapter_row";
 
  347                 $anchor_row_block = 
"anchor_link";
 
  350                         $chapterRowBlock .= 
"_js";
 
  351                         $anchor_row_block .= 
"_js";
 
  358                 switch($this->link_type)
 
  364                                         require_once(
"./Modules/LearningModule/classes/class.ilObjLearningModule.php");
 
  367                                 else if ($type == 
"dbk")
 
  369                                         require_once(
"./Modules/LearningModule/classes/class.ilObjDlBook.php");
 
  374                                 $ctree = $cont_obj->getLMTree();
 
  375                                 $nodes = $ctree->getSubtree($ctree->getNodeData($ctree->getRootId()));
 
  376                                 $tpl->setCurrentBlock(
"chapter_list");
 
  377                                 $tpl->setVariable(
"TXT_CONTENT_OBJECT", $this->lng->txt(
"cont_content_obj"));
 
  378                                 $tpl->setVariable(
"TXT_CONT_TITLE", $cont_obj->getTitle());
 
  379                                 $tpl->setCurrentBlock(
"change_cont_obj");
 
  380                                 $tpl->setVariable(
"CMD_CHANGE_CONT_OBJ", 
"changeTargetObject");
 
  381                                 $tpl->setVariable(
"BTN_CHANGE_CONT_OBJ", $this->lng->txt(
"change"));
 
  382                                 $tpl->parseCurrentBlock();
 
  384                                 foreach($nodes as $node)
 
  386                                         if($node[
"type"] == 
"st")
 
  388                                                 $tpl->setCurrentBlock(
"chapter_row");
 
  389                                                 $tpl->setVariable(
"TXT_CHAPTER", $node[
"title"]);
 
  390                                                 $tpl->setVariable(
"ROWCLASS", 
"tblrow1");
 
  393                                                 $tpl->parseCurrentBlock();
 
  394                                                 $tpl->setCurrentBlock(
"row");
 
  395                                                 $tpl->parseCurrentBlock();
 
  398                                         if($node[
"type"] == 
"pg")
 
  401                                                         "PageObject", 
"pg", 
"page",
 
  408                                 $free_pages = array();
 
  409                                 foreach ($pages as $page)
 
  411                                         if (!$ctree->isInTree($page[
"obj_id"]))
 
  413                                                 $free_pages[] = $page;
 
  416                                 if(count($free_pages) > 0)
 
  418                                         $tpl->setCurrentBlock(str_replace(
"_js",
"",$chapterRowBlock));
 
  419                                         $tpl->setVariable(
"TXT_CHAPTER", $this->lng->txt(
"cont_free_pages"));
 
  420                                         $tpl->setVariable(
"ROWCLASS", 
"tblrow1");
 
  421                                         $tpl->parseCurrentBlock();
 
  423                                         foreach ($free_pages as $node)
 
  426                                                         "PageObject", 
"pg", 
"page",
 
  431                                 $tpl->setCurrentBlock(
"chapter_list");
 
  432                                 $tpl->parseCurrentBlock();
 
  437                         case "StructureObject":
 
  448                                         require_once(
"./Modules/LearningModule/classes/class.ilObjLearningModule.php");
 
  451                                 else if ($type == 
"dbk")
 
  453                                         require_once(
"./Modules/LearningModule/classes/class.ilObjDlBook.php");
 
  458                                 $ctree =& $cont_obj->getLMTree();
 
  459                                 $nodes = $ctree->getSubtree($ctree->getNodeData($ctree->getRootId()));
 
  460                                 $tpl->setCurrentBlock(
"chapter_list");
 
  461                                 $tpl->setVariable(
"TXT_CONTENT_OBJECT", $this->lng->txt(
"cont_content_obj"));
 
  462                                 $tpl->setVariable(
"TXT_CONT_TITLE", $cont_obj->getTitle());
 
  463                                 $tpl->setCurrentBlock(
"change_cont_obj");
 
  464                                 $tpl->setVariable(
"CMD_CHANGE_CONT_OBJ", 
"changeTargetObject");
 
  465                                 $tpl->setVariable(
"BTN_CHANGE_CONT_OBJ", $this->lng->txt(
"change"));
 
  466                                 $tpl->parseCurrentBlock();
 
  468                                 foreach($nodes as $node)
 
  470                                         if($node[
"type"] == 
"st")
 
  473                                                         "StructureObject", 
"st", 
"chap");
 
  476                                 $tpl->setCurrentBlock(
"chapter_list");
 
  477                                 $tpl->parseCurrentBlock();
 
  482                                 require_once(
"./Modules/Glossary/classes/class.ilObjGlossary.php");
 
  486                                 $terms = $glossary->getTermList();
 
  487                                 $tpl->setCurrentBlock(
"chapter_list");
 
  488                                 $tpl->setVariable(
"TXT_CONTENT_OBJECT", $this->lng->txt(
"glossary"));
 
  489                                 $tpl->setVariable(
"TXT_CONT_TITLE", $glossary->getTitle());
 
  490                                 $tpl->setCurrentBlock(
"change_cont_obj");
 
  491                                 $tpl->setVariable(
"CMD_CHANGE_CONT_OBJ", 
"changeTargetObject");
 
  492                                 $tpl->setVariable(
"BTN_CHANGE_CONT_OBJ", $this->lng->txt(
"change"));
 
  493                                 $tpl->parseCurrentBlock();
 
  495                                 foreach($terms as $term)
 
  498                                                 "GlossaryItem", 
"git", 
"term");
 
  501                                 $tpl->setCurrentBlock(
"chapter_list");
 
  502                                 $tpl->parseCurrentBlock();
 
  507                                 include_once(
"./Modules/MediaPool/classes/class.ilMediaPoolItem.php");
 
  512                                         $tpl->setCurrentBlock(
"change_cont_obj");
 
  513                                         $tpl->setVariable(
"CMD_CHANGE_CONT_OBJ", 
"changeTargetObject");
 
  514                                         $tpl->setVariable(
"BTN_CHANGE_CONT_OBJ", $this->lng->txt(
"change"));
 
  515                                         $tpl->parseCurrentBlock();
 
  516                                         $mobjs = $this->ilias->account->getClipboardObjects(
"mob");
 
  519                                         foreach ($mobjs as $obj)
 
  521                                                 $objs[$obj[
"title"].
":".$obj[
"id"]] = $obj;
 
  524                                         $tpl->setCurrentBlock(
"chapter_list");
 
  525                                         $tpl->setVariable(
"TXT_CONTENT_OBJECT", $this->lng->txt(
"cont_media_source"));
 
  526                                         $tpl->setVariable(
"TXT_CONT_TITLE", $this->lng->txt(
"cont_personal_clipboard"));
 
  527                                         $tpl->setVariable(
"COLSPAN", 
"2");
 
  529                                         foreach($objs as $obj)
 
  532                                                         "MediaObject", 
"mob", 
"media");
 
  534                                         $tpl->setCurrentBlock(
"chapter_list");
 
  535                                         $tpl->parseCurrentBlock();
 
  539                                         require_once(
"./Modules/MediaPool/classes/class.ilObjMediaPool.php");
 
  542                                         $fobjs = $med_pool->getChilds(
$_SESSION[
"il_link_mep_obj"], 
"fold");
 
  544                                         foreach ($fobjs as $obj)
 
  546                                                 $f2objs[$obj[
"title"].
":".$obj[
"child"]] = $obj;
 
  550                                         $mobjs = $med_pool->getChilds(
$_SESSION[
"il_link_mep_obj"], 
"mob");
 
  552                                         foreach ($mobjs as $obj)
 
  554                                                 $m2objs[$obj[
"title"].
":".$obj[
"child"]] = $obj;
 
  559                                         $objs = array_merge($f2objs, $m2objs);
 
  561                                         $tpl->setCurrentBlock(
"chapter_list");
 
  562                                         $tpl->setVariable(
"TXT_CONTENT_OBJECT", $this->lng->txt(
"mep"));
 
  563                                         $tpl->setVariable(
"TXT_CONT_TITLE", $med_pool->getTitle());
 
  564                                         $tpl->setCurrentBlock(
"change_cont_obj");
 
  565                                         $tpl->setVariable(
"CMD_CHANGE_CONT_OBJ", 
"changeTargetObject");
 
  566                                         $tpl->setVariable(
"BTN_CHANGE_CONT_OBJ", $this->lng->txt(
"change"));
 
  567                                         $tpl->setVariable(
"COLSPAN", 
"2");
 
  568                                         $tpl->parseCurrentBlock();
 
  569                                         if ($parent_id = $med_pool->getParentId(
$_SESSION[
"il_link_mep_obj"]))
 
  571                                                 $css_row = 
"tblrow1";
 
  572                                                 $tpl->setCurrentBlock(
"icon");
 
  574                                                 $tpl->parseCurrentBlock();
 
  575                                                 $tpl->setCurrentBlock(
"link_row");
 
  576                                                 $tpl->setVariable(
"ROWCLASS", $css_row);
 
  577                                                 $tpl->setVariable(
"TXT_CHAPTER", 
"..");
 
  578                                                 $this->ctrl->setParameter($this, 
"mep_fold", $parent_id);
 
  579                                                 if ($ilCtrl->isAsynch())
 
  581                                                         $tpl->setVariable(
"LINK", 
"#");
 
  582                                                         $tpl->setVariable(
"LR_ONCLICK",
 
  583                                                                 " onclick=\"return il.IntLink.setMepPoolFolder('".$parent_id.
"');\" ");
 
  588                                                         $tpl->setVariable(
"LINK",
 
  589                                                                 $this->ctrl->getLinkTarget($this, 
"setMedPoolFolder"));
 
  591                                                 $tpl->parseCurrentBlock();
 
  592                                                 $tpl->setCurrentBlock(
"row");
 
  593                                                 $tpl->parseCurrentBlock();
 
  595                                         foreach($objs as $obj)
 
  597                                                 if($obj[
"type"] == 
"fold")
 
  599                                                         $css_row = ($css_row == 
"tblrow2")
 
  602                                                         $tpl->setCurrentBlock(
"icon");
 
  604                                                         $tpl->parseCurrentBlock();
 
  605                                                         $tpl->setCurrentBlock(
"link_row");
 
  606                                                         $tpl->setVariable(
"ROWCLASS", $css_row);
 
  607                                                         $tpl->setVariable(
"TXT_CHAPTER", $obj[
"title"]);
 
  608                                                         $this->ctrl->setParameter($this, 
"mep_fold", $obj[
"child"]);
 
  609                                                         if ($ilCtrl->isAsynch())
 
  611                                                                 $tpl->setVariable(
"LINK", 
"#");
 
  612                                                                 $tpl->setVariable(
"LR_ONCLICK",
 
  613                                                                         " onclick=\"return il.IntLink.setMepPoolFolder('".$obj[
"child"].
"');\" ");
 
  618                                                                 $tpl->setVariable(
"LINK",
 
  619                                                                         $this->ctrl->getLinkTarget($this, 
"setMedPoolFolder"));
 
  621                                                         $tpl->parseCurrentBlock();
 
  629                                                                         "MediaObject", 
"mob", 
"media");
 
  632                                                 $tpl->setCurrentBlock(
"row");
 
  633                                                 $tpl->parseCurrentBlock();
 
  635                                         $tpl->setCurrentBlock(
"chapter_list");
 
  636                                         $tpl->parseCurrentBlock();
 
  641                         case "RepositoryItem":
 
  647                                 if (!is_object($this->uploaded_file))
 
  660                 if ($ilCtrl->isAsynch())
 
  677                 if (!is_object($this->uploaded_file))
 
  679                         $tpl = 
new ilTemplate(
"tpl.link_file.html", 
true, 
true, 
"Modules/LearningModule");
 
  680                         $tpl->setCurrentBlock(
"form");
 
  681                         $tpl->setVariable(
"FORM_ACTION",
 
  682                                 $ilCtrl->getFormAction($this, 
"saveFileLink", 
"", 
true));
 
  683                         $tpl->setVariable(
"TXT_SELECT_FILE", $lng->txt(
"cont_select_file"));
 
  684                         $tpl->setVariable(
"TXT_SAVE_LINK", $lng->txt(
"cont_create_link"));
 
  685                         $tpl->setVariable(
"CMD_SAVE_LINK", 
"saveFileLink");
 
  686                         include_once(
"./Services/Form/classes/class.ilFileInputGUI.php");
 
  689                         $tpl->setVariable(
"INPUT", $fi->getToolbarHTML());
 
  690                         $tpl->parseCurrentBlock();
 
  695                         $tpl = 
new ilTemplate(
"tpl.link_file.html", 
true, 
true, 
"Modules/LearningModule");
 
  696                         $tpl->setCurrentBlock(
"link_js");
 
  700                         $tpl->setVariable(
"TAG_B",
 
  701                                 '[iln dfile=\x22'.$this->uploaded_file->getId().
'\x22]');
 
  702                         $tpl->setVariable(
"TAG_E",
 
  704                         $tpl->setVariable(
"TXT_FILE",
 
  705                                 $this->uploaded_file->getTitle());
 
  716                 $mtpl =& 
new ilTemplate(
"tpl.link_help.html", 
true, 
true, 
"Modules/LearningModule");
 
  719                 if ($_FILES[
"link_file"][
"name"] != 
"")
 
  721                         include_once(
"./Modules/File/classes/class.ilObjFile.php");
 
  723                         $fileObj->setType(
"file");
 
  724                         $fileObj->setTitle($_FILES[
"link_file"][
"name"]);
 
  725                         $fileObj->setDescription(
"");
 
  726                         $fileObj->setFileName($_FILES[
"link_file"][
"name"]);
 
  727                         $fileObj->setFileType($_FILES[
"link_file"][
"type"]);
 
  728                         $fileObj->setFileSize($_FILES[
"link_file"][
"size"]);
 
  729                         $fileObj->setMode(
"filelist");
 
  732                         $fileObj->createDirectory();
 
  733                         $fileObj->raiseUploadError(
false);
 
  734                         $fileObj->getUploadFile($_FILES[
"link_file"][
"tmp_name"],
 
  735                                 $_FILES[
"link_file"][
"name"]);
 
  736                         $this->uploaded_file = $fileObj;
 
  749                 $med =& $mob->getMediaItem(
"Standard");
 
  750                 $target = $med->getThumbnailTarget(
"small");
 
  754                         $tpl->setCurrentBlock(
"thumbnail_link");
 
  759                         $tpl->setCurrentBlock(
"thumbnail_js");
 
  764                         $tpl->setCurrentBlock(
"thumbnail");
 
  769                         $tpl->setCurrentBlock(
"thumb".$suff);
 
  770                         $tpl->setVariable(
"SRC_THUMB", $target);
 
  771                         $tpl->parseCurrentBlock();
 
  775                         $tpl->setVariable(
"NO_THUMB", 
" ");
 
  780                         $tpl->setCurrentBlock(
"thumbnail_link");
 
  785                         $tpl->setCurrentBlock(
"thumbnail_js");
 
  789                         $tpl->setCurrentBlock(
"thumbnail");
 
  791                 $tpl->parseCurrentBlock();
 
  821                 include_once(
"./Services/Link/classes/class.ilLinkTargetObjectExplorer.php");
 
  823                         $ilCtrl->getTargetScript(), 
"do=set"));
 
  824                 if (
$_GET[
"expand"] == 
"")
 
  826                         $expanded = $this->tree->readRootId();
 
  830                         $expanded = 
$_GET[
"expand"];
 
  832                 $exp->setExpand($expanded);
 
  833                 $exp ->setAsynchExpanding(
true);
 
  835                 $exp->setTargetGet(
"sel_id");
 
  836                 $ilCtrl->setParameter($this, 
"target_type", $a_type);
 
  837                 $exp->setParamsGet($this->ctrl->getParameterArray($this, 
"refreshTargetExplorer"));
 
  839                 $exp->addFilter(
"root");
 
  840                 $exp->addFilter(
"cat");
 
  841                 $exp->addFilter(
"grp");
 
  842                 $exp->addFilter(
"fold");
 
  843                 $exp->addFilter(
"crs");
 
  848                                 $exp->addFilter(
"glo");
 
  852                                 $exp->addFilter(
"mep");
 
  856                                 $exp->addFilter(
"lm");
 
  857                                 $exp->addFilter(
"dbk");
 
  860                 $exp->setFiltered(
true);
 
  863                 $exp->setClickable(
"cat", 
false);
 
  864                 $exp->setClickable(
"grp", 
false);
 
  865                 $exp->setClickable(
"fold", 
false);
 
  866                 $exp->setClickable(
"crs", 
false);
 
  868                 $exp->setFrameTarget(
"");
 
  871                 return $exp->getOutput();
 
  882                 if(
$_GET[
"do"] == 
"set")
 
  884                         switch (
$_GET[
"target_type"])
 
  904                         if (!empty(
$_GET[
"target_type"]))
 
  906                                 $a_type = 
$_GET[
"target_type"];
 
  911                                 if ($this->link_type == 
"GlossaryItem")
 
  915                                 if ($this->link_type == 
"Media")
 
  922                 $tpl =& 
new ilTemplate(
"tpl.link_help_explorer.html", 
true, 
true, 
"Modules/LearningModule");
 
  926                 if ($a_type == 
"glo")
 
  928                         $tpl->setVariable(
"TXT_EXPLORER_HEADER", $this->lng->txt(
"cont_choose_glossary"));
 
  930                 else if ($a_type == 
"mep")
 
  932                         $tpl->setVariable(
"TXT_EXPLORER_HEADER", $this->lng->txt(
"cont_choose_media_source"));
 
  936                         $tpl->setVariable(
"TXT_EXPLORER_HEADER", $this->lng->txt(
"cont_choose_cont_obj"));
 
  938                 $tpl->setVariable(
"EXPLORER",$output);
 
  939                 $tpl->setVariable(
"ACTION", $this->ctrl->getFormAction($this, 
"resetLinkList", 
"", 
true));
 
  940                 $tpl->setVariable(
"BTN_RESET", 
"resetLinkList");
 
  941                 $tpl->setVariable(
"TXT_RESET", $this->lng->txt(
"back"));
 
  943                 if ($a_type == 
"mep")
 
  945                         $tpl->setCurrentBlock(
"sel_clipboard");
 
  946                         $this->ctrl->setParameter($this, 
"do", 
"set");
 
  947                         if ($ilCtrl->isAsynch())
 
  949                                 $tpl->setVariable(
"LINK_CLIPBOARD", 
"#");
 
  950                                 $tpl->setVariable(
"CLIPBOARD_ONCLICK",
 
  951                                         " onclick=\"return il.IntLink.selectLinkTargetObject('mep', 0);\" ");
 
  956                                 $tpl->setVariable(
"LINK_CLIPBOARD", $this->ctrl->getLinkTarget($this, 
"changeTargetObject"));
 
  958                         $tpl->setVariable(
"TXT_PERS_CLIPBOARD", $this->lng->txt(
"clipboard"));
 
  959                         $tpl->parseCurrentBlock();
 
  962                 $tpl->parseCurrentBlock();
 
  990                         $a_type = 
$_GET[
"target_type"];
 
  993                 include_once 
"./Modules/LearningModule/classes/class.ilIntLinkRepItemExplorer.php";
 
  995                         $this->ctrl->getTargetScript(), 
"do=set"));
 
  996                 if (
$_GET[
"expand"] == 
"")
 
  998                         $expanded = $this->tree->readRootId();
 
 1002                         $expanded = 
$_GET[
"expand"];
 
 1004                 $exp->setMode($this->mode);
 
 1006                 $exp->setExpand($expanded);
 
 1008                 $exp->setTargetGet(
"sel_id");
 
 1009                 $this->ctrl->setParameter($this, 
"target_type", $a_type);
 
 1010                 $exp->setParamsGet($this->ctrl->getParameterArray($this, 
"refreshRepositorySelector"));
 
 1013                 $exp->setFiltered(
true);
 
 1015                 $exp->addFilter(
"root");
 
 1016                 $exp->addFilter(
"cat");
 
 1017                 $exp->addFilter(
"grp");
 
 1018                 $exp->addFilter(
"fold");
 
 1019                 $exp->addFilter(
"crs");
 
 1020                 $exp->addFilter(
"lm");
 
 1021                 $exp->addFilter(
"htlm");
 
 1022                 $exp->addFilter(
"dbk");
 
 1023                 $exp->addFilter(
"glo");
 
 1024                 $exp->addFilter(
"frm");
 
 1025                 $exp->addFilter(
"exc");
 
 1026                 $exp->addFilter(
"tst");
 
 1027                 $exp->addFilter(
"svy");
 
 1028                 $exp->addFilter(
"webr");
 
 1029                 $exp->addFilter(
"file");
 
 1030                 $exp->addFilter(
"chat");
 
 1031                 $exp->addFilter(
"sahs");
 
 1032                 $exp->addFilter(
"mcst");
 
 1033                 $exp->addFilter(
"wiki");
 
 1034                 $exp->addFilter(
"mep");
 
 1036                 $sel_types = array(
'lm',
'dbk',
'htlm',
'glo',
'frm',
'exc',
'tst',
'svy',
'webr',
'chat',
 
 1037                         'cat',
'crs',
'grp',
'file',
'fold',
'sahs',
'mcst',
'wiki',
'mep');
 
 1038                 $exp->setSelectableTypes($sel_types);
 
 1041                 $exp->setFrameTarget(
"");
 
 1043                 $output = $exp->getOutput();
 
 1078                 include_once(
"./Services/COPage/classes/class.ilPageEditorGUI.php");
 
 1080                 if (self::_doJSEditing())
 
 1096                 include_once(
"./Services/YUI/classes/class.ilYuiUtil.php");
 
 1100                 $tpl->addJavaScript(
"./Services/UIComponent/Explorer/js/ilExplorer.js");
 
 1101                 $tpl->addJavascript(
"./Services/Link/js/ilIntLink.js");
 
 1103                 $ltpl = 
new ilTemplate(
"tpl.int_link_panel.html", 
true, 
true, 
"Services/Link");
 
 1104                 $ltpl->setVariable(
"IL_INT_LINK_URL", $a_url);
 
 1106                 return $ltpl->get();
 
 1113                 $a_anchors = array())
 
 1115                 $chapterRowBlock = 
"chapter_row";
 
 1116                 $anchor_row_block = 
"anchor_link";
 
 1120                         $chapterRowBlock .= 
"_js";
 
 1121                         $anchor_row_block .= 
"_js";
 
 1124                 $target_str = ($this->link_target == 
"")
 
 1126                         : 
" target=\"".$this->link_target.
"\"";
 
 1128                 if (count($a_anchors) > 0)
 
 1130                         foreach ($a_anchors as $anchor)
 
 1132                                 $tpl->setCurrentBlock($anchor_row_block);
 
 1133                                 $tpl->setVariable(
"ALINK_BEGIN",
 
 1135                                 $tpl->setVariable(
"ALINK_END", 
"[/iln]");
 
 1136                                 $tpl->setVariable(
"TXT_LINK", 
"#".$anchor);
 
 1137                                 $tpl->parseCurrentBlock();
 
 1141                 $this->css_row = ($this->css_row == 
"tblrow1")
 
 1147                         require_once(
"./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php");
 
 1148                         require_once(
"./Services/MediaObjects/classes/class.ilImageMapEditorGUI.php");
 
 1150                         if ($a_type == 
"MediaObject")
 
 1154                         $tpl->setCurrentBlock(
"link_row");
 
 1155                         $tpl->setVariable(
"ROWCLASS", $this->css_row);
 
 1156                         $tpl->setVariable(
"TXT_CHAPTER", $a_title);
 
 1158                         $tpl->setVariable(
"LINK",
 
 1160                                 "linktype=".$a_type.
 
 1161                                 "&linktarget=il__".$a_type_short.
"_".$a_obj_id.
 
 1162                                 "&linktargetframe=".$this->link_target));
 
 1163                         $tpl->parseCurrentBlock();
 
 1167                         $tpl->setCurrentBlock($chapterRowBlock);
 
 1168                         if ($a_type == 
"MediaObject")
 
 1171                                 $tpl->setCurrentBlock($chapterRowBlock);
 
 1173                         $tpl->setVariable(
"ROWCLASS", $this->css_row);
 
 1174                         $tpl->setVariable(
"TXT_CHAPTER", $a_title);
 
 1179                         if ($a_type == 
"MediaObject" && empty($target_str))
 
 1181                                 $tpl->setVariable(
"LINK_BEGIN",
 
 1183                                 $tpl->setVariable(
"LINK_END", 
"");
 
 1187                                 $tpl->setVariable(
"LINK_BEGIN",
 
 1189                                 $tpl->setVariable(
"LINK_END", 
"[/iln]");
 
 1191                         $tpl->parseCurrentBlock();
 
 1194                 $tpl->setCurrentBlock(
"row");
 
 1195                 $tpl->parseCurrentBlock();