ILIAS  eassessment Revision 61809
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilObjAccessibilitySettings.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 require_once "./classes/class.ilObject.php";
5 
15 {
16 
23  function ilObjAccessibilitySettings($a_id = 0,$a_call_by_reference = true)
24  {
25  $this->type = "accs";
26  $this->ilObject($a_id,$a_call_by_reference);
27  }
28 
35  function update()
36  {
37  global $ilDB;
38 
39  if (!parent::update())
40  {
41  return false;
42  }
43 
44  return true;
45  }
46 
50  function read()
51  {
52  global $ilDB;
53 
54  parent::read();
55 
56  }
57 
58 
59 
60 
61 
68  function delete()
69  {
70  // always call parent delete function first!!
71  if (!parent::delete())
72  {
73  return false;
74  }
75 
76  //put here your module specific stuff
77 
78  return true;
79  }
80 
89  function initDefaultRoles()
90  {
91  global $rbacadmin;
92 
93  return $roles ? $roles : array();
94  }
95 
109  function notify($a_event,$a_ref_id,$a_parent_non_rbac_id,$a_node_id,$a_params = 0)
110  {
111  global $tree;
112 
113  switch ($a_event)
114  {
115  case "link":
116 
117  //var_dump("<pre>",$a_params,"</pre>");
118  //echo "Module name ".$this->getRefId()." triggered by link event. Objects linked into target object ref_id: ".$a_ref_id;
119  //exit;
120  break;
121 
122  case "cut":
123 
124  //echo "Module name ".$this->getRefId()." triggered by cut event. Objects are removed from target object ref_id: ".$a_ref_id;
125  //exit;
126  break;
127 
128  case "copy":
129 
130  //var_dump("<pre>",$a_params,"</pre>");
131  //echo "Module name ".$this->getRefId()." triggered by copy event. Objects are copied into target object ref_id: ".$a_ref_id;
132  //exit;
133  break;
134 
135  case "paste":
136 
137  //echo "Module name ".$this->getRefId()." triggered by paste (cut) event. Objects are pasted into target object ref_id: ".$a_ref_id;
138  //exit;
139  break;
140 
141  case "new":
142 
143  //echo "Module name ".$this->getRefId()." triggered by paste (new) event. Objects are applied to target object ref_id: ".$a_ref_id;
144  //exit;
145  break;
146  }
147 
148  // At the beginning of the recursive process it avoids second call of the notify function with the same parameter
149  if ($a_node_id==$_GET["ref_id"])
150  {
151  $parent_obj =& $this->ilias->obj_factory->getInstanceByRefId($a_node_id);
152  $parent_type = $parent_obj->getType();
153  if($parent_type == $this->getType())
154  {
155  $a_node_id = (int) $tree->getParentId($a_node_id);
156  }
157  }
158 
159  parent::notify($a_event,$a_ref_id,$a_parent_non_rbac_id,$a_node_id,$a_params);
160  }
161 }
162 ?>