Public Member Functions | |
ilAICCExplorer ($a_target, &$a_slm_obj) | |
Constructor public. | |
getItem ($a_node_id) | |
getIconImagePathPrefix () | |
getNodesToSkip () | |
isClickable ($a_type, $a_id=0) | |
check if links for certain object type are activated | |
formatItemTable (&$tpl, $a_id, $a_type) | |
formatObject ($a_node_id, $a_option) | |
Creates output recursive method private. |
Definition at line 37 of file class.ilAICCExplorer.php.
ilAICCExplorer::formatItemTable | ( | &$ | tpl, | |
$ | a_id, | |||
$ | a_type | |||
) |
Reimplemented from ilSCORMExplorer.
Definition at line 91 of file class.ilAICCExplorer.php.
References $lng.
Referenced by ilHACPExplorer::formatObject(), and formatObject().
{ global $lng; /* if ($a_type != "sau") { return; } else { $sc_object =& new ilAICCUnit($a_id); //if ($sc_object->getIdentifierRef() != "") //{ $trdata = $sc_object->getTrackingDataOfUser(); // status $status = ($trdata["lesson_status"] == "") ? "not attempted" : $trdata["lesson_status"]; $tpl->setCurrentBlock("item_row"); $tpl->setVariable("TXT_KEY", $lng->txt("cont_status")); $tpl->setVariable("TXT_VALUE", $lng->txt("cont_sc_stat_".str_replace(" ", "_", $status))); $tpl->parseCurrentBlock(); // credits if ($trdata["mastery_score"] != "") { $tpl->setCurrentBlock("item_row"); $tpl->setVariable("TXT_KEY", $lng->txt("cont_credits")); $tpl->setVariable("TXT_VALUE", $trdata["mastery_score"]); $tpl->parseCurrentBlock(); } // total time if ($trdata["total_time"] != "") { $tpl->setCurrentBlock("item_row"); $tpl->setVariable("TXT_KEY", $lng->txt("cont_total_time")); $tpl->setVariable("TXT_VALUE", $trdata["total_time"]); $tpl->parseCurrentBlock(); } $tpl->setCurrentBlock("item_table"); $tpl->parseCurrentBlock(); //} } */ }
ilAICCExplorer::formatObject | ( | $ | a_node_id, | |
$ | a_option | |||
) |
Creates output recursive method private.
integer | ||
array |
Reimplemented from ilSCORMExplorer.
Reimplemented in ilHACPExplorer.
Definition at line 151 of file class.ilAICCExplorer.php.
References $lng, ilExplorer::$target, $tpl, ilExplorer::buildFrameTarget(), ilExplorer::buildLinkTarget(), ilSCORMExplorer::createTarget(), formatItemTable(), ilUtil::getImagePath(), ilSCORMExplorer::getOutputIcons(), isClickable(), and ilUtil::shortenText().
{ global $lng; if (!isset($a_node_id) or !is_array($a_option)) { $this->ilias->raiseError(get_class($this)."::formatObject(): Missing parameter or wrong datatype! ". "node_id: ".$a_node_id." options:".var_dump($a_option),$this->ilias->error_obj->WARNING); } $tpl = new ilTemplate("tpl.sahs_tree.html", true, true, true); if ($a_option["type"]=="sos") return; if ($a_option["type"]=="srs") return; if (is_array($a_option["tab"])) { //test if there are any tabs foreach ($a_option["tab"] as $picture) { $pic = false; if ($picture == 'plus') { $target = $this->createTarget('+',$a_node_id); $tpl->setCurrentBlock("expander"); $tpl->setVariable("LINK_TARGET_EXPANDER", $target); $tpl->setVariable("IMGPATH", ilUtil::getImagePath("browser/plus.gif")); $tpl->parseCurrentBlock(); $pic = true; } if ($picture == 'minus' && $this->show_minus) { $target = $this->createTarget('-',$a_node_id); $tpl->setCurrentBlock("expander"); $tpl->setVariable("LINK_TARGET_EXPANDER", $target); $tpl->setVariable("IMGPATH", ilUtil::getImagePath("browser/minus.gif")); $tpl->parseCurrentBlock(); $pic = true; } if (!$pic) { $picture = 'blank'; $tpl->setCurrentBlock("lines"); $tpl->setVariable("IMGPATH_LINES", ilUtil::getImagePath("browser/".$picture.".gif")); $tpl->parseCurrentBlock(); } } } if ($this->output_icons) { if ($this->isClickable($a_option["type"], $a_node_id) && !$a_option["type"]=="sbl") $this->getOutputIcons($tpl, $a_option, $a_node_id); } if ($this->isClickable($a_option["type"], $a_node_id)) // output link { $tpl->setCurrentBlock("link"); //$target = (strpos($this->target, "?") === false) ? // $this->target."?" : $this->target."&"; //$tpl->setVariable("LINK_TARGET", $target.$this->target_get."=".$a_node_id.$this->params_get); //$tpl->setVariable("TITLE", ilUtil::shortenText($a_option["title"], $this->textwidth, true)); $frame_target = $this->buildFrameTarget($a_option["type"], $a_node_id, $a_option["obj_id"]); if ($frame_target != "") { // if ($this->api == 1) // { // $tpl->setVariable("TITLE", ilUtil::shortenText($a_option["title"], $this->textwidth, true)); // $tpl->setVariable("TARGET", " target=\"".$frame_target."\""); // //$tpl->setVariable("LINK_TARGET", $this->buildLinkTarget($a_node_id, $a_option["type"])); // $tpl->setVariable("LINK_TARGET", $this->buildLinkTarget($a_node_id, $a_option["type"])); // } // else // { if ($a_option["type"]=="sbl") { $tpl->setVariable("TITLE", ilUtil::shortenText($a_option["title"]." ($a_node_id)", $this->textwidth, true)); $tpl->setVariable("TARGET", " target=\"".$frame_target."\""); $tpl->setVariable("LINK_TARGET", $this->buildLinkTarget($a_node_id, $a_option["type"])); } else { $tpl->setVariable("TITLE", ilUtil::shortenText($a_option["title"]." ($a_node_id)", $this->textwidth, true)); $tpl->setVariable("LINK_TARGET", "javascript:void(0);"); $tpl->setVariable("ONCLICK", " onclick=\"parent.APIFRAME.setupApi();parent.APIFRAME.API.IliasLaunchSahs('".$a_node_id."');return false;\""); // } } } $tpl->parseCurrentBlock(); } else // output text only { $tpl->setCurrentBlock("text"); $tpl->setVariable("OBJ_TITLE", ilUtil::shortenText($a_option["title"], $this->textwidth, true)); $tpl->parseCurrentBlock(); } $this->formatItemTable($tpl, $a_node_id, $a_option["type"]); $tpl->setCurrentBlock("row"); $tpl->parseCurrentBlock(); $this->output[] = $tpl->get(); }
ilAICCExplorer::getIconImagePathPrefix | ( | ) |
Reimplemented from ilSCORMExplorer.
Definition at line 61 of file class.ilAICCExplorer.php.
{ return "scorm/"; }
ilAICCExplorer::getItem | ( | $ | a_node_id | ) |
Reimplemented from ilSCORMExplorer.
Definition at line 57 of file class.ilAICCExplorer.php.
{ return new ilAICCUnit($a_node_id); }
ilAICCExplorer::getNodesToSkip | ( | ) |
Reimplemented from ilSCORMExplorer.
Definition at line 65 of file class.ilAICCExplorer.php.
{
return 1;
}
ilAICCExplorer::ilAICCExplorer | ( | $ | a_target, | |
&$ | a_slm_obj | |||
) |
Constructor public.
string | scriptname | |
int | user_id |
Definition at line 46 of file class.ilAICCExplorer.php.
References ilExplorer::checkPermissions(), ilExplorer::ilExplorer(), ilExplorer::outputIcons(), and ilExplorer::setOrderColumn().
{ parent::ilExplorer($a_target); $this->slm_obj =& $a_slm_obj; $this->tree = new ilAICCTree($a_slm_obj->getId()); $this->root_id = $this->tree->readRootId(); $this->checkPermissions(false); $this->outputIcons(false); $this->setOrderColumn(""); }
ilAICCExplorer::isClickable | ( | $ | a_type, | |
$ | a_ref_id = 0 | |||
) |
check if links for certain object type are activated
string | $a_type object type |
Reimplemented from ilExplorer.
Definition at line 69 of file class.ilAICCExplorer.php.
Referenced by ilHACPExplorer::formatObject(), and formatObject().
{ if ($a_type=="sbl") { $block_object =& new ilAICCBlock($a_id); return (strlen($block_object->getDescription())>0); } if ($a_type != "sau") { return false; } else { $sc_object =& new ilAICCUnit($a_id); //if ($sc_object->getIdentifierRef() != "") //{ return true; //} } return false; }