ILIAS  Release_4_1_x_branch Revision 61804
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilHTLMPresentationGUI.php
Go to the documentation of this file.
1 <?php
2 /*
3  +-----------------------------------------------------------------------------+
4  | ILIAS open source |
5  +-----------------------------------------------------------------------------+
6  | Copyright (c) 1998-2005 ILIAS open source, University of Cologne |
7  | |
8  | This program is free software; you can redistribute it and/or |
9  | modify it under the terms of the GNU General Public License |
10  | as published by the Free Software Foundation; either version 2 |
11  | of the License, or (at your option) any later version. |
12  | |
13  | This program is distributed in the hope that it will be useful, |
14  | but WITHOUT ANY WARRANTY; without even the implied warranty of |
15  | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16  | GNU General Public License for more details. |
17  | |
18  | You should have received a copy of the GNU General Public License |
19  | along with this program; if not, write to the Free Software |
20  | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
21  +-----------------------------------------------------------------------------+
22 */
23 
24 
37 {
43  var $ilias;
44  var $tpl;
45  var $lng;
47  var $ref_id;
48 
54  {
56  $rbacsystem, $ilAccess;
57 
58  $lng->loadLanguageModule("content");
59 
60  // check write permission
61  if (!$ilAccess->checkAccess("read", "", $_GET["ref_id"]))
62  {
63  $ilias->raiseError($lng->txt("permission_denied"),$ilias->error_obj->MESSAGE);
64  }
65 
66 
67  $this->ctrl =& $ilCtrl;
68 
69  //$this->ctrl->saveParameter($this, array("ref_id", "obj_id"));
70  $this->ctrl->saveParameter($this, array("ref_id"));
71 
72  // initiate variables
73  $this->ilias =& $ilias;
74  $this->tpl =& $tpl;
75  $this->lng =& $lng;
76  $this->objDefinition =& $objDefinition;
77  $this->ref_id = $_GET["ref_id"];
78 
79  }
80 
84  function &executeCommand()
85  {
86  global $tpl, $ilCtrl,$ilAccess, $ilNavigationHistory;
87 
88  // add entry to navigation history
89  if ($ilAccess->checkAccess("read", "", $_GET["ref_id"]))
90  {
91  $ilNavigationHistory->addItem($_GET["ref_id"],
92  "repository.php?cmd=infoScreen&ref_id=".$_GET["ref_id"], "lm");
93  }
94 
95  $next_class = $this->ctrl->getNextClass($this);
96  $cmd = $this->ctrl->getCmd("");
97 
98  switch($next_class)
99  {
100  case "ilobjfilebasedlmgui":
101  require_once ("./Modules/HTMLLearningModule/classes/class.ilObjFileBasedLMGUI.php");
102  $fblm_gui =& new ilObjFileBasedLMGUI("", $_GET["ref_id"],true, false);
103  $ilCtrl->forwardCommand($fblm_gui);
104  $tpl->show();
105  break;
106 
107  default:
108  $this->ctrl->setCmdClass("ilobjfilebasedlmgui");
109  $this->ctrl->setCmd("showLearningModule");
110  return $this->executeCommand();
111  break;
112  }
113  }
114 
115 }
116 ?>