ILIAS  eassessment Revision 61809
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilHTLMEditorGUI.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 
53  function ilHTLMEditorGUI()
54  {
56  $rbacsystem, $ilLocator;
57 
58  $lng->loadLanguageModule("content");
59 
60  // check write permission
61  if (!$rbacsystem->checkAccess("write", $_GET["ref_id"]))
62  {
63  $ilias->raiseError($lng->txt("permission_denied"),$ilias->error_obj->MESSAGE);
64  }
65 
66  $this->ctrl =& $ilCtrl;
67 
68  //$this->ctrl->saveParameter($this, array("ref_id", "obj_id"));
69  $this->ctrl->saveParameter($this, array("ref_id"));
70 
71  // initiate variables
72  $this->ilias =& $ilias;
73  $this->tpl =& $tpl;
74  $this->lng =& $lng;
75  $this->objDefinition =& $objDefinition;
76  $this->ref_id = $_GET["ref_id"];
77 
78  }
79 
83  function &executeCommand()
84  {
85  global $tpl, $ilCtrl,$ilAccess, $ilNavigationHistory;
86 
87  $next_class = $this->ctrl->getNextClass($this);
88  $cmd = $this->ctrl->getCmd("");
89 
90  // add entry to navigation history
91  if ($ilAccess->checkAccess("read", "", $_GET["ref_id"]))
92  {
93  $ilNavigationHistory->addItem($_GET["ref_id"],
94  "repository.php?cmd=infoScreen&ref_id=".$_GET["ref_id"], "lm");
95  }
96 
97  switch($next_class)
98  {
99  case "ilobjfilebasedlmgui":
100  require_once ("./Modules/HTMLLearningModule/classes/class.ilObjFileBasedLMGUI.php");
101  $fblm_gui =& new ilObjFileBasedLMGUI("", $_GET["ref_id"],true, false);
102  $ilCtrl->forwardCommand($fblm_gui);
103  $tpl->show();
104  break;
105 
106  default:
107  $this->ctrl->setCmdClass("ilobjfilebasedlmgui");
108  $this->ctrl->setCmd("");
109  return $this->executeCommand();
110  break;
111  }
112  }
113 
114 }
115 ?>