Go to the documentation of this file.00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 require_once("classes/class.ilExplorer.php");
00034
00035 class ilLMExplorer extends ilExplorer
00036 {
00037
00043 var $root_id;
00044 var $lm_obj;
00045 var $output;
00046
00053 function ilLMExplorer($a_target,&$a_lm_obj)
00054 {
00055 parent::ilExplorer($a_target);
00056 $this->tree = new ilTree($a_lm_obj->getId());
00057 $this->tree->setTableNames('lm_tree','lm_data');
00058 $this->tree->setTreeTablePK("lm_id");
00059 $this->root_id = $this->tree->readRootId();
00060 $this->lm_obj =& $a_lm_obj;
00061 $this->order_column = "";
00062 $this->setSessionExpandVariable("lmexpand");
00063 $this->checkPermissions(false);
00064 $this->setPostSort(false);
00065 $this->textwidth = 200;
00066 }
00067
00075 function formatHeader(&$tpl, $a_obj_id,$a_option)
00076 {
00077 global $lng, $ilias;
00078
00079 $tpl->setCurrentBlock("icon");
00080 $tpl->setVariable("ICON_IMAGE" , ilUtil::getImagePath("icon_lm.gif",false, "output", $this->offlineMode()));
00081 $tpl->setVariable("TXT_ALT_IMG", $lng->txt("obj_".$this->lm_obj->getType()));
00082 $tpl->parseCurrentBlock();
00083
00084 $tpl->setCurrentBlock("link");
00085 $tpl->setVariable("TITLE", ilUtil::shortenText($this->lm_obj->getTitle(), $this->textwidth, true));
00086 $tpl->setVariable("LINK_TARGET", $this->buildLinkTarget("",""));
00087 $tpl->setVariable("TARGET", " target=\"".$this->frame_target."\"");
00088 $tpl->parseCurrentBlock();
00089
00090 $tpl->touchBlock("element");
00091 }
00092
00100 function isClickable($a_type, $a_obj_id = 0)
00101 {
00102 global $ilUser;
00103
00104
00105
00106
00107 if ($this->is_clickable[$a_type] == "n")
00108 {
00109 return false;
00110 }
00111
00112
00113 if ($ilUser->getId() == ANONYMOUS_USER_ID and !ilLMObject::_isPagePublic($a_obj_id,true))
00114 {
00115 return false;
00116 }
00117
00118 return true;
00119 }
00120 }
00121 ?>