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;
105 $ilBench->start(
"Explorer",
"getOutput");
107 $this->format_options[0][
"tab"] = array();
109 $depth = $this->tree->getMaximumDepth();
111 for ($i=0;$i<$depth;++$i)
117 $tpl->setBodyClass(
"il_Explorer");
119 $tpl_tree =
new ilTemplate(
"tpl.tree_form.html",
true,
true,
"Modules/LearningModule");
122 foreach ($this->format_options as $key => $options)
125 if (!$options[
"visible"])
136 $cur_depth = $options[
"depth"];
138 if ($options[
"visible"] and $key != 0)
140 $this->
formatObject($tpl_tree, $options[
"child"],$options,$options[
'obj_id']);
144 $this->
formatHeader($tpl_tree, $options[
"child"],$options);
151 $ilBench->stop(
"Explorer",
"getOutput");
153 return $tpl_tree->get();
168 if (!isset($a_node_id) or !is_array($a_option))
170 $this->ilias->raiseError(get_class($this).
"::formatObject(): Missing parameter or wrong datatype! ".
171 "node_id: ".$a_node_id.
" options:".var_dump($a_option),$this->ilias->error_obj->WARNING);
174 if ($this->output_icons)
176 $tpl->setCurrentBlock(
"icon");
178 $tpl->setVariable(
"PAGE_ID" , $a_node_id);
182 $tpl->setVariable(
"TXT_ALT_IMG", $lng->txt($a_option[
"desc"]));
183 $tpl->parseCurrentBlock();
186 if (!$a_option[
"container"])
188 $tpl->setCurrentBlock(
"checkbox");
189 $tpl->setVariable(
"PAGE_ID", $a_node_id);
192 $tpl->setVariable(
"CHECKED",
"checked=\"checked\"");
195 $tpl->parseCurrentBlock();
199 $childs = $this->tree->getChilds($a_node_id);
201 foreach ($childs as $node)
203 if ($node[
"type"] ==
"pg")
205 $pages[] = $node[
"child"];
210 $tpl->setVariable(
"ONCLICK",
" onclick=\"alterCheckboxes('PublicSelector','page_',$js_pages); return false;\"");
213 $tpl->setCurrentBlock(
"text");
214 $tpl->setVariable(
"PAGE_ID", $a_node_id);
216 $tpl->parseCurrentBlock();
218 $tpl->setCurrentBlock(
"element");
219 $tpl->parseCurrentBlock();