00001 <?php 00002 /* 00003 +-----------------------------------------------------------------------------+ 00004 | ILIAS open source | 00005 +-----------------------------------------------------------------------------+ 00006 | Copyright (c) 1998-2006 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.ilObject.php"; 00025 00034 class ilObjPersonalDesktopSettings extends ilObject 00035 { 00036 00043 function ilObjPersonalDesktopSettings($a_id = 0,$a_call_by_reference = true) 00044 { 00045 $this->type = "pdts"; 00046 $this->ilObject($a_id,$a_call_by_reference); 00047 } 00048 00055 function update() 00056 { 00057 global $ilDB; 00058 00059 if (!parent::update()) 00060 { 00061 return false; 00062 } 00063 00064 return true; 00065 } 00066 00070 function read() 00071 { 00072 global $ilDB; 00073 00074 parent::read(); 00075 00076 } 00077 00078 00079 00080 00081 00088 function delete() 00089 { 00090 // always call parent delete function first!! 00091 if (!parent::delete()) 00092 { 00093 return false; 00094 } 00095 00096 //put here your module specific stuff 00097 00098 return true; 00099 } 00100 00110 function initDefaultRoles() 00111 { 00112 global $rbacadmin; 00113 00114 // create a local role folder 00115 //$rfoldObj = $this->createRoleFolder("Local roles","Role Folder of forum obj_no.".$this->getId()); 00116 00117 // create moderator role and assign role to rolefolder... 00118 //$roleObj = $rfoldObj->createRole("Moderator","Moderator of forum obj_no.".$this->getId()); 00119 //$roles[] = $roleObj->getId(); 00120 00121 //unset($rfoldObj); 00122 //unset($roleObj); 00123 00124 return $roles ? $roles : array(); 00125 } 00126 00140 function notify($a_event,$a_ref_id,$a_parent_non_rbac_id,$a_node_id,$a_params = 0) 00141 { 00142 global $tree; 00143 00144 switch ($a_event) 00145 { 00146 case "link": 00147 00148 //var_dump("<pre>",$a_params,"</pre>"); 00149 //echo "Module name ".$this->getRefId()." triggered by link event. Objects linked into target object ref_id: ".$a_ref_id; 00150 //exit; 00151 break; 00152 00153 case "cut": 00154 00155 //echo "Module name ".$this->getRefId()." triggered by cut event. Objects are removed from target object ref_id: ".$a_ref_id; 00156 //exit; 00157 break; 00158 00159 case "copy": 00160 00161 //var_dump("<pre>",$a_params,"</pre>"); 00162 //echo "Module name ".$this->getRefId()." triggered by copy event. Objects are copied into target object ref_id: ".$a_ref_id; 00163 //exit; 00164 break; 00165 00166 case "paste": 00167 00168 //echo "Module name ".$this->getRefId()." triggered by paste (cut) event. Objects are pasted into target object ref_id: ".$a_ref_id; 00169 //exit; 00170 break; 00171 00172 case "new": 00173 00174 //echo "Module name ".$this->getRefId()." triggered by paste (new) event. Objects are applied to target object ref_id: ".$a_ref_id; 00175 //exit; 00176 break; 00177 } 00178 00179 // At the beginning of the recursive process it avoids second call of the notify function with the same parameter 00180 if ($a_node_id==$_GET["ref_id"]) 00181 { 00182 $parent_obj =& $this->ilias->obj_factory->getInstanceByRefId($a_node_id); 00183 $parent_type = $parent_obj->getType(); 00184 if($parent_type == $this->getType()) 00185 { 00186 $a_node_id = (int) $tree->getParentId($a_node_id); 00187 } 00188 } 00189 00190 parent::notify($a_event,$a_ref_id,$a_parent_non_rbac_id,$a_node_id,$a_params); 00191 } 00192 } // END class.ilObjPersonalDesktopSettings 00193 ?>
1.7.1