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;
63 parent::ilLMExplorer($a_target, $a_lm_obj);
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)
138 if (
$options[
"visible"] and $key != 0)
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();
forceExpandAll($a_mode, $a_show_minus=true)
force expandAll.
static shortenText($a_str, $a_len, $a_dots=false, $a_next_blank=false, $a_keep_extension=false)
shorten a string to given length.
handleListEndTags(&$a_tpl_tree, $a_cur_depth, $a_item_depth)
handle list end tags ( and )
formatHeader($tpl, $a_obj_id, $a_option)
overwritten method from base class public
getOutput()
Creates output recursive method public.
if(!is_array($argv)) $options
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
formatObject(&$tpl, $a_node_id, $a_option, $a_obj_id=0)
Creates output recursive method private.
special template class to simplify handling of ITX/PEAR
redirection script todo: (a better solution should control the processing via a xml file) ...
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
static array_php2js($data)
convert php arrays to javascript arrays
ilPublicSectionSelector($a_target, &$a_lm_obj, $a_gui_class)
Constructor public.
handleListStartTags(&$a_tpl_tree, $a_cur_depth, $a_item_depth)
handle list start tags (
setSessionExpandVariable($a_var_name="expand")
set name of expand session variable
static _isPagePublic($a_node_id, $a_check_public_mode=false)
createLines($a_depth)
Creates lines for explorer view private.