ILIAS  Release_3_10_x_branch Revision 61812
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilObjFileBasedLMGUI.php
Go to the documentation of this file.
1 <?php
2 /*
3  +-----------------------------------------------------------------------------+
4  | ILIAS open source |
5  +-----------------------------------------------------------------------------+
6  | Copyright (c) 1998-2006 ILIAS open source, University of Cologne |
7  | |
8  | This program is free software; you can redistribute it and/or |
9  | modify it under the terms of the GNU General Public License |
10  | as published by the Free Software Foundation; either version 2 |
11  | of the License, or (at your option) any later version. |
12  | |
13  | This program is distributed in the hope that it will be useful, |
14  | but WITHOUT ANY WARRANTY; without even the implied warranty of |
15  | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16  | GNU General Public License for more details. |
17  | |
18  | You should have received a copy of the GNU General Public License |
19  | along with this program; if not, write to the Free Software |
20  | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
21  +-----------------------------------------------------------------------------+
22 */
23 
24 
37 require_once("classes/class.ilObjectGUI.php");
38 require_once("./Modules/HTMLLearningModule/classes/class.ilObjFileBasedLM.php");
39 require_once("./Services/Table/classes/class.ilTableGUI.php");
40 require_once("classes/class.ilFileSystemGUI.php");
41 
43 {
45 
51  function ilObjFileBasedLMGUI($a_data,$a_id = 0,$a_call_by_reference = true, $a_prepare_output = true)
52  {
53  global $lng, $ilCtrl;
54 
55  $this->ctrl =& $ilCtrl;
56  $this->ctrl->saveParameter($this, array("ref_id"));
57 
58  #include_once("classes/class.ilTabsGUI.php");
59  #$this->tabs_gui =& new ilTabsGUI();
60 
61  $this->type = "htlm";
62  $lng->loadLanguageModule("content");
63 
64  parent::ilObjectGUI($a_data, $a_id, $a_call_by_reference, false);
65  //$this->actions = $this->objDefinition->getActions("mep");
66  $this->output_prepared = $a_prepare_output;
67 
68  }
69 
73  function &executeCommand()
74  {
75  global $ilUser, $ilLocator;
76 
77  if (strtolower($_GET["baseClass"]) == "iladministrationgui" ||
78  $this->getCreationMode() == true)
79  {
80  $this->prepareOutput();
81  }
82  else
83  {
84  $this->getTemplate();
85  $this->setLocator();
86  $this->setTabs();
87  }
88 
89  $next_class = $this->ctrl->getNextClass($this);
90  $cmd = $this->ctrl->getCmd();
91 
92  if(!$this->getCreationMode())
93  {
94  include_once 'payment/classes/class.ilPaymentObject.php';
95  if(ilPaymentObject::_isBuyable($_GET['ref_id']) &&
97  {
98  $this->tpl->getStandardTemplate();
99 
100  include_once 'Services/Payment/classes/class.ilShopPurchaseGUI.php';
101  $pp = new ilShopPurchaseGUI((int)$_GET['ref_id']);
102  $ret = $this->ctrl->forwardCommand($pp);
103  return true;
104  }
105  }
106 
107  switch($next_class)
108  {
109  case 'ilmdeditorgui':
110 
111  include_once 'Services/MetaData/classes/class.ilMDEditorGUI.php';
112 
113  $md_gui =& new ilMDEditorGUI($this->object->getId(), 0, $this->object->getType());
114  $md_gui->addObserver($this->object,'MDUpdateListener','General');
115 
116  $this->ctrl->forwardCommand($md_gui);
117  break;
118 
119  case "ilfilesystemgui":
120  $fs_gui =& new ilFileSystemGUI($this->object->getDataDirectory());
121  $fs_gui->activateLabels(true, $this->lng->txt("cont_purpose"));
122  if ($this->object->getStartFile() != "")
123  {
124  $fs_gui->labelFile($this->object->getStartFile(),
125  $this->lng->txt("cont_startfile"));
126  }
127  $fs_gui->addCommand($this, "setStartFile", $this->lng->txt("cont_set_start_file"));
128  $ret =& $this->ctrl->forwardCommand($fs_gui);
129  break;
130 
131  case "ilinfoscreengui":
132  $ret =& $this->outputInfoScreen();
133  break;
134 
135  case "illearningprogressgui":
136  include_once './Services/Tracking/classes/class.ilLearningProgressGUI.php';
137 
139  $this->object->getRefId(),
140  $_GET['user_id'] ? $_GET['user_id'] : $ilUser->getId());
141  $this->ctrl->forwardCommand($new_gui);
142  $this->tabs_gui->setTabActive('learning_progress');
143  break;
144 
145  case 'ilpermissiongui':
146  include_once("./classes/class.ilPermissionGUI.php");
147  $perm_gui =& new ilPermissionGUI($this);
148  $ret =& $this->ctrl->forwardCommand($perm_gui);
149  break;
150 
151  default:
152  $cmd = $this->ctrl->getCmd("frameset");
153  if (strtolower($_GET["baseClass"]) == "iladministrationgui" ||
154  $this->getCreationMode() == true)
155  {
156  $cmd.= "Object";
157  }
158  $ret =& $this->$cmd();
159  break;
160  }
161  //$this->tpl->show();
162  }
163 
169  function createObject()
170  {
171  global $rbacsystem;
172 
173  $new_type = $_POST["new_type"] ? $_POST["new_type"] : $_GET["new_type"];
174 
175  if (!$rbacsystem->checkAccess("create", $_GET["ref_id"], $new_type))
176  {
177  $this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
178  }
179  else
180  {
181  // fill in saved values in case of error
182  $data = array();
183  $data["fields"] = array();
184  $data["fields"]["title"] = ilUtil::prepareFormOutput($_SESSION["error_post_vars"]["Fobject"]["title"],true);
185  $data["fields"]["desc"] = ilUtil::stripSlashes($_SESSION["error_post_vars"]["Fobject"]["desc"]);
186 
187  $this->getTemplateFile("edit",$new_type);
188 
189  $this->tpl->setCurrentBlock("img");
190  $this->tpl->setVariable("TYPE_IMG",
191  ilUtil::getImagePath("icon_".$new_type.".gif"));
192  $this->tpl->setVariable("ALT_IMG",
193  $this->lng->txt("obj_".$new_type));
194  $this->tpl->parseCurrentBlock();
195 
196  foreach ($data["fields"] as $key => $val)
197  {
198  $this->tpl->setVariable("TXT_".strtoupper($key), $this->lng->txt($key));
199  $this->tpl->setVariable(strtoupper($key), $val);
200 
201  if ($this->prepare_output)
202  {
203  $this->tpl->parseCurrentBlock();
204  }
205  }
206 
207  $this->ctrl->setParameter($this, "new_type", $new_type);
208  $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this, "save"));
209  //$this->tpl->setVariable("FORMACTION", $this->getFormAction("save","adm_object.php?cmd=gateway&ref_id=".
210  // $_GET["ref_id"]."&new_type=".$new_type));
211  $this->tpl->setVariable("TXT_HEADER", $this->lng->txt($new_type."_new"));
212  $this->tpl->setVariable("TXT_CANCEL", $this->lng->txt("cancel"));
213  $this->tpl->setVariable("TXT_SUBMIT", $this->lng->txt($new_type."_add"));
214  $this->tpl->setVariable("CMD_SUBMIT", "save");
215  $this->tpl->setVariable("TARGET", ' target="'.
216  ilFrameTargetInfo::_getFrame("MainContent").'" ');
217  $this->tpl->setVariable("TXT_REQUIRED_FLD", $this->lng->txt("required_field"));
218  }
219  }
220 
221 
227  function properties()
228  {
229  global $rbacsystem, $tree, $tpl;
230 
231  // edit button
232  $this->tpl->addBlockfile("BUTTONS", "buttons", "tpl.buttons.html");
233 
234  // view link
235  require_once("./Modules/HTMLLearningModule/classes/class.ilObjFileBasedLMAccess.php");
236  $startfile = ilObjFileBasedLMAccess::_determineStartUrl($this->object->getId());
237 
238  if ($startfile != "")
239  {
240  $this->tpl->setCurrentBlock("btn_cell");
241  $this->tpl->setVariable("BTN_LINK",
242  "ilias.php?baseClass=ilHTLMPresentationGUI&ref_id=".$this->object->getRefID());
243  $this->tpl->setVariable("BTN_TARGET"," target=\"ilContObj".$this->object->getID()."\" ");
244  $this->tpl->setVariable("BTN_TXT",$this->lng->txt("view"));
245  $this->tpl->parseCurrentBlock();
246  }
247 
248  // lm properties
249  $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.fblm_properties.html",
250  'Modules/HTMLLearningModule');
251  $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
252  $this->tpl->setVariable("TXT_PROPERTIES", $this->lng->txt("cont_lm_properties"));
253 
254  // online
255  $this->tpl->setVariable("TXT_ONLINE", $this->lng->txt("cont_online"));
256  $this->tpl->setVariable("CBOX_ONLINE", "cobj_online");
257  $this->tpl->setVariable("VAL_ONLINE", "y");
258  if ($this->object->getOnline())
259  {
260  $this->tpl->setVariable("CHK_ONLINE", "checked");
261  }
262 
263  // start file
264  $this->tpl->setVariable("TXT_START_FILE", $this->lng->txt("cont_startfile"));
265  if ($startfile != "")
266  {
267  $this->tpl->setVariable("VAL_START_FILE", basename($startfile));
268  }
269  else
270  {
271  $this->tpl->setVariable("VAL_START_FILE", $this->lng->txt("no_start_file"));
272  }
273  $this->tpl->setVariable("TXT_SET_START_FILE", $this->lng->txt("cont_set_start_file"));
274  $this->tpl->setVariable("LINK_SET_START_FILE",
275  $this->ctrl->getLinkTargetByClass("ilfilesystemgui", "listFiles"));
276 
277  $this->tpl->setCurrentBlock("commands");
278  $this->tpl->setVariable("BTN_NAME", "saveProperties");
279  $this->tpl->setVariable("BTN_TEXT", $this->lng->txt("save"));
280  $this->tpl->parseCurrentBlock();
281 
282  }
283 
287  function saveProperties()
288  {
289  $this->object->setOnline(ilUtil::yn2tf($_POST["cobj_online"]));
290  $this->object->update();
291  ilUtil::sendInfo($this->lng->txt("msg_obj_modified"), true);
292  $this->ctrl->redirect($this, "properties");
293  }
294 
295 
300  function saveObject()
301  {
302  global $rbacadmin;
303 
304  // create and insert forum in objecttree
305  $newObj = parent::saveObject();
306 
307  // setup rolefolder & default local roles
308  //$roles = $newObj->initDefaultRoles();
309 
310  // ...finally assign role to creator of object
311  //$rbacadmin->assignUser($roles[0], $newObj->getOwner(), "y");
312 
313  // put here object specific stuff
314 
315  // always send a message
316  ilUtil::sendInfo($this->lng->txt("object_added"),true);
317  ilUtil::redirect("ilias.php?baseClass=ilHTLMEditorGUI&ref_id=".$newObj->getRefId());
318 
319  //ilUtil::redirect($this->getReturnLocation("save","adm_object.php?".$this->link_params));
320  }
321 
327  function editObject()
328  {
329  global $rbacsystem, $tree, $tpl;
330 
331  if (!$rbacsystem->checkAccess("visible,write",$this->object->getRefId()))
332  {
333  $this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
334  }
335 
336  // edit button
337  $this->tpl->addBlockfile("BUTTONS", "buttons", "tpl.buttons.html");
338 
339  }
340 
344  function edit()
345  {
346  $this->prepareOutput();
347  $this->editObject();
348  }
349 
353  function cancel()
354  {
355  //$this->setReturnLocation("cancel","fblm_edit.php?cmd=listFiles&ref_id=".$_GET["ref_id"]);
356  $this->cancelObject();
357  }
358 
364  function cancelObject($in_rep = false)
365  {
366  ilUtil::sendInfo($this->lng->txt("msg_cancel"),true);
367  ilUtil::redirect("repository.php?cmd=frameset&ref_id=".$_GET["ref_id"]);
368  //$this->ctrl->redirectByClass("ilrepositorygui", "frameset");
369  }
370 
371 
375  function update()
376  {
377  //$this->setReturnLocation("update", "fblm_edit.php?cmd=listFiles&ref_id=".$_GET["ref_id"].
378  // "&obj_id=".$_GET["obj_id"]);
379  $this->updateObject();
380  }
381 
382 
383  function setStartFile($a_file)
384  {
385  $this->object->setStartFile($a_file);
386  $this->object->update();
387  $this->ctrl->redirectByClass("ilfilesystemgui", "listFiles");
388  }
389 
393  function perm()
394  {
395  $this->setFormAction("permSave", "fblm_edit.php?cmd=permSave&ref_id=".$_GET["ref_id"].
396  "&obj_id=".$_GET["obj_id"]);
397  $this->setFormAction("addRole", "fblm_edit.php?ref_id=".$_GET["ref_id"].
398  "&obj_id=".$_GET["obj_id"]."&cmd=addRole");
399  $this->permObject();
400  }
401 
405  function saveBibItemObject($a_target = "")
406  {
407  include_once "./Modules/LearningModule/classes/class.ilBibItemGUI.php";
408  $bib_gui =& new ilBibItemGUI();
409  $bib_gui->setObject($this->object);
410  $bibItemIndex = $_POST["bibItemIndex"] ? $_POST["bibItemIndex"] : $_GET["bibItemIndex"];
411  $bibItemIndex *= 1;
412  if ($bibItemIndex < 0)
413  {
414  $bibItemIndex = 0;
415  }
416  $bibItemIndex = $bib_gui->save($bibItemIndex);
417 
418  if ($a_target == "")
419  {
420  $a_target = "adm_object.php?ref_id=" . $this->object->getRefId();
421  }
422 
423  $bib_gui->edit("ADM_CONTENT", "adm_content", $a_target, $bibItemIndex);
424  }
425 
429  function saveBibItem()
430  {
431  //$this->setTabs();
432  $this->saveBibItemObject($this->ctrl->getLinkTarget($this));
433  }
434 
438  function editBibItemObject($a_target = "")
439  {
440  include_once "./Modules/LearningModule/classes/class.ilBibItemGUI.php";
441  $bib_gui =& new ilBibItemGUI();
442  $bib_gui->setObject($this->object);
443  $bibItemIndex = $_POST["bibItemIndex"] ? $_POST["bibItemIndex"] : $_GET["bibItemIndex"];
444  $bibItemIndex *= 1;
445  if ($bibItemIndex < 0)
446  {
447  $bibItemIndex = 0;
448  }
449  if ($a_target == "")
450  {
451  $a_target = "adm_object.php?ref_id=" . $this->object->getRefId();
452  }
453 
454  $bib_gui->edit("ADM_CONTENT", "adm_content", $a_target, $bibItemIndex);
455  }
456 
460  function editBibItem()
461  {
462  //$this->setTabs();
463  $this->editBibItemObject($this->ctrl->getLinkTarget($this));
464  }
465 
469  function deleteBibItemObject($a_target = "")
470  {
471  include_once "./Modules/LearningModule/classes/class.ilBibItemGUI.php";
472  $bib_gui =& new ilBibItemGUI();
473  $bib_gui->setObject($this->object);
474  $bibItemIndex = $_POST["bibItemIndex"] ? $_POST["bibItemIndex"] : $_GET["bibItemIndex"];
475  $bib_gui->bib_obj->delete($_GET["bibItemName"], $_GET["bibItemPath"], $bibItemIndex);
476  if (strpos($bibItemIndex, ",") > 0)
477  {
478  $bibItemIndex = substr($bibItemIndex, 0, strpos($bibItemIndex, ","));
479  }
480  if ($a_target == "")
481  {
482  $a_target = "adm_object.php?ref_id=" . $this->object->getRefId();
483  }
484 
485  $bib_gui->edit("ADM_CONTENT", "adm_content", $a_target, $bibItemIndex);
486  }
487 
491  function deleteBibItem()
492  {
493  //$this->setTabs();
494  $this->deleteBibItemObject($this->ctrl->getLinkTarget($this));
495  }
496 
500  function addBibItemObject($a_target = "")
501  {
502  $bibItemName = $_POST["bibItemName"] ? $_POST["bibItemName"] : $_GET["bibItemName"];
503  $bibItemIndex = $_POST["bibItemIndex"] ? $_POST["bibItemIndex"] : $_GET["bibItemIndex"];
504  if ($bibItemName == "BibItem")
505  {
506  include_once "./Modules/LearningModule/classes/class.ilBibItem.php";
507  $bib_item =& new ilBibItem();
508  $bib_item->setId($this->object->getId());
509  $bib_item->setType($this->object->getType());
510  $bib_item->read();
511  }
512 
513  include_once "./Modules/LearningModule/classes/class.ilBibItemGUI.php";
514  $bib_gui =& new ilBibItemGUI();
515  $bib_gui->setObject($this->object);
516  if ($bibItemIndex == "")
517  $bibItemIndex = 0;
518  $bibItemPath = $_POST["bibItemPath"] ? $_POST["bibItemPath"] : $_GET["bibItemPath"];
519 
520  //if ($bibItemName != "" && $bibItemName != "BibItem")
521  if ($bibItemName != "")
522  {
523  $bib_gui->bib_obj->add($bibItemName, $bibItemPath, $bibItemIndex);
524  $data = $bib_gui->bib_obj->getElement("BibItem");
525  $bibItemIndex = (count($data) - 1);
526  }
527  else
528  {
529  ilUtil::sendInfo($this->lng->txt("bibitem_choose_element"), true);
530  }
531  if ($a_target == "")
532  {
533  $a_target = "adm_object.php?ref_id=" . $this->object->getRefId();
534  }
535 
536  $bib_gui->edit("ADM_CONTENT", "adm_content", $a_target, $bibItemIndex);
537  }
538 
542  function addBibItem()
543  {
544  //$this->setTabs();
545  $this->addBibItemObject($this->ctrl->getLinkTarget($this));
546  }
547 
553  function frameset()
554  {
555  $this->tpl = new ilTemplate("tpl.fblm_edit_frameset.html", false, false,
556  "Modules/HTMLLearningModule");
557  $this->tpl->setVariable("HREF_FILES",$this->ctrl->getLinkTargetByClass(
558  "ilfilesystemgui", "listFiles"));
559  $this->tpl->show();
560  exit;
561  }
562 
566  function explorer()
567  {
568  $this->tpl = new ilTemplate("tpl.main.html", true, true);
569 
570  $this->tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
571 
572  $this->tpl->addBlockFile("CONTENT", "content", "tpl.explorer.html");
573 
574  require_once ("./Modules/HTMLLearningModule/classes/class.ilFileExplorer.php");
575  $exp = new ilFileExplorer($this->lm->getDataDirectory());
576 
577  }
578 
582  function getTemplate()
583  {
584  global $lng;
585 
586  $this->tpl->addBlockFile("CONTENT", "content", "tpl.adm_content.html");
587  //$this->tpl->setVariable("HEADER", $a_header_title);
588  $this->tpl->addBlockFile("STATUSLINE", "statusline", "tpl.statusline.html");
589  //$this->tpl->setVariable("TXT_LOCATOR",$this->lng->txt("locator"));
590  }
591 
593  {
594  // Track access
595  include_once "Services/Tracking/classes/class.ilTracking.php";
596  ilTracking::_trackAccess($this->object->getId(),'htlm');
597 
598  require_once("./Modules/HTMLLearningModule/classes/class.ilObjFileBasedLMAccess.php");
599  $startfile = ilObjFileBasedLMAccess::_determineStartUrl($this->object->getId());
600  if ($startfile != "")
601  {
602  ilUtil::redirect($startfile);
603  }
604  }
605 
606  // InfoScreen methods
612  function infoScreen()
613  {
614  $this->ctrl->setCmd("showSummary");
615  $this->ctrl->setCmdClass("ilinfoscreengui");
616  $this->outputInfoScreen();
617  }
618 
622  function showInfoScreen()
623  {
624  $this->outputInfoScreen(true);
625  }
626 
630  function outputInfoScreen($a_standard_locator = true)
631  {
632  global $ilBench, $ilLocator, $ilAccess;
633 
634 
635  $this->tabs_gui->setTabActive('info_short');
636 
637  $this->lng->loadLanguageModule("meta");
638  include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
639 
640  $info = new ilInfoScreenGUI($this);
641  $info->enablePrivateNotes();
642  $info->enableLearningProgress();
643 
644  $info->enableNews();
645  if ($ilAccess->checkAccess("write", "", $_GET["ref_id"]))
646  {
647  $info->enableNewsEditing();
648 
649  $news_set = new ilSetting("news");
650  $enable_internal_rss = $news_set->get("enable_rss_for_internal");
651  if ($enable_internal_rss)
652  {
653  $info->setBlockProperty("news", "settings", true);
654  }
655  }
656 
657  // add read / back button
658  if ($ilAccess->checkAccess("read", "", $_GET["ref_id"]))
659  {
660  $info->addButton($this->lng->txt("view"),
661  "ilias.php?baseClass=ilHTLMPresentationGUI&ref_id=".$this->object->getRefID(),
662  ' target="ilContObj'.$this->object->getId().'" ');
663  }
664 
665  // show standard meta data section
666  $info->addMetaDataSections($this->object->getId(),0, $this->object->getType());
667 
668  // forward the command
669  $this->ctrl->forwardCommand($info);
670  }
671 
672 
673 
677  function setTabs()
678  {
679  $this->tpl->setCurrentBlock("header_image");
680  $this->tpl->setVariable("IMG_HEADER", ilUtil::getImagePath("icon_lm_b.gif"));
681  $this->tpl->parseCurrentBlock();
682 
683  $this->getTabs($this->tabs_gui);
684  #$this->tpl->setVariable("TABS", $this->tabs_gui->getHTML());
685  $this->tpl->setVariable("HEADER", $this->object->getTitle());
686  }
687 
693  function getTabs(&$tabs_gui)
694  {
695  global $rbacsystem,$ilUser;
696 
697 
698  if($rbacsystem->checkAccess('write',$this->ref_id))
699  {
700  // properties
701  $tabs_gui->addTarget("cont_list_files",
702  $this->ctrl->getLinkTargetByClass("ilfilesystemgui", "listFiles"), "",
703  "ilfilesystemgui");
704 
705  // info screen
706  $force_active = (strtolower($_GET["cmdClass"]) == "ilinfoscreengui"
707  || strtolower($_GET["cmdClass"]) == "ilnotegui")
708  ? true
709  : false;
710  $tabs_gui->addTarget("info_short",
711  $this->ctrl->getLinkTargetByClass(array("ilobjfilebasedlmgui",
712  "ilinfoscreengui"),
713  "showSummary"),
714  "infoScreen",
715  "",
716  "",
717  $force_active);
718 
719  // properties
720  $tabs_gui->addTarget("properties",
721  $this->ctrl->getLinkTarget($this, "properties"), "properties",
722  get_class($this));
723 
724  $tabs_gui->addTarget("meta_data",
725  $this->ctrl->getLinkTargetByClass('ilmdeditorgui',''),
726  "", "ilmdeditorgui");
727 
728  // edit bib item information
729  $tabs_gui->addTarget("bib_data",
730  $this->ctrl->getLinkTarget($this, "editBibItem"),
731  array("editBibItem", "saveBibItem", "deleteBibItem", "addBibItem"),
732  get_class($this));
733  }
734 
735  // learning progress
736  include_once './Services/Tracking/classes/class.ilLearningProgressAccess.php';
737  if(ilLearningProgressAccess::checkAccess($this->object->getRefId()))
738  {
739  $tabs_gui->addTarget('learning_progress',
740  $this->ctrl->getLinkTargetByClass(array('ilobjfilebasedlmgui','illearningprogressgui'),''),
741  '',
742  array('illplistofobjectsgui','illplistofsettingsgui','illearningprogressgui','illplistofprogressgui'));
743  }
744 
745  // perm
746  if ($rbacsystem->checkAccess('edit_permission',$this->object->getRefId()))
747  {
748  $tabs_gui->addTarget("perm_settings",
749  $this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm"), array("perm","info","owner"), 'ilpermissiongui');
750  }
751  }
752 
758  function _goto($a_target)
759  {
760  global $rbacsystem, $ilErr, $lng, $ilAccess;
761 
762  if ($ilAccess->checkAccess("visible", "", $a_target))
763  {
764  $_GET["ref_id"] = $a_target;
765  $_GET["cmd"] = "infoScreen";
766  include("repository.php");
767  exit;
768  }
769  else if ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID))
770  {
771  $_GET["cmd"] = "frameset";
772  $_GET["target"] = "";
773  $_GET["ref_id"] = ROOT_FOLDER_ID;
774  ilUtil::sendInfo(sprintf($lng->txt("msg_no_perm_read_item"),
776  include("repository.php");
777  exit;
778  }
779 
780  $ilErr->raiseError($lng->txt("msg_no_perm_read_lm"), $ilErr->FATAL);
781  }
782 
783  function addLocatorItems()
784  {
785  global $ilLocator;
786 
787  if (is_object($this->object))
788  {
789  $ilLocator->addItem($this->object->getTitle(),
790  $this->ctrl->getLinkTargetByClass("ilinfoscreengui", "showSummary"), "", $_GET["ref_id"]);
791  }
792  }
793 }
794 ?>