Go to the documentation of this file.00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 require_once "classes/class.ilObjectGUI.php";
00025 require_once("classes/class.ilFileSystemGUI.php");
00026 require_once("classes/class.ilTabsGUI.php");
00027 require_once("content/classes/class.ilObjSCORMLearningModuleGUI.php");
00028 require_once "content/classes/class.ilObjAICCCourseInterchangeFiles.php";
00029 require_once("content/classes/class.ilObjAICCLearningModule.php");
00030
00042 class ilObjAICCLearningModuleGUI extends ilObjSCORMLearningModuleGUI
00043 {
00049 function ilObjAICCLearningModuleGUI($a_data,$a_id,$a_call_by_reference, $a_prepare_output = true)
00050 {
00051 global $lng;
00052
00053 $lng->loadLanguageModule("content");
00054 $this->type = "sahs";
00055 $this->ilObjectGUI($a_data,$a_id,$a_call_by_reference,$a_prepare_output);
00056 #$this->tabs_gui =& new ilTabsGUI();
00057
00058 }
00059
00060
00064 function assignObject()
00065 {
00066 if ($this->id != 0)
00067 {
00068 if ($this->call_by_reference)
00069 {
00070 $this->object =& new ilObjAICCLearningModule($this->id, true);
00071 }
00072 else
00073 {
00074 $this->object =& new ilObjAICCLearningModule($this->id, false);
00075 }
00076 }
00077 }
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00096 function showTrackingItems()
00097 {
00098
00099 include_once "./classes/class.ilTableGUI.php";
00100
00101
00102 $this->tpl->addBlockfile("ADM_CONTENT", "adm_content", "tpl.table.html");
00103
00104 $this->tpl->addBlockfile("TBL_CONTENT", "tbl_content", "tpl.scorm_track_items.html", true);
00105
00106 $num = 1;
00107
00108 $this->tpl->setVariable("FORMACTION", "adm_object.php?ref_id=".$this->ref_id."$obj_str&cmd=gateway");
00109
00110
00111 $tbl = new ilTableGUI();
00112
00113
00114 $tbl->setTitle($this->lng->txt("cont_tracking_items"));
00115
00116 $tbl->setHeaderNames(array($this->lng->txt("title")));
00117
00118 $header_params = array("ref_id" => $this->ref_id, "cmd" => $_GET["cmd"],
00119 "cmdClass" => get_class($this));
00120 $cols = array("title");
00121 $tbl->setHeaderVars($cols, $header_params);
00122 $tbl->setColumnWidth(array("100%"));
00123
00124
00125 $tbl->setOrderColumn($_GET["sort_by"]);
00126 $tbl->setOrderDirection($_GET["sort_order"]);
00127 $tbl->setLimit($_GET["limit"]);
00128 $tbl->setOffset($_GET["offset"]);
00129 $tbl->setMaxCount($this->maxcount);
00130
00131
00132
00133
00134
00135 $tbl->setFooter("tblfooter",$this->lng->txt("previous"),$this->lng->txt("next"));
00136 #$tbl->disable("footer");
00137
00138
00139 $items = $this->object->getTrackedItems();
00140
00141
00142 $tbl->setMaxCount(count($items));
00143 $items = array_slice($items, $_GET["offset"], $_GET["limit"]);
00144
00145 $tbl->render();
00146 if (count($items) > 0)
00147 {
00148 foreach ($items as $item)
00149 {
00150 $this->tpl->setCurrentBlock("tbl_content");
00151 $this->tpl->setVariable("TXT_ITEM_TITLE", $item->getTitle());
00152 $this->ctrl->setParameter($this, "obj_id", $item->getId());
00153 $this->tpl->setVariable("LINK_ITEM",
00154 $this->ctrl->getLinkTarget($this, "showTrackingItem"));
00155
00156 $css_row = ilUtil::switchColor($i++, "tblrow1", "tblrow2");
00157 $this->tpl->setVariable("CSS_ROW", $css_row);
00158 $this->tpl->parseCurrentBlock();
00159 }
00160 }
00161 else
00162 {
00163 $this->tpl->setCurrentBlock("notfound");
00164 $this->tpl->setVariable("TXT_OBJECT_NOT_FOUND", $this->lng->txt("obj_not_found"));
00165 $this->tpl->setVariable("NUM_COLS", $num);
00166 $this->tpl->parseCurrentBlock();
00167 }
00168 }
00169
00173 function showTrackingItem()
00174 {
00175 parent::showTrackingItem();
00176 }
00177
00178
00179 }
00180 ?>