5 include_once(
"./Services/Object/classes/class.ilObject2GUI.php");
6 include_once(
"./Modules/ItemGroup/classes/class.ilObjItemGroup.php");
29 $lng->loadLanguageModule(
"itgr");
31 $this->ctrl->saveParameter($this, array(
"ref_id"));
49 $next_class = $this->ctrl->getNextClass($this);
50 $cmd = $this->ctrl->getCmd();
54 case 'ilinfoscreengui':
60 case 'ilpermissiongui':
62 $ilTabs->activateTab(
"perm_settings");
64 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
66 $ret = $this->ctrl->forwardCommand($perm_gui);
69 case "ilcommonactiondispatchergui":
70 include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
72 $this->ctrl->forwardCommand($gui);
76 $cmd = $this->ctrl->getCmd(
"listMaterials");
92 global $ilLocator, $ilAccess;
94 if (is_object($this->
object) && $ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
96 $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this,
"listMaterials"),
"",
$_GET[
"ref_id"]);
102 $forms = array(self::CFORM_NEW => $this->
initCreateForm($a_new_type)
116 $ilCtrl->redirect($this,
"listMaterials");
132 $ilTabs->activateTab(
"materials");
135 $parent_node = $tree->getNodeData($tree->getParentId($this->object->getRefId()));
140 foreach($subtypes as $type => $sub_item)
142 if (!in_array($type, array(
"itgr",
"sess")))
145 if ($ilAccess->checkAccess(
"create_".$type,
"", $parent_node[
"child"], $parent_node[
"type"]))
148 $title = $this->lng->txt(
'obj_'.$type);
149 if ($sub_item[
"plugin"])
151 include_once(
"./Services/Component/classes/class.ilPlugin.php");
155 $subobj[] = array(
'value' => $type,
166 $this->ctrl->setParameter($this,
'ref_id', $parent_node[
"child"]);
169 $this->ctrl->setParameter($this,
'crtcb', $this->object->getRefId());
171 $this->lng->loadLanguageModule(
'cntr');
172 $this->tpl->setCreationSelector($this->ctrl->getFormAction($this),
173 $subobj,
'create', $this->lng->txt(
'add'));
175 $this->ctrl->setParameter($this,
'ref_id', $this->object->getRefId());
177 $this->ctrl->setParameter($this,
'crtcb',
'');
181 include_once(
"./Modules/ItemGroup/classes/class.ilItemGroupItemsTableGUI.php");
183 $tpl->setContent(
$tab->getHTML());
195 include_once
'./Modules/ItemGroup/classes/class.ilItemGroupItems.php';
198 $items = is_array(
$_POST[
'items'])
202 $item_group_items->setItems($items);
203 $item_group_items->update();
206 $ilCtrl->redirect($this,
"listMaterials");
215 $this->tpl->getStandardTemplate();
226 $ilHelp->setScreenIdComponent(
"itgr");
228 $parent_ref_id = $tree->getParentId($this->object->getRefId());
232 include_once(
"./Services/Link/classes/class.ilLink.php");
233 $ilTabs->setBackTarget(
234 $lng->txt(
'obj_'.$parent_type),
237 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
239 $ilTabs->addTab(
'materials',
240 $lng->txt(
'itgr_materials'),
241 $this->ctrl->getLinkTarget($this,
'listMaterials'));
243 $ilTabs->addTab(
'settings',
244 $lng->txt(
'settings'),
245 $this->ctrl->getLinkTarget($this,
'edit'));
248 if ($ilAccess->checkAccess(
"edit_permission",
"", $this->object->getRefId()))
250 $ilTabs->addTab(
"perm_settings",
251 $lng->txt(
'perm_settings'),
252 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm")
265 $targets = explode(
'_',$a_target);
267 $par_id = $tree->getParentId(
$ref_id);
269 if ($ilAccess->checkAccess(
"read",
"", $par_id))
271 include_once(
"./Services/Link/classes/class.ilLink.php");
275 else if ($ilAccess->checkAccess(
"read",
"", ROOT_FOLDER_ID))
282 $ilErr->raiseError($lng->txt(
"msg_no_perm_read"), $ilErr->FATAL);
292 $ref_id = $this->
object->getRefId();
293 $par_id = $tree->getParentId(
$ref_id);
295 if ($ilAccess->checkAccess(
"read",
"", $par_id))
297 include_once(
"./Services/Link/classes/class.ilLink.php");
311 include_once
'./Modules/ItemGroup/classes/class.ilItemGroupItems.php';