4 require_once
"./classes/class.ilObjectGUI.php";
24 $this->
ilObjectGUI($a_data,$a_id,$a_call_by_reference,$a_prepare_output);
32 $next_class = $this->ctrl->getNextClass($this);
36 case 'ilpermissiongui':
38 $ilTabs->activateTab(
"id_permissions");
39 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
41 $ret =& $this->ctrl->forwardCommand($perm_gui);
44 case "ilexternalfeedblockgui":
46 $ilTabs->activateTab(
"id_settings");
47 include_once(
"./Services/Block/classes/class.ilExternalFeedBlockGUI.php");
49 $fb_gui->setGuiObject($this);
50 if (is_object($this->
object))
52 $fb_gui->setRefId($this->object->getRefId());
54 $ret =& $this->ctrl->forwardCommand($fb_gui);
55 $tpl->setContent(
$ret);
60 $ilTabs->activateTab(
"export");
61 include_once(
"./Services/Export/classes/class.ilExportGUI.php");
63 $exp_gui->addFormat(
"xml");
64 $ret = $this->ctrl->forwardCommand($exp_gui);
69 $cmd = $this->ctrl->getCmd(
"view");
84 $ilCtrl->setCmdClass(
"ilexternalfeedblockgui");
85 $ilCtrl->setCmd(
"create");
93 function save($a_feed_block)
95 global $rbacadmin, $ilUser;
98 $_GET[
"new_type"] =
"feed";
99 $_POST[
"Fobject"][
"title"] = $a_feed_block->getTitle();
100 $_POST[
"Fobject"][
"desc"] = $a_feed_block->getFeedUrl();
102 $newObj->setOwner($ilUser->getId());
103 $newObj->updateOwner();
104 $a_feed_block->setContextObjId($newObj->getId());
105 $a_feed_block->setContextObjType(
"feed");
118 $this->ctrl->returnToParent($this);
130 $_POST[
"Fobject"][
"title"] = $a_feed_block->getTitle();
131 $_POST[
"Fobject"][
"desc"] = $a_feed_block->getFeedUrl();
144 $par = $tree->getParentId(
$_GET[
"ref_id"]);
145 $_GET[
"ref_id"] = $par;
160 $par = $tree->getParentId(
$_GET[
"ref_id"]);
161 $_GET[
"ref_id"] = $par;
174 if (in_array($ilCtrl->getCmd(), array(
"create",
"saveFeedBlock")))
179 $ilCtrl->setParameterByClass(
"ilexternalfeedblockgui",
"external_feed_block_id",
180 $_GET[
"external_feed_block_id"]);
181 $ilCtrl->saveParameter($this,
"external_feed_block_id");
183 if ($ilAccess->checkAccess(
'write',
'', $this->object->getRefId()))
185 $ilTabs->addTab(
"id_settings",
186 $lng->txt(
"settings"),
187 $this->ctrl->getLinkTargetByClass(
"ilexternalfeedblockgui",
"editFeedBlock"));
191 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId()) && DEVMODE == 1)
193 $ilTabs->addTab(
"export",
195 $this->ctrl->getLinkTargetByClass(
"ilexportgui",
""));
199 if($ilAccess->checkAccess(
'edit_permission',
'', $this->object->getRefId()))
201 $ilTabs->addTab(
"id_permissions",
202 $lng->txt(
"perm_settings"),
203 $this->ctrl->getLinkTargetByClass(
"ilpermissiongui",
"perm"));