• Main Page
  • Related Pages
  • Namespaces
  • Data Structures
  • Files
  • File List
  • Globals

content/classes/class.ilObjAICCLearningModuleGUI.php

Go to the documentation of this file.
00001 <?php
00002 /*
00003         +-----------------------------------------------------------------------------+
00004         | ILIAS open source                                                           |
00005         +-----------------------------------------------------------------------------+
00006         | Copyright (c) 1998-2001 ILIAS open source, University of Cologne            |
00007         |                                                                             |
00008         | This program is free software; you can redistribute it and/or               |
00009         | modify it under the terms of the GNU General Public License                 |
00010         | as published by the Free Software Foundation; either version 2              |
00011         | of the License, or (at your option) any later version.                      |
00012         |                                                                             |
00013         | This program is distributed in the hope that it will be useful,             |
00014         | but WITHOUT ANY WARRANTY; without even the implied warranty of              |
00015         | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               |
00016         | GNU General Public License for more details.                                |
00017         |                                                                             |
00018         | You should have received a copy of the GNU General Public License           |
00019         | along with this program; if not, write to the Free Software                 |
00020         | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. |
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 //      * save new learning module to db
00081 //      */
00082 //      function saveObject()
00083 //      {
00084 //              global $rbacadmin;
00085 //
00086 //              $this->uploadObject();
00087 //
00088 //              sendInfo($this->lng->txt("alm_added"), true);
00089 //              ilUtil::redirect($this->getReturnLocation("save","adm_object.php?".$this->link_params));
00090 //
00091 //      }
00092 
00096         function showTrackingItems()
00097         {
00098 
00099                 include_once "./classes/class.ilTableGUI.php";
00100 
00101                 // load template for table
00102                 $this->tpl->addBlockfile("ADM_CONTENT", "adm_content", "tpl.table.html");
00103                 // load template for table content data
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                 // create table
00111                 $tbl = new ilTableGUI();
00112 
00113                 // title & header columns
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                 // control
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                 //$this->tpl->setVariable("COLUMN_COUNTS",count($this->data["cols"]));
00132                 //$this->showActions(true);
00133 
00134                 // footer
00135                 $tbl->setFooter("tblfooter",$this->lng->txt("previous"),$this->lng->txt("next"));
00136                 #$tbl->disable("footer");
00137 
00138                 //$items = $this->object->getTrackingItems();
00139                 $items = $this->object->getTrackedItems();
00140 
00141                 //$objs = ilUtil::sortArray($objs, $_GET["sort_by"], $_GET["sort_order"]);
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                 } //if is_array
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 } // END class.ilObjAICCLearningModule
00180 ?>

Generated on Fri Dec 13 2013 09:06:35 for ILIAS Release_3_4_x_branch .rev 46804 by  doxygen 1.7.1