4 include_once
'./Services/UIComponent/Explorer/classes/class.ilExplorer.php';
39 $this->
setRoot($tree->readRootId());
44 $this->filter = array();
76 public function isClickable($a_type, $a_ref_id, $a_obj_id = 0)
87 $this->form_items[
$type] =
true;
92 $this->form_items[
$type] =
false;
97 $this->checked_items = $a_checked_items;
107 return in_array($a_id, $this->checked_items) ?
true :
false;
112 $this->post_var = $a_post_var;
121 if(!array_key_exists($a_type, $this->form_items) || !$this->form_items[$a_type])
return '';
125 case self::SEL_TYPE_CHECK:
129 case self::SEL_TYPE_RADIO:
139 if (!isset($a_node_id) or !is_array($a_option))
141 $this->ilias->raiseError(get_class($this).
"::formatObject(): Missing parameter or wrong datatype! ".
142 "node_id: ".$a_node_id.
" options:".var_dump($a_option),$this->ilias->error_obj->WARNING);
146 foreach ($a_option[
"tab"] as $picture)
148 if ($picture ==
'plus')
150 $tpl->setCurrentBlock(
"exp_desc");
151 $tpl->setVariable(
"EXP_DESC", $lng->txt(
"expand"));
152 $tpl->parseCurrentBlock();
154 $tpl->setCurrentBlock(
"expander");
155 $tpl->setVariable(
"LINK_NAME", $a_node_id);
156 $tpl->setVariable(
"LINK_TARGET_EXPANDER",
$target);
157 $tpl->setVariable(
"IMGPATH", $this->
getImage(
"browser/plus.png"));
158 $tpl->parseCurrentBlock();
162 if ($picture ==
'minus' && $this->show_minus)
164 $tpl->setCurrentBlock(
"exp_desc");
165 $tpl->setVariable(
"EXP_DESC", $lng->txt(
"collapse"));
166 $tpl->parseCurrentBlock();
168 $tpl->setCurrentBlock(
"expander");
169 $tpl->setVariable(
"LINK_NAME", $a_node_id);
170 $tpl->setVariable(
"LINK_TARGET_EXPANDER",
$target);
171 $tpl->setVariable(
"IMGPATH", $this->
getImage(
"browser/minus.png"));
172 $tpl->parseCurrentBlock();
179 $tpl->setCurrentBlock(
"blank");
180 $tpl->setVariable(
"BLANK_PATH", $this->
getImage(
"browser/blank.png"));
181 $tpl->parseCurrentBlock();
184 if ($this->output_icons)
186 $tpl->setCurrentBlock(
"icon");
187 $tpl->setVariable(
"ICON_IMAGE" , $this->
getImage(
"icon_".$a_option[
"type"].
"_s.png", $a_option[
"type"], $a_obj_id));
189 $tpl->setVariable(
"TARGET_ID" ,
"iconid_".$a_node_id);
190 $this->iconList[] =
"iconid_".$a_node_id;
191 $tpl->setVariable(
"TXT_ALT_IMG", $lng->txt($a_option[
"desc"]));
192 $tpl->parseCurrentBlock();
195 if(strlen($formItem = $this->
buildFormItem($a_node_id, $a_option[
'type'])))
197 $tpl->setCurrentBlock(
'check');
198 $tpl->setVariable(
'OBJ_CHECK', $formItem);
199 $tpl->parseCurrentBlock();
202 if ($this->
isClickable($a_option[
"type"], $a_node_id,$a_obj_id))
204 $tpl->setCurrentBlock(
"link");
212 if ($style_class !=
"")
214 $tpl->setVariable(
"A_CLASS",
' class="'.$style_class.
'" ' );
217 if (($onclick = $this->
buildOnClick($a_node_id, $a_option[
"type"], $a_option[
"title"])) !=
"")
219 $tpl->setVariable(
"ONCLICK",
"onClick=\"$onclick\"");
222 $tpl->setVariable(
"LINK_NAME", $a_node_id);
223 $tpl->setVariable(
"TITLE",
224 $this->
buildTitle($a_option[
"title"], $a_node_id, $a_option[
"type"])
227 $this->
buildDescription($a_option[
"description"], $a_node_id, $a_option[
"type"]), $this->textwidth,
true));
228 $frame_target = $this->
buildFrameTarget($a_option[
"type"], $a_node_id, $a_option[
"obj_id"]);
229 if ($frame_target !=
"")
231 $tpl->setVariable(
"TARGET",
" target=\"".$frame_target.
"\"");
233 $tpl->parseCurrentBlock();
237 $tpl->setCurrentBlock(
"text");
238 $tpl->setVariable(
"OBJ_TITLE",
239 $this->
buildTitle($a_option[
"title"], $a_node_id, $a_option[
"type"]));
241 $this->
buildDescription($a_option[
"desc"], $a_node_id, $a_option[
"type"]), $this->textwidth,
true));
242 $tpl->parseCurrentBlock();
245 $tpl->setCurrentBlock(
"list_item");
246 $tpl->parseCurrentBlock();
247 $tpl->touchBlock(
"element");
267 $tpl->setCurrentBlock(
"icon");
268 $nd = $tree->getNodeData(ROOT_FOLDER_ID);
272 $title = $lng->txt(
"repository");
277 $tpl->parseCurrentBlock();
279 if(strlen($formItem = $this->
buildFormItem($a_obj_id, $a_option[
'type'])))
281 $tpl->setCurrentBlock(
'check');
282 $tpl->setVariable(
'OBJ_CHECK', $formItem);
283 $tpl->parseCurrentBlock();
290 '<font style="font-weight: bold">'.
$title.
'</font>'
310 return '<font style="font-weight: bold">'.$title.
'</font>';
314 return '<font style="font-style: italic">'.$title.
'</font>';
324 include_once
'./Services/WebServices/ECS/classes/Course/class.ilECSCourseMappingRule.php';
340 return array_key_exists($a_ref_id, $this->mappings);
345 foreach($this->mappings as
$ref_id => $parent_nodes)
347 if(in_array($a_ref_id, $parent_nodes))