24 require_once(
"./Modules/LearningModule/classes/class.ilLMExplorer.php");
25 require_once(
"./Modules/LearningModule/classes/class.ilLMObject.php");
61 $this->gui_class = $a_gui_class;
81 $tpl->setCurrentBlock(
"link");
83 $tpl->setVariable(
"LINK_TARGET", $this->target);
84 $tpl->setVariable(
"TARGET",
" target=\"".$this->frame_target.
"\"");
85 $tpl->parseCurrentBlock();
87 $tpl->setCurrentBlock(
"element");
88 $tpl->parseCurrentBlock();
103 $ilBench->start(
"Explorer",
"getOutput");
105 $this->format_options[0][
"tab"] = array();
107 $depth = $this->tree->getMaximumDepth();
109 for ($i=0;$i<$depth;++$i)
115 $tpl->setBodyClass(
"il_Explorer");
117 $tpl_tree =
new ilTemplate(
"tpl.tree_form.html",
true,
true);
120 foreach ($this->format_options as $key => $options)
123 if (!$options[
"visible"])
134 $cur_depth = $options[
"depth"];
136 if ($options[
"visible"] and $key != 0)
138 $this->
formatObject($tpl_tree, $options[
"child"],$options,$options[
'obj_id']);
142 $this->
formatHeader($tpl_tree, $options[
"child"],$options);
149 $ilBench->stop(
"Explorer",
"getOutput");
151 return $tpl_tree->get();
166 if (!isset($a_node_id) or !is_array($a_option))
168 $this->ilias->raiseError(get_class($this).
"::formatObject(): Missing parameter or wrong datatype! ".
169 "node_id: ".$a_node_id.
" options:".var_dump($a_option),$this->ilias->error_obj->WARNING);
172 if ($this->output_icons)
174 $tpl->setCurrentBlock(
"icon");
176 $tpl->setVariable(
"PAGE_ID" , $a_node_id);
180 $tpl->setVariable(
"TXT_ALT_IMG", $lng->txt($a_option[
"desc"]));
181 $tpl->parseCurrentBlock();
184 if (!$a_option[
"container"])
186 $tpl->setCurrentBlock(
"checkbox");
187 $tpl->setVariable(
"PAGE_ID", $a_node_id);
190 $tpl->setVariable(
"CHECKED",
"checked=\"checked\"");
193 $tpl->parseCurrentBlock();
197 $childs = $this->tree->getChilds($a_node_id);
199 foreach ($childs as $node)
201 if ($node[
"type"] ==
"pg")
203 $pages[] = $node[
"child"];
208 $tpl->setVariable(
"ONCLICK",
" onclick=\"alterCheckboxes('PublicSelector','page_',$js_pages); return false;\"");
211 $tpl->setCurrentBlock(
"text");
212 $tpl->setVariable(
"PAGE_ID", $a_node_id);
214 $tpl->parseCurrentBlock();
216 $tpl->setCurrentBlock(
"element");
217 $tpl->parseCurrentBlock();