4 include_once(
"./Services/Object/classes/class.ilObject2GUI.php");
5 include_once(
"./Services/Component/classes/class.ilPlugin.php");
19 function __construct($a_ref_id = 0, $a_id_type = self::REPOSITORY_NODE_ID, $a_parent_node_id = 0)
25 if (!is_object($this->plugin))
27 die(
"ilObjectPluginGUI: Could not instantiate plugin object for type ".$this->
getType().
".");
39 $tpl->getStandardTemplate();
44 $tpl->setTitle($this->object->getTitle());
48 if (strtolower(
$_GET[
"baseClass"]) !=
"iladministrationgui")
61 if ($ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"]))
63 $ilNavigationHistory->addItem(
$_GET[
"ref_id"],
64 $ilCtrl->getLinkTarget($this, $this->getStandardCmd()), $this->
getType());
74 $lng->txt(
"obj_".ilObject::_lookupType(
$_GET[
"ref_id"],
true)));
79 $next_class = $this->ctrl->getNextClass($this);
80 $cmd = $this->ctrl->getCmd();
84 case "ilinfoscreengui":
89 case 'ilpermissiongui':
90 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
92 $ilTabs->setTabActive(
"perm_settings");
93 $ret = $ilCtrl->forwardCommand($perm_gui);
96 case 'ilobjectcopygui':
97 include_once
'./Services/Object/classes/class.ilObjectCopyGUI.php';
100 $this->ctrl->forwardCommand($cp);
103 case 'illearningprogressgui':
104 $ilTabs->setTabActive(
"learning_progress");
105 include_once
'./Services/Tracking/classes/class.ilLearningProgressGUI.php';
107 $this->object->getRefId(),
109 $this->ctrl->forwardCommand($new_gui);
111 case 'ilcommonactiondispatchergui':
112 include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
114 $this->ctrl->forwardCommand($gui);
117 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui")
126 if (
$cmd ==
"infoScreen")
128 $ilCtrl->setCmd(
"showSummary");
129 $ilCtrl->setCmdClass(
"ilinfoscreengui");
140 $this->performCommand(
$cmd);
161 $ilLocator->addItem($this->object->getTitle(),
173 return $this->plugin;
179 final protected function txt($a_var)
194 case self::CFORM_NEW:
197 case self::CFORM_IMPORT:
198 return $this->lng->txt(
"import");
200 case self::CFORM_CLONE:
201 return $this->
txt(
"objs_".$this->
getType().
"_duplicate");
232 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
234 $form->setTarget(
"_top");
235 $form->setFormAction($this->ctrl->getFormAction($this,
"save"));
236 $form->setTitle($this->
txt($a_new_type.
"_new"));
242 $ti->setRequired(
true);
251 $form->addCommandButton(
"save", $this->
txt($a_new_type.
"_add"));
252 $form->addCommandButton(
"cancel", $this->lng->txt(
"cancel"));
266 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
268 $form->setTarget(
"_top");
269 $form->setFormAction($ilCtrl->getFormAction($this,
"update"));
270 $form->setTitle($lng->txt(
"edit"));
276 $ti->setRequired(
true);
285 $form->addCommandButton(
"update", $lng->txt(
"save"));
299 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
301 $form->setTarget(
"_top");
302 $form->setFormAction($this->ctrl->getFormAction($this,
"importFile"));
303 $form->setTitle($this->lng->txt(
"import"));
305 include_once(
"./Services/Form/classes/class.ilFileInputGUI.php");
306 $fi =
new ilFileInputGUI($this->lng->txt(
"import_file"),
"importfile");
308 $fi->setRequired(
true);
311 $form->addCommandButton(
"importFile", $this->lng->txt(
"import"));
312 $form->addCommandButton(
"cancel", $this->lng->txt(
"cancel"));
327 $ilCtrl->initBaseClass(
"ilObjPluginDispatchGUI");
328 $ilCtrl->setTargetScript(
"ilias.php");
329 $ilCtrl->getCallStructure(strtolower(
"ilObjPluginDispatchGUI"));
336 $ilCtrl->setParameterByClass(get_class($this),
"ref_id", $newObj->getRefId());
337 $ilCtrl->redirectByClass(array(
"ilobjplugindispatchgui", get_class($this)), $this->
getAfterCreationCmd());
354 global $ilAccess, $ilTabs;
357 if ($ilAccess->checkAccess(
'visible',
"", $this->object->getRefId()))
359 $ilTabs->addTarget(
"info_short",
360 $this->ctrl->getLinkTargetByClass(
361 "ilinfoscreengui",
"showSummary"),
371 global $ilAccess, $ilTabs,
$ilCtrl;
374 if($ilAccess->checkAccess(
'edit_permission',
"", $this->object->getRefId()))
376 $ilTabs->addTarget(
"perm_settings",
377 $ilCtrl->getLinkTargetByClass(
"ilpermissiongui",
"perm"),
378 array(
"perm",
"info",
"owner"),
'ilpermissiongui');
390 $ilTabs->setTabActive(
"info_short");
394 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
396 $info->enablePrivateNotes();
399 $lng->loadLanguageModule(
"meta");
404 $ret = $ilCtrl->forwardCommand($info);
418 public static function _goto($a_target)
422 $t = explode(
"_", $a_target[0]);
424 $class_name = $a_target[1];
426 if ($ilAccess->checkAccess(
"read",
"",
$ref_id))
428 $ilCtrl->initBaseClass(
"ilObjPluginDispatchGUI");
429 $ilCtrl->setTargetScript(
"ilias.php");
430 $ilCtrl->getCallStructure(strtolower(
"ilObjPluginDispatchGUI"));
431 $ilCtrl->setParameterByClass($class_name,
"ref_id",
$ref_id);
432 $ilCtrl->redirectByClass(array(
"ilobjplugindispatchgui", $class_name),
"");
434 else if($ilAccess->checkAccess(
"visible",
"",
$ref_id))
436 $ilCtrl->initBaseClass(
"ilObjPluginDispatchGUI");
437 $ilCtrl->setTargetScript(
"ilias.php");
438 $ilCtrl->getCallStructure(strtolower(
"ilObjPluginDispatchGUI"));
439 $ilCtrl->setParameterByClass($class_name,
"ref_id",
$ref_id);
440 $ilCtrl->redirectByClass(array(
"ilobjplugindispatchgui", $class_name),
"infoScreen");
442 else if ($ilAccess->checkAccess(
"read",
"", ROOT_FOLDER_ID))
446 include_once(
"./Services/Object/classes/class.ilObjectGUI.php");