• Main Page
  • Related Pages
  • Namespaces
  • Data Structures
  • Files
  • File List
  • Globals

content/classes/class.ilObjFileBasedLMGUI.php

Go to the documentation of this file.
00001 <?php
00002 /*
00003         +-----------------------------------------------------------------------------+
00004         | ILIAS open source                                                           |
00005         +-----------------------------------------------------------------------------+
00006         | Copyright (c) 1998-2005 ILIAS open source, University of Cologne            |
00007         |                                                                             |
00008         | This program is free software; you can redistribute it and/or               |
00009         | modify it under the terms of the GNU General Public License                 |
00010         | as published by the Free Software Foundation; either version 2              |
00011         | of the License, or (at your option) any later version.                      |
00012         |                                                                             |
00013         | This program is distributed in the hope that it will be useful,             |
00014         | but WITHOUT ANY WARRANTY; without even the implied warranty of              |
00015         | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               |
00016         | GNU General Public License for more details.                                |
00017         |                                                                             |
00018         | You should have received a copy of the GNU General Public License           |
00019         | along with this program; if not, write to the Free Software                 |
00020         | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. |
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, $a_prepare_output);
00066                 //$this->actions = $this->objDefinition->getActions("mep");
00067                 $this->output_prepared = $a_prepare_output;
00068 
00069                 if (defined("ILIAS_MODULE"))
00070                 {
00071                         $this->setTabTargetScript("fblm_edit.php");
00072                 }
00073         }
00074 
00078         function executeCommand()
00079         {
00080                 $fs_gui =& new ilFileSystemGUI($this->object->getDataDirectory());
00081                 $fs_gui->getTabs($this->tabs_gui);
00082                 $this->getTemplate();
00083                 $this->setLocator();
00084                 $this->setTabs();
00085 
00086                 $next_class = $this->ctrl->getNextClass($this);
00087                 $cmd = $this->ctrl->getCmd();
00088 //echo "<br>cmd:$cmd:next_class:$next_class:";
00089                 switch($next_class)
00090                 {
00091                         case 'ilmdeditorgui':
00092 
00093                                 include_once 'Services/MetaData/classes/class.ilMDEditorGUI.php';
00094 
00095                                 $md_gui =& new ilMDEditorGUI($this->object->getId(), 0, $this->object->getType());
00096                                 $md_gui->addObserver($this->object,'MDUpdateListener','General');
00097 
00098                                 $this->ctrl->forwardCommand($md_gui);
00099                                 break;
00100 
00101                         case "ilfilesystemgui":
00102 //echo "<br>data_dir:".$this->object->getDataDirectory().":";
00103                                 $fs_gui->activateLabels(true, $this->lng->txt("cont_purpose"));
00104                                 if ($this->object->getStartFile() != "")
00105                                 {
00106                                         $fs_gui->labelFile($this->object->getStartFile(),
00107                                                 $this->lng->txt("cont_startfile"));
00108                                 }
00109                                 $fs_gui->addCommand($this, "setStartFile", $this->lng->txt("cont_set_start_file"));
00110                                 //$ret =& $fs_gui->executeCommand();
00111                                 $ret =& $this->ctrl->forwardCommand($fs_gui);
00112                                 break;
00113 
00114                         default:
00115                                 $cmd = $this->ctrl->getCmd("frameset");
00116                                 $ret =& $this->$cmd();
00117                                 break;
00118                 }
00119                 $this->tpl->show();
00120         }
00121 
00122 
00128         function properties()
00129         {
00130                 global $rbacsystem, $tree, $tpl;
00131 
00132                 // edit button
00133                 $this->tpl->addBlockfile("BUTTONS", "buttons", "tpl.buttons.html");
00134 
00135                 // view link
00136                 $this->tpl->setCurrentBlock("btn_cell");
00137                 $this->tpl->setVariable("BTN_LINK", "fblm_presentation.php?ref_id=".$this->object->getRefID());
00138                 $this->tpl->setVariable("BTN_TARGET"," target=\"ilContObj".$this->object->getID()."\" ");
00139                 $this->tpl->setVariable("BTN_TXT",$this->lng->txt("view"));
00140                 $this->tpl->parseCurrentBlock();
00141 
00142                 // lm properties
00143                 $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.fblm_properties.html", true);
00144                 $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
00145                 $this->tpl->setVariable("TXT_PROPERTIES", $this->lng->txt("cont_lm_properties"));
00146 
00147                 // online
00148                 $this->tpl->setVariable("TXT_ONLINE", $this->lng->txt("cont_online"));
00149                 $this->tpl->setVariable("CBOX_ONLINE", "cobj_online");
00150                 $this->tpl->setVariable("VAL_ONLINE", "y");
00151                 if ($this->object->getOnline())
00152                 {
00153                         $this->tpl->setVariable("CHK_ONLINE", "checked");
00154                 }
00155 
00156                 // start file
00157                 $this->tpl->setVariable("TXT_START_FILE", $this->lng->txt("cont_startfile"));
00158                 $this->tpl->setVariable("VAL_START_FILE", $this->object->getStartFile());
00159                 $this->tpl->setVariable("TXT_SET_START_FILE", $this->lng->txt("cont_set_start_file"));
00160                 $this->tpl->setVariable("LINK_SET_START_FILE",
00161                         $this->ctrl->getLinkTargetByClass("ilfilesystemgui", "listFiles"));
00162 
00163                 $this->tpl->setCurrentBlock("commands");
00164                 $this->tpl->setVariable("BTN_NAME", "saveProperties");
00165                 $this->tpl->setVariable("BTN_TEXT", $this->lng->txt("save"));
00166                 $this->tpl->parseCurrentBlock();
00167 
00168         }
00169 
00173         function saveProperties()
00174         {
00175                 $this->object->setOnline(ilUtil::yn2tf($_POST["cobj_online"]));
00176                 $this->object->update();
00177                 sendInfo($this->lng->txt("msg_obj_modified"), true);
00178                 $this->ctrl->redirect($this, "properties");
00179         }
00180 
00181 
00186         function saveObject()
00187         {
00188                 global $rbacadmin;
00189 
00190                 // create and insert forum in objecttree
00191                 $newObj = parent::saveObject();
00192 
00193                 // setup rolefolder & default local roles
00194                 //$roles = $newObj->initDefaultRoles();
00195 
00196                 // ...finally assign role to creator of object
00197                 //$rbacadmin->assignUser($roles[0], $newObj->getOwner(), "y");
00198 
00199                 // put here object specific stuff
00200 
00201                 // always send a message
00202                 sendInfo($this->lng->txt("object_added"),true);
00203 
00204                 ilUtil::redirect($this->getReturnLocation("save","adm_object.php?".$this->link_params));
00205         }
00206 
00212         function editObject()
00213         {
00214                 global $rbacsystem, $tree, $tpl;
00215 
00216                 if (!$rbacsystem->checkAccess("visible,write",$this->object->getRefId()))
00217                 {
00218                         $this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
00219                 }
00220 
00221                 // edit button
00222                 $this->tpl->addBlockfile("BUTTONS", "buttons", "tpl.buttons.html");
00223 
00224                 if (!defined("ILIAS_MODULE"))
00225                 {
00226                         $this->tpl->setCurrentBlock("btn_cell");
00227                         $this->tpl->setVariable("BTN_LINK","content/fblm_edit.php?ref_id=".$this->object->getRefID());
00228                         $this->tpl->setVariable("BTN_TARGET"," target=\"bottom\" ");
00229                         $this->tpl->setVariable("BTN_TXT",$this->lng->txt("edit"));
00230                         $this->tpl->parseCurrentBlock();
00231                 }
00232 
00233                 //parent::editObject();
00234         }
00235 
00239         function edit()
00240         {
00241                 $this->prepareOutput();
00242                 $this->setFormAction("update", "fblm_edit.php?cmd=post&ref_id=".$_GET["ref_id"].
00243                         "&obj_id=".$_GET["obj_id"]);
00244                 $this->editObject();
00245                 $this->tpl->show();
00246         }
00247 
00251         function cancel()
00252         {
00253                 $this->setReturnLocation("cancel","fblm_edit.php?cmd=listFiles&ref_id=".$_GET["ref_id"]);
00254                 $this->cancelObject();
00255         }
00256 
00260         function update()
00261         {
00262                 $this->setReturnLocation("update", "fblm_edit.php?cmd=listFiles&ref_id=".$_GET["ref_id"].
00263                         "&obj_id=".$_GET["obj_id"]);
00264                 $this->updateObject();
00265         }
00266 
00267 
00268         function setStartFile($a_file)
00269         {
00270                 $this->object->setStartFile($a_file);
00271                 $this->object->update();
00272                 $this->ctrl->redirectByClass("ilfilesystemgui", "listFiles");
00273         }
00274 
00278         function perm()
00279         {
00280                 $this->setFormAction("permSave", "fblm_edit.php?cmd=permSave&ref_id=".$_GET["ref_id"].
00281                         "&obj_id=".$_GET["obj_id"]);
00282                 $this->setFormAction("addRole", "fblm_edit.php?ref_id=".$_GET["ref_id"].
00283                         "&obj_id=".$_GET["obj_id"]."&cmd=addRole");
00284                 $this->permObject();
00285         }
00286 
00290         function info()
00291         {
00292                 $this->infoObject();
00293         }
00294 
00298         function permSave()
00299         {
00300                 $this->setReturnLocation("permSave",
00301                         "fblm_edit.php?ref_id=".$_GET["ref_id"]."&obj_id=".$_GET["obj_id"]."&cmd=perm");
00302                 $this->permSaveObject();
00303         }
00304 
00308         function addRole()
00309         {
00310                 $this->setReturnLocation("addRole",
00311                         "fblm_edit.php?ref_id=".$_GET["ref_id"]."&obj_id=".$_GET["obj_id"]."&cmd=perm");
00312                 $this->addRoleObject();
00313         }
00314 
00318         function owner()
00319         {
00320                 $this->ownerObject();
00321         }
00322 
00327 /*
00328         function chooseMetaSectionObject($a_target = "")
00329         {
00330                 if ($a_target == "")
00331                 {
00332                         $a_target = "adm_object.php?ref_id=".$this->object->getRefId();
00333                 }
00334 
00335                 include_once "classes/class.ilMetaDataGUI.php";
00336                 $meta_gui =& new ilMetaDataGUI();
00337                 $meta_gui->setObject($this->object);
00338                 $meta_gui->edit("ADM_CONTENT", "adm_content",
00339                         $a_target, $_REQUEST["meta_section"]);
00340         }
00341 */
00342 
00347 /*
00348         function chooseMetaSection()
00349         {
00350                 //$this->setTabs();
00351                 $this->chooseMetaSectionObject($this->ctrl->getLinkTarget($this));
00352         }
00353 */
00354 
00359 /*
00360         function addMetaObject($a_target = "")
00361         {
00362                 if ($a_target == "")
00363                 {
00364                         $a_target = "adm_object.php?ref_id=".$this->object->getRefId();
00365                 }
00366 
00367                 include_once "classes/class.ilMetaDataGUI.php";
00368                 $meta_gui =& new ilMetaDataGUI();
00369                 $meta_gui->setObject($this->object);
00370                 $meta_name = $_POST["meta_name"] ? $_POST["meta_name"] : $_GET["meta_name"];
00371                 $meta_index = $_POST["meta_index"] ? $_POST["meta_index"] : $_GET["meta_index"];
00372                 if ($meta_index == "")
00373                         $meta_index = 0;
00374                 $meta_path = $_POST["meta_path"] ? $_POST["meta_path"] : $_GET["meta_path"];
00375                 $meta_section = $_POST["meta_section"] ? $_POST["meta_section"] : $_GET["meta_section"];
00376                 if ($meta_name != "")
00377                 {
00378                         $meta_gui->meta_obj->add($meta_name, $meta_path, $meta_index);
00379                 }
00380                 else
00381                 {
00382                         sendInfo($this->lng->txt("meta_choose_element"), true);
00383                 }
00384                 $meta_gui->edit("ADM_CONTENT", "adm_content", $a_target, $meta_section);
00385         }
00386 */
00387 
00392 /*
00393         function addMeta()
00394         {
00395                 $this->addMetaObject($this->ctrl->getLinkTarget($this));
00396         }
00397 */
00398 
00399 
00404 /*
00405         function deleteMetaObject($a_target = "")
00406         {
00407                 if ($a_target == "")
00408                 {
00409                         $a_target = "adm_object.php?ref_id=".$this->object->getRefId();
00410                 }
00411 
00412                 include_once "classes/class.ilMetaDataGUI.php";
00413                 $meta_gui =& new ilMetaDataGUI();
00414                 $meta_gui->setObject($this->object);
00415                 $meta_index = $_POST["meta_index"] ? $_POST["meta_index"] : $_GET["meta_index"];
00416                 $meta_gui->meta_obj->delete($_GET["meta_name"], $_GET["meta_path"], $meta_index);
00417                 $meta_gui->edit("ADM_CONTENT", "adm_content", $a_target, $_GET["meta_section"]);
00418         }
00419 */
00420 
00425 /*
00426         function deleteMeta()
00427         {
00428                 $this->deleteMetaObject($this->ctrl->getLinkTarget($this));
00429         }
00430 */
00431 
00436 /*
00437         function editMetaObject($a_target = "")
00438         {
00439                 if ($a_target == "")
00440                 {
00441                         $a_target = "adm_object.php?ref_id=".$this->object->getRefId();
00442                 }
00443 
00444                 include_once "classes/class.ilMetaDataGUI.php";
00445                 $meta_gui =& new ilMetaDataGUI();
00446                 $meta_gui->setObject($this->object);
00447                 $meta_gui->edit("ADM_CONTENT", "adm_content", $a_target, $_GET["meta_section"]);
00448         }
00449 */
00450 
00455 /*
00456         function editMeta()
00457         {
00458                 $this->editMetaObject($this->ctrl->getLinkTarget($this));
00459         }
00460 */
00461 
00466 /*
00467         function saveMetaObject($a_target = "")
00468         {
00469                 if ($a_target == "")
00470                 {
00471                         $a_target = "adm_object.php?cmd=editMeta&ref_id=".$this->object->getRefId();
00472                 }
00473 
00474                 include_once "classes/class.ilMetaDataGUI.php";
00475                 $meta_gui =& new ilMetaDataGUI();
00476                 $meta_gui->setObject($this->object);
00477                 $meta_gui->save($_POST["meta_section"]);
00478                 ilUtil::redirect(ilUtil::appendUrlParameterString($a_target,
00479                         "meta_section=" . $_POST["meta_section"]));
00480         }
00481 */
00482 
00487 /*
00488         function saveMeta()
00489         {
00490                 $this->saveMetaObject($this->ctrl->getLinkTarget($this, "editMeta"));
00491         }
00492 */
00493 
00497         function saveBibItemObject($a_target = "")
00498         {
00499                 include_once "content/classes/class.ilBibItemGUI.php";
00500                 $bib_gui =& new ilBibItemGUI();
00501                 $bib_gui->setObject($this->object);
00502                 $bibItemIndex = $_POST["bibItemIndex"] ? $_POST["bibItemIndex"] : $_GET["bibItemIndex"];
00503                 $bibItemIndex *= 1;
00504                 if ($bibItemIndex < 0)
00505                 {
00506                         $bibItemIndex = 0;
00507                 }
00508                 $bibItemIndex = $bib_gui->save($bibItemIndex);
00509 
00510                 if ($a_target == "")
00511                 {
00512                         $a_target = "adm_object.php?ref_id=" . $this->object->getRefId();
00513                 }
00514 
00515                 $bib_gui->edit("ADM_CONTENT", "adm_content", $a_target, $bibItemIndex);
00516         }
00517 
00521         function saveBibItem()
00522         {
00523                 //$this->setTabs();
00524                 $this->saveBibItemObject($this->ctrl->getLinkTarget($this));
00525         }
00526 
00530         function editBibItemObject($a_target = "")
00531         {
00532                 include_once "content/classes/class.ilBibItemGUI.php";
00533                 $bib_gui =& new ilBibItemGUI();
00534                 $bib_gui->setObject($this->object);
00535                 $bibItemIndex = $_POST["bibItemIndex"] ? $_POST["bibItemIndex"] : $_GET["bibItemIndex"];
00536                 $bibItemIndex *= 1;
00537                 if ($bibItemIndex < 0)
00538                 {
00539                         $bibItemIndex = 0;
00540                 }
00541                 if ($a_target == "")
00542                 {
00543                         $a_target = "adm_object.php?ref_id=" . $this->object->getRefId();
00544                 }
00545 
00546                 $bib_gui->edit("ADM_CONTENT", "adm_content", $a_target, $bibItemIndex);
00547         }
00548 
00552         function editBibItem()
00553         {
00554                 //$this->setTabs();
00555                 $this->editBibItemObject($this->ctrl->getLinkTarget($this));
00556         }
00557 
00561         function deleteBibItemObject($a_target = "")
00562         {
00563                 include_once "content/classes/class.ilBibItemGUI.php";
00564                 $bib_gui =& new ilBibItemGUI();
00565                 $bib_gui->setObject($this->object);
00566                 $bibItemIndex = $_POST["bibItemIndex"] ? $_POST["bibItemIndex"] : $_GET["bibItemIndex"];
00567                 $bib_gui->bib_obj->delete($_GET["bibItemName"], $_GET["bibItemPath"], $bibItemIndex);
00568                 if (strpos($bibItemIndex, ",") > 0)
00569                 {
00570                         $bibItemIndex = substr($bibItemIndex, 0, strpos($bibItemIndex, ","));
00571                 }
00572                 if ($a_target == "")
00573                 {
00574                         $a_target = "adm_object.php?ref_id=" . $this->object->getRefId();
00575                 }
00576 
00577                 $bib_gui->edit("ADM_CONTENT", "adm_content", $a_target, $bibItemIndex);
00578         }
00579 
00583         function deleteBibItem()
00584         {
00585                 //$this->setTabs();
00586                 $this->deleteBibItemObject($this->ctrl->getLinkTarget($this));
00587         }
00588 
00592         function addBibItemObject($a_target = "")
00593         {
00594                 $bibItemName = $_POST["bibItemName"] ? $_POST["bibItemName"] : $_GET["bibItemName"];
00595                 $bibItemIndex = $_POST["bibItemIndex"] ? $_POST["bibItemIndex"] : $_GET["bibItemIndex"];
00596                 if ($bibItemName == "BibItem")
00597                 {
00598                         include_once "content/classes/class.ilBibItem.php";
00599                         $bib_item =& new ilBibItem();
00600                         $bib_item->setId($this->object->getId());
00601                         $bib_item->setType($this->object->getType());
00602                         $bib_item->read();
00603                 }
00604 
00605                 include_once "content/classes/class.ilBibItemGUI.php";
00606                 $bib_gui =& new ilBibItemGUI();
00607                 $bib_gui->setObject($this->object);
00608                 if ($bibItemIndex == "")
00609                         $bibItemIndex = 0;
00610                 $bibItemPath = $_POST["bibItemPath"] ? $_POST["bibItemPath"] : $_GET["bibItemPath"];
00611 
00612                 //if ($bibItemName != "" && $bibItemName != "BibItem")
00613                 if ($bibItemName != "")
00614                 {
00615                         $bib_gui->bib_obj->add($bibItemName, $bibItemPath, $bibItemIndex);
00616                         $data = $bib_gui->bib_obj->getElement("BibItem");
00617                         $bibItemIndex = (count($data) - 1);
00618                 }
00619                 else
00620                 {
00621                         sendInfo($this->lng->txt("bibitem_choose_element"), true);
00622                 }
00623                 if ($a_target == "")
00624                 {
00625                         $a_target = "adm_object.php?ref_id=" . $this->object->getRefId();
00626                 }
00627 
00628                 $bib_gui->edit("ADM_CONTENT", "adm_content", $a_target, $bibItemIndex);
00629         }
00630 
00634         function addBibItem()
00635         {
00636                 //$this->setTabs();
00637                 $this->addBibItemObject($this->ctrl->getLinkTarget($this));
00638         }
00639 
00645         function frameset()
00646         {
00647                 $this->tpl = new ilTemplate("tpl.fblm_edit_frameset.html", false, false, "content");
00648                 $this->tpl->setVariable("HREF_FILES",$this->ctrl->getLinkTargetByClass(
00649                         "ilfilesystemgui", "listFiles"));
00650                 $this->tpl->show();
00651         }
00652 
00656         function explorer()
00657         {
00658                 $this->tpl = new ilTemplate("tpl.main.html", true, true);
00659 
00660                 $this->tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
00661 
00662                 $this->tpl->addBlockFile("CONTENT", "content", "tpl.explorer.html");
00663 
00664                 require_once ("content/classes/class.ilFileExplorer.php");
00665                 $exp = new ilFileExplorer($this->lm->getDataDirectory());
00666 
00667         }
00668 
00669 
00673         function setLocator($a_tree = "", $a_id = "", $scriptname="adm_object.php")
00674         {
00675                 global $ilias_locator, $tree;
00676                 if (!defined("ILIAS_MODULE"))
00677                 {
00678                         parent::setLocator();
00679                 }
00680                 else
00681                 {
00682                         $a_tree =& $tree;
00683                         $a_id = $_GET["ref_id"];
00684 
00685                         $this->tpl->addBlockFile("LOCATOR", "locator", "tpl.locator.html");
00686 
00687                         $path = $a_tree->getPathFull($a_id);
00688 
00689                         // this is a stupid workaround for a bug in PEAR:IT
00690                         $modifier = 1;
00691 
00692                         if (!empty($_GET["obj_id"]))
00693                         {
00694                                 $modifier = 0;
00695                         }
00696 
00697                         // ### AA 03.11.10 added new locator GUI class ###
00698                         $i = 1;
00699 
00700                         if ($this->object->getType() != "grp" && ($_GET["cmd"] == "delete" || $_GET["cmd"] == "edit"))
00701                         {
00702                                 unset($path[count($path) - 1]);
00703                         }
00704 
00705                         foreach ($path as $key => $row)
00706                         {
00707 
00708                                 if ($key < count($path) - $modifier)
00709                                 {
00710                                         $this->tpl->touchBlock("locator_separator");
00711                                 }
00712 
00713                                 $this->tpl->setCurrentBlock("locator_item");
00714                                 if ($row["child"] != $a_tree->getRootId())
00715                                 {
00716                                         $this->tpl->setVariable("ITEM", $row["title"]);
00717                                 }
00718                                 else
00719                                 {
00720                                         $this->tpl->setVariable("ITEM", $this->lng->txt("repository"));
00721                                 }
00722                                 if($row["type"] == "htlm")
00723                                 {
00724                                         $this->tpl->setVariable("LINK_ITEM", "fblm_edit.php?ref_id=".$row["child"]);
00725                                 }
00726                                 else
00727                                 {
00728                                         $this->tpl->setVariable("LINK_ITEM", "../repository.php?cmd=frameset&ref_id=".$row["child"]);
00729                                         $t_frame = ilFrameTargetInfo::_getFrame("MainContent");
00730                                         $this->tpl->setVariable("LINK_TARGET", " target=\"$t_frame\" ");
00731                                 }
00732 
00733                                 $this->tpl->parseCurrentBlock();
00734 
00735                                 $this->tpl->setCurrentBlock("locator");
00736 
00737                                 // ### AA 03.11.10 added new locator GUI class ###
00738                                 // navigate locator
00739                                 if ($row["child"] != $a_tree->getRootId())
00740                                 {
00741                                         $ilias_locator->navigate($i++,$row["title"],"../repository.php?ref_id=".$row["child"],"bottom");
00742                                 }
00743                                 else
00744                                 {
00745                                         $ilias_locator->navigate($i++,$this->lng->txt("repository"),"../repository.php?ref_id=".$row["child"],"bottom");
00746                                 }
00747                         }
00748 
00749                         /*
00750                         if (DEBUG)
00751                         {
00752                                 $debug = "DEBUG: <font color=\"red\">".$this->type."::".$this->id."::".$_GET["cmd"]."</font><br/>";
00753                         }
00754 
00755                         $prop_name = $this->objDefinition->getPropertyName($_GET["cmd"],$this->type);
00756 
00757                         if ($_GET["cmd"] == "confirmDeleteAdm")
00758                         {
00759                                 $prop_name = "delete_object";
00760                         }*/
00761 
00762                         $this->tpl->setVariable("TXT_LOCATOR",$debug.$this->lng->txt("locator"));
00763                         $this->tpl->parseCurrentBlock();
00764                 }
00765 
00766         }
00767 
00771         function getTemplate()
00772         {
00773                 global $lng;
00774 
00775                 $this->tpl->addBlockFile("CONTENT", "content", "tpl.adm_content.html");
00776                 //$this->tpl->setVariable("HEADER", $a_header_title);
00777                 $this->tpl->addBlockFile("STATUSLINE", "statusline", "tpl.statusline.html");
00778                 //$this->tpl->setVariable("TXT_LOCATOR",$this->lng->txt("locator"));
00779         }
00780 
00781         function showLearningModule()
00782         {
00783                 $dir = $this->object->getDataDirectory();
00784                 if (($this->object->getStartFile() != "") &&
00785                         (@is_file($dir."/".$this->object->getStartFile())))
00786                 {
00787                         ilUtil::redirect("../".$dir."/".$this->object->getStartFile());
00788                 }
00789                 else if (@is_file($dir."/index.html"))
00790                 {
00791                         ilUtil::redirect("../".$dir."/index.html");
00792                 }
00793                 else if (@is_file($dir."/index.htm"))
00794                 {
00795                         ilUtil::redirect("../".$dir."/index.htm");
00796                 }
00797         }
00798 
00802         function setTabs()
00803         {
00804                 $this->getTabs($this->tabs_gui);
00805                 $this->tpl->setVariable("TABS", $this->tabs_gui->getHTML());
00806                 $this->tpl->setVariable("HEADER", $this->object->getTitle());
00807         }
00808 
00814         function getTabs(&$tabs_gui)
00815         {
00816                 global $rbacsystem;
00817                 
00818                 // properties
00819                 $tabs_gui->addTarget("properties",
00820                         $this->ctrl->getLinkTarget($this, "properties"), "properties",
00821                         get_class($this));
00822 
00823                 // edit meta
00824 /*
00825                 $tabs_gui->addTarget("meta_data",
00826                         $this->ctrl->getLinkTarget($this, "editMeta"), "editMeta",
00827                         get_class($this));
00828 */
00829 
00830                 $tabs_gui->addTarget("meta_data",
00831                         $this->ctrl->getLinkTargetByClass('ilmdeditorgui',''),
00832                         "meta_data", get_class($this));
00833 
00834 
00835                 // edit bib item information
00836                 $tabs_gui->addTarget("bib_data",
00837                         $this->ctrl->getLinkTarget($this, "editBibItem"), "editBibItem",
00838                         get_class($this));
00839 
00840                 // perm
00841                 if ($rbacsystem->checkAccess('edit_permission',$this->object->getRefId()))
00842                 {
00843                         $tabs_gui->addTarget("perm_settings",
00844                                 $this->ctrl->getLinkTarget($this, "perm"), array("perm", "info"),
00845                                 get_class($this));
00846                 }
00847 
00848                 // owner
00849                 /*
00850                 $tabs_gui->addTarget("owner",
00851                         $this->ctrl->getLinkTarget($this, "owner"), "owner",
00852                         get_class($this));
00853                 */
00854         }
00855 
00856 
00857 }
00858 ?>

Generated on Fri Dec 13 2013 10:18:29 for ILIAS Release_3_5_x_branch .rev 46805 by  doxygen 1.7.1