39 function __construct($a_node_type, $a_access_handler, $a_obj_type, $a_node_id, $a_obj_id)
41 $this->node_type = (int)$a_node_type;
42 $this->access_handler = $a_access_handler;
43 $this->obj_type = (string)$a_obj_type;
44 $this->node_id = (int)$a_node_id;
45 $this->obj_id = (int)$a_obj_id;
56 $this->obj_id, $this->sub_type, $this->sub_id);
70 static function buildAjaxHash($a_node_type, $a_node_id, $a_obj_type, $a_obj_id, $a_sub_type = null, $a_sub_id = null)
72 return $a_node_type.
";".$a_node_id.
";".$a_obj_type.
";".
73 $a_obj_id.
";".$a_sub_type.
";".$a_sub_id;
85 if(isset(
$_GET[
"cadh"]))
87 $parts = explode(
";", (
string)
$_GET[
"cadh"]);
98 case self::TYPE_REPOSITORY:
99 $access_handler = $ilAccess;
102 case self::TYPE_WORKSPACE:
103 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
105 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
122 if(
$node_type == self::TYPE_REPOSITORY && $obj_type !=
"poll")
124 $dispatcher->enableCommentsSettings(
true);
136 if ($this->node_id &&
137 !$this->access_handler->checkAccess(
"visible",
"", $this->node_id) &&
138 !$this->access_handler->checkAccess(
"read",
"", $this->node_id))
143 $next_class = $ilCtrl->getNextClass($this);
144 $cmd = $ilCtrl->getCmd();
146 $ilCtrl->saveParameter($this,
"cadh");
158 include_once
"Services/Notes/classes/class.ilNoteGUI.php";
160 $note_gui->enablePrivateNotes(
true);
162 $has_write = $this->access_handler->checkAccess(
"write",
"", $this->node_id);
163 if($has_write && $ilSetting->get(
"comments_del_tutor", 1))
165 $note_gui->enablePublicNotesDeletion(
true);
169 if($this->enable_comments_settings)
173 $this->access_handler->checkAccess(
"edit_permissions",
"", $this->node_id))
175 $note_gui->enableCommentsSettings();
180 else if($this->sub_id)
182 $note_gui->enablePublicNotes(
true);
185 $ilCtrl->forwardCommand($note_gui);
189 include_once
"Services/Tagging/classes/class.ilTaggingGUI.php";
191 $tags_gui->setObject($this->obj_id, $this->obj_type);
192 $ilCtrl->forwardCommand($tags_gui);
195 case "ilobjectactivationgui":
196 $ilCtrl->setParameter($this,
"parent_id", (
int)
$_REQUEST[
'parent_id']);
197 include_once
'Services/Object/classes/class.ilObjectActivationGUI.php';
199 $ilCtrl->forwardCommand($act_gui);
203 include_once(
"./Services/Rating/classes/class.ilRatingGUI.php");
207 $rating_gui->setObject($this->obj_id, $this->obj_type, $this->sub_id, $this->sub_type);
212 $rating_gui->setObject($this->obj_id, $this->obj_type);
214 $ilCtrl->forwardCommand($rating_gui);
215 if($this->rating_callback)
219 $ilCtrl->redirect($this->rating_callback[0], $this->rating_callback[1]);
238 $this->sub_type = (string)$a_sub_obj_type;
239 $this->sub_id = (int)$a_sub_obj_id;
249 $this->enable_comments_settings = (bool)$a_value;
260 $this->rating_callback = array($a_gui, $a_cmd);
269 if ($this->node_id &&
270 !$this->access_handler->checkAccess(
"visible",
"", $this->node_id) &&
271 !$this->access_handler->checkAccess(
"read",
"", $this->node_id))
276 include_once
'Services/Object/classes/class.ilObjectListGUIFactory.php';
280 $this->header_action->enableCopy(
false);
281 $this->header_action->enableCut(
false);
282 $this->header_action->enableDelete(
false);
283 $this->header_action->enableLink(
false);
284 $this->header_action->enableInfoscreen(
false);
285 $this->header_action->enablePayment(
false);
286 $this->header_action->enableTimings(
false);
288 switch($this->node_type)
290 case self::TYPE_REPOSITORY:
291 $this->header_action->enableSubscribe(
true);
295 case self::TYPE_WORKSPACE:
296 $this->header_action->enableSubscribe(
false);
301 $this->header_action->initItem($this->node_id, $this->obj_id,
"",
"",
303 $this->header_action->setHeaderSubObject($this->sub_type, $this->sub_id);
304 $this->header_action->setAjaxHash($this->
getAjaxHash());
306 return $this->header_action;