24include_once(
"Services/Table/classes/class.ilTable2GUI.php");
 
   42                parent::__construct($a_parent_obj, $a_parent_cmd);
 
   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                include_once(
"./Modules/LearningModule/classes/class.ilLMPage.php");
 
   81                $page_object = 
new ilLMPage($a_set[
"obj_id"]);
 
   82                $page_object->buildDom();
 
   83                $int_links = $page_object->getInternalLinks();
 
   85                foreach($int_links as $link)
 
   88                        if (substr(
$target, 0, 4) == 
"il__")
 
   92                                $type = $link[
"Type"];
 
   97                                                $this->tpl->setCurrentBlock(
"link");
 
   98                                                $this->tpl->setVariable(
"TXT_LINK_TYPE", 
$lng->txt(
"pg"));
 
  102                                                        $add_str = ($lm_id != $this->lm_id)
 
  105                                                        $this->tpl->setVariable(
"TXT_LINK_TITLE",
 
  110                                                        $this->tpl->setVariable(
"TXT_MISSING",
 
  111                                                                "<b>".
$lng->txt(
"cont_target_missing").
" [".
$target_id.
"]".
"</b>");
 
  113                                                $this->tpl->parseCurrentBlock();
 
  116                                        case "StructureObject":
 
  117                                                $this->tpl->setCurrentBlock(
"link");
 
  118                                                $this->tpl->setVariable(
"TXT_LINK_TYPE", 
$lng->txt(
"st"));
 
  122                                                        $add_str = ($lm_id != $this->lm_id)
 
  125                                                        $this->tpl->setVariable(
"TXT_LINK_TITLE",
 
  130                                                        $this->tpl->setVariable(
"TXT_MISSING",
 
  131                                                                "<b>".
$lng->txt(
"cont_target_missing").
" [".
$target_id.
"]".
"</b>");
 
  133                                                $this->tpl->parseCurrentBlock();
 
  137                                                $this->tpl->setCurrentBlock(
"link");
 
  138                                                $this->tpl->setVariable(
"TXT_LINK_TYPE", 
$lng->txt(
"cont_term"));
 
  139                                                include_once(
"./Modules/Glossary/classes/class.ilGlossaryTerm.php");
 
  142                                                        $this->tpl->setVariable(
"TXT_LINK_TITLE",
 
  147                                                        $this->tpl->setVariable(
"TXT_MISSING",
 
  148                                                                "<b>".
$lng->txt(
"cont_target_missing").
" [".
$target_id.
"]".
"</b>");
 
  150                                                $this->tpl->parseCurrentBlock();
 
  154                                                $this->tpl->setCurrentBlock(
"link");
 
  155                                                $this->tpl->setVariable(
"TXT_LINK_TYPE", 
$lng->txt(
"mob"));
 
  158                                                        $this->tpl->setVariable(
"TXT_LINK_TITLE",
 
  163                                                        $this->tpl->setVariable(
"TXT_MISSING",
 
  164                                                                "<b>".
$lng->txt(
"cont_target_missing").
" [".
$target_id.
"]".
"</b>");
 
  166                                                $this->tpl->parseCurrentBlock();
 
  169                                        case "RepositoryItem":
 
  170                                                $this->tpl->setCurrentBlock(
"link");
 
  171                                                $this->tpl->setVariable(
"TXT_LINK_TYPE", 
$lng->txt(
"cont_repository_item"));
 
  176                                                        $this->tpl->setVariable(
"TXT_LINK_TITLE",
 
  178                                                                $lng->txt((
"obj_".$obj_type))
 
  183                                                        $this->tpl->setVariable(
"TXT_MISSING",
 
  184                                                                "<b>".
$lng->txt(
"cont_target_missing").
" [".
$target_id.
"]".
"</b>");
 
  186                                                $this->tpl->parseCurrentBlock();
 
  193                                $type = $link[
"Type"];
 
  198                                                $this->tpl->setVariable(
"TXT_LINK_TYPE", 
$lng->txt(
"pg"));
 
  200                                        case "StructureObject":
 
  201                                                $this->tpl->setVariable(
"TXT_LINK_TYPE", 
$lng->txt(
"st"));
 
  204                                                $this->tpl->setVariable(
"TXT_LINK_TYPE", 
$lng->txt(
"cont_term"));
 
  207                                                $this->tpl->setVariable(
"TXT_LINK_TYPE", 
$lng->txt(
"mob"));
 
  209                                        case "RepositoryItem":
 
  210                                                $this->tpl->setVariable(
"TXT_LINK_TYPE", 
$lng->txt(
"cont_repository_item"));
 
  214                                $this->tpl->setCurrentBlock(
"link");
 
  215                                $this->tpl->setVariable(
"TXT_MISSING",
 
  216                                        "<b>".
$lng->txt(
"cont_target_missing").
" [".
$target.
"]".
"</b>");
 
  217                                $this->tpl->parseCurrentBlock();
 
An exception for terminatinating execution or to throw for unit testing.
static _lookGlossaryTerm($term_id)
get glossary term
static _exists($a_id)
checks wether a glossary term with specified id exists or not
static _lookupContObjID($a_id)
get learning module / digibook id for lm object
static _lookupTitle($a_obj_id)
Lookup title.
static _exists($a_id)
checks wether a lm content object with specified id exists or not
static getPagesWithLinksList($a_lm_id, $a_par_type)
Get all pages of lm that contain any internal links.
Extension of ilPageObject for learning modules.
TableGUI class for (broken) links in learning module.
__construct($a_parent_obj, $a_parent_cmd, $a_lm_id, $a_lm_type)
fillRow($a_set)
Standard Version of Fill Row.
getLinks()
Get pages incl.
static _lookupObjId($a_id)
static _lookupTitle($a_id)
lookup object title
static _exists($a_id, $a_reference=false, $a_type=null)
checks if an object exists in object_data@access public
static _lookupType($a_id, $a_reference=false)
lookup object type
setEnableHeader($a_enableheader)
Set Enable Header.
addColumn($a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="", $a_tooltip_with_html=false)
Add a column to the header.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
setData($a_data)
set table data @access public
setRowTemplate($a_template, $a_template_dir="")
Set row template.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.