00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00038 require_once("classes/class.ilObjectGUI.php");
00039 require_once("content/classes/class.ilObjFileBasedLM.php");
00040 require_once("classes/class.ilTableGUI.php");
00041 require_once("classes/class.ilFileSystemGUI.php");
00042
00043 class ilObjFileBasedLMGUI extends ilObjectGUI
00044 {
00045 var $output_prepared;
00046
00052 function ilObjFileBasedLMGUI($a_data,$a_id = 0,$a_call_by_reference = true, $a_prepare_output = true)
00053 {
00054 global $lng, $ilCtrl;
00055
00056 $this->ctrl =& $ilCtrl;
00057 $this->ctrl->saveParameter($this, array("ref_id"));
00058
00059 #include_once("classes/class.ilTabsGUI.php");
00060 #$this->tabs_gui =& new ilTabsGUI();
00061
00062 $this->type = "htlm";
00063 $lng->loadLanguageModule("content");
00064
00065 parent::ilObjectGUI($a_data, $a_id, $a_call_by_reference, false);
00066
00067 $this->output_prepared = $a_prepare_output;
00068
00069 }
00070
00074 function &executeCommand()
00075 {
00076 global $ilUser;
00077
00078 if (strtolower($_GET["baseClass"]) == "iladministrationgui" ||
00079 $this->getCreationMode() == true)
00080 {
00081 $this->prepareOutput();
00082 }
00083 else
00084 {
00085 $this->getTemplate();
00086 $this->setLocator();
00087 $this->setTabs();
00088 }
00089
00090 $next_class = $this->ctrl->getNextClass($this);
00091 $cmd = $this->ctrl->getCmd();
00092
00093 switch($next_class)
00094 {
00095 case 'ilmdeditorgui':
00096
00097 include_once 'Services/MetaData/classes/class.ilMDEditorGUI.php';
00098
00099 $md_gui =& new ilMDEditorGUI($this->object->getId(), 0, $this->object->getType());
00100 $md_gui->addObserver($this->object,'MDUpdateListener','General');
00101
00102 $this->ctrl->forwardCommand($md_gui);
00103 break;
00104
00105 case "ilfilesystemgui":
00106 $fs_gui =& new ilFileSystemGUI($this->object->getDataDirectory());
00107
00108 $fs_gui->activateLabels(true, $this->lng->txt("cont_purpose"));
00109 if ($this->object->getStartFile() != "")
00110 {
00111 $fs_gui->labelFile($this->object->getStartFile(),
00112 $this->lng->txt("cont_startfile"));
00113 }
00114 $fs_gui->addCommand($this, "setStartFile", $this->lng->txt("cont_set_start_file"));
00115
00116 $ret =& $this->ctrl->forwardCommand($fs_gui);
00117 break;
00118
00119 case "ilinfoscreengui":
00120 $ret =& $this->outputInfoScreen();
00121 break;
00122
00123 case "illearningprogressgui":
00124 include_once './Services/Tracking/classes/class.ilLearningProgressGUI.php';
00125
00126 $new_gui =& new ilLearningProgressGUI(LP_MODE_REPOSITORY,
00127 $this->object->getRefId(),
00128 $_GET['user_id'] ? $_GET['user_id'] : $ilUser->getId());
00129 $this->ctrl->forwardCommand($new_gui);
00130 $this->tabs_gui->setTabActive('learning_progress');
00131 break;
00132
00133 case 'ilpermissiongui':
00134 include_once("./classes/class.ilPermissionGUI.php");
00135 $perm_gui =& new ilPermissionGUI($this);
00136 $ret =& $this->ctrl->forwardCommand($perm_gui);
00137 break;
00138
00139 default:
00140 $cmd = $this->ctrl->getCmd("frameset");
00141 if (strtolower($_GET["baseClass"]) == "iladministrationgui" ||
00142 $this->getCreationMode() == true)
00143 {
00144 $cmd.= "Object";
00145 }
00146 $ret =& $this->$cmd();
00147 break;
00148 }
00149
00150 }
00151
00157 function createObject()
00158 {
00159 global $rbacsystem;
00160
00161 $new_type = $_POST["new_type"] ? $_POST["new_type"] : $_GET["new_type"];
00162
00163 if (!$rbacsystem->checkAccess("create", $_GET["ref_id"], $new_type))
00164 {
00165 $this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
00166 }
00167 else
00168 {
00169
00170 $data = array();
00171 $data["fields"] = array();
00172 $data["fields"]["title"] = ilUtil::prepareFormOutput($_SESSION["error_post_vars"]["Fobject"]["title"],true);
00173 $data["fields"]["desc"] = ilUtil::stripSlashes($_SESSION["error_post_vars"]["Fobject"]["desc"]);
00174
00175 $this->getTemplateFile("edit",$new_type);
00176
00177 $this->tpl->setCurrentBlock("img");
00178 $this->tpl->setVariable("TYPE_IMG",
00179 ilUtil::getImagePath("icon_".$new_type.".gif"));
00180 $this->tpl->setVariable("ALT_IMG",
00181 $this->lng->txt("obj_".$new_type));
00182 $this->tpl->parseCurrentBlock();
00183
00184 foreach ($data["fields"] as $key => $val)
00185 {
00186 $this->tpl->setVariable("TXT_".strtoupper($key), $this->lng->txt($key));
00187 $this->tpl->setVariable(strtoupper($key), $val);
00188
00189 if ($this->prepare_output)
00190 {
00191 $this->tpl->parseCurrentBlock();
00192 }
00193 }
00194
00195 $this->ctrl->setParameter($this, "new_type", $new_type);
00196 $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this, "save"));
00197
00198
00199 $this->tpl->setVariable("TXT_HEADER", $this->lng->txt($new_type."_new"));
00200 $this->tpl->setVariable("TXT_CANCEL", $this->lng->txt("cancel"));
00201 $this->tpl->setVariable("TXT_SUBMIT", $this->lng->txt($new_type."_add"));
00202 $this->tpl->setVariable("CMD_SUBMIT", "save");
00203 $this->tpl->setVariable("TARGET", ' target="'.
00204 ilFrameTargetInfo::_getFrame("MainContent").'" ');
00205 $this->tpl->setVariable("TXT_REQUIRED_FLD", $this->lng->txt("required_field"));
00206 }
00207 }
00208
00209
00215 function properties()
00216 {
00217 global $rbacsystem, $tree, $tpl;
00218
00219
00220 $this->tpl->addBlockfile("BUTTONS", "buttons", "tpl.buttons.html");
00221
00222
00223 $dir = (!defined('ILIAS_MODULE'))
00224 ? "./content/"
00225 : "./";
00226
00227 $this->tpl->setCurrentBlock("btn_cell");
00228 $this->tpl->setVariable("BTN_LINK", $dir."fblm_presentation.php?ref_id=".$this->object->getRefID());
00229 $this->tpl->setVariable("BTN_TARGET"," target=\"ilContObj".$this->object->getID()."\" ");
00230 $this->tpl->setVariable("BTN_TXT",$this->lng->txt("view"));
00231 $this->tpl->parseCurrentBlock();
00232
00233
00234 $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.fblm_properties.html",'content');
00235 $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
00236 $this->tpl->setVariable("TXT_PROPERTIES", $this->lng->txt("cont_lm_properties"));
00237
00238
00239 $this->tpl->setVariable("TXT_ONLINE", $this->lng->txt("cont_online"));
00240 $this->tpl->setVariable("CBOX_ONLINE", "cobj_online");
00241 $this->tpl->setVariable("VAL_ONLINE", "y");
00242 if ($this->object->getOnline())
00243 {
00244 $this->tpl->setVariable("CHK_ONLINE", "checked");
00245 }
00246
00247
00248 $this->tpl->setVariable("TXT_START_FILE", $this->lng->txt("cont_startfile"));
00249 $this->tpl->setVariable("VAL_START_FILE", $this->object->getStartFile());
00250 $this->tpl->setVariable("TXT_SET_START_FILE", $this->lng->txt("cont_set_start_file"));
00251 $this->tpl->setVariable("LINK_SET_START_FILE",
00252 $this->ctrl->getLinkTargetByClass("ilfilesystemgui", "listFiles"));
00253
00254 $this->tpl->setCurrentBlock("commands");
00255 $this->tpl->setVariable("BTN_NAME", "saveProperties");
00256 $this->tpl->setVariable("BTN_TEXT", $this->lng->txt("save"));
00257 $this->tpl->parseCurrentBlock();
00258
00259 }
00260
00264 function saveProperties()
00265 {
00266 $this->object->setOnline(ilUtil::yn2tf($_POST["cobj_online"]));
00267 $this->object->update();
00268 sendInfo($this->lng->txt("msg_obj_modified"), true);
00269 $this->ctrl->redirect($this, "properties");
00270 }
00271
00272
00277 function saveObject()
00278 {
00279 global $rbacadmin;
00280
00281
00282 $newObj = parent::saveObject();
00283
00284
00285
00286
00287
00288
00289
00290
00291
00292
00293 sendInfo($this->lng->txt("object_added"),true);
00294 ilUtil::redirect("content/fblm_edit.php?ref_id=".$newObj->getRefId());
00295
00296
00297 }
00298
00304 function editObject()
00305 {
00306 global $rbacsystem, $tree, $tpl;
00307
00308 if (!$rbacsystem->checkAccess("visible,write",$this->object->getRefId()))
00309 {
00310 $this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
00311 }
00312
00313
00314 $this->tpl->addBlockfile("BUTTONS", "buttons", "tpl.buttons.html");
00315
00316 if (!defined("ILIAS_MODULE"))
00317 {
00318 $this->tpl->setCurrentBlock("btn_cell");
00319 $this->tpl->setVariable("BTN_LINK","content/fblm_edit.php?ref_id=".$this->object->getRefID());
00320 $this->tpl->setVariable("BTN_TARGET"," target=\"".ilFrameTargetInfo::_getFrame("MainContent")."\" ");
00321 $this->tpl->setVariable("BTN_TXT",$this->lng->txt("edit"));
00322 $this->tpl->parseCurrentBlock();
00323 }
00324
00325
00326 }
00327
00331 function edit()
00332 {
00333 $this->prepareOutput();
00334 $this->setFormAction("update", "fblm_edit.php?cmd=post&ref_id=".$_GET["ref_id"].
00335 "&obj_id=".$_GET["obj_id"]);
00336 $this->editObject();
00337
00338 }
00339
00343 function cancel()
00344 {
00345 $this->setReturnLocation("cancel","fblm_edit.php?cmd=listFiles&ref_id=".$_GET["ref_id"]);
00346 $this->cancelObject();
00347 }
00348
00354 function cancelObject($in_rep = false)
00355 {
00356 sendInfo($this->lng->txt("msg_cancel"),true);
00357 ilUtil::redirect("repository.php?cmd=frameset&ref_id=".$_GET["ref_id"]);
00358
00359 }
00360
00361
00365 function update()
00366 {
00367 $this->setReturnLocation("update", "fblm_edit.php?cmd=listFiles&ref_id=".$_GET["ref_id"].
00368 "&obj_id=".$_GET["obj_id"]);
00369 $this->updateObject();
00370 }
00371
00372
00373 function setStartFile($a_file)
00374 {
00375 $this->object->setStartFile($a_file);
00376 $this->object->update();
00377 $this->ctrl->redirectByClass("ilfilesystemgui", "listFiles");
00378 }
00379
00383 function perm()
00384 {
00385 $this->setFormAction("permSave", "fblm_edit.php?cmd=permSave&ref_id=".$_GET["ref_id"].
00386 "&obj_id=".$_GET["obj_id"]);
00387 $this->setFormAction("addRole", "fblm_edit.php?ref_id=".$_GET["ref_id"].
00388 "&obj_id=".$_GET["obj_id"]."&cmd=addRole");
00389 $this->permObject();
00390 }
00391
00395 function info()
00396 {
00397 $this->infoObject();
00398 }
00399
00403 function permSave()
00404 {
00405 $this->setReturnLocation("permSave",
00406 "fblm_edit.php?ref_id=".$_GET["ref_id"]."&obj_id=".$_GET["obj_id"]."&cmd=perm");
00407 $this->permSaveObject();
00408 }
00409
00413 function addRole()
00414 {
00415 $this->setReturnLocation("addRole",
00416 "fblm_edit.php?ref_id=".$_GET["ref_id"]."&obj_id=".$_GET["obj_id"]."&cmd=perm");
00417 $this->addRoleObject();
00418 }
00419
00423 function owner()
00424 {
00425 $this->ownerObject();
00426 }
00427
00431 function saveBibItemObject($a_target = "")
00432 {
00433 include_once "content/classes/class.ilBibItemGUI.php";
00434 $bib_gui =& new ilBibItemGUI();
00435 $bib_gui->setObject($this->object);
00436 $bibItemIndex = $_POST["bibItemIndex"] ? $_POST["bibItemIndex"] : $_GET["bibItemIndex"];
00437 $bibItemIndex *= 1;
00438 if ($bibItemIndex < 0)
00439 {
00440 $bibItemIndex = 0;
00441 }
00442 $bibItemIndex = $bib_gui->save($bibItemIndex);
00443
00444 if ($a_target == "")
00445 {
00446 $a_target = "adm_object.php?ref_id=" . $this->object->getRefId();
00447 }
00448
00449 $bib_gui->edit("ADM_CONTENT", "adm_content", $a_target, $bibItemIndex);
00450 }
00451
00455 function saveBibItem()
00456 {
00457
00458 $this->saveBibItemObject($this->ctrl->getLinkTarget($this));
00459 }
00460
00464 function editBibItemObject($a_target = "")
00465 {
00466 include_once "content/classes/class.ilBibItemGUI.php";
00467 $bib_gui =& new ilBibItemGUI();
00468 $bib_gui->setObject($this->object);
00469 $bibItemIndex = $_POST["bibItemIndex"] ? $_POST["bibItemIndex"] : $_GET["bibItemIndex"];
00470 $bibItemIndex *= 1;
00471 if ($bibItemIndex < 0)
00472 {
00473 $bibItemIndex = 0;
00474 }
00475 if ($a_target == "")
00476 {
00477 $a_target = "adm_object.php?ref_id=" . $this->object->getRefId();
00478 }
00479
00480 $bib_gui->edit("ADM_CONTENT", "adm_content", $a_target, $bibItemIndex);
00481 }
00482
00486 function editBibItem()
00487 {
00488
00489 $this->editBibItemObject($this->ctrl->getLinkTarget($this));
00490 }
00491
00495 function deleteBibItemObject($a_target = "")
00496 {
00497 include_once "content/classes/class.ilBibItemGUI.php";
00498 $bib_gui =& new ilBibItemGUI();
00499 $bib_gui->setObject($this->object);
00500 $bibItemIndex = $_POST["bibItemIndex"] ? $_POST["bibItemIndex"] : $_GET["bibItemIndex"];
00501 $bib_gui->bib_obj->delete($_GET["bibItemName"], $_GET["bibItemPath"], $bibItemIndex);
00502 if (strpos($bibItemIndex, ",") > 0)
00503 {
00504 $bibItemIndex = substr($bibItemIndex, 0, strpos($bibItemIndex, ","));
00505 }
00506 if ($a_target == "")
00507 {
00508 $a_target = "adm_object.php?ref_id=" . $this->object->getRefId();
00509 }
00510
00511 $bib_gui->edit("ADM_CONTENT", "adm_content", $a_target, $bibItemIndex);
00512 }
00513
00517 function deleteBibItem()
00518 {
00519
00520 $this->deleteBibItemObject($this->ctrl->getLinkTarget($this));
00521 }
00522
00526 function addBibItemObject($a_target = "")
00527 {
00528 $bibItemName = $_POST["bibItemName"] ? $_POST["bibItemName"] : $_GET["bibItemName"];
00529 $bibItemIndex = $_POST["bibItemIndex"] ? $_POST["bibItemIndex"] : $_GET["bibItemIndex"];
00530 if ($bibItemName == "BibItem")
00531 {
00532 include_once "content/classes/class.ilBibItem.php";
00533 $bib_item =& new ilBibItem();
00534 $bib_item->setId($this->object->getId());
00535 $bib_item->setType($this->object->getType());
00536 $bib_item->read();
00537 }
00538
00539 include_once "content/classes/class.ilBibItemGUI.php";
00540 $bib_gui =& new ilBibItemGUI();
00541 $bib_gui->setObject($this->object);
00542 if ($bibItemIndex == "")
00543 $bibItemIndex = 0;
00544 $bibItemPath = $_POST["bibItemPath"] ? $_POST["bibItemPath"] : $_GET["bibItemPath"];
00545
00546
00547 if ($bibItemName != "")
00548 {
00549 $bib_gui->bib_obj->add($bibItemName, $bibItemPath, $bibItemIndex);
00550 $data = $bib_gui->bib_obj->getElement("BibItem");
00551 $bibItemIndex = (count($data) - 1);
00552 }
00553 else
00554 {
00555 sendInfo($this->lng->txt("bibitem_choose_element"), true);
00556 }
00557 if ($a_target == "")
00558 {
00559 $a_target = "adm_object.php?ref_id=" . $this->object->getRefId();
00560 }
00561
00562 $bib_gui->edit("ADM_CONTENT", "adm_content", $a_target, $bibItemIndex);
00563 }
00564
00568 function addBibItem()
00569 {
00570
00571 $this->addBibItemObject($this->ctrl->getLinkTarget($this));
00572 }
00573
00579 function frameset()
00580 {
00581 $this->tpl = new ilTemplate("tpl.fblm_edit_frameset.html", false, false, "content");
00582 $this->tpl->setVariable("HREF_FILES",$this->ctrl->getLinkTargetByClass(
00583 "ilfilesystemgui", "listFiles"));
00584 $this->tpl->show();
00585 exit;
00586 }
00587
00591 function explorer()
00592 {
00593 $this->tpl = new ilTemplate("tpl.main.html", true, true);
00594
00595 $this->tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
00596
00597 $this->tpl->addBlockFile("CONTENT", "content", "tpl.explorer.html");
00598
00599 require_once ("content/classes/class.ilFileExplorer.php");
00600 $exp = new ilFileExplorer($this->lm->getDataDirectory());
00601
00602 }
00603
00604
00608 function setLocator($a_tree = "", $a_id = "", $scriptname="adm_object.php")
00609 {
00610 global $ilias_locator, $tree;
00611 if (!defined("ILIAS_MODULE"))
00612 {
00613 parent::setLocator();
00614 }
00615 else
00616 {
00617 $a_tree =& $tree;
00618 $a_id = $_GET["ref_id"];
00619
00620 $this->tpl->addBlockFile("LOCATOR", "locator", "tpl.locator.html");
00621
00622 $path = $a_tree->getPathFull($a_id);
00623
00624
00625 $modifier = 1;
00626
00627 if (!empty($_GET["obj_id"]))
00628 {
00629 $modifier = 0;
00630 }
00631
00632
00633 $i = 1;
00634
00635 if ($this->object->getType() != "grp" && ($_GET["cmd"] == "delete" || $_GET["cmd"] == "edit"))
00636 {
00637 unset($path[count($path) - 1]);
00638 }
00639
00640 foreach ($path as $key => $row)
00641 {
00642
00643 if ($key < count($path) - $modifier)
00644 {
00645 $this->tpl->touchBlock("locator_separator");
00646 }
00647
00648 $this->tpl->setCurrentBlock("locator_item");
00649 if ($row["child"] != $a_tree->getRootId())
00650 {
00651 $this->tpl->setVariable("ITEM", $row["title"]);
00652 }
00653 else
00654 {
00655 $this->tpl->setVariable("ITEM", $this->lng->txt("repository"));
00656 }
00657 if($row["type"] == "htlm")
00658 {
00659 $this->tpl->setVariable("LINK_ITEM", "fblm_edit.php?ref_id=".$row["child"]);
00660 }
00661 else
00662 {
00663 $this->tpl->setVariable("LINK_ITEM", "../repository.php?cmd=frameset&ref_id=".$row["child"]);
00664 $t_frame = ilFrameTargetInfo::_getFrame("MainContent");
00665 $this->tpl->setVariable("LINK_TARGET", " target=\"$t_frame\" ");
00666 }
00667
00668 $this->tpl->parseCurrentBlock();
00669
00670 $this->tpl->setCurrentBlock("locator");
00671
00672
00673
00674 if ($row["child"] != $a_tree->getRootId())
00675 {
00676 $ilias_locator->navigate($i++,$row["title"],"../repository.php?ref_id=".$row["child"],
00677 ilFrameTargetInfo::_getFrame("MainContent"));
00678 }
00679 else
00680 {
00681 $ilias_locator->navigate($i++,$this->lng->txt("repository"),"../repository.php?ref_id=".$row["child"],
00682 ilFrameTargetInfo::_getFrame("MainContent"));
00683 }
00684 }
00685
00686
00687
00688
00689
00690
00691
00692
00693
00694
00695
00696
00697
00698
00699 $this->tpl->setVariable("TXT_LOCATOR",$debug.$this->lng->txt("locator"));
00700 $this->tpl->parseCurrentBlock();
00701 }
00702
00703 }
00704
00708 function getTemplate()
00709 {
00710 global $lng;
00711
00712 $this->tpl->addBlockFile("CONTENT", "content", "tpl.adm_content.html");
00713
00714 $this->tpl->addBlockFile("STATUSLINE", "statusline", "tpl.statusline.html");
00715
00716 }
00717
00718 function showLearningModule()
00719 {
00720
00721 include_once "Services/Tracking/classes/class.ilTracking.php";
00722 ilTracking::_trackAccess($this->object->getId(),'htlm');
00723
00724 $dir = $this->object->getDataDirectory();
00725 if (($this->object->getStartFile() != "") &&
00726 (@is_file($dir."/".$this->object->getStartFile())))
00727 {
00728 ilUtil::redirect("../".$dir."/".$this->object->getStartFile());
00729 }
00730 else if (@is_file($dir."/index.html"))
00731 {
00732 ilUtil::redirect("../".$dir."/index.html");
00733 }
00734 else if (@is_file($dir."/index.htm"))
00735 {
00736 ilUtil::redirect("../".$dir."/index.htm");
00737 }
00738 }
00739
00740
00746 function infoScreen()
00747 {
00748 $this->ctrl->setCmd("showSummary");
00749 $this->ctrl->setCmdClass("ilinfoscreengui");
00750 $this->outputInfoScreen();
00751 }
00752
00756 function showInfoScreen()
00757 {
00758 $this->outputInfoScreen(true);
00759 }
00760
00764 function outputInfoScreen($a_standard_locator = true)
00765 {
00766 global $ilBench, $ilLocator, $ilAccess;
00767
00768
00769 $this->tabs_gui->setTabActive('info_short');
00770
00771 $this->lng->loadLanguageModule("meta");
00772 include_once("classes/class.ilInfoScreenGUI.php");
00773
00774 $info = new ilInfoScreenGUI($this);
00775 $info->enablePrivateNotes();
00776 $info->enableLearningProgress();
00777
00778
00779 if ($ilAccess->checkAccess("read", "", $_GET["ref_id"]))
00780 {
00781 $dir = (!defined('ILIAS_MODULE'))
00782 ? "./content/"
00783 : "./";
00784
00785 $info->addButton($this->lng->txt("view"),
00786 $dir."fblm_presentation.php?ref_id=".$this->object->getRefID(),
00787 ' target="ilContObj'.$this->object->getId().'" ');
00788 }
00789
00790
00791 $info->addMetaDataSections($this->object->getId(),0, $this->object->getType());
00792
00793
00794 $this->ctrl->forwardCommand($info);
00795 }
00796
00797
00798
00802 function setTabs()
00803 {
00804 $this->tpl->setCurrentBlock("header_image");
00805 $this->tpl->setVariable("IMG_HEADER", ilUtil::getImagePath("icon_lm_b.gif"));
00806 $this->tpl->parseCurrentBlock();
00807
00808 $this->getTabs($this->tabs_gui);
00809 #$this->tpl->setVariable("TABS", $this->tabs_gui->getHTML());
00810 $this->tpl->setVariable("HEADER", $this->object->getTitle());
00811 }
00812
00818 function getTabs(&$tabs_gui)
00819 {
00820 global $rbacsystem;
00821
00822
00823 if($rbacsystem->checkAccess('write',$this->ref_id))
00824 {
00825
00826 $tabs_gui->addTarget("cont_list_files",
00827 $this->ctrl->getLinkTargetByClass("ilfilesystemgui", "listFiles"), "",
00828 "ilfilesystemgui");
00829
00830
00831 $force_active = (strtolower($_GET["cmdClass"]) == "ilinfoscreengui"
00832 || strtolower($_GET["cmdClass"]) == "ilnotegui")
00833 ? true
00834 : false;
00835 $tabs_gui->addTarget("info_short",
00836 $this->ctrl->getLinkTargetByClass(array("ilobjfilebasedlmgui",
00837 "ilinfoscreengui"),
00838 "showSummary"),
00839 "infoScreen",
00840 "",
00841 "",
00842 $force_active);
00843
00844
00845 $tabs_gui->addTarget("properties",
00846 $this->ctrl->getLinkTarget($this, "properties"), "properties",
00847 get_class($this));
00848
00849 $tabs_gui->addTarget("meta_data",
00850 $this->ctrl->getLinkTargetByClass('ilmdeditorgui',''),
00851 "", "ilmdeditorgui");
00852
00853
00854 $tabs_gui->addTarget("bib_data",
00855 $this->ctrl->getLinkTarget($this, "editBibItem"),
00856 array("editBibItem", "saveBibItem", "deleteBibItem", "addBibItem"),
00857 get_class($this));
00858 }
00859
00860
00861 include_once("Services/Tracking/classes/class.ilObjUserTracking.php");
00862 if($rbacsystem->checkAccess('write',$this->ref_id) and ilObjUserTracking::_enabledLearningProgress())
00863 {
00864 $tabs_gui->addTarget('learning_progress',
00865 $this->ctrl->getLinkTargetByClass(array('ilobjfilebasedlmgui','illearningprogressgui'),''),
00866 '',
00867 array('illplistofobjectsgui','illplistofsettingsgui','illearningprogressgui','illplistofprogressgui'));
00868 }
00869
00870
00871 if ($rbacsystem->checkAccess('edit_permission',$this->object->getRefId()))
00872 {
00873 $tabs_gui->addTarget("perm_settings",
00874 $this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm"), array("perm","info","owner"), 'ilpermissiongui');
00875 }
00876 }
00877
00883 function _goto($a_target)
00884 {
00885 global $rbacsystem, $ilErr, $lng, $ilAccess;
00886
00887 if ($ilAccess->checkAccess("visible", "", $a_target))
00888 {
00889 $_GET["ref_id"] = $a_target;
00890 $_GET["cmd"] = "infoScreen";
00891 include("repository.php");
00892 exit;
00893 }
00894 else if ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID))
00895 {
00896 $_GET["cmd"] = "frameset";
00897 $_GET["target"] = "";
00898 $_GET["ref_id"] = ROOT_FOLDER_ID;
00899 sendInfo(sprintf($lng->txt("msg_no_perm_read_item"),
00900 ilObject::_lookupTitle(ilObject::_lookupObjId($a_target))), true);
00901 include("repository.php");
00902 exit;
00903 }
00904
00905 $ilErr->raiseError($lng->txt("msg_no_perm_read_lm"), $ilErr->FATAL);
00906 }
00907
00908 }
00909 ?>