25 require_once(
"./Services/UIComponent/Explorer/classes/class.ilExplorer.php");
26 require_once(
"./Modules/ScormAicc/classes/AICC/class.ilAICCTree.php");
27 require_once(
"./Modules/ScormAicc/classes/AICC/class.ilAICCExplorer.php");
44 $this->slm_obj =& $a_slm_obj;
45 $this->tree =
new ilAICCTree($a_slm_obj->getId());
65 if (!isset($a_node_id) or !is_array($a_option))
67 $this->ilias->raiseError(get_class($this).
"::formatObject(): Missing parameter or wrong datatype! ".
68 "node_id: ".$a_node_id.
" options:".var_dump($a_option),$this->ilias->error_obj->WARNING);
71 $tpl =
new ilTemplate(
"tpl.sahs_tree.html",
true,
true,
"Modules/ScormAicc");
73 if ($a_option[
"c_type"]==
"sos")
76 if ($a_option[
"c_type"]==
"srs")
79 if (is_array($a_option[
"tab"])) {
80 foreach ($a_option[
"tab"] as $picture)
82 if ($picture ==
'plus')
85 $tpl->setCurrentBlock(
"expander");
88 $tpl->parseCurrentBlock();
91 if ($picture ==
'minus' && $this->show_minus)
94 $tpl->setCurrentBlock(
"expander");
97 $tpl->parseCurrentBlock();
100 if ($picture ==
'blank' or $picture ==
'winkel'
101 or $picture ==
'hoch' or $picture ==
'quer' or $picture ==
'ecke'
102 or ($picture ==
'minus' && !$this->show_minus))
105 $tpl->setCurrentBlock(
"lines");
107 $tpl->parseCurrentBlock();
112 if ($this->output_icons) {
113 if ($this->
isClickable($a_option[
"c_type"], $a_node_id) && $a_option[
"c_type"]!=
"sbl")
118 if ($this->
isClickable($a_option[
"c_type"], $a_node_id))
120 $tpl->setCurrentBlock(
"link");
125 $frame_target = $this->
buildFrameTarget($a_option[
"c_type"], $a_node_id, $a_option[
"obj_id"]);
126 if ($frame_target !=
"")
137 if ($a_option[
"c_type"]==
"sbl") {
139 $tpl->setVariable(
"TARGET",
" target=\"".$frame_target.
"\"");
143 include_once(
"./Modules/ScormAicc/classes/AICC/class.ilAICCUnit.php");
147 $url=$unit->getCommand_line();
149 $url=$unit->getFilename();
153 if (substr($url,0,7)!=
"http://")
154 $url=$this->slm_obj->getDataDirectory(
"output").
"/".$url;
156 if (strlen($unit->getWebLaunch())>0)
157 $url.=
"?".$unit->getWebLaunch();
159 $hacpURL=ILIAS_HTTP_PATH.
"/Modules/ScormAicc/sahs_server.php";
163 $aicc_sid=implode(
"_", array(session_id(), CLIENT_ID, $this->slm_obj->ref_id, $a_node_id));
164 if (strlen($unit->getWebLaunch())>0)
168 $url.=
"aicc_url=$hacpURL&aicc_sid=$aicc_sid";
176 $tpl->setVariable(
"LINK_TARGET",
"javascript:void(0);");
177 $tpl->setVariable(
"ONCLICK",
" onclick=\"parent.$frame_target.location.href='$url'\"");
184 $tpl->parseCurrentBlock();
188 $tpl->setCurrentBlock(
"text");
190 $tpl->parseCurrentBlock();
194 $tpl->setCurrentBlock(
"row");
195 $tpl->parseCurrentBlock();
197 $this->output[] =
$tpl->get();