25require_once(
"./Services/UIComponent/Explorer/classes/class.ilExplorer.php");
 
   26require_once(
"./Modules/ScormAicc/classes/AICC/class.ilAICCTree.php");
 
   27require_once(
"./Modules/ScormAicc/classes/AICC/class.ilAICCExplorer.php");
 
   43                parent::ilExplorer($a_target);
 
   44                $this->slm_obj =& $a_slm_obj;
 
   45                $this->tree = 
new ilAICCTree($a_slm_obj->getId());
 
   46                $this->root_id = $this->tree->readRootId();
 
   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();
 
Explorer View for AICC Learning Modules.
formatItemTable(&$tpl, $a_id, $a_type)
isClickable($a_type, $a_id=0)
check if links for certain object type are activated
outputIcons($a_icons)
output icons
checkPermissions($a_check)
check permissions via rbac
buildFrameTarget($a_type, $a_child=0, $a_obj_id=0)
get frame target (may be overwritten by derived classes)
setOrderColumn($a_column)
set the order column @access public
buildLinkTarget($a_node_id, $a_type)
get link target (may be overwritten by derived classes)
ilHACPExplorer($a_target, &$a_slm_obj)
Constructor @access public.
formatObject($a_node_id, $a_option)
Creates output recursive method @access private.
createTarget($a_type, $a_child)
Creates Get Parameter @access private.
getOutputIcons(&$tpl, $a_option, $a_node_id, $scormtype="sco")
tpl is filled with option state
special template class to simplify handling of ITX/PEAR
static shortenText($a_str, $a_len, $a_dots=false, $a_next_blank=false, $a_keep_extension=false)
shorten a string to given length.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
redirection script todo: (a better solution should control the processing via a xml file)