24 include_once(
"Services/Table/classes/class.ilTable2GUI.php");
44 $this->
addColumn($lng->txt(
"pg"),
"",
"");
45 $this->
addColumn($lng->txt(
"cont_internal_links"),
"",
"");
49 "Modules/LearningModule");
50 $this->lm_id = $a_lm_id;
51 $this->lm_type = $a_lm_type;
54 $this->
setTitle($lng->txt(
"cont_internal_links"));
74 $this->tpl->setVariable(
"TXT_PAGE_TITLE", $a_set[
"title"]);
75 $ilCtrl->setParameterByClass(
"illmpageobjectgui",
"obj_id",
77 $this->tpl->setVariable(
"HREF_PAGE",
78 $ilCtrl->getLinkTargetByClass(
"illmpageobjectgui",
"edit"));
80 $page_object =
new ilPageObject($this->lm_type, $a_set[
"obj_id"]);
81 $page_object->buildDom();
82 $int_links = $page_object->getInternalLinks();
84 foreach($int_links as $link)
86 $target = $link[
"Target"];
87 if (substr($target, 0, 4) ==
"il__")
91 $type = $link[
"Type"];
96 $this->tpl->setCurrentBlock(
"link");
97 $this->tpl->setVariable(
"TXT_LINK_TYPE", $lng->txt(
"pg"));
101 $add_str = ($lm_id != $this->lm_id)
104 $this->tpl->setVariable(
"TXT_LINK_TITLE",
109 $this->tpl->setVariable(
"TXT_MISSING",
110 "<b>".$lng->txt(
"cont_target_missing").
" [".
$target_id.
"]".
"</b>");
112 $this->tpl->parseCurrentBlock();
115 case "StructureObject":
116 $this->tpl->setCurrentBlock(
"link");
117 $this->tpl->setVariable(
"TXT_LINK_TYPE", $lng->txt(
"st"));
121 $add_str = ($lm_id != $this->lm_id)
124 $this->tpl->setVariable(
"TXT_LINK_TITLE",
129 $this->tpl->setVariable(
"TXT_MISSING",
130 "<b>".$lng->txt(
"cont_target_missing").
" [".
$target_id.
"]".
"</b>");
132 $this->tpl->parseCurrentBlock();
136 $this->tpl->setCurrentBlock(
"link");
137 $this->tpl->setVariable(
"TXT_LINK_TYPE", $lng->txt(
"cont_term"));
138 include_once(
"./Modules/Glossary/classes/class.ilGlossaryTerm.php");
141 $this->tpl->setVariable(
"TXT_LINK_TITLE",
146 $this->tpl->setVariable(
"TXT_MISSING",
147 "<b>".$lng->txt(
"cont_target_missing").
" [".
$target_id.
"]".
"</b>");
149 $this->tpl->parseCurrentBlock();
153 $this->tpl->setCurrentBlock(
"link");
154 $this->tpl->setVariable(
"TXT_LINK_TYPE", $lng->txt(
"mob"));
157 $this->tpl->setVariable(
"TXT_LINK_TITLE",
162 $this->tpl->setVariable(
"TXT_MISSING",
163 "<b>".$lng->txt(
"cont_target_missing").
" [".
$target_id.
"]".
"</b>");
165 $this->tpl->parseCurrentBlock();
168 case "RepositoryItem":
169 $this->tpl->setCurrentBlock(
"link");
170 $this->tpl->setVariable(
"TXT_LINK_TYPE", $lng->txt(
"cont_repository_item"));
175 $this->tpl->setVariable(
"TXT_LINK_TITLE",
177 $lng->txt((
"obj_".$obj_type))
182 $this->tpl->setVariable(
"TXT_MISSING",
183 "<b>".$lng->txt(
"cont_target_missing").
" [".
$target_id.
"]".
"</b>");
185 $this->tpl->parseCurrentBlock();
192 $type = $link[
"Type"];
197 $this->tpl->setVariable(
"TXT_LINK_TYPE", $lng->txt(
"pg"));
199 case "StructureObject":
200 $this->tpl->setVariable(
"TXT_LINK_TYPE", $lng->txt(
"st"));
203 $this->tpl->setVariable(
"TXT_LINK_TYPE", $lng->txt(
"cont_term"));
206 $this->tpl->setVariable(
"TXT_LINK_TYPE", $lng->txt(
"mob"));
208 case "RepositoryItem":
209 $this->tpl->setVariable(
"TXT_LINK_TYPE", $lng->txt(
"cont_repository_item"));
213 $this->tpl->setCurrentBlock(
"link");
214 $this->tpl->setVariable(
"TXT_MISSING",
215 "<b>".$lng->txt(
"cont_target_missing").
" [".$target.
"]".
"</b>");
216 $this->tpl->parseCurrentBlock();