ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilObjLearningModuleGUI.php
Go to the documentation of this file.
1 <?php
2 /*
3  +-----------------------------------------------------------------------------+
4  | ILIAS open source |
5  +-----------------------------------------------------------------------------+
6  | Copyright (c) 1998-2008 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 require_once("./Modules/LearningModule/classes/class.ilObjContentObjectGUI.php");
24 
38 {
39  var $object;
44  function ilObjLearningModuleGUI($a_data,$a_id = 0,$a_call_by_reference = true, $a_prepare_output = true)
45  {
46  $this->type = "lm";
47 
48  parent::ilObjContentObjectGUI($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
49 
50  # BETTER DO IT HERE THAN IN PARENT CLASS ( PROBLEMS FOR import, create)
51  $this->assignObject();
52 
53  // SAME REASON
54  if($a_id != 0)
55  {
56  $this->lm_tree =& $this->object->getLMTree();
57  }
58  /*
59  global $ilias, $tpl, $lng, $objDefinition;
60 
61  $this->ilias =& $ilias;
62  $this->tpl =& $tpl;
63  $this->lng =& $lng;
64  $this->objDefinition =& $objDefinition;
65  $this->lm_tree =& $a_tree;
66  */
67 
68  //$this->read(); todo
69  }
70 
71  function assignObject()
72  {
73  include_once("./Modules/LearningModule/classes/class.ilObjLearningModule.php");
74 
75  $this->link_params = "ref_id=".$this->ref_id;
76  $this->object =& new ilObjLearningModule($this->id, true);
77  }
78 
79  /*
80  function setLearningModuleObject(&$a_lm_obj)
81  {
82  $this->lm_obj =& $a_lm_obj;
83  //$this->obj =& $this->lm_obj;
84  }*/
85 
86  // MOVED ALL *style METHODS TO base class
87 
88  function view()
89  {
90  if (strtolower($_GET["baseClass"]) == "iladministrationgui")
91  {
92  $this->prepareOutput();
94  }
95  else
96  {
97  $this->properties();
98  }
99  }
100 
101 }
102 
103 ?>