ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilObjContentObjectGUI Class Reference

Class ilObjContentObjectGUI. More...

+ Inheritance diagram for ilObjContentObjectGUI:
+ Collaboration diagram for ilObjContentObjectGUI:

Public Member Functions

 ilObjContentObjectGUI ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=false)
 Constructor.
executeCommand ()
 execute command
 _forwards ()
 properties ()
 edit properties form
 initPropertiesForm ()
 Init properties form.
 getPropertiesFormValues ()
 Get values for properties form.
 saveProperties ()
 save properties
 editStyleProperties ()
 Edit style properties.
 initStylePropertiesForm ()
 Init style properties form.
 createStyle ()
 Create Style.
 editStyle ()
 Edit Style.
 deleteStyle ()
 Delete Style.
 saveStyleSettings ()
 Save style settings.
 initMenuForm ()
 Init menu form.
 editMenuProperties ()
 Edit menu properies.
 saveMenuProperties ()
 save properties
 explorer ()
 output explorer tree
 popup ()
 popup window for wysiwyg editor
 proceedDragDrop ()
 proceed drag and drop operations on pages/chapters
 initImportForm ()
 Init import form.
 addBibItemObject ($a_target="")
 add bib item (admin call)
 addBibItem ()
 add bib item (module call)
 deleteBibItemObject ($a_target="")
 delete bib item (admin call)
 deleteBibItem ()
 delete bib item (module call)
 editBibItemObject ($a_target="")
 edit bib items (admin call)
 editBibItem ()
 edit bib items (module call)
 saveBibItemObject ($a_target="")
 save bib item (admin call)
 saveBibItem ()
 save bib item (module call)
 exportObject ()
 export object
 importObject ()
 display dialogue for importing XML-LeaningObjects
 importFileObject ()
 display status information or report errors messages in case of error
 chapters ()
 show chapters
 pages ()
 listLinks ()
 List all broken links.
 showMaintenance ()
 Show maintenance.
 activatePages ()
 activates or deactivates pages
 pastePage ()
 paste page
 copyPage ()
 copy page
 delete ($a_parent_subobj_id=0)
 confirm deletion screen for page object and structure object deletion
 cancelDelete ()
 cancel delete
 confirmedDelete ($a_parent_subobj_id=0)
 delete page object or structure objects
 getContextPath ($a_endnode_id, $a_startnode_id=1)
 get context path in content object tree
 showActions ($a_actions)
 show possible action (form buttons)
 perm ()
 edit permissions
 permSave ()
 save permissions
 info ()
 info permissions
 addRole ()
 add local role
 owner ()
 show owner of content object
 view ()
 view content object
 moveChapter ($a_parent_subobj_id=0)
 move a single chapter (selection)
 copyChapter ($a_parent_subobj_id=0)
 copy a single chapter (selection)
 pasteChapter ($a_parent_subobj_id=0)
 paste chapter
 movePage ()
 move page
 cancel ()
 cancel action
 export ()
 export content object
 getPublicAccessColValue ($a_type, $a_file)
 Get public access value for export table.
 publishExportFile ($a_files)
 download export file
 downloadPDFFile ()
 download export file
 fixTreeConfirm ()
 confirm screen for tree fixing
 fixTree ()
 Fix tree.
 setilLMMenu ($a_offline=false, $a_export_format="", $a_active="content", $a_use_global_tabs=false, $a_as_subtabs=false, $a_cur_page=0)
 get lm menu html
 createPDF ()
 export content object
 exportHTML ()
 create html package
 exportSCORM ()
 create scorm package
 addLocations ($a_omit_obj_id=false)
 display locator
 listQuestions ()
 List questions.
 setTabs ($a_act="")
 output tabs
 setContentSubTabs ($a_active)
 Set pages tabs.
 addTabs ($a_act="")
 Adds tabs.
 setSubTabs ($a_active)
 Set sub tabs.
 editPublicSection ()
 savePublicSection ()
 history ()
 history
 formatInvalidLinkArray (Array $row)
 linkChecker ()
 saveLinkCheck ()
 refreshLinkCheck ()
 __initLinkChecker ()
 __initLMMenuEditor ()
 addMenuEntry ()
 display add menu entry form
 initMenuEntryForm ($a_mode="edit")
 Init menu entry form.
 saveMenuEntry ()
 save new menu entry
 deleteMenuEntry ()
 drop a menu entry
 editMenuEntry ()
 edit menu entry form
 updateMenuEntry ()
 update a menu entry
 showEntrySelector ()
 selectHeader ()
 select page as header
 selectFooter ()
 select page as footer
 saveAllTitles ()
 Save all titles of chapters/pages.
 insertChapter ()
 Insert (multiple) chapters at node.
 insertChapterClip ()
 Insert Chapter from clipboard.
 _goto ($a_target)
 redirect script
 cutItems ($a_return="chapters")
 Copy items to clipboard, then cut them from the current tree.
 copyItems ()
 Copy items to clipboard.
 cutChapter ()
 Cut chapter(s)
 showExportIDsOverview ($a_validation=false)
 Show export IDs overview.
 filterHelpChapters ()
 Filter help chapters.
 saveExportIds ()
 Save export IDs.
 saveHelpMapping ()
 Save help mapping.
 showTooltipList ()
 Show export IDs overview.
 addTooltip ()
 Add tooltip.
 filterTooltips ()
 Filter tooltips.
 saveTooltips ()
 Save tooltips.
 deleteTooltips ()
 Delete tooltips.
 setPageLayoutInHierarchy ()
 Set layout for multipl pages.
 setPageLayout ($a_in_hierarchy=false)
 Set layout for multipl pages.
 initSetPageLayoutForm ()
 Init set page layout form.
 savePageLayout ()
 Save page layout.
 editGlossaries ()
 Edit automatically linked glossaries.
 showLMGlossarySelector ()
 Select LM Glossary.
 confirmGlossarySelection ()
 Confirm glossary selection.
 selectLMGlossaryLink ()
 Select a glossary and link all its terms.
 selectLMGlossary ()
 Select lm glossary.
 removeLMGlossary ()
 Remove lm glossary.
 editMasterLanguage ()
 Edit master language.
 switchToLanguage ()
 Switch to language.
 redrawHeaderAction ()
- Public Member Functions inherited from ilObjectGUI
 ilObjectGUI ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor public.
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not)
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui
 getCreationMode ()
 get creation mode
 getAdminTabs (&$tabs_gui)
 administration tabs show only permissions and trash folder
 getHTML ()
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled
 cancelDeleteObject ()
 cancel deletion of object
 cancelObject ($in_rep=false)
 cancel action and go back to previous page public
 createObject ()
 create new object form
 cancelCreation ()
 cancel create action and go back to repository parent
 saveObject ()
 save object
 editObject ()
 edit object
 updateObject ()
 updates object entry in object_data
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g.
 isVisible ($a_ref_id, $a_type)
 viewObject ()
 list childs of current object
 deleteObject ($a_error=false)
 Display deletion confirmation screen.
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI.

Static Public Member Functions

static getMultiLangHeader ($a_lm_id, $a_gui_class)
 Get multi lang header.
static getLayoutOption ($a_txt, $a_var, $a_def_option="")
 Save help mapping.
- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot ($a_raise_error=false)
 Goto repository root.
static _gotoRepositoryNode ($a_ref_id, $a_cmd="frameset")
 Goto repository root.

Data Fields

 $ctrl
- Data Fields inherited from ilObjectGUI
const COPY_WIZARD_NEEDS_PAGE = 1
 $ilias
 $objDefinition
 $tpl
 $tree
 $lng
 $data
 $object
 $ref_id
 $obj_id
 $maxcount
 $formaction
 $return_location
 $target_frame
 $tab_target_script
 $actions
 $sub_objects
 $omit_locator = false
const CFORM_NEW = 1
const CFORM_IMPORT = 2
const CFORM_CLONE = 3

Protected Member Functions

 initCreationForms ($a_new_type)
 Init creation froms.
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook.
- Protected Member Functions inherited from ilObjectGUI
 assignObject ()
 prepareOutput ()
 prepare output
 setTitleAndDescription ()
 called by prepare output
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu.
 insertHeaderAction ($a_list_gui)
 Insert header action into main template.
 addHeaderAction ()
 Add header action menu.
 redrawHeaderActionObject ()
 Ajax call: redraw action header only.
 showMountWebfolderIcon ()
 setTabs ()
 set admin tabs public
 setAdminTabs ()
 set admin tabs public
 setLocator ()
 set Locator
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded)
 omitLocator ($a_omit=true)
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded)
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion)
 initCreateForm ($a_new_type)
 Init object creation form.
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types.
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates.
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen.
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position.
 initEditForm ()
 Init object edit form.
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form.
 getEditFormValues ()
 Get values for edit form.
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields.
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object.
 afterUpdate ()
 Post (successful) object update hook.
 initImportForm ($a_new_type)
 Init object import form.
 importFileObject ($parent_id=null)
 Import.
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook.
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g.
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g.
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu)
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl.
 getTitlesByRefId ($a_ref_ids)
 get Titles of objects this method is used for error messages in methods cut/copy/paste
 getTabs (&$tabs_gui)
 get tabs abstract method.
 __showButton ($a_cmd, $a_text, $a_target= '')
 hitsperpageObject ()
__initTableGUI ()
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table
 redirectToRefId ($a_ref_id, $a_cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current $_GET["ref_id"] value
 fillCloneTemplate ($a_tpl_varname, $a_type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning.
 getCenterColumnHTML ()
 Get center column.
 getRightColumnHTML ()
 Display right column.
 setColumnSettings ($column_gui)
 May be overwritten in subclasses.
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error.
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission.
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files.
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting.

Detailed Description

Member Function Documentation

ilObjContentObjectGUI::__initLinkChecker ( )

Definition at line 2975 of file class.ilObjContentObjectGUI.php.

Referenced by linkChecker(), and refreshLinkCheck().

{
global $ilDB;
include_once './Services/LinkChecker/classes/class.ilLinkChecker.php';
$this->link_checker_obj =& new ilLinkChecker($ilDB,false);
$this->link_checker_obj->setObjId($this->object->getId());
return true;
}

+ Here is the caller graph for this function:

ilObjContentObjectGUI::__initLMMenuEditor ( )

Definition at line 2987 of file class.ilObjContentObjectGUI.php.

Referenced by deleteMenuEntry(), editMenuProperties(), initMenuEntryForm(), saveMenuEntry(), saveMenuProperties(), setilLMMenu(), and updateMenuEntry().

{
include_once './Modules/LearningModule/classes/class.ilLMMenuEditor.php';
$this->lmme_obj =& new ilLMMenuEditor();
$this->lmme_obj->setObjId($this->object->getId());
return true;
}

+ Here is the caller graph for this function:

ilObjContentObjectGUI::_forwards ( )

Definition at line 333 of file class.ilObjContentObjectGUI.php.

{
return array("ilLMPageObjectGUI", "ilStructureObjectGUI","ilObjStyleSheetGUI");
}
ilObjContentObjectGUI::_goto (   $a_target)

redirect script

Parameters
string$a_target

Definition at line 3405 of file class.ilObjContentObjectGUI.php.

References $_GET, $ilErr, ilObjectGUI\$lng, ilObjectGUI\_gotoRepositoryRoot(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), exit, and ilUtil\sendFailure().

{
global $ilAccess, $ilErr, $lng;
if ($ilAccess->checkAccess("read", "", $a_target))
{
$_GET["baseClass"] = "ilLMPresentationGUI";
$_GET["ref_id"] = $a_target;
include("ilias.php");
} else if ($ilAccess->checkAccess("visible", "", $a_target))
{
$_GET["baseClass"] = "ilLMPresentationGUI";
$_GET["ref_id"] = $a_target;
$_GET["cmd"] = "infoScreen";
include("ilias.php");
}
else if ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID))
{
ilUtil::sendFailure(sprintf($lng->txt("msg_no_perm_read_item"),
}
$ilErr->raiseError($lng->txt("msg_no_perm_read_lm"), $ilErr->FATAL);
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::activatePages ( )

activates or deactivates pages

Definition at line 1571 of file class.ilObjContentObjectGUI.php.

References $_POST, ilPageObject\_lookupActive(), and ilPageObject\_writeActive().

{
if (is_array($_POST["id"]))
{
foreach($_POST["id"] as $id)
{
include_once("./Modules/LearningModule/classes/class.ilLMPage.php");
$act = ilLMPage::_lookupActive($id, $this->object->getType());
ilLMPage::_writeActive($id, $this->object->getType(), !$act);
}
}
$this->ctrl->redirect($this, "pages");
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::addBibItem ( )

add bib item (module call)

Definition at line 1057 of file class.ilObjContentObjectGUI.php.

References addBibItemObject(), ilCtrl\IL_RTOKEN_NAME, and ilObjectGUI\setTabs().

{
$this->setTabs();
// questionable workaround to make this old stuff work
$this->ctrl->setParameter($this, ilCtrl::IL_RTOKEN_NAME, $this->ctrl->getRequestToken());
$this->addBibItemObject($this->ctrl->getLinkTarget($this));
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::addBibItemObject (   $a_target = "")

add bib item (admin call)

Definition at line 1026 of file class.ilObjContentObjectGUI.php.

References $_GET, $_POST, ilObjectGUI\$data, and ilUtil\sendInfo().

Referenced by addBibItem().

{
include_once "./Modules/LearningModule/classes/class.ilBibItemGUI.php";
$bib_gui =& new ilBibItemGUI();
$bib_gui->setObject($this->object);
$bibItemName = $_POST["bibItemName"] ? $_POST["bibItemName"] : $_GET["bibItemName"];
$bibItemIndex = $_POST["bibItemIndex"] ? $_POST["bibItemIndex"] : $_GET["bibItemIndex"];
if ($bibItemIndex == "")
$bibItemIndex = 0;
$bibItemPath = $_POST["bibItemPath"] ? $_POST["bibItemPath"] : $_GET["bibItemPath"];
if ($bibItemName != "")
{
$bib_gui->bib_obj->add($bibItemName, $bibItemPath, $bibItemIndex);
$data = $bib_gui->bib_obj->getElement("BibItem");
$bibItemIndex = (count($data) - 1);
}
else
{
ilUtil::sendInfo($this->lng->txt("bibitem_choose_element"), true);
}
if ($a_target == "")
{
$a_target = "adm_object.php?ref_id=" . $this->object->getRefId();
}
$bib_gui->edit("ADM_CONTENT", "adm_content", $a_target, $bibItemIndex);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjContentObjectGUI::addLocations (   $a_omit_obj_id = false)

display locator

Parameters
boolean$a_omit_obj_idset to true, if obj id is not page id (e.g. permission gui)

Definition at line 2415 of file class.ilObjContentObjectGUI.php.

References $_GET, $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\$obj_id, $path, $row, ilObjectGUI\$tree, ilFrameTargetInfo\_getFrame(), ilLMPageObject\_getPresentationTitle(), ilObject\_lookupObjId(), and ilObject\_lookupTitle().

Referenced by executeCommand().

{
global $lng, $tree, $ilLocator, $ilCtrl;
$par_id = $tree->getParentId($_GET["ref_id"]);
// parent is not root folder, "shorten" locator
if($par_id != ROOT_FOLDER_ID)
{
$this->ctrl->addLocation("...",
"");
}
else
{
// if parent is root folder and has no custom title
// we adapt it [see $ilLocator->addRepositoryItems()]
if ($parent_title == "ILIAS")
{
$parent_title = $lng->txt("repository");
}
}
$ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $par_id);
$this->ctrl->addLocation($parent_title,
$ilCtrl->getLinkTargetByClass("ilrepositorygui", "frameset"),
ilFrameTargetInfo::_getFrame("MainContent"), $par_id);
$ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $_GET["ref_id"]);
if (!$a_omit_obj_id)
{
$obj_id = $_GET["obj_id"];
}
$lmtree =& $this->object->getTree();
if (($obj_id != 0) && $lmtree->isInTree($obj_id))
{
$path = $lmtree->getPathFull($obj_id);
}
else
{
$path = $lmtree->getPathFull($lmtree->getRootId());
if ($obj_id != 0)
{
$path[] = array("type" => "pg", "child" => $this->obj_id,
"title" => ilLMPageObject::_getPresentationTitle($this->obj_id));
}
}
$modifier = 1;
foreach ($path as $key => $row)
{
if ($row["child"] == 1)
{
$this->ctrl->setParameter($this, "obj_id", "");
$this->ctrl->addLocation(
$this->object->getTitle(),
$this->ctrl->getLinkTarget($this, "chapters"), "", $_GET["ref_id"]);
}
else
{
$title = $row["title"];
switch($row["type"])
{
case "st":
$this->ctrl->setParameterByClass("ilstructureobjectgui", "obj_id", $row["child"]);
$this->ctrl->addLocation(
$title,
$this->ctrl->getLinkTargetByClass("ilstructureobjectgui", "view"));
break;
case "pg":
$this->ctrl->setParameterByClass("illmpageobjectgui", "obj_id", $row["child"]);
$this->ctrl->addLocation(
$title,
$this->ctrl->getLinkTargetByClass("illmpageobjectgui", "edit"));
break;
}
}
}
if (!$a_omit_obj_id)
{
$this->ctrl->setParameter($this, "obj_id", $_GET["obj_id"]);
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjContentObjectGUI::addMenuEntry ( )

display add menu entry form

Definition at line 3000 of file class.ilObjContentObjectGUI.php.

References $ilCtrl, ilObjectGUI\$tpl, initMenuEntryForm(), setSubTabs(), and ilObjectGUI\setTabs().

{
global $ilTabs, $ilToolbar, $tpl, $ilCtrl;
$this->setTabs();
$ilTabs->setTabActive("settings");
$this->setSubTabs("cont_lm_menu");
$ilToolbar->addButton($this->lng->txt("lm_menu_select_internal_object"),
$ilCtrl->getLinkTarget($this, "showEntrySelector"));
$form = $this->initMenuEntryForm("create");
$this->tpl->setContent($form->getHTML());
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::addRole ( )

add local role

Definition at line 1900 of file class.ilObjContentObjectGUI.php.

References ilObjectGUI\setReturnLocation().

{
$this->setReturnLocation("addRole", $this->ctrl->getLinkTarget($this, "perm"));
$this->addRoleObject();
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::addTabs (   $a_act = "")

Adds tabs.

Definition at line 2623 of file class.ilObjContentObjectGUI.php.

References $ilUser, ilObjectGUI\$lng, and ilLearningProgressAccess\checkAccess().

Referenced by setTabs().

{
global $rbacsystem, $ilUser, $ilTabs, $lng;
$tabs_gui = $ilTabs;
// content
$ilTabs->addTab("content",
$lng->txt("content"),
$this->ctrl->getLinkTarget($this, "chapters"));
// info
$ilTabs->addTab("info",
$lng->txt("info_short"),
$this->ctrl->getLinkTargetByClass("ilinfoscreengui",'showSummary'));
// settings
$ilTabs->addTab("settings",
$lng->txt("settings"),
$this->ctrl->getLinkTarget($this,'properties'));
// learning progress
include_once './Services/Tracking/classes/class.ilLearningProgressAccess.php';
if(ilLearningProgressAccess::checkAccess($this->object->getRefId()) and ($this->object->getType() == 'lm' or $this->object->getType() == 'dbk'))
{
$ilTabs->addTab('learning_progress',
$lng->txt("learning_progress"),
$this->ctrl->getLinkTargetByClass(array('illearningprogressgui'),''));
}
if ($this->object->getType() != "lm")
{
// bibliographical data
$ilTabs->addTab("bib_data",
$lng->txt("bib_data"),
$this->ctrl->getLinkTarget($this, "editBibItem"));
}
// history
$ilTabs->addTab("history",
$lng->txt("history"),
$this->ctrl->getLinkTarget($this, "history"));
// meta data
$ilTabs->addTab("meta",
$lng->txt("meta_data"),
$this->ctrl->getLinkTargetByClass('ilmdeditorgui',''));
if ($this->object->getType() == "lm")
{
// export
$ilTabs->addTab("export",
$lng->txt("export"),
$this->ctrl->getLinkTargetByClass("ilexportgui", ""));
}
// permissions
if ($rbacsystem->checkAccess('edit_permission',$this->object->getRefId()))
{
$ilTabs->addTab("perm",
$lng->txt("perm_settings"),
$this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm"));
}
if ($a_act != "")
{
$ilTabs->activateTab($a_act);
}
// presentation view
$ilTabs->addNonTabbedLink("pres_mode", $lng->txt("cont_presentation_view"),
"ilias.php?baseClass=ilLMPresentationGUI&ref_id=".$this->object->getRefID(), "_top");
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjContentObjectGUI::addTooltip ( )

Add tooltip.

Parameters
@return

Definition at line 3685 of file class.ilObjContentObjectGUI.php.

References $_POST, $ilCtrl, ilObjectGUI\$lng, ilUtil\sendFailure(), ilUtil\sendSuccess(), ilSession\set(), and ilUtil\stripSlashes().

{
global $lng, $ilCtrl;
$tt_id = ilUtil::stripSlashes($_POST["tooltip_id"]);
if (trim($tt_id) != "")
{
if (is_int(strpos($tt_id, "_")))
{
include_once("./Services/Help/classes/class.ilHelp.php");
ilHelp::addTooltip(trim($tt_id), "");
ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
$fu = strpos($tt_id, "_");
$comp = substr($tt_id, 0, $fu);
ilSession::set("help_tt_comp", ilUtil::stripSlashes($comp));
}
else
{
ilUtil::sendFailure($lng->txt("cont_help_no_valid_tooltip_id"), true);
}
}
$ilCtrl->redirect($this, "showTooltipList");
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::afterSave ( ilObject  $a_new_object)
protected

Post (successful) object creation hook.

Parameters
ilObject$a_new_object

Reimplemented from ilObjectGUI.

Definition at line 967 of file class.ilObjContentObjectGUI.php.

References $_GET, ilObject\getRefId(), ilObject\notify(), ilUtil\redirect(), ilUtil\sendSuccess(), and ilObject\update().

{
$a_new_object->notify("new", $_GET["ref_id"], $_GET["parent_non_rbac_id"],
$_GET["ref_id"], $a_new_object->getRefId());
$a_new_object->setCleanFrames(true);
$a_new_object->update();
// create content object tree
$a_new_object->createLMTree();
// create a first chapter
$a_new_object->addFirstChapterAndPage();
// always send a message
ilUtil::sendSuccess($this->lng->txt($this->type."_added"), true);
ilUtil::redirect("ilias.php?ref_id=".$a_new_object->getRefId().
"&baseClass=ilLMEditorGUI");
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::cancel ( )

cancel action

Definition at line 2006 of file class.ilObjContentObjectGUI.php.

References $_GET.

{
if ($_GET["new_type"] == "pg")
{
$this->ctrl->redirect($this, "pages");
}
else
{
$this->ctrl->redirect($this, "chapters");
}
}
ilObjContentObjectGUI::cancelDelete ( )

cancel delete

Definition at line 1730 of file class.ilObjContentObjectGUI.php.

References $_GET.

{
$this->ctrl->redirect($this, $_GET["backcmd"]);
}
ilObjContentObjectGUI::chapters ( )

show chapters

Definition at line 1260 of file class.ilObjContentObjectGUI.php.

References $_GET, $ilCtrl, $ilUser, ilObjectGUI\$lng, ilObjectGUI\$tree, ilUtil\getImagePath(), getMultiLangHeader(), setContentSubTabs(), ilFormGUI\setFormAction(), and ilObjectGUI\setTabs().

{
$this->setTabs();
$this->setContentSubTabs("chapters");
$ilCtrl->setParameter($this, "backcmd", "chapters");
include_once("./Modules/LearningModule/classes/class.ilChapterHierarchyFormGUI.php");
$form_gui = new ilChapterHierarchyFormGUI($this->object->getType(), $_GET["transl"]);
$form_gui->setFormAction($ilCtrl->getFormAction($this));
$form_gui->setTitle($this->object->getTitle());
$form_gui->setIcon(ilUtil::getImagePath("icon_lm.png"));
$form_gui->setTree($this->lm_tree);
$form_gui->setMaxDepth(0);
$form_gui->setCurrentTopNodeId($this->tree->getRootId());
$form_gui->addMultiCommand($lng->txt("delete"), "delete");
$form_gui->addMultiCommand($lng->txt("cut"), "cutItems");
$form_gui->addMultiCommand($lng->txt("copy"), "copyItems");
if ($this->object->getLayoutPerPage())
{
$form_gui->addMultiCommand($lng->txt("cont_set_layout"), "setPageLayoutInHierarchy");
}
$form_gui->setDragIcon(ilUtil::getImagePath("icon_st_s.png"));
$form_gui->addCommand($lng->txt("cont_save_all_titles"), "saveAllTitles");
$up_gui = ($this->object->getType() == "dbk")
? "ilobjdlbookgui"
: "ilobjlearningmodulegui";
$form_gui->setExplorerUpdater("tree", "tree_div",
$ilCtrl->getLinkTargetByClass($up_gui, "explorer", "", true));
$ctpl = new ilTemplate("tpl.chap_and_pages.html", true, true, "Modules/LearningModule");
$ctpl->setVariable("HIERARCHY_FORM", $form_gui->getHTML());
$ilCtrl->setParameter($this, "obj_id", "");
$ml_head = self::getMultiLangHeader($this->object->getId(), $this);
$this->tpl->setContent($ml_head.$ctpl->get());
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::confirmedDelete (   $a_parent_subobj_id = 0)

delete page object or structure objects

Parameters
int$a_parent_subobj_idid of parent object (structure object) of the objects, that should be deleted (or no parent object id for top level)

Definition at line 1743 of file class.ilObjContentObjectGUI.php.

References $_GET, $_POST, ilObjectGUI\$tree, ilHistory\_createEntry(), ilLMObject\_lookupTitle(), ilLMObjectFactory\getInstance(), IL_FIRST_NODE, and ilUtil\sendSuccess().

Referenced by ilLMObjectGUI\confirmedDelete().

{
$tree = new ilTree($this->object->getId());
$tree->setTableNames('lm_tree','lm_data');
$tree->setTreeTablePK("lm_id");
// check number of objects
if (!$_POST["id"])
{
$this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
}
// delete all selected objects
foreach ($_POST["id"] as $id)
{
if ($id != IL_FIRST_NODE)
{
$obj =& ilLMObjectFactory::getInstance($this->object, $id, false);
$node_data = $tree->getNodeData($id);
if (is_object($obj))
{
$obj->setLMId($this->object->getId());
include_once("./Services/History/classes/class.ilHistory.php");
ilHistory::_createEntry($this->object->getId(), "delete_".$obj->getType(),
array(ilLMObject::_lookupTitle($id), $id),
$this->object->getType());
$obj->delete();
}
if($tree->isInTree($id))
{
$tree->deleteTree($node_data);
}
}
}
// check the tree
$this->object->checkTree();
// feedback
ilUtil::sendSuccess($this->lng->txt("info_deleted"),true);
if ($a_parent_subobj_id == 0)
{
$this->ctrl->redirect($this, $_GET["backcmd"]);
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjContentObjectGUI::confirmGlossarySelection ( )

Confirm glossary selection.

Definition at line 3988 of file class.ilObjContentObjectGUI.php.

References $_GET, $ilCtrl, ilObjectGUI\$lng, and ilObjectGUI\$tpl.

{
global $ilCtrl, $tpl, $lng;
include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
$cgui = new ilConfirmationGUI();
$ilCtrl->setParameter($this, "glo_ref_id", $_GET["root_id"]);
$cgui->setFormAction($ilCtrl->getFormAction($this));
$cgui->setHeaderText($lng->txt("cont_link_glo_in_lm"));
$cgui->setCancel($lng->txt("no"), "selectLMGlossary");
$cgui->setConfirm($lng->txt("yes"), "selectLMGlossaryLink");
$tpl->setContent($cgui->getHTML());
}
ilObjContentObjectGUI::copyChapter (   $a_parent_subobj_id = 0)

copy a single chapter (selection)

Definition at line 1969 of file class.ilObjContentObjectGUI.php.

References copyItems().

{
$this->copyItems();
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::copyItems ( )

Copy items to clipboard.

Definition at line 3470 of file class.ilObjContentObjectGUI.php.

References $_POST, $ilCtrl, ilObjectGUI\$lng, ilLMObject\clipboardCopy(), ilUtil\sendFailure(), ilUtil\sendInfo(), ilEditClipboard\setAction(), and ilUtil\stripSlashesArray().

Referenced by copyChapter().

{
global $ilCtrl, $lng;
if (!is_array($items))
{
ilUtil::sendFailure($lng->txt("no_checkbox"), true);
$ilCtrl->redirect($this, "chapters");
}
$todel = array(); // delete IDs < 0 (needed for non-js editing)
foreach($items as $k => $item)
{
if ($item < 0)
{
$todel[] = $k;
}
}
foreach($todel as $k)
{
unset($items[$k]);
}
ilLMObject::clipboardCopy($this->object->getId(), $items);
ilUtil::sendInfo($lng->txt("cont_selected_items_have_been_copied"), true);
$ilCtrl->redirect($this, "chapters");
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjContentObjectGUI::copyPage ( )

copy page

Definition at line 1650 of file class.ilObjContentObjectGUI.php.

References $_POST, $ilUser, ilLMObject\clipboardCopy(), ilUtil\sendInfo(), ilEditClipboard\setAction(), and ilUtil\stripSlashesArray().

{
global $ilUser;
if(!isset($_POST["id"]))
{
$this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
}
ilLMObject::clipboardCopy($this->object->getId(), $items);
ilUtil::sendInfo($this->lng->txt("cont_selected_items_have_been_copied"), true);
$this->ctrl->redirect($this, "pages");
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::createPDF ( )

export content object

Definition at line 2370 of file class.ilObjContentObjectGUI.php.

{
require_once("./Modules/LearningModule/classes/class.ilContObjectExport.php");
$cont_exp = new ilContObjectExport($this->object, "pdf");
$cont_exp->buildExportFile();
$this->offlineList();
}
ilObjContentObjectGUI::createStyle ( )

Create Style.

Definition at line 666 of file class.ilObjContentObjectGUI.php.

References $ilCtrl.

{
global $ilCtrl;
$ilCtrl->redirectByClass("ilobjstylesheetgui", "create");
}
ilObjContentObjectGUI::cutChapter ( )

Cut chapter(s)

Definition at line 3502 of file class.ilObjContentObjectGUI.php.

References cutItems().

{
$this->cutItems("chapters");
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::cutItems (   $a_return = "chapters")

Copy items to clipboard, then cut them from the current tree.

Definition at line 3437 of file class.ilObjContentObjectGUI.php.

References $_POST, $ilCtrl, ilObjectGUI\$lng, ilLMObject\clipboardCut(), ilUtil\sendFailure(), ilUtil\sendInfo(), ilEditClipboard\setAction(), and ilUtil\stripSlashesArray().

Referenced by cutChapter().

{
global $ilCtrl, $lng;
if (!is_array($items))
{
ilUtil::sendFailure($lng->txt("no_checkbox"), true);
$ilCtrl->redirect($this, $a_return);
}
$todel = array(); // delete IDs < 0 (needed for non-js editing)
foreach($items as $k => $item)
{
if ($item < 0)
{
$todel[] = $k;
}
}
foreach($todel as $k)
{
unset($items[$k]);
}
ilLMObject::clipboardCut($this->object->getId(), $items);
ilUtil::sendInfo($lng->txt("cont_selected_items_have_been_cut"), true);
$ilCtrl->redirect($this, $a_return);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjContentObjectGUI::delete (   $a_parent_subobj_id = 0)

confirm deletion screen for page object and structure object deletion

Parameters
int$a_parent_subobj_idid of parent object (structure object) of the objects, that should be deleted (or no parent object id for top level)

Definition at line 1675 of file class.ilObjContentObjectGUI.php.

References $_GET, $_POST, ilUtil\getImageTagByType(), IL_FIRST_NODE, and ilObjectGUI\setTabs().

Referenced by ilLMObjectGUI\delete().

{
if(!isset($_POST["id"]))
{
$this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
}
if(count($_POST["id"]) == 1 && $_POST["id"][0] == IL_FIRST_NODE)
{
$this->ilias->raiseError($this->lng->txt("cont_select_item"), $this->ilias->error_obj->MESSAGE);
}
if ($a_parent_subobj_id == 0)
{
$this->setTabs();
}
if ($a_parent_subobj_id != 0)
{
$this->ctrl->setParameterByClass("ilStructureObjectGUI", "backcmd", $_GET["backcmd"]);
$this->ctrl->setParameterByClass("ilStructureObjectGUI", "obj_id", $a_parent_subobj_id);
$form_action = $this->ctrl->getFormActionByClass("ilStructureObjectGUI");
}
else
{
$this->ctrl->setParameter($this, "backcmd", $_GET["backcmd"]);
$form_action = $this->ctrl->getFormAction($this);
}
// display confirmation message
include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
$cgui = new ilConfirmationGUI();
$cgui->setFormAction($form_action);
$cgui->setHeaderText($this->lng->txt("info_delete_sure"));
$cgui->setCancel($this->lng->txt("cancel"), "cancelDelete");
$cgui->setConfirm($this->lng->txt("confirm"), "confirmedDelete");
foreach($_POST["id"] as $id)
{
if ($id != IL_FIRST_NODE)
{
$obj = new ilLMObject($this->object, $id);
$caption = ilUtil::getImageTagByType($obj->getType(), $this->tpl->tplPath).
" ".$obj->getTitle();
$cgui->addItem("id[]", $id, $caption);
}
}
$this->tpl->setContent($cgui->getHTML());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjContentObjectGUI::deleteBibItem ( )

delete bib item (module call)

Definition at line 1092 of file class.ilObjContentObjectGUI.php.

References deleteBibItemObject(), ilCtrl\IL_RTOKEN_NAME, and ilObjectGUI\setTabs().

{
$this->setTabs();
// questionable workaround to make this old stuff work
$this->ctrl->setParameter($this, ilCtrl::IL_RTOKEN_NAME, $this->ctrl->getRequestToken());
$this->deleteBibItemObject($this->ctrl->getLinkTarget($this));
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::deleteBibItemObject (   $a_target = "")

delete bib item (admin call)

Definition at line 1070 of file class.ilObjContentObjectGUI.php.

References $_GET, and $_POST.

Referenced by deleteBibItem().

{
include_once "./Modules/LearningModule/classes/class.ilBibItemGUI.php";
$bib_gui =& new ilBibItemGUI();
$bib_gui->setObject($this->object);
$bibItemIndex = $_POST["bibItemIndex"] ? $_POST["bibItemIndex"] : $_GET["bibItemIndex"];
$bib_gui->bib_obj->delete($_GET["bibItemName"], $_GET["bibItemPath"], $bibItemIndex);
if (strpos($bibItemIndex, ",") > 0)
{
$bibItemIndex = substr($bibItemIndex, 0, strpos($bibItemIndex, ","));
}
if ($a_target == "")
{
$a_target = "adm_object.php?ref_id=" . $this->object->getRefId();
}
$bib_gui->edit("ADM_CONTENT", "adm_content", $a_target, $bibItemIndex);
}

+ Here is the caller graph for this function:

ilObjContentObjectGUI::deleteMenuEntry ( )

drop a menu entry

Definition at line 3125 of file class.ilObjContentObjectGUI.php.

References $_GET, __initLMMenuEditor(), and ilUtil\sendSuccess().

{
if (empty($_GET["menu_entry"]))
{
$this->ilias->raiseError($this->lng->txt("no_menu_entry_id"),$this->ilias->error_obj->MESSAGE);
}
$this->lmme_obj->delete($_GET["menu_entry"]);
ilUtil::sendSuccess($this->lng->txt("msg_entry_removed"), true);
$this->ctrl->redirect($this, "editMenuProperties");
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::deleteStyle ( )

Delete Style.

Definition at line 686 of file class.ilObjContentObjectGUI.php.

References $ilCtrl.

{
global $ilCtrl;
$ilCtrl->redirectByClass("ilobjstylesheetgui", "delete");
}
ilObjContentObjectGUI::deleteTooltips ( )

Delete tooltips.

Definition at line 3752 of file class.ilObjContentObjectGUI.php.

References $_POST, $ilCtrl, ilObjectGUI\$lng, ilHelp\deleteTooltip(), and ilUtil\sendSuccess().

{
global $lng, $ilCtrl;
if (is_array($_POST["id"]))
{
include_once("./Services/Help/classes/class.ilHelp.php");
foreach ($_POST["id"] as $id)
{
}
ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
}
$ilCtrl->redirect($this, "showTooltipList");
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::downloadPDFFile ( )

download export file

Definition at line 2094 of file class.ilObjContentObjectGUI.php.

References $_POST, $file, and ilUtil\deliverFile().

{
if(!isset($_POST["file"]))
{
$this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
}
if (count($_POST["file"]) > 1)
{
$this->ilias->raiseError($this->lng->txt("cont_select_max_one_item"),$this->ilias->error_obj->MESSAGE);
}
$export_dir = $this->object->getOfflineDirectory();
$file = basename($_POST["file"][0]);
ilUtil::deliverFile($export_dir."/".$file, $file);
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::editBibItem ( )

edit bib items (module call)

Definition at line 1128 of file class.ilObjContentObjectGUI.php.

References editBibItemObject(), ilCtrl\IL_RTOKEN_NAME, and ilObjectGUI\setTabs().

{
$this->setTabs();
// questionable workaround to make this old stuff work
$this->ctrl->setParameter($this, ilCtrl::IL_RTOKEN_NAME, $this->ctrl->getRequestToken());
$this->editBibItemObject($this->ctrl->getLinkTarget($this));
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::editBibItemObject (   $a_target = "")

edit bib items (admin call)

Definition at line 1106 of file class.ilObjContentObjectGUI.php.

References $_GET, and $_POST.

Referenced by editBibItem().

{
include_once "./Modules/LearningModule/classes/class.ilBibItemGUI.php";
$bib_gui =& new ilBibItemGUI();
$bib_gui->setObject($this->object);
$bibItemIndex = $_POST["bibItemIndex"] ? $_POST["bibItemIndex"] : $_GET["bibItemIndex"];
$bibItemIndex *= 1;
if ($bibItemIndex < 0)
{
$bibItemIndex = 0;
}
if ($a_target == "")
{
$a_target = "adm_object.php?ref_id=" . $this->object->getRefId();
}
$bib_gui->edit("ADM_CONTENT", "adm_content", $a_target, $bibItemIndex);
}

+ Here is the caller graph for this function:

ilObjContentObjectGUI::editGlossaries ( )

Edit automatically linked glossaries.

Parameters
@return

Definition at line 3938 of file class.ilObjContentObjectGUI.php.

References $ilCtrl, ilObjectGUI\$lng, $tab, ilObjectGUI\$tpl, setSubTabs(), and ilObjectGUI\setTabs().

{
global $tpl, $ilToolbar, $lng, $ilCtrl, $ilTabs;
$this->setTabs();
$ilTabs->setTabActive("settings");
$this->setSubTabs("cont_glossaries");
$ilToolbar->addButton($lng->txt("add"),
$ilCtrl->getLinkTarget($this, "showLMGlossarySelector"));
include_once("./Modules/LearningModule/classes/class.ilLMGlossaryTableGUI.php");
$tab = new ilLMGlossaryTableGUI($this->object, $this, "editGlossaries");
$tpl->setContent($tab->getHTML());
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::editMasterLanguage ( )

Edit master language.

Parameters
@return

Definition at line 4064 of file class.ilObjContentObjectGUI.php.

References $ilCtrl.

{
global $ilCtrl;
$ilCtrl->setParameter($this, "transl", "");
$ilCtrl->redirect($this, "chapters");
}
ilObjContentObjectGUI::editMenuEntry ( )

edit menu entry form

Definition at line 3142 of file class.ilObjContentObjectGUI.php.

References $_GET, $ilCtrl, and initMenuEntryForm().

{
global $ilToolbar, $ilCtrl;
if (empty($_GET["menu_entry"]))
{
$this->ilias->raiseError($this->lng->txt("no_menu_entry_id"),$this->ilias->error_obj->MESSAGE);
}
$ilCtrl->saveParameter($this, array("menu_entry"));
$ilToolbar->addButton($this->lng->txt("lm_menu_select_internal_object"),
$ilCtrl->getLinkTarget($this, "showEntrySelector"));
$form = $this->initMenuEntryForm("edit");
$this->tpl->setContent($form->getHTML());
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::editMenuProperties ( )

Edit menu properies.

Definition at line 783 of file class.ilObjContentObjectGUI.php.

References $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\$tpl, __initLMMenuEditor(), initMenuForm(), setSubTabs(), and ilObjectGUI\setTabs().

{
global $lng, $ilTabs, $ilCtrl, $tpl, $ilToolbar;
$lng->loadLanguageModule("style");
$this->setTabs();
$ilTabs->setTabActive("settings");
$this->setSubTabs("cont_lm_menu");
$ilToolbar->setFormAction($ilCtrl->getFormAction($this));
$ilToolbar->addFormButton($this->lng->txt("add_menu_entry"), "addMenuEntry");
$ilToolbar->setCloseFormTag(false);
$form = $this->initMenuForm();
$form->setOpenTag(false);
$form->setCloseTag(false);
$entries = $this->lmme_obj->getMenuEntries();
include_once("./Modules/LearningModule/classes/class.ilLMMenuItemsTableGUI.php");
$table = new ilLMMenuItemsTableGUI($this, "editMenuProperties", $this->lmme_obj);
$table->setOpenFormTag(false);
$tpl->setContent($form->getHTML()."<br />".$table->getHTML());
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::editPublicSection ( )

Definition at line 2752 of file class.ilObjContentObjectGUI.php.

References ilObjectGUI\$object, $si, ilUtil\array_php2js(), ilUtil\sendInfo(), setSubTabs(), ilObjectGUI\setTabs(), and ilExplorer\setTargetGet().

{
global $ilTabs, $ilToobar, $ilAccess;
if (!$ilAccess->checkAccessOfUser(ANONYMOUS_USER_ID, "read", "", $this->object->getRefId()))
{
ilUtil::sendInfo($this->lng->txt("cont_anonymous_user_missing_perm"));
}
$this->setTabs();
$this->setSubTabs("public_section");
$ilTabs->setTabActive("settings");
switch ($this->object->getType())
{
case "lm":
$gui_class = "ilobjlearningmodulegui";
break;
case "dlb":
$gui_class = "ilobjdlbookgui";
break;
}
$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.lm_public_selector.html",
"Modules/LearningModule");
// get learning module object
$this->lm_obj = new ilObjLearningModule($this->ref_id, true);
// public mode
$my_toolbar = new ilToolbarGUI();
$modes = array("complete" => $this->lng->txt("all_pages"), "selected" => $this->lng->txt("selected_pages_only"));
include_once("./Services/Form/classes/class.ilSelectInputGUI.php");
$si = new ilSelectInputGUI($this->lng->txt("choose_public_mode"), "lm_public_mode");
$si->setOptions($modes);
$si->setValue($this->object->getPublicAccessMode());
$my_toolbar->addInputItem($si, true);
$my_toolbar->setOpenFormTag(false);
$my_toolbar->setCloseFormTag(false);
$my_toolbar->addFormButton($this->lng->txt("save"), "savePublicSection");
$this->tpl->setVariable("TOOLBAR", $my_toolbar->getHTML());
$this->tpl->setVariable("FORMACTION", $this->ctrl->getLinkTarget($this, "savePublicSection"));
if ($this->object->getPublicAccessMode() == "selected")
{
$this->tpl->setCurrentBlock("select_pages");
require_once ("./Modules/LearningModule/classes/class.ilPublicSectionSelector.php");
$exp = new ilPublicSectionSelector($this->ctrl->getLinkTarget($this, "view"),
$this->object, $gui_class);
$exp->setTargetGet("obj_id");
// build html-output
$exp->setOutput(0);
$output = $exp->getOutput();
// get page ids
foreach ($exp->format_options as $node)
{
if (!$node["container"])
{
$pages[] = $node["child"];
}
}
$js_pages = ilUtil::array_php2js($pages);
$this->tpl->setVariable("EXPLORER",$output);
$this->tpl->setVariable("ONCLICK",$js_pages);
$this->tpl->setVariable("TXT_CHECKALL", $this->lng->txt("check_all"));
$this->tpl->setVariable("TXT_UNCHECKALL", $this->lng->txt("uncheck_all"));
$this->tpl->setVariable("TXT_SAVE", $this->lng->txt("save"));
$this->tpl->parseCurrentBlock();
}
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::editStyle ( )

Edit Style.

Definition at line 676 of file class.ilObjContentObjectGUI.php.

References $ilCtrl.

{
global $ilCtrl;
$ilCtrl->redirectByClass("ilobjstylesheetgui", "edit");
}
ilObjContentObjectGUI::editStyleProperties ( )

Edit style properties.

Definition at line 583 of file class.ilObjContentObjectGUI.php.

References ilObjectGUI\$tpl, and initStylePropertiesForm().

{
global $tpl;
$tpl->setContent($this->form->getHTML());
}

+ Here is the call graph for this function:

& ilObjContentObjectGUI::executeCommand ( )

execute command

Reimplemented from ilObjectGUI.

Definition at line 43 of file class.ilObjContentObjectGUI.php.

References $_GET, $_POST, $cmd, $ilCtrl, $ilErr, ilObjectGUI\$lng, $ret, ilLearningProgressBaseGUI\activateStatistics(), ilObjectGUI\addHeaderAction(), addLocations(), ilMDEditorGUI\addObserver(), explorer(), ilObjectGUI\getCreationMode(), ilLMObjectFactory\getInstance(), ilObjectTranslation\getInstance(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), ilLearningProgressBaseGUI\LP_CONTEXT_REPOSITORY, ilObjectGUI\omitLocator(), ilObjectGUI\prepareOutput(), setSubTabs(), and ilObjectGUI\setTabs().

{
global $ilAccess, $lng, $ilTabs, $ilCtrl, $ilErr;
if ($this->ctrl->getRedirectSource() == "ilinternallinkgui")
{
$this->explorer();
return;
}
if ($this->ctrl->getCmdClass() == "ilinternallinkgui")
{
$this->ctrl->setReturn($this, "explorer");
}
// get next class that processes or forwards current command
$next_class = $this->ctrl->getNextClass($this);
// get current command
// $cmd = $this->ctrl->getCmd("", array("downloadExportFile"));
if ($_GET["to_props"] == 1)
{
$cmd = $this->ctrl->getCmd("properties");
}
else
{
$cmd = $this->ctrl->getCmd("chapters");
}
//echo "-$cmd-".$next_class."-";
switch($next_class)
{
case "illearningprogressgui":
$this->addHeaderAction();
$this->addLocations();
include_once './Services/Tracking/classes/class.ilLearningProgressGUI.php';
$this->setTabs("learning_progress");
$new_gui =& new ilLearningProgressGUI(ilLearningProgressGUI::LP_CONTEXT_REPOSITORY,$this->object->getRefId());
$new_gui->activateStatistics();
$this->ctrl->forwardCommand($new_gui);
break;
case 'ilmdeditorgui':
if(!$ilAccess->checkAccess('write','',$this->object->getRefId()))
{
$ilErr->raiseError($this->lng->txt('permission_denied'),$ilErr->WARNING);
}
$this->addHeaderAction();
$this->addLocations();
include_once 'Services/MetaData/classes/class.ilMDEditorGUI.php';
$this->setTabs("meta");
$md_gui =& new ilMDEditorGUI($this->object->getId(), 0, $this->object->getType());
$md_gui->addObserver($this->object,'MDUpdateListener','General');
$this->ctrl->forwardCommand($md_gui);
break;
case "ilobjstylesheetgui":
$this->addLocations();
include_once ("./Services/Style/classes/class.ilObjStyleSheetGUI.php");
$this->ctrl->setReturn($this, "editStyleProperties");
$style_gui =& new ilObjStyleSheetGUI("", $this->object->getStyleSheetId(), false, false);
$style_gui->omitLocator();
if ($cmd == "create" || $_GET["new_type"]=="sty")
{
$style_gui->setCreationMode(true);
}
$ret =& $this->ctrl->forwardCommand($style_gui);
//$ret =& $style_gui->executeCommand();
if ($cmd == "save" || $cmd == "copyStyle" || $cmd == "importStyle")
{
$style_id = $ret;
$this->object->setStyleSheetId($style_id);
$this->object->update();
$this->ctrl->redirectByClass("ilobjstylesheetgui", "edit");
}
break;
case "illmpageobjectgui":
$ilTabs->setBackTarget($lng->txt("learning module"),
$ilCtrl->getLinkTarget($this, "chapters"));
$this->ctrl->saveParameter($this, array("obj_id"));
$this->addLocations();
$this->ctrl->setReturn($this, "chapters");
//echo "!";
//$this->lm_obj =& $this->ilias->obj_factory->getInstanceByRefId($this->ref_id);
$pg_gui =& new ilLMPageObjectGUI($this->object);
if ($_GET["obj_id"] != "")
{
$obj =& ilLMObjectFactory::getInstance($this->object, $_GET["obj_id"]);
$pg_gui->setLMPageObject($obj);
}
//$ret =& $pg_gui->executeCommand();
$ret =& $this->ctrl->forwardCommand($pg_gui);
if ($cmd == "save" || $cmd == "cancel")
{
// $this->ctrl->redirect($this, "pages");
}
break;
case "ilstructureobjectgui":
$ilTabs->setBackTarget($lng->txt("learning module"),
$ilCtrl->getLinkTarget($this, "chapters"));
$this->ctrl->saveParameter($this, array("obj_id"));
$this->addLocations();
$this->ctrl->setReturn($this, "chapters");
$st_gui =& new ilStructureObjectGUI($this->object, $this->object->lm_tree);
if ($_GET["obj_id"] != "")
{
$obj =& ilLMObjectFactory::getInstance($this->object, $_GET["obj_id"]);
$st_gui->setStructureObject($obj);
}
//$ret =& $st_gui->executeCommand();
$ret =& $this->ctrl->forwardCommand($st_gui);
if ($cmd == "save" || $cmd == "cancel")
{
if ($_GET["obj_id"] == "")
{
$this->ctrl->redirect($this, "chapters");
}
else
{
$this->ctrl->setCmd("subchap");
$this->executeCommand();
}
}
break;
case 'ilpermissiongui':
if (strtolower($_GET["baseClass"]) == "iladministrationgui")
{
$this->prepareOutput();
}
else
{
$this->addHeaderAction();
$this->addLocations(true);
$this->setTabs("perm");
}
include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
$perm_gui =& new ilPermissionGUI($this);
$ret =& $this->ctrl->forwardCommand($perm_gui);
break;
// infoscreen
case 'ilinfoscreengui':
$this->addHeaderAction();
$this->addLocations(true);
$this->setTabs("info");
include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
$info = new ilInfoScreenGUI($this);
$info->enablePrivateNotes();
$info->enableLearningProgress();
$info->enableNews();
if ($ilAccess->checkAccess("write", "", $_GET["ref_id"]))
{
$info->enableNewsEditing();
$info->setBlockProperty("news", "settings", true);
}
// show standard meta data section
$info->addMetaDataSections($this->object->getId(), 0,
$this->object->getType());
$ret =& $this->ctrl->forwardCommand($info);
break;
case "ilexportgui":
$this->addHeaderAction();
$this->addLocations(true);
$this->setTabs("export");
include_once("./Services/Export/classes/class.ilExportGUI.php");
$exp_gui = new ilExportGUI($this);
$exp_gui->addFormat("xml", "", $this, "export");
include_once("./Services/Object/classes/class.ilObjectTranslation.php");
$ot = ilObjectTranslation::getInstance($this->object->getId());
if ($ot->getContentActivated())
{
$lng->loadLanguageModule("meta");
$langs = $ot->getLanguages();
foreach ($langs as $l => $ldata)
{
$exp_gui->addFormat("html_".$l, "HTML (".$lng->txt("meta_l_".$l).")", $this, "exportHTML");
}
}
else
{
$exp_gui->addFormat("html", "", $this, "exportHTML");
}
$exp_gui->addFormat("scorm", "", $this, "exportSCORM");
$exp_gui->addCustomColumn($lng->txt("cont_public_access"),
$this, "getPublicAccessColValue");
$exp_gui->addCustomMultiCommand($lng->txt("cont_public_access"),
$this, "publishExportFile");
$ret = $this->ctrl->forwardCommand($exp_gui);
break;
case 'ilobjecttranslationgui':
$this->addHeaderAction();
$this->addLocations(true);
//$this->checkPermissionBool("write");
//$this->prepareOutput();
//$this->tabs_gui->setTabActive('export');
$this->setTabs("settings");
$this->setSubTabs("obj_multilinguality");
include_once("./Services/Object/classes/class.ilObjectTranslationGUI.php");
$transgui = new ilObjectTranslationGUI($this);
$transgui->setTitleDescrOnlyMode(false);
$this->ctrl->forwardCommand($transgui);
break;
case "ilcommonactiondispatchergui":
include_once("Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
$this->ctrl->forwardCommand($gui);
break;
/* case "ilpagemultilanggui":
$this->addHeaderAction();
$this->addLocations(true);
$ilCtrl->setReturn($this, "properties");
include_once("./Services/COPage/classes/class.ilPageMultiLangGUI.php");
$ml_gui = new ilPageMultiLangGUI("lm", $this->object->getId());
$this->setTabs("settings");
$this->setSubTabs("cont_multilinguality");
$ret = $this->ctrl->forwardCommand($ml_gui);
break;*/
default:
$new_type = $_POST["new_type"]
? $_POST["new_type"]
: $_GET["new_type"];
if ($cmd == "create" &&
!in_array($new_type, array("dbk", "lm")))
{
//$this->addLocations();
switch ($new_type)
{
case "pg":
$this->setTabs();
$this->ctrl->setCmdClass("ilLMPageObjectGUI");
$ret =& $this->executeCommand();
break;
case "st":
$this->setTabs();
$this->ctrl->setCmdClass("ilStructureObjectGUI");
$ret =& $this->executeCommand();
break;
}
}
else
{
// creation of new dbk/lm in repository
if ($this->getCreationMode() == true &&
in_array($new_type, array("dbk", "lm")))
{
$this->prepareOutput();
if ($cmd == "") // this may be due to too big upload files
{
$cmd = "create";
}
$cmd .= "Object";
$ret =& $this->$cmd();
}
else
{
$this->addHeaderAction();
$this->addLocations();
$ret =& $this->$cmd();
}
}
break;
}
return $ret;
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::explorer ( )

output explorer tree

Definition at line 836 of file class.ilObjContentObjectGUI.php.

References $_GET, $ilCtrl, ilObjectGUI\$ilias, $ilUser, ilObjectGUI\$object, $path, exit, ilUtil\getImagePath(), ilUtil\getStyleSheetLocation(), proceedDragDrop(), and ilTree\setTableNames().

Referenced by executeCommand().

{
switch ($this->object->getType())
{
case "lm":
$gui_class = "ilobjlearningmodulegui";
break;
case "dlb":
$gui_class = "ilobjdlbookgui";
break;
}
$ilCtrl->setParameterByClass($gui_class, "active_node", $_GET["active_node"]);
$this->tpl = new ilTemplate("tpl.main.html", true, true);
// get learning module object
//$this->lm_obj =& new ilObjLearningModule($this->ref_id, true);
$this->tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
//$this->tpl = new ilTemplate("tpl.explorer.html", false, false);
$this->tpl->addBlockFile("CONTENT", "content", "tpl.explorer.html");
$this->tpl->setVariable("IMG_SPACE", ilUtil::getImagePath("spacer.png", false));
require_once ("./Modules/LearningModule/classes/class.ilLMEditorExplorer.php");
$exp = new ilLMEditorExplorer($this->ctrl->getLinkTarget($this, "view"),
$this->object, $gui_class);
$exp->setTargetGet("obj_id");
$exp->setExpandTarget($this->ctrl->getLinkTarget($this, "explorer"));
if ($_GET["lmmovecopy"] == "1")
{
$this->proceedDragDrop();
}
if ($_GET["lmexpand"] == "")
{
$mtree = new ilTree($this->object->getId());
$mtree->setTableNames('lm_tree','lm_data');
$mtree->setTreeTablePK("lm_id");
$expanded = $mtree->readRootId();
}
else
{
$expanded = $_GET["lmexpand"];
}
if ($_GET["active_node"] != "")
{
$path = $this->lm_tree->getPathId($_GET["active_node"]);
$exp->setForceOpenPath($path);
$exp->highlightNode($_GET["active_node"]);
}
$exp->setExpand($expanded);
// build html-output
$exp->setOutput(0);
$output = $exp->getOutput();
// asynchronous output
if ($ilCtrl->isAsynch())
{
echo $output; exit;
}
include_once("./Services/COPage/classes/class.ilPageEditorGUI.php");
/*if (ilPageEditorGUI::_doJSEditing())
{
//$this->tpl->touchBlock("includejavascript");
$IDS = "";
for ($i=0;$i<count($exp->iconList);$i++)
{
if ($i>0) $IDS .= ",";
$IDS .= "'".$exp->iconList[$i]."'";
}
$this->tpl->setVariable("ICONIDS",$IDS);
//$this->ctrl->setParameter($this, "lmovecopy", 1);
$this->tpl->setVariable("TESTPFAD",$this->ctrl->getLinkTarget($this, "explorer")."&lmmovecopy=1");
//$this->tpl->setVariable("POPUPLINK",$this->ctrl->getLinkTarget($this, "popup")."&ptype=movecopytreenode");
$this->tpl->setVariable("POPUPLINK",$this->ctrl->getLinkTarget($this, "popup")."&ptype=movecopytreenode");
}*/
$this->tpl->setCurrentBlock("content");
$this->tpl->setVariable("TXT_EXPLORER_HEADER", $this->lng->txt("cont_chap_and_pages"));
$this->tpl->setVariable("EXP_REFRESH", $this->lng->txt("refresh"));
$this->tpl->setVariable("EXPLORER",$output);
$this->ctrl->setParameter($this, "lmexpand", $_GET["lmexpand"]);
$this->tpl->setVariable("ACTION", $this->ctrl->getLinkTarget($this, "explorer"));
$this->tpl->parseCurrentBlock();
$this->tpl->show(false);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjContentObjectGUI::export ( )

export content object

Reimplemented in ilObjDlBookGUI.

Definition at line 2022 of file class.ilObjContentObjectGUI.php.

{
require_once("./Modules/LearningModule/classes/class.ilContObjectExport.php");
$cont_exp = new ilContObjectExport($this->object);
$cont_exp->buildExportFile();
// $this->ctrl->redirect($this, "exportList");
}
ilObjContentObjectGUI::exportHTML ( )

create html package

Definition at line 2381 of file class.ilObjContentObjectGUI.php.

References $_POST, $lang, ilObjectTranslation\getInstance(), and ilUtil\stripSlashes().

{
include_once("./Services/Object/classes/class.ilObjectTranslation.php");
$ot = ilObjectTranslation::getInstance($this->object->getId());
$lang = "";
if ($ot->getContentActivated())
{
$format = explode("_", $_POST["format"]);
$lang = ilUtil::stripSlashes($format[1]);
}
require_once("./Modules/LearningModule/classes/class.ilContObjectExport.php");
$cont_exp = new ilContObjectExport($this->object, "html", $lang);
$cont_exp->buildExportFile();
//echo $this->tpl->get();
// $this->ctrl->redirect($this, "exportList");
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::exportObject ( )

export object

public

Definition at line 1180 of file class.ilObjContentObjectGUI.php.

{
return;
}
ilObjContentObjectGUI::exportSCORM ( )

create scorm package

Definition at line 2401 of file class.ilObjContentObjectGUI.php.

{
require_once("./Modules/LearningModule/classes/class.ilContObjectExport.php");
$cont_exp = new ilContObjectExport($this->object, "scorm");
$cont_exp->buildExportFile();
//echo $this->tpl->get();
// $this->ctrl->redirect($this, "exportList");
}
ilObjContentObjectGUI::filterHelpChapters ( )

Filter help chapters.

Parameters
@return

Definition at line 3560 of file class.ilObjContentObjectGUI.php.

References $_POST, $ilCtrl, ilSession\set(), and ilUtil\stripSlashes().

{
global $ilCtrl;
ilSession::set("help_chap", ilUtil::stripSlashes($_POST["help_chap"]));
$ilCtrl->redirect($this, "showExportIDsOverview");
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::filterTooltips ( )

Filter tooltips.

Parameters
@return

Definition at line 3716 of file class.ilObjContentObjectGUI.php.

References $_POST, $ilCtrl, ilObjectGUI\$lng, ilSession\set(), and ilUtil\stripSlashes().

{
global $lng, $ilCtrl;
ilSession::set("help_tt_comp", ilUtil::stripSlashes($_POST["help_tt_comp"]));
$ilCtrl->redirect($this, "showTooltipList");
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::fixTree ( )

Fix tree.

Definition at line 2138 of file class.ilObjContentObjectGUI.php.

References ilUtil\sendSuccess().

{
$this->object->fixTree();
ilUtil::sendSuccess($this->lng->txt("cont_tree_fixed"), true);
$this->ctrl->redirect($this, "showMaintenance");
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::fixTreeConfirm ( )

confirm screen for tree fixing

Definition at line 2119 of file class.ilObjContentObjectGUI.php.

References setContentSubTabs(), and ilObjectGUI\setTabs().

{
$this->setTabs();
$this->setContentSubTabs("maintenance");
// display confirmation message
include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
$cgui = new ilConfirmationGUI();
$cgui->setFormAction($this->ctrl->getFormAction($this));
$cgui->setHeaderText($this->lng->txt("cont_fix_tree_confirm"));
$cgui->setCancel($this->lng->txt("cancel"), "showMaintenance");
$cgui->setConfirm($this->lng->txt("cont_fix_tree"), "fixTree");
$this->tpl->setContent($cgui->getHTML());
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::formatInvalidLinkArray ( Array  $row)
See Also
ilLinkCheckerGUIRowHandling::formatInvalidLinkArray()
Parameters
arrayUnformatted array
Returns
array Formatted array public

Implements ilLinkCheckerGUIRowHandling.

Definition at line 2868 of file class.ilObjContentObjectGUI.php.

References ilObjectGUI\$actions, $row, and ilLMPageObject\_getPresentationTitle().

{
$row['title'] = ilLMPageObject::_getPresentationTitle($row['page_id'], $this->object->getPageHeader());
require_once 'Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php';
$actions->setSelectionHeaderClass('small');
$actions->setItemLinkClass('xsmall');
$actions->setListTitle($this->lng->txt('actions'));
$actions->setId($row['page_id']);
$this->ctrl->setParameterByClass('ilLMPageObjectGUI', 'obj_id', $row['page_id']);
$actions->addItem(
$this->lng->txt('edit'),
'',
$this->ctrl->getLinkTargetByClass('ilLMPageObjectGUI', 'edit')
);
$this->ctrl->clearParametersByClass('ilLMPageObjectGUI');
$row['action_html'] = $actions->getHTML();
return $row;
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::getContextPath (   $a_endnode_id,
  $a_startnode_id = 1 
)

get context path in content object tree

Parameters
int$a_endnode_idid of endnode
int$a_startnode_idid of startnode

Reimplemented in ilObjDlBookGUI.

Definition at line 1800 of file class.ilObjContentObjectGUI.php.

References $path.

Referenced by pages().

{
$path = "";
$tmpPath = $this->lm_tree->getPathFull($a_endnode_id, $a_startnode_id);
// count -1, to exclude the learning module itself
for ($i = 1; $i < (count($tmpPath) - 1); $i++)
{
if ($path != "")
{
$path .= " > ";
}
$path .= $tmpPath[$i]["title"];
}
return $path;
}

+ Here is the caller graph for this function:

static ilObjContentObjectGUI::getLayoutOption (   $a_txt,
  $a_var,
  $a_def_option = "" 
)
static

Save help mapping.

Parameters
@returnGet layout option
Returns
object layout form option

Definition at line 3801 of file class.ilObjContentObjectGUI.php.

References ilObjectGUI\$lng, ilObjContentObject\getAvailableLayouts(), ilUtil\getImagePath(), and ilUtil\img().

Referenced by initPropertiesForm(), ilStructureObjectGUI\initSetPageLayoutForm(), and initSetPageLayoutForm().

{
global $lng;
// default layout
$layout = new ilRadioGroupInputGUI($a_txt, $a_var);
if ($a_def_option != "")
{
if (is_file($im = ilUtil::getImagePath("layout_".$a_def_option.".png")))
{
$im_tag = ilUtil::img($im, $a_def_option);
}
$layout->addOption(new ilRadioOption("<table><tr><td>".$im_tag."</td><td><b>".
$lng->txt("cont_lm_default_layout").
"</b>: ".$lng->txt("cont_layout_".$a_def_option).
"</td></tr></table>", ""));
}
{
$im_tag = "";
if (is_file($im = ilUtil::getImagePath("layout_".$l.".png")))
{
$im_tag = ilUtil::img($im, $l);
}
$layout->addOption(new ilRadioOption("<table><tr><td style='padding: 0px 5px 5px;'>".
$im_tag."</td><td style='padding:5px;'><b>".$lng->txt("cont_layout_".$l)."</b>: ".
$lng->txt("cont_layout_".$l."_desc")."</td></tr></table>", $l));
}
return $layout;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilObjContentObjectGUI::getMultiLangHeader (   $a_lm_id,
  $a_gui_class 
)
static

Get multi lang header.

Parameters
@return

Definition at line 1307 of file class.ilObjContentObjectGUI.php.

References $_GET, $ilCtrl, $lang, ilObjectGUI\$lng, and ilObjectTranslation\getInstance().

Referenced by chapters(), and ilStructureObjectGUI\showHierarchy().

{
global $lng, $ilCtrl;
// multi language
include_once("./Services/Object/classes/class.ilObjectTranslation.php");
//include_once("./Services/COPage/classes/class.ilPageMultiLang.php");
//$ml = new ilPageMultiLang("lm", $a_lm_id);
if ($ot->getContentActivated())
{
$lng->loadLanguageModule("meta");
// info
include_once("./Services/COPage/classes/class.ilPageMultiLangGUI.php");
$ml_gui = new ilPageMultiLangGUI("lm", $a_lm_id);
$ml_head = $ml_gui->getMultiLangInfo($_GET["transl"]);
// language switch
include_once("./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php");
$list->setListTitle($lng->txt("actions"));
$list->setId("copage_act");
$entries = false;
if (!in_array($_GET["transl"], array("", "-")))
{
$l = $ot->getMasterLanguage();
$list->addItem($lng->txt("cont_edit_language_version").": ".
$lng->txt("meta_l_".$l), "",
$ilCtrl->getLinkTarget($a_gui_class, "editMasterLanguage"));
$entries = true;
}
foreach ($ot->getLanguages() as $al => $lang)
{
if ($_GET["transl"] != $al &&
$al != $ot->getMasterLanguage())
{
$ilCtrl->setParameter($a_gui_class, "totransl", $al);
$list->addItem($lng->txt("cont_edit_language_version").": ".
$lng->txt("meta_l_".$al), "",
$ilCtrl->getLinkTarget($a_gui_class, "switchToLanguage"));
$ilCtrl->setParameter($a_gui_class, "totransl", $_GET["totransl"]);
}
$entries = true;
}
if ($entries)
{
$ml_head = '<div class="ilFloatLeft">'.$ml_head.'</div><div style="margin: 5px 0;" class="small ilRight">'.$list->getHTML()."</div>";
}
}
return $ml_head;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjContentObjectGUI::getPropertiesFormValues ( )

Get values for properties form.

Definition at line 461 of file class.ilObjContentObjectGUI.php.

References ilObjectTranslation\getInstance().

Referenced by properties().

{
$values = array();
$title = $this->object->getTitle();
$description = $this->object->getDescription();
include_once("./Services/Object/classes/class.ilObjectTranslation.php");
$ot = ilObjectTranslation::getInstance($this->object->getId());
if ($ot->getContentActivated())
{
$title = $ot->getDefaultTitle();
$description = $ot->getDefaultDescription();
}
$values["title"] = $title;
$values["description"] = $description;
if ($this->object->getOnline())
{
$values["cobj_online"] = true;
}
$values["lm_layout"] = $this->object->getLayout();
$values["lm_pg_header"] = $this->object->getPageHeader();
if ($this->object->isActiveNumbering())
{
$values["cobj_act_number"] = true;
}
$values["toc_mode"] = $this->object->getTOCMode();
if ($this->object->publicNotes())
{
$values["cobj_pub_notes"] = true;
}
if ($this->object->cleanFrames())
{
$values["cobj_clean_frames"] = true;
}
if ($this->object->isActiveHistoryUserComments())
{
$values["cobj_user_comments"] = true;
}
$values["layout_per_page"] = $this->object->getLayoutPerPage();
$values["rating"] = $this->object->hasRating();
$values["rating_pages"] = $this->object->hasRatingPages();
$values["disable_def_feedback"] = $this->object->getDisableDefaultFeedback();
$this->form->setValuesByArray($values);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjContentObjectGUI::getPublicAccessColValue (   $a_type,
  $a_file 
)

Get public access value for export table.

Definition at line 2033 of file class.ilObjContentObjectGUI.php.

References $ilCtrl, and ilObjectGUI\$lng.

{
global $lng, $ilCtrl;
$changelink = "<a href='".$ilCtrl->getLinkTarget($this, "editMenuProperties")."'>".$lng->txt("change")."</a>";
if (!$this->object->isActiveLMMenu())
{
$add = "<br />".$lng->txt("cont_download_no_menu")." ".$changelink;
}
else if (!$this->object->isActiveDownloads())
{
$add = "<br />".$lng->txt("cont_download_no_download")." ".$changelink;
}
if ($this->object->getPublicExportFile($a_type) == $a_file)
{
return $lng->txt("yes").$add;
}
return " ";
}
ilObjContentObjectGUI::history ( )

history

public

Definition at line 2845 of file class.ilObjContentObjectGUI.php.

References ilHistoryGUI\getHistoryTable(), and ilObjectGUI\setTabs().

{
$this->setTabs("history");
require_once("./Services/History/classes/class.ilHistoryGUI.php");
$hist_gui =& new ilHistoryGUI($this->object->getId() ,
$this->object->getType());
$hist_html = $hist_gui->getHistoryTable(
$this->ctrl->getParameterArray($this, "history"),
$this->object->isActiveHistoryUserComments()
);
$this->tpl->setVariable("ADM_CONTENT", $hist_html);
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::ilObjContentObjectGUI (   $a_data,
  $a_id = 0,
  $a_call_by_reference = true,
  $a_prepare_output = false 
)

Constructor.

public

Definition at line 30 of file class.ilObjContentObjectGUI.php.

References $ilCtrl, ilObjectGUI\$lng, and ilObjectGUI\ilObjectGUI().

Referenced by ilObjDlBookGUI\ilObjDlBookGUI(), and ilObjLearningModuleGUI\ilObjLearningModuleGUI().

{
global $lng, $ilCtrl;
//echo "<br>ilobjcontobjgui-constructor-id-$a_id";
$this->ctrl =& $ilCtrl;
$lng->loadLanguageModule("content");
$lng->loadLanguageModule("obj");
parent::ilObjectGUI($a_data,$a_id,$a_call_by_reference,false);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjContentObjectGUI::importFileObject ( )

display status information or report errors messages in case of error

public

Definition at line 1203 of file class.ilObjContentObjectGUI.php.

References $_GET, $_POST, ilObjectGUI\$tpl, initImportForm(), ilUtil\redirect(), and ilUtil\sendSuccess().

{
global $_FILES, $rbacsystem, $ilDB, $tpl;
include_once "./Modules/LearningModule/classes/class.ilObjLearningModule.php";
if (!$rbacsystem->checkAccess("create", $_GET["ref_id"], $_GET["new_type"]))
{
$this->ilias->raiseError($this->lng->txt("no_create_permission"), $this->ilias->error_obj->MESSAGE);
return;
}
$form = $this->initImportForm();
if ($form->checkInput())
{
// create and insert object in objecttree
include_once("./Modules/LearningModule/classes/class.ilObjContentObject.php");
$newObj = new ilObjContentObject();
$newObj->setType($_GET["new_type"]);
$newObj->setTitle($_FILES["xmldoc"]["name"]);
$newObj->setDescription("");
$newObj->create(true);
$newObj->createReference();
$newObj->putInTree($_GET["ref_id"]);
$newObj->setPermissions($_GET["ref_id"]);
$newObj->notify("new",$_GET["ref_id"],$_GET["parent_non_rbac_id"],$_GET["ref_id"],$newObj->getRefId());
// create learning module tree
$newObj->createLMTree();
// import lm from file
$mess = $newObj->importFromZipFile($_FILES["xmldoc"]["tmp_name"], $_FILES["xmldoc"]["name"],
$_POST["validate"]);
if ($mess == "")
{
ilUtil::sendSuccess($this->lng->txt($this->type."_added"),true);
ilUtil::redirect("ilias.php?ref_id=".$newObj->getRefId().
"&baseClass=ilLMEditorGUI");
}
else
{
$link = '<a href="'."ilias.php?ref_id=".$newObj->getRefId().
"&baseClass=ilLMEditorGUI".'" target="_top">'.$this->lng->txt("btn_next").'</a>';
$tpl->setContent("<br />".$link."<br /><br />".$mess.$link);
}
}
else
{
$form->setValuesByPost();
$tpl->setContent($form->getHtml());
}
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::importObject ( )

display dialogue for importing XML-LeaningObjects

public

Definition at line 1190 of file class.ilObjContentObjectGUI.php.

References ilObjectGUI\createObject().

{
$this->createObject();
return;
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::info ( )

info permissions

Definition at line 1890 of file class.ilObjContentObjectGUI.php.

References ilObjectGUI\setTabs().

{
$this->setTabs();
$this->infoObject();
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::initCreationForms (   $a_new_type)
protected

Init creation froms.

this will create the default creation forms: new, import, clone

Parameters
string$a_new_type
Returns
array

Reimplemented from ilObjectGUI.

Definition at line 959 of file class.ilObjContentObjectGUI.php.

References ilObjectGUI\initCreateForm(), and initImportForm().

{
$forms = array(self::CFORM_NEW => $this->initCreateForm($a_new_type),
self::CFORM_IMPORT => $this->initImportForm());
return $forms;
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::initImportForm ( )

Init import form.

Definition at line 989 of file class.ilObjContentObjectGUI.php.

References $_GET, $_POST, $ilCtrl, ilObjectGUI\$lng, ilFrameTargetInfo\_getFrame(), ilFormPropertyGUI\setInfo(), and ilFileInputGUI\setSuffixes().

Referenced by importFileObject(), and initCreationForms().

{
global $lng, $ilCtrl;
include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
$form = new ilPropertyFormGUI();
$new_type = $_POST["new_type"] ? $_POST["new_type"] : $_GET["new_type"];
$this->ctrl->setParameter($this, "new_type", $new_type);
$form->setTarget(ilFrameTargetInfo::_getFrame("MainContent"));
$form->setTableWidth("600px");
// import file
$fi = new ilFileInputGUI($this->lng->txt("file"), "xmldoc");
$fi->setSuffixes(array("zip"));
$fi->setRequired(true);
$fi->setSize(30);
$form->addItem($fi);
// validation
$cb = new ilCheckboxInputGUI($this->lng->txt("cont_validate_file"), "validate");
$cb->setInfo($this->lng->txt(""));
$form->addItem($cb);
$form->addCommandButton("importFile", $lng->txt("import"));
$form->addCommandButton("cancel", $lng->txt("cancel"));
$form->setTitle($this->lng->txt("import_".$new_type));
$form->setFormAction($ilCtrl->getFormAction($this));
return $form;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjContentObjectGUI::initMenuEntryForm (   $a_mode = "edit")

Init menu entry form.

Parameters
string$a_modeEdit Mode

Definition at line 3021 of file class.ilObjContentObjectGUI.php.

References $_GET, $_REQUEST, $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\$obj_id, __initLMMenuEditor(), ilObject\_lookupObjectId(), ilObject\_lookupTitle(), ilObject\_lookupType(), and ilTextInputGUI\setMaxLength().

Referenced by addMenuEntry(), and editMenuEntry().

{
global $lng, $ilCtrl;
include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
$form = new ilPropertyFormGUI();
// title
$ti = new ilTextInputGUI($this->lng->txt("lm_menu_entry_title"), "title");
$ti->setMaxLength(255);
$ti->setSize(40);
$form->addItem($ti);
// target
$ta = new ilTextInputGUI($this->lng->txt("lm_menu_entry_target"), "target");
$ta->setMaxLength(255);
$ta->setSize(40);
$form->addItem($ta);
if ($a_mode == "edit")
{
$this->lmme_obj->readEntry($_REQUEST["menu_entry"]);
$ti->setValue($this->lmme_obj->getTitle());
$ta->setValue($this->lmme_obj->getTarget());
}
if (isset($_GET["link_ref_id"]))
{
$link_ref_id = (int) $_GET["link_ref_id"];
$obj_type = ilObject::_lookupType($link_ref_id,true);
$target_link = $obj_type."_".$link_ref_id;
$ti->setValue($title);
$ta->setValue($target_link);
// link ref id
$hi = new ilHiddenInputGUI("link_ref_id");
$hi->setValue($link_ref_id);
$form->addItem($hi);
}
// save and cancel commands
if ($a_mode == "create")
{
$form->addCommandButton("saveMenuEntry", $lng->txt("save"));
$form->addCommandButton("editMenuProperties", $lng->txt("cancel"));
$form->setTitle($lng->txt("lm_menu_new_entry"));
}
else
{
$form->addCommandButton("updateMenuEntry", $lng->txt("save"));
$form->addCommandButton("editMenuProperties", $lng->txt("cancel"));
$form->setTitle($lng->txt("lm_menu_edit_entry"));
}
$form->setFormAction($ilCtrl->getFormAction($this));
return $form;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjContentObjectGUI::initMenuForm ( )

Init menu form.

Definition at line 714 of file class.ilObjContentObjectGUI.php.

References $ilCtrl, ilObjectGUI\$lng, ilCheckboxInputGUI\setChecked(), and ilFormPropertyGUI\setInfo().

Referenced by editMenuProperties().

{
global $lng, $ilCtrl;
include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
$form = new ilPropertyFormGUI();
// enable menu
$menu = new ilCheckboxInputGUI($this->lng->txt("cont_active"), "cobj_act_lm_menu");
$menu->setChecked($this->object->isActiveLMMenu());
$form->addItem($menu);
// toc
$toc = new ilCheckboxInputGUI($this->lng->txt("cont_toc"), "cobj_act_toc");
$toc->setChecked($this->object->isActiveTOC());
$form->addItem($toc);
// print view
$print = new ilCheckboxInputGUI($this->lng->txt("cont_print_view"), "cobj_act_print");
$print->setChecked($this->object->isActivePrintView());
$form->addItem($print);
// prevent glossary appendix
$glo = new ilCheckboxInputGUI($this->lng->txt("cont_print_view_pre_glo"), "cobj_act_print_prev_glo");
$glo->setChecked($this->object->isActivePreventGlossaryAppendix());
$print->addSubItem($glo);
// hide header and footer in print view
$hhfp = new ilCheckboxInputGUI($this->lng->txt("cont_hide_head_foot_print"), "hide_head_foot_print");
$hhfp->setChecked($this->object->getHideHeaderFooterPrint());
$print->addSubItem($hhfp);
// downloads
$no_download_file_available =
" ".$lng->txt("cont_no_download_file_available").
" <a href='".$ilCtrl->getLinkTargetByClass("ilexportgui", "")."'>".$lng->txt("change")."</a>";
$types = array("xml", "html", "scorm");
foreach($types as $type)
{
if ($this->object->getPublicExportFile($type) != "")
{
if (is_file($this->object->getExportDirectory($type)."/".
$this->object->getPublicExportFile($type)))
{
$no_download_file_available = "";
}
}
}
$dl = new ilCheckboxInputGUI($this->lng->txt("cont_downloads"), "cobj_act_downloads");
$dl->setInfo($this->lng->txt("cont_downloads_desc").$no_download_file_available);
$dl->setChecked($this->object->isActiveDownloads());
$form->addItem($dl);
// downloads in public area
$pdl = new ilCheckboxInputGUI($this->lng->txt("cont_downloads_public_desc"), "cobj_act_downloads_public");
$pdl->setChecked($this->object->isActiveDownloadsPublic());
$dl->addSubItem($pdl);
$form->addCommandButton("saveMenuProperties", $lng->txt("save"));
$form->setTitle($lng->txt("cont_lm_menu"));
$form->setFormAction($ilCtrl->getFormAction($this));
return $form;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjContentObjectGUI::initPropertiesForm ( )

Init properties form.

Definition at line 367 of file class.ilObjContentObjectGUI.php.

References $ilCtrl, ilObjectGUI\$lng, getLayoutOption(), ilFormPropertyGUI\setInfo(), ilSelectInputGUI\setOptions(), and ilFormPropertyGUI\setRequired().

Referenced by properties(), and saveProperties().

{
global $ilCtrl, $lng;
include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
$this->form = new ilPropertyFormGUI();
// title
$ti = new ilTextInputGUI($lng->txt("title"), "title");
//$ti->setMaxLength();
//$ti->setSize();
//$ti->setInfo($lng->txt(""));
$ti->setRequired(true);
$this->form->addItem($ti);
// description
$ta = new ilTextAreaInputGUI($lng->txt("desc"), "description");
//$ta->setCols();
//$ta->setRows();
//$ta->setInfo($lng->txt(""));
$this->form->addItem($ta);
// online
$online = new ilCheckboxInputGUI($lng->txt("cont_online"), "cobj_online");
$this->form->addItem($online);
// default layout
$layout = self::getLayoutOption($lng->txt("cont_def_layout"), "lm_layout");
$this->form->addItem($layout);
// page header
$page_header = new ilSelectInputGUI($lng->txt("cont_page_header"), "lm_pg_header");
$option = array ("st_title" => $this->lng->txt("cont_st_title"),
"pg_title" => $this->lng->txt("cont_pg_title"),
"none" => $this->lng->txt("cont_none"));
$page_header->setOptions($option);
$this->form->addItem($page_header);
// chapter numeration
$chap_num = new ilCheckboxInputGUI($lng->txt("cont_act_number"), "cobj_act_number");
$this->form->addItem($chap_num);
// toc mode
$toc_mode = new ilSelectInputGUI($lng->txt("cont_toc_mode"), "toc_mode");
$option = array ("chapters" => $this->lng->txt("cont_chapters_only"),
"pages" => $this->lng->txt("cont_chapters_and_pages"));
$toc_mode->setOptions($option);
$this->form->addItem($toc_mode);
// public notes
if (!$this->ilias->getSetting('disable_comments'))
{
$this->lng->loadLanguageModule("notes");
$pub_nodes = new ilCheckboxInputGUI($lng->txt("notes_comments"), "cobj_pub_notes");
$pub_nodes->setInfo($this->lng->txt("cont_lm_comments_desc"));
$this->form->addItem($pub_nodes);
}
// layout per page
$lpp = new ilCheckboxInputGUI($lng->txt("cont_layout_per_page"), "layout_per_page");
$lpp->setInfo($this->lng->txt("cont_layout_per_page_info"));
$this->form->addItem($lpp);
// synchronize frames
$synch = new ilCheckboxInputGUI($lng->txt("cont_synchronize_frames"), "cobj_clean_frames");
$synch->setInfo($this->lng->txt("cont_synchronize_frames_desc"));
$this->form->addItem($synch);
// history user comments
$com = new ilCheckboxInputGUI($lng->txt("enable_hist_user_comments"), "cobj_user_comments");
$com->setInfo($this->lng->txt("enable_hist_user_comments_desc"));
$this->form->addItem($com);
// rating
$this->lng->loadLanguageModule('rating');
$rate = new ilCheckboxInputGUI($this->lng->txt('rating_activate_rating'), 'rating');
$rate->setInfo($this->lng->txt('rating_activate_rating_info'));
$this->form->addItem($rate);
$ratep = new ilCheckboxInputGUI($this->lng->txt('lm_activate_rating'), 'rating_pages');
$this->form->addItem($ratep);
// disable default feedback for questions
$qfeed = new ilCheckboxInputGUI($lng->txt("cont_disable_def_feedback"), "disable_def_feedback");
$qfeed->setInfo($this->lng->txt("cont_disable_def_feedback_info"));
$this->form->addItem($qfeed);
$this->form->setTitle($lng->txt("cont_general_properties"));
$this->form->addCommandButton("saveProperties", $lng->txt("save"));
$this->form->setFormAction($ilCtrl->getFormAction($this));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjContentObjectGUI::initSetPageLayoutForm ( )

Init set page layout form.

Definition at line 3873 of file class.ilObjContentObjectGUI.php.

References $_POST, $ilCtrl, ilObjectGUI\$lng, and getLayoutOption().

Referenced by setPageLayout().

{
global $lng, $ilCtrl;
include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
$this->form = new ilPropertyFormGUI();
if (is_array($_POST["id"]))
{
foreach ($_POST["id"] as $id)
{
$hi = new ilHiddenInputGUI("id[]");
$hi->setValue($id);
$this->form->addItem($hi);
}
}
$layout = self::getLayoutOption($lng->txt("cont_layout"), "layout",
$this->object->getLayout());
$this->form->addItem($layout);
$this->form->addCommandButton("savePageLayout", $lng->txt("save"));
$this->form->addCommandButton("pages", $lng->txt("cancel"));
$this->form->setTitle($lng->txt("cont_set_layout"));
$this->form->setFormAction($ilCtrl->getFormAction($this));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjContentObjectGUI::initStylePropertiesForm ( )

Init style properties form.

Definition at line 594 of file class.ilObjContentObjectGUI.php.

References $_GET, $ilCtrl, $ilSetting, ilObjectGUI\$lng, ilObjStyleSheet\_getStandardStyles(), ilObjStyleSheet\_lookupStandard(), ilObject\_lookupTitle(), ilUtil\formSelect(), ilSelectInputGUI\setOptions(), setSubTabs(), ilObjectGUI\setTabs(), and ilNonEditableValueGUI\setValue().

Referenced by editStyleProperties().

{
global $ilCtrl, $lng, $ilTabs, $ilSetting;
$lng->loadLanguageModule("style");
$this->setTabs();
$ilTabs->setTabActive("settings");
$this->setSubTabs("cont_style");
include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
$this->form = new ilPropertyFormGUI();
$fixed_style = $ilSetting->get("fixed_content_style_id");
$style_id = $this->object->getStyleSheetId();
if ($fixed_style > 0)
{
$st = new ilNonEditableValueGUI($lng->txt("cont_current_style"));
$st->setValue(ilObject::_lookupTitle($fixed_style)." (".
$this->lng->txt("global_fixed").")");
$this->form->addItem($st);
}
else
{
$st_styles = ilObjStyleSheet::_getStandardStyles(true, false,
$_GET["ref_id"]);
$st_styles[0] = $this->lng->txt("default");
ksort($st_styles);
if ($style_id > 0)
{
// individual style
{
$st = new ilNonEditableValueGUI($lng->txt("cont_current_style"));
$st->setValue(ilObject::_lookupTitle($style_id));
$this->form->addItem($st);
//$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "edit"));
// delete command
$this->form->addCommandButton("editStyle",
$lng->txt("cont_edit_style"));
$this->form->addCommandButton("deleteStyle",
$lng->txt("cont_delete_style"));
//$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "delete"));
}
}
if ($style_id <= 0 || ilObjStyleSheet::_lookupStandard($style_id))
{
$style_sel = ilUtil::formSelect ($style_id, "style_id",
$st_styles, false, true);
$style_sel = new ilSelectInputGUI($lng->txt("cont_current_style"), "style_id");
$style_sel->setOptions($st_styles);
$style_sel->setValue($style_id);
$this->form->addItem($style_sel);
//$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "create"));
$this->form->addCommandButton("saveStyleSettings",
$lng->txt("save"));
$this->form->addCommandButton("createStyle",
$lng->txt("sty_create_ind_style"));
}
}
$this->form->setTitle($lng->txt("cont_style"));
$this->form->setFormAction($ilCtrl->getFormAction($this));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjContentObjectGUI::insertChapter ( )

Insert (multiple) chapters at node.

Definition at line 3316 of file class.ilObjContentObjectGUI.php.

References $ilCtrl, ilObjectGUI\$lng, ilHierarchyFormGUI\getPostFirstChild(), ilHierarchyFormGUI\getPostMulti(), ilHierarchyFormGUI\getPostNodeId(), IL_FIRST_NODE, and ilLMObject\putInTree().

{
global $ilCtrl, $lng;
include_once("./Modules/LearningModule/classes/class.ilChapterHierarchyFormGUI.php");
if (!ilChapterHierarchyFormGUI::getPostFirstChild()) // insert after node id
{
$parent_id = $this->lm_tree->getParentId($node_id);
$target = $node_id;
}
else // insert as first child
{
$parent_id = $node_id;
$target = IL_FIRST_NODE;
}
for ($i = 1; $i <= $num; $i++)
{
$chap = new ilStructureObject($this->object);
$chap->setType("st");
$chap->setTitle($lng->txt("cont_new_chap"));
$chap->setLMId($this->object->getId());
$chap->create();
ilLMObject::putInTree($chap, $parent_id, $target);
}
$ilCtrl->redirect($this, "chapters");
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::insertChapterClip ( )

Insert Chapter from clipboard.

Definition at line 3352 of file class.ilObjContentObjectGUI.php.

References $ilCtrl, $ilLog, $ilUser, ilEditClipboard\clear(), ilEditClipboard\getAction(), ilHierarchyFormGUI\getPostFirstChild(), ilHierarchyFormGUI\getPostNodeId(), IL_FIRST_NODE, ilLMObject\pasteTree(), and ilLMObject\updateInternalLinks().

Referenced by pasteChapter().

{
include_once("./Modules/LearningModule/classes/class.ilChapterHierarchyFormGUI.php");
$ilLog->write("InsertChapterClip, num: $num, node_id: $node_id, ".
if (!$first_child) // insert after node id
{
$parent_id = $this->lm_tree->getParentId($node_id);
$target = $node_id;
}
else // insert as first child
{
$parent_id = $node_id;
$target = IL_FIRST_NODE;
}
// copy and paste
$chapters = $ilUser->getClipboardObjects("st", true);
$copied_nodes = array();
foreach ($chapters as $chap)
{
$ilLog->write("Call pasteTree, Target LM: ".$this->object->getId().", Chapter ID: ".$chap["id"]
.", Parent ID: ".$parent_id.", Target: ".$target);
$cid = ilLMObject::pasteTree($this->object, $chap["id"], $parent_id,
$target, $chap["insert_time"], $copied_nodes,
$target = $cid;
}
{
$ilUser->clipboardDeleteObjectsOfType("pg");
$ilUser->clipboardDeleteObjectsOfType("st");
}
$this->object->checkTree();
$ilCtrl->redirect($this, "chapters");
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjContentObjectGUI::linkChecker ( )

Definition at line 2890 of file class.ilObjContentObjectGUI.php.

References ilObjectGUI\$ilias, $ilUser, ilObjectGUI\$tpl, __initLinkChecker(), ilLinkCheckNotify\_getNotifyStatus(), ilCronManager\isJobActive(), setContentSubTabs(), ilObjectGUI\setTabs(), and ilCheckboxInputGUI\setValue().

Referenced by refreshLinkCheck(), and saveLinkCheck().

{
global $ilias, $ilUser, $tpl;
$this->setTabs();
$this->setContentSubTabs("link_check");
require_once './Services/LinkChecker/classes/class.ilLinkCheckerTableGUI.php';
$toolbar = new ilToolbarGUI();
// #13684
include_once "Services/Cron/classes/class.ilCronManager.php";
if(ilCronManager::isJobActive("lm_link_check"))
{
include_once './Services/LinkChecker/classes/class.ilLinkCheckNotify.php';
include_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
$chb = new ilCheckboxInputGUI($this->lng->txt('link_check_message_a'), 'link_check_message');
$chb->setValue(1);
$chb->setChecked((bool)ilLinkCheckNotify::_getNotifyStatus($ilUser->getId(),$this->object->getId()));
$chb->setOptionTitle($this->lng->txt('link_check_message_b'));
$toolbar->addInputItem($chb);
$toolbar->addFormButton($this->lng->txt('save'), 'saveLinkCheck');
$toolbar->setFormAction($this->ctrl->getLinkTarget($this, 'saveLinkCheck'));
}
$tgui = new ilLinkCheckerTableGUI($this, 'linkChecker');
$tgui->setLinkChecker($this->link_checker_obj)
->setRowHandler($this)
->setRefreshButton($this->lng->txt('refresh'), 'refreshLinkCheck');
return $tpl->setContent($tgui->prepareHTML()->getHTML().$toolbar->getHTML());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjContentObjectGUI::listLinks ( )

List all broken links.

Definition at line 1540 of file class.ilObjContentObjectGUI.php.

References ilObjectGUI\$tpl, setContentSubTabs(), and ilObjectGUI\setTabs().

{
global $tpl;
$this->setTabs();
$this->setContentSubTabs("internal_links");
include_once("./Modules/LearningModule/classes/class.ilLinksTableGUI.php");
$table_gui = new ilLinksTableGUI($this, "listLinks",
$this->object->getId(), $this->object->getType());
$tpl->setContent($table_gui->getHTML());
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::listQuestions ( )

List questions.

Parameters
@return

Definition at line 2513 of file class.ilObjContentObjectGUI.php.

References ilObjectGUI\$tpl, setContentSubTabs(), and ilObjectGUI\setTabs().

{
global $tpl;
$this->setTabs();
$this->setContentSubTabs("export_ids");
include_once("./Modules/LearningModule/classes/class.ilLMQuestionListTableGUI.php");
$table = new ilLMQuestionListTableGUI($this, "listQuestions", $this->object);
$tpl->setContent($table->getHTML());
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::moveChapter (   $a_parent_subobj_id = 0)

move a single chapter (selection)

Definition at line 1937 of file class.ilObjContentObjectGUI.php.

References $_POST, IL_FIRST_NODE, ilUtil\sendInfo(), and ilEditClipboard\storeContentObject().

{
if(!isset($_POST["id"]))
{
$this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
}
//echo "Hallo::"; exit;
if(count($_POST["id"]) > 1)
{
$this->ilias->raiseError($this->lng->txt("cont_select_max_one_item"),$this->ilias->error_obj->MESSAGE);
}
if(count($_POST["id"]) == 1 && $_POST["id"][0] == IL_FIRST_NODE)
{
$this->ilias->raiseError($this->lng->txt("cont_select_item"), $this->ilias->error_obj->MESSAGE);
}
// SAVE POST VALUES
ilUtil::sendInfo($this->lng->txt("cont_chap_select_target_now"), true);
if ($a_parent_subobj_id == 0)
{
$this->ctrl->redirect($this, "chapters");
}
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::movePage ( )

move page

Definition at line 1985 of file class.ilObjContentObjectGUI.php.

References $_POST, $ilUser, ilLMObject\clipboardCut(), ilUtil\sendInfo(), ilEditClipboard\setAction(), and ilUtil\stripSlashesArray().

{
global $ilUser;
if(!isset($_POST["id"]))
{
$this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
}
ilUtil::sendInfo($this->lng->txt("cont_selected_items_have_been_cut"), true);
ilLMObject::clipboardCut($this->object->getId(), $items);
$this->ctrl->redirect($this, "pages");
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::owner ( )

show owner of content object

Definition at line 1910 of file class.ilObjContentObjectGUI.php.

References ilObjectGUI\setTabs().

{
$this->setTabs();
$this->ownerObject();
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::pages ( )

Definition at line 1368 of file class.ilObjContentObjectGUI.php.

References $ilCtrl, ilObjectGUI\$lng, $t, ilObjectGUI\$tpl, ilObjectGUI\$tree, ilPageObject\_isScheduledActivation(), ilPageObject\_lookupActive(), ilPageObject\_lookupContainsDeactivatedElements(), ilUtil\formSelect(), ilEditClipboard\getAction(), ilEditClipboard\getContentObjectType(), getContextPath(), ilUtil\getImagePath(), ilLMPageObject\getPageList(), IL_FIRST_NODE, setContentSubTabs(), ilObjectGUI\setTabs(), showActions(), and ilUtil\switchColor().

{
global $tree, $tpl, $ilToolbar, $ilCtrl, $lng;
$this->setTabs();
$this->setContentSubTabs("pages");
if (!false)
{
$ilCtrl->setParameter($this, "backcmd", "pages");
$ilCtrl->setParameterByClass("illmpageobjectgui", "new_type", "pg");
$ilToolbar->addButton($lng->txt("pg_add"),
$ilCtrl->getLinkTargetByClass("illmpageobjectgui", "create"));
$ilCtrl->setParameterByClass("illmpageobjectgui", "new_type", "");
include_once("./Modules/LearningModule/classes/class.ilLMPagesTableGUI.php");
$t = new ilLMPagesTableGUI($this, "pages", $this->object);
$tpl->setContent($t->getHTML());
return;
}
$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.all_pages.html", "Modules/LearningModule");
$num = 0;
$this->tpl->setCurrentBlock("form");
$this->ctrl->setParameter($this, "backcmd", "pages");
$this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
$this->tpl->setVariable("HEADER_TEXT", $this->lng->txt("cont_pages"));
$this->tpl->setVariable("CONTEXT", $this->lng->txt("cont_usage"));
$this->tpl->setVariable("CHECKBOX_TOP", IL_FIRST_NODE);
$cnt = 0;
$pages = ilLMPageObject::getPageList($this->object->getId());
foreach ($pages as $page)
{
$this->tpl->setCurrentBlock("table_row");
// check activation
include_once("./Modules/LearningModule/classes/class.ilLMPage.php");
$lm_set = new ilSetting("lm");
$active = ilLMPage::_lookupActive($page["obj_id"], $this->object->getType(),
$lm_set->get("time_scheduled_page_activation"));
// is page scheduled?
$img_sc = ($lm_set->get("time_scheduled_page_activation") &&
ilLMPage::_isScheduledActivation($page["obj_id"], $this->object->getType()))
? "_sc"
: "";
if (!$active)
{
$this->tpl->setVariable("IMG_OBJ", ilUtil::getImagePath("icon_pg_d".$img_sc.".png"));
$this->tpl->setVariable("IMG_ALT",
$this->lng->txt("cont_page_deactivated"));
}
else
{
$this->object->getType()))
{
$this->tpl->setVariable("IMG_OBJ", ilUtil::getImagePath("icon_pg_del".$img_sc.".png"));
$this->tpl->setVariable("IMG_ALT",
$this->lng->txt("cont_page_deactivated_elements"));
}
else
{
$this->tpl->setVariable("IMG_OBJ", ilUtil::getImagePath("icon_pg".$img_sc.".png"));
$this->tpl->setVariable("IMG_ALT",
$this->lng->txt("pg"));
}
}
// color changing
$css_row = ilUtil::switchColor($cnt++,"tblrow1","tblrow2");
// checkbox
$this->tpl->setVariable("CHECKBOX_ID", $page["obj_id"]);
$this->tpl->setVariable("CSS_ROW", $css_row);
// link
$this->ctrl->setParameter($this, "backcmd", "");
$this->ctrl->setParameterByClass("ilLMPageObjectGUI", "obj_id", $page["obj_id"]);
//echo "<br>:".$this->ctrl->getLinkTargetByClass("ilLMPageObjectGUI", "view").":";
$this->tpl->setVariable("LINK_TARGET",
$this->ctrl->getLinkTargetByClass("ilLMPageObjectGUI", "edit"));
// title
$this->tpl->setVariable("TEXT_CONTENT", $page["title"]);
// context
if ($this->lm_tree->isInTree($page["obj_id"]))
{
$path_str = $this->getContextPath($page["obj_id"]);
}
else
{
$path_str = "---";
}
// check whether page is header or footer
$add_str = "";
if ($page["obj_id"] == $this->object->getHeaderPage())
{
$add_str = " <b>(".$this->lng->txt("cont_header").")</b>";
}
if ($page["obj_id"] == $this->object->getFooterPage())
{
$add_str = " <b>(".$this->lng->txt("cont_footer").")</b>";
}
$this->tpl->setVariable("TEXT_CONTEXT", $path_str.$add_str);
$this->tpl->parseCurrentBlock();
}
if($cnt == 0)
{
$this->tpl->setCurrentBlock("notfound");
$this->tpl->setVariable("NUM_COLS", 4);
$this->tpl->setVariable("TXT_OBJECT_NOT_FOUND", $this->lng->txt("obj_not_found"));
$this->tpl->parseCurrentBlock();
}
else
{
$acts = array("delete" => "delete", "movePage" => "movePage", "copyPage" => "copyPage",
"selectHeader" => "selectHeader", "selectFooter" => "selectFooter",
"activatePages" => "cont_de_activate");
{
$acts["pastePage"] = "pastePage";
}
/*
if (ilEditClipboard::getContentObjectType() == "st")
{
$acts["pasteChapter"] = "pasteChapter";
}*/
$this->tpl->setVariable("NUM_COLS", 4);
$this->showActions($acts);
// SHOW VALID ACTIONS
/*
$this->tpl->setCurrentBlock("operation_btn");
$this->tpl->setVariable("BTN_NAME", "delete");
$this->tpl->setVariable("BTN_VALUE", $this->lng->txt("delete"));
$this->tpl->parseCurrentBlock();*/
}
// SHOW POSSIBLE SUB OBJECTS
$this->tpl->setVariable("NUM_COLS", 4);
//$this->showPossibleSubObjects("st");
$subobj = array("pg");
$opts = ilUtil::formSelect(12,"new_type",$subobj);
$this->tpl->setCurrentBlock("add_object");
$this->tpl->setVariable("SELECT_OBJTYPE", $opts);
$this->tpl->setVariable("BTN_NAME", "create");
$this->tpl->setVariable("TXT_ADD", $this->lng->txt("create"));
$this->tpl->parseCurrentBlock();
$this->tpl->setCurrentBlock("form");
$this->tpl->parseCurrentBlock();
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::pasteChapter (   $a_parent_subobj_id = 0)

paste chapter

Definition at line 1977 of file class.ilObjContentObjectGUI.php.

References insertChapterClip().

{
return $this->insertChapterClip(false);
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::pastePage ( )

paste page

Definition at line 1589 of file class.ilObjContentObjectGUI.php.

References ilLMObject\_lookupContObjID(), ilEditClipboard\clear(), ilEditClipboard\getAction(), ilEditClipboard\getContentObjectId(), ilEditClipboard\getContentObjectType(), and ilLMObject\updateInternalLinks().

{
{
$this->ilias->raiseError($this->lng->txt("no_page_in_clipboard"),$this->ilias->error_obj->MESSAGE);
}
// paste selected object
// copy page, if action is copy
if (ilEditClipboard::getAction() == "copy")
{
// check wether page belongs to lm
== $this->object->getID())
{
$lm_page = new ilLMPageObject($this->object, $id);
$new_page =& $lm_page->copy();
$id = $new_page->getId();
}
else
{
// get page from other content object into current content object
$lm_obj =& $this->ilias->obj_factory->getInstanceByObjId($lm_id);
$lm_page = new ilLMPageObject($lm_obj, $id);
$copied_nodes = array();
$new_page =& $lm_page->copyToOtherContObject($this->object, $copied_nodes);
$id = $new_page->getId();
}
}
// cut is not be possible in "all pages" form yet
{
// check wether page belongs not to lm
!= $this->object->getID())
{
$lm_obj =& $this->ilias->obj_factory->getInstanceByObjId($lm_id);
$lm_page = new ilLMPageObject($lm_obj, $id);
$lm_page->setLMId($this->object->getID());
$lm_page->update();
$page =& $lm_page->getPageObject();
$page->buildDom();
$page->setParentId($this->object->getID());
$page->update();
}
}
$this->ctrl->redirect($this, "pages");
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::perm ( )

edit permissions

Definition at line 1868 of file class.ilObjContentObjectGUI.php.

References ilObjectGUI\setFormAction(), and ilObjectGUI\setTabs().

{
$this->setTabs();
$this->setFormAction("addRole", $this->ctrl->getLinkTarget($this, "addRole"));
$this->setFormAction("permSave", $this->ctrl->getLinkTarget($this, "permSave"));
$this->permObject();
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::permSave ( )

save permissions

Definition at line 1881 of file class.ilObjContentObjectGUI.php.

References ilObjectGUI\setReturnLocation().

{
$this->setReturnLocation("permSave", $this->ctrl->getLinkTarget($this, "perm"));
$this->permSaveObject();
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::popup ( )

popup window for wysiwyg editor

Definition at line 939 of file class.ilObjContentObjectGUI.php.

References $_GET, and exit.

{
include_once "./Services/COPage/classes/class.ilWysiwygUtil.php";
$popup = new ilWysiwygUtil();
$popup->show($_GET["ptype"]);
}
ilObjContentObjectGUI::proceedDragDrop ( )

proceed drag and drop operations on pages/chapters

Definition at line 950 of file class.ilObjContentObjectGUI.php.

References $_POST, and $ilCtrl.

Referenced by explorer().

{
global $ilCtrl;
$this->object->executeDragDrop($_POST["il_hform_source_id"], $_POST["il_hform_target_id"],
$_POST["il_hform_fc"], $_POST["il_hform_as_subitem"]);
$ilCtrl->redirect($this, "chapters");
}

+ Here is the caller graph for this function:

ilObjContentObjectGUI::properties ( )

edit properties form

Reimplemented in ilObjDlBookGUI.

Definition at line 341 of file class.ilObjContentObjectGUI.php.

References ilObjectGUI\$lng, getPropertiesFormValues(), initPropertiesForm(), setSubTabs(), and ilObjectGUI\setTabs().

Referenced by ilObjLearningModuleGUI\view().

{
global $lng;
$lng->loadLanguageModule("style");
$this->setTabs("settings");
$this->setSubTabs("cont_general_properties");
// lm properties
if($this->object->getType() == "lm")
{
// Edit ecs export settings
include_once 'Modules/LearningModule/classes/class.ilECSLearningModuleSettings.php';
$ecs = new ilECSLearningModuleSettings($this->object);
$ecs->addSettingsToForm($this->form, 'lm');
}
$this->tpl->setContent($this->form->getHTML());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjContentObjectGUI::publishExportFile (   $a_files)

download export file

Definition at line 2061 of file class.ilObjContentObjectGUI.php.

References $file, $ilCtrl, and ilUtil\sendFailure().

{
global $ilCtrl;
if(!isset($a_files))
{
ilUtil::sendFailure($this->lng->txt("no_checkbox"), true);
}
else
{
foreach ($a_files as $f)
{
$file = explode(":", $f);
$export_dir = $this->object->getExportDirectory($file[0]);
if ($this->object->getPublicExportFile($file[0]) ==
$file[1])
{
$this->object->setPublicExportFile($file[0], "");
}
else
{
$this->object->setPublicExportFile($file[0], $file[1]);
}
}
$this->object->update();
}
$ilCtrl->redirectByClass("ilexportgui");
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::redrawHeaderAction ( )

Definition at line 4086 of file class.ilObjContentObjectGUI.php.

References ilObjectGUI\redrawHeaderActionObject().

{
// #12281
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::refreshLinkCheck ( )

Definition at line 2955 of file class.ilObjContentObjectGUI.php.

References __initLinkChecker(), linkChecker(), ilUtil\sendFailure(), and ilUtil\sendSuccess().

{
if(!$this->link_checker_obj->checkPear())
{
ilUtil::sendFailure($this->lng->txt('missing_pear_library'));
$this->linkChecker();
return false;
}
$this->link_checker_obj->checkLinks();
ilUtil::sendSuccess($this->lng->txt('link_checker_refreshed'));
$this->linkChecker();
return true;
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::removeLMGlossary ( )

Remove lm glossary.

Parameters
@return

Definition at line 4047 of file class.ilObjContentObjectGUI.php.

References $_GET, $ilCtrl, ilObjectGUI\$lng, and ilUtil\sendSuccess().

{
global $ilCtrl, $lng;
$this->object->removeAutoGlossary((int) $_GET["glo_id"]);
$this->object->update();
ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
$ilCtrl->redirect($this, "editGlossaries");
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::saveAllTitles ( )

Save all titles of chapters/pages.

Definition at line 3304 of file class.ilObjContentObjectGUI.php.

References $_GET, $_POST, $ilCtrl, ilLMObject\saveTitles(), and ilUtil\stripSlashesArray().

{
global $ilCtrl;
ilLMObject::saveTitles($this->object, ilUtil::stripSlashesArray($_POST["title"]), $_GET["transl"]);
$ilCtrl->redirect($this, "chapters");
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::saveBibItem ( )

save bib item (module call)

Definition at line 1165 of file class.ilObjContentObjectGUI.php.

References ilCtrl\IL_RTOKEN_NAME, saveBibItemObject(), and ilObjectGUI\setTabs().

{
$this->setTabs();
// questionable workaround to make this old stuff work
$this->ctrl->setParameter($this, ilCtrl::IL_RTOKEN_NAME, $this->ctrl->getRequestToken());
$this->saveBibItemObject($this->ctrl->getLinkTarget($this));
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::saveBibItemObject (   $a_target = "")

save bib item (admin call)

Definition at line 1141 of file class.ilObjContentObjectGUI.php.

References $_GET, and $_POST.

Referenced by saveBibItem().

{
include_once "./Modules/LearningModule/classes/class.ilBibItemGUI.php";
$bib_gui =& new ilBibItemGUI();
$bib_gui->setObject($this->object);
$bibItemIndex = $_POST["bibItemIndex"] ? $_POST["bibItemIndex"] : $_GET["bibItemIndex"];
$bibItemIndex *= 1;
if ($bibItemIndex < 0)
{
$bibItemIndex = 0;
}
$bibItemIndex = $bib_gui->save($bibItemIndex);
if ($a_target == "")
{
$a_target = "adm_object.php?ref_id=" . $this->object->getRefId();
}
$bib_gui->edit("ADM_CONTENT", "adm_content", $a_target, $bibItemIndex);
}

+ Here is the caller graph for this function:

ilObjContentObjectGUI::saveExportIds ( )

Save export IDs.

Definition at line 3572 of file class.ilObjContentObjectGUI.php.

References $_POST, $ilCtrl, ilObjectGUI\$lng, $ok, ilLMObject\_lookupType(), ilLMObject\saveExportId(), ilUtil\sendFailure(), ilUtil\sendSuccess(), showExportIDsOverview(), and ilUtil\stripSlashes().

{
global $ilCtrl, $lng;
// check all export ids
$ok = true;
if (is_array($_POST["exportid"]))
{
foreach ($_POST["exportid"] as $pg_id => $exp_id)
{
if ($exp_id != "" && !preg_match("/^([a-zA-Z]+)[0-9a-zA-Z_]*$/",
trim($exp_id)))
{
$ok = false;
}
}
}
if (!$ok)
{
ilUtil::sendFailure($lng->txt("cont_exp_ids_not_resp_format1").": a-z, A-Z, 0-9, '_'. ".
$lng->txt("cont_exp_ids_not_resp_format3")." ".
$lng->txt("cont_exp_ids_not_resp_format2"));
$this->showExportIDsOverview(true);
return;
}
if (is_array($_POST["exportid"]))
{
foreach ($_POST["exportid"] as $pg_id => $exp_id)
{
ilLMPageObject::saveExportId($this->object->getId(), $pg_id,
}
}
ilUtil::sendSuccess($lng->txt("cont_saved_export_ids"), true);
$ilCtrl->redirect($this, "showExportIdsOverview");
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::saveHelpMapping ( )

Save help mapping.

Parameters
@return

Definition at line 3618 of file class.ilObjContentObjectGUI.php.

References $_POST, $ilCtrl, ilObjectGUI\$lng, ilHelpMapping\saveScreenIdsForChapter(), and ilUtil\sendSuccess().

{
global $lng, $ilCtrl;
include_once("./Services/Help/classes/class.ilHelpMapping.php");
if (is_array($_POST["screen_ids"]))
{
foreach ($_POST["screen_ids"] as $chap => $ids)
{
$ids = explode("\n", $ids);
}
}
ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
$ilCtrl->redirect($this, "showExportIdsOverview");
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::saveLinkCheck ( )

Definition at line 2928 of file class.ilObjContentObjectGUI.php.

References $_POST, $ilUser, linkChecker(), and ilUtil\sendSuccess().

{
global $ilDB,$ilUser;
include_once './Services/LinkChecker/classes/class.ilLinkCheckNotify.php';
$link_check_notify =& new ilLinkCheckNotify($ilDB);
$link_check_notify->setUserId($ilUser->getId());
$link_check_notify->setObjId($this->object->getId());
if($_POST['link_check_message'])
{
ilUtil::sendSuccess($this->lng->txt('link_check_message_enabled'));
$link_check_notify->addNotifier();
}
else
{
ilUtil::sendSuccess($this->lng->txt('link_check_message_disabled'));
$link_check_notify->deleteNotifier();
}
$this->linkChecker();
return true;
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::saveMenuEntry ( )

save new menu entry

Definition at line 3088 of file class.ilObjContentObjectGUI.php.

References $_POST, $ilCtrl, __initLMMenuEditor(), ilUtil\sendFailure(), and ilUtil\sendSuccess().

{
global $ilCtrl;
// check title and target
if (empty($_POST["title"]))
{
//$this->ilias->raiseError($this->lng->txt("please_enter_title"),$this->ilias->error_obj->MESSAGE);
ilUtil::sendFailure($this->lng->txt("please_enter_title") , true);
$ilCtrl->redirect($this, "addMenuEntry");
}
if (empty($_POST["target"]))
{
//$this->ilias->raiseError($this->lng->txt("please_enter_target"),$this->ilias->error_obj->MESSAGE);
ilUtil::sendFailure($this->lng->txt("please_enter_target"), true);
$ilCtrl->redirect($this, "addMenuEntry");
}
$this->lmme_obj->setTitle($_POST["title"]);
$this->lmme_obj->setTarget($_POST["target"]);
$this->lmme_obj->setLinkRefId($_POST["link_ref_id"]);
if ($_POST["link_ref_id"])
{
$this->lmme_obj->setLinkType("intern");
}
$this->lmme_obj->create();
ilUtil::sendSuccess($this->lng->txt("msg_entry_added"), true);
$this->ctrl->redirect($this, "editMenuProperties");
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::saveMenuProperties ( )

save properties

Definition at line 812 of file class.ilObjContentObjectGUI.php.

References $_POST, ilObjectGUI\$ilias, __initLMMenuEditor(), and ilUtil\sendSuccess().

{
global $ilias;
$this->object->setActiveLMMenu((int) $_POST["cobj_act_lm_menu"]);
$this->object->setActiveTOC((int) $_POST["cobj_act_toc"]);
$this->object->setActivePrintView((int) $_POST["cobj_act_print"]);
$this->object->setActivePreventGlossaryAppendix((int) $_POST["cobj_act_print_prev_glo"]);
$this->object->setHideHeaderFooterPrint((int) $_POST["hide_head_foot_print"]);
$this->object->setActiveDownloads((int) $_POST["cobj_act_downloads"]);
$this->object->setActiveDownloadsPublic((int) $_POST["cobj_act_downloads_public"]);
$this->object->updateProperties();
//var_dump($_POST["menu_entries"]); exit;
$this->lmme_obj->updateActiveStatus($_POST["menu_entries"]);
ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
$this->ctrl->redirect($this, "editMenuProperties");
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::savePageLayout ( )

Save page layout.

Definition at line 3904 of file class.ilObjContentObjectGUI.php.

References $_GET, $_POST, $ilCtrl, ilObjectGUI\$lng, ilUtil\sendSuccess(), ilUtil\stripSlashes(), and ilLMObject\writeLayout().

{
global $lng, $ilCtrl;
$ilCtrl->setParameter($this, "hierarchy", $_GET["hierarchy"]);
foreach ($_POST["id"] as $id)
{
$this->object);
}
ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
if ($_GET["hierarchy"] == 1)
{
$ilCtrl->redirect($this, "chapters");
}
else
{
$ilCtrl->redirect($this, "pages");
}
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::saveProperties ( )

save properties

Definition at line 511 of file class.ilObjContentObjectGUI.php.

References $_POST, ilObjectGUI\$lng, $valid, ilObjectTranslation\getInstance(), initPropertiesForm(), ilUtil\sendSuccess(), setSubTabs(), and ilObjectGUI\setTabs().

{
global $lng;
$valid = false;
if ($this->form->checkInput())
{
include_once("./Services/Object/classes/class.ilObjectTranslation.php");
$ot = ilObjectTranslation::getInstance($this->object->getId());
if ($ot->getContentActivated())
{
$ot->setDefaultTitle($_POST['title']);
$ot->setDefaultDescription($_POST['description']);
$ot->save();
}
$this->object->setTitle($_POST['title']);
$this->object->setDescription($_POST['description']);
$this->object->setLayout($_POST["lm_layout"]);
$this->object->setPageHeader($_POST["lm_pg_header"]);
$this->object->setTOCMode($_POST["toc_mode"]);
$this->object->setOnline($_POST["cobj_online"]);
$this->object->setActiveNumbering($_POST["cobj_act_number"]);
$this->object->setCleanFrames($_POST["cobj_clean_frames"]);
if (!$this->ilias->getSetting('disable_comments'))
{
$this->object->setPublicNotes($_POST["cobj_pub_notes"]);
}
$this->object->setHistoryUserComments($_POST["cobj_user_comments"]);
$this->object->setLayoutPerPage($_POST["layout_per_page"]);
$this->object->setRating($_POST["rating"]);
$this->object->setRatingPages($_POST["rating_pages"]);
$this->object->setDisableDefaultFeedback((int) $_POST["disable_def_feedback"]);
$this->object->updateProperties();
$this->object->update();
if($this->object->getType() == 'lm')
{
// Update ecs export settings
include_once 'Modules/LearningModule/classes/class.ilECSLearningModuleSettings.php';
$ecs = new ilECSLearningModuleSettings($this->object);
if($ecs->handleSettingsUpdate())
{
$valid = true;
}
}
else
{
$valid = true;
}
}
if($valid)
{
ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
$this->ctrl->redirect($this, "properties");
}
else
{
$lng->loadLanguageModule("style");
$this->setTabs("settings");
$this->setSubTabs("cont_general_properties");
$this->form->setValuesByPost();
$this->tpl->setContent($this->form->getHTML());
}
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::savePublicSection ( )

Definition at line 2830 of file class.ilObjContentObjectGUI.php.

References $_POST, ilLMObject\_writePublicAccessStatus(), and ilUtil\sendSuccess().

{
//var_dump($_POST["lm_public_mode"]);exit;
$this->object->setPublicAccessMode($_POST["lm_public_mode"]);
$this->object->updateProperties();
ilLMObject::_writePublicAccessStatus($_POST["pages"],$this->object->getId());
ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
$this->ctrl->redirect($this, "editPublicSection");
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::saveStyleSettings ( )

Save style settings.

Definition at line 696 of file class.ilObjContentObjectGUI.php.

References $_POST, $ilSetting, ilObjStyleSheet\_lookupStandard(), ilUtil\sendSuccess(), and ilUtil\stripSlashes().

{
global $ilSetting;
if ($ilSetting->get("fixed_content_style_id") <= 0 &&
(ilObjStyleSheet::_lookupStandard($this->object->getStyleSheetId())
|| $this->object->getStyleSheetId() == 0))
{
$this->object->setStyleSheetId(ilUtil::stripSlashes($_POST["style_id"]));
$this->object->update();
ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
}
$this->ctrl->redirect($this, "editStyleProperties");
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::saveTooltips ( )

Save tooltips.

Parameters
@return

Definition at line 3731 of file class.ilObjContentObjectGUI.php.

References $_POST, $ilCtrl, ilObjectGUI\$lng, ilUtil\sendSuccess(), ilUtil\stripSlashes(), and ilHelp\updateTooltip().

{
global $ilCtrl, $lng;
include_once("./Services/Help/classes/class.ilHelp.php");
if (is_array($_POST["text"]))
{
foreach ($_POST["text"] as $id => $text)
{
ilUtil::stripSlashes($_POST["tt_id"][(int) $id]));
}
ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
}
$ilCtrl->redirect($this, "showTooltipList");
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::selectFooter ( )

select page as footer

Definition at line 3279 of file class.ilObjContentObjectGUI.php.

References $_POST.

{
if(!isset($_POST["id"]))
{
$this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
}
if(count($_POST["id"]) > 1)
{
$this->ilias->raiseError($this->lng->txt("cont_select_max_one_item"),$this->ilias->error_obj->MESSAGE);
}
if ($_POST["id"][0] != $this->object->getFooterPage())
{
$this->object->setFooterPage($_POST["id"][0]);
}
else
{
$this->object->setFooterPage(0);
}
$this->object->updateProperties();
$this->ctrl->redirect($this, "pages");
}
ilObjContentObjectGUI::selectHeader ( )

select page as header

Definition at line 3254 of file class.ilObjContentObjectGUI.php.

References $_POST.

{
if(!isset($_POST["id"]))
{
$this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
}
if(count($_POST["id"]) > 1)
{
$this->ilias->raiseError($this->lng->txt("cont_select_max_one_item"),$this->ilias->error_obj->MESSAGE);
}
if ($_POST["id"][0] != $this->object->getHeaderPage())
{
$this->object->setHeaderPage($_POST["id"][0]);
}
else
{
$this->object->setHeaderPage(0);
}
$this->object->updateProperties();
$this->ctrl->redirect($this, "pages");
}
ilObjContentObjectGUI::selectLMGlossary ( )

Select lm glossary.

Parameters
@return

Definition at line 4023 of file class.ilObjContentObjectGUI.php.

References $_GET, $ilCtrl, ilObjectGUI\$lng, ilObject\_lookupObjId(), and ilUtil\sendSuccess().

Referenced by selectLMGlossaryLink().

{
global $ilCtrl, $lng;
$glos = $this->object->getAutoGlossaries();
$glo_ref_id = (int) $_GET["glo_ref_id"];
$glo_id = ilObject::_lookupObjId($glo_ref_id);
if (!in_array($glo_id, $glos))
{
$glos[] = $glo_id;
}
$this->object->setAutoGlossaries($glos);
$this->object->update();
ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
$ilCtrl->redirect($this, "editGlossaries");
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjContentObjectGUI::selectLMGlossaryLink ( )

Select a glossary and link all its terms.

Parameters
@return

Definition at line 4008 of file class.ilObjContentObjectGUI.php.

References $_GET, ilObject\_lookupObjId(), and selectLMGlossary().

{
$glo_ref_id = (int) $_GET["glo_ref_id"];
$glo_id = ilObject::_lookupObjId($glo_ref_id);
$this->object->autoLinkGlossaryTerms($glo_id);
$this->selectLMGlossary();
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::setContentSubTabs (   $a_active)

Set pages tabs.

Parameters
@return

Definition at line 2552 of file class.ilObjContentObjectGUI.php.

References $ilCtrl, ilObjectGUI\$lng, and ilObjContentObject\isOnlineHelpModule().

Referenced by chapters(), fixTreeConfirm(), linkChecker(), listLinks(), listQuestions(), pages(), showExportIDsOverview(), showMaintenance(), and showTooltipList().

{
global $ilTabs, $lng, $ilCtrl;
$lm_set = new ilSetting("lm");
// chapters
$ilTabs->addSubtab("chapters",
$lng->txt("cont_chapters"),
$ilCtrl->getLinkTarget($this, "chapters"));
// all pages
$ilTabs->addSubtab("pages",
$lng->txt("cont_all_pages"),
$ilCtrl->getLinkTarget($this, "pages"));
// questions
$ilTabs->addSubtab("questions",
$lng->txt("objs_qst"),
$ilCtrl->getLinkTarget($this, "listQuestions"));
// export ids
if ($lm_set->get("html_export_ids"))
{
if (!ilObjContentObject::isOnlineHelpModule($this->object->getRefId()))
{
$ilTabs->addSubtab("export_ids",
$lng->txt("cont_html_export_ids"),
$ilCtrl->getLinkTarget($this, "showExportIDsOverview"));
}
}
if (ilObjContentObject::isOnlineHelpModule($this->object->getRefId()))
{
$lng->loadLanguageModule("help");
$ilTabs->addSubtab("export_ids",
$lng->txt("cont_online_help_ids"),
$ilCtrl->getLinkTarget($this, "showExportIDsOverview"));
$ilTabs->addSubtab("help_tooltips",
$lng->txt("help_tooltips"),
$ilCtrl->getLinkTarget($this, "showTooltipList"));
}
// list links
$ilTabs->addSubtab("internal_links",
$lng->txt("cont_internal_links"),
$ilCtrl->getLinkTarget($this, "listLinks"));
// web link checker
if ($this->object->getType() == "lm")
{
if(@include_once('HTTP/Request.php'))
{
$ilTabs->addSubtab("link_check",
$lng->txt("link_check"),
$ilCtrl->getLinkTarget($this, "linkChecker"));
}
}
// maintenance
$ilTabs->addSubtab("maintenance",
$lng->txt("cont_maintenance"),
$ilCtrl->getLinkTarget($this, "showMaintenance"));
$ilTabs->activateSubTab($a_active);
$ilTabs->activateTab("content");
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjContentObjectGUI::setilLMMenu (   $a_offline = false,
  $a_export_format = "",
  $a_active = "content",
  $a_use_global_tabs = false,
  $a_as_subtabs = false,
  $a_cur_page = 0 
)

get lm menu html

Definition at line 2148 of file class.ilObjContentObjectGUI.php.

References $_GET, $ilCtrl, $ilUser, __initLMMenuEditor(), ilFrameTargetInfo\_getFrame(), ilPaymentObject\_requiresPurchaseToAccess(), ilUtil\appendUrlParameterString(), ilLearningProgressAccess\checkAccess(), ilObjectLP\getInstance(), ilPluginAdmin\getPluginObject(), IL_COMP_SERVICE, ilLPObjSettings\LP_MODE_COLLECTION_MANUAL, and ilLPObjSettings\LP_MODE_COLLECTION_TLT.

{
global $ilCtrl,$ilUser, $ilAccess, $ilTabs, $rbacsystem, $ilPluginAdmin, $ilHelp;
$ilHelp->setScreenIdComponent("lm");
if ($a_as_subtabs)
{
$addcmd = "addSubTabTarget";
$getcmd = "getSubTabHTML";
}
else
{
$addcmd = "addTarget";
$getcmd = "getHTML";
}
$active[$a_active] = true;
if (!$this->object->isActiveLMMenu())
{
return "";
}
if ($a_use_global_tabs)
{
$tabs_gui = $ilTabs;
}
else
{
$tabs_gui = new ilTabsGUI();
}
// Determine whether the view of a learning resource should
// be shown in the frameset of ilias, or in a separate window.
//$showViewInFrameset = $this->ilias->ini->readVariable("layout","view_target") == "frame";
$showViewInFrameset = true;
if ($showViewInFrameset && !$a_offline)
{
$buttonTarget = ilFrameTargetInfo::_getFrame("MainContent");
}
else
{
$buttonTarget = "_top";
}
if ($a_export_format == "scorm")
{
$buttonTarget = "";
}
include_once("./Services/Payment/classes/class.ilPaymentObject.php");
$requires_purchase_to_access = ilPaymentObject::_requiresPurchaseToAccess((int)$_GET['ref_id']);
// content
if (!$a_offline && $ilAccess->checkAccess("read", "", $_GET["ref_id"]))
{
$ilCtrl->setParameterByClass("illmpresentationgui", "obj_id", $_GET["obj_id"]);
$tabs_gui->$addcmd("content",
$ilCtrl->getLinkTargetByClass("illmpresentationgui", "layout"),
"", "", $buttonTarget, $active["content"]);
if ($active["content"])
{
$ilHelp->setScreenId("content");
$ilHelp->setSubScreenId("content");
}
}
// table of contents
if (!$requires_purchase_to_access && $this->object->isActiveTOC() && $ilAccess->checkAccess("read", "", $_GET["ref_id"]))
{
if (!$a_offline)
{
$ilCtrl->setParameterByClass("illmpresentationgui", "obj_id", $_GET["obj_id"]);
$link = $ilCtrl->getLinkTargetByClass("illmpresentationgui", "showTableOfContents");
}
else
{
$link = "./table_of_contents.html";
}
$tabs_gui->$addcmd("cont_toc", $link,
"", "", $buttonTarget, $active["toc"]);
}
// print view
if (!$requires_purchase_to_access && $this->object->isActivePrintView() && $ilAccess->checkAccess("read", "", $_GET["ref_id"]))
{
if (!$a_offline) // has to be implemented for offline mode
{
$ilCtrl->setParameterByClass("illmpresentationgui", "obj_id", $_GET["obj_id"]);
$link = $ilCtrl->getLinkTargetByClass("illmpresentationgui", "showPrintViewSelection");
$tabs_gui->$addcmd("cont_print_view", $link,
"", "", $buttonTarget, $active["print"]);
}
}
// download
if (!$requires_purchase_to_access && $ilUser->getId() == ANONYMOUS_USER_ID)
{
$is_public = $this->object->isActiveDownloadsPublic();
}
else if(!$requires_purchase_to_access)
{
$is_public = true;
}
if (!$requires_purchase_to_access && $this->object->isActiveDownloads() && !$a_offline && $is_public &&
$ilAccess->checkAccess("read", "", $_GET["ref_id"]))
{
$ilCtrl->setParameterByClass("illmpresentationgui", "obj_id", $_GET["obj_id"]);
$link = $ilCtrl->getLinkTargetByClass("illmpresentationgui", "showDownloadList");
$tabs_gui->$addcmd("download", $link,
"", "", $buttonTarget, $active["download"]);
}
// info button
if ($a_export_format != "scorm" && !$a_offline)
{
if (!$a_offline)
{
$ilCtrl->setParameterByClass("illmpresentationgui", "obj_id", $_GET["obj_id"]);
$link = $this->ctrl->getLinkTargetByClass(
array("illmpresentationgui", "ilinfoscreengui"), "showSummary");
}
else
{
$link = "./info.html";
}
$tabs_gui->$addcmd(($requires_purchase_to_access ? 'buy' : 'info_short'), $link,
"", "", $buttonTarget, $active["info"]);
}
include_once './Services/Tracking/classes/class.ilLearningProgressAccess.php';
if(!$a_offline &&
$ilAccess->checkAccess("read", "", $_GET["ref_id"]) && // #14075
{
include_once './Services/Object/classes/class.ilObjectLP.php';
$olp = ilObjectLP::getInstance($this->object->getId());
if($olp->getCurrentMode() == ilLPObjSettings::LP_MODE_COLLECTION_MANUAL)
{
$tabs_gui->$addcmd("learning_progress",
$this->ctrl->getLinkTargetByClass(array("illmpresentationgui", "illearningprogressgui"), "editmanual"),
"", "", $buttonTarget, $active["learning_progress"]);
}
else if($olp->getCurrentMode() == ilLPObjSettings::LP_MODE_COLLECTION_TLT)
{
$tabs_gui->$addcmd("learning_progress",
$this->ctrl->getLinkTargetByClass(array("illmpresentationgui", "illearningprogressgui"), "showtlt"),
"", "", $buttonTarget, $active["learning_progress"]);
}
}
// edit learning module
if (!$a_offline && $a_cur_page > 0)
{
if ($rbacsystem->checkAccess("write", $_GET["ref_id"]))
{
//$page_id = $this->getCurrentPageId();
$page_id = $a_cur_page;
$tabs_gui->$addcmd("edit_page", ILIAS_HTTP_PATH."/ilias.php?baseClass=ilLMEditorGUI&ref_id=".$_GET["ref_id"].
"&obj_id=".$page_id."&to_page=1",
"", "", $buttonTarget, $active["edit_page"]);
}
}
if(!$requires_purchase_to_access)
{
// get user defined menu entries
$entries = $this->lmme_obj->getMenuEntries(true);
if (count($entries) > 0 && $ilAccess->checkAccess("read", "", $_GET["ref_id"]))
{
foreach ($entries as $entry)
{
// build goto-link for internal resources
if ($entry["type"] == "intern")
{
$entry["link"] = ILIAS_HTTP_PATH."/goto.php?target=".$entry["link"];
}
// add http:// prefix if not exist
if (!strstr($entry["link"],'://') && !strstr($entry["link"],'mailto:'))
{
$entry["link"] = "http://".$entry["link"];
}
if (!strstr($entry["link"],'mailto:'))
{
$entry["link"] = ilUtil::appendUrlParameterString($entry["link"], "ref_id=".$this->ref_id."&structure_id=".$this->obj_id);
}
$tabs_gui->$addcmd($entry["title"],
$entry["link"],
"", "", "_blank", "", true);
}
}
}
// user interface hook [uihk]
$pl_names = $ilPluginAdmin->getActivePluginsForSlot(IL_COMP_SERVICE, "UIComponent", "uihk");
$plugin_html = false;
foreach ($pl_names as $pl)
{
$ui_plugin = ilPluginAdmin::getPluginObject(IL_COMP_SERVICE, "UIComponent", "uihk", $pl);
$gui_class = $ui_plugin->getUIClassInstance();
$resp = $gui_class->modifyGUI("Modules/LearningModule", "lm_menu_tabs",
array("lm_menu_tabs" => $tabs_gui));
}
return $tabs_gui->$getcmd();
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::setPageLayout (   $a_in_hierarchy = false)

Set layout for multipl pages.

Definition at line 3847 of file class.ilObjContentObjectGUI.php.

References $_POST, $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\$tpl, initSetPageLayoutForm(), and ilUtil\sendFailure().

Referenced by setPageLayoutInHierarchy().

{
global $tpl, $ilCtrl, $lng;
if (!is_array($_POST["id"]))
{
ilUtil::sendFailure($lng->txt("no_checkbox"), true);
if ($a_in_hierarchy)
{
$ilCtrl->redirect($this, "chapters");
}
else
{
$ilCtrl->redirect($this, "pages");
}
}
$tpl->setContent($this->form->getHTML());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjContentObjectGUI::setPageLayoutInHierarchy ( )

Set layout for multipl pages.

Definition at line 3836 of file class.ilObjContentObjectGUI.php.

References $ilCtrl, and setPageLayout().

{
global $ilCtrl;
$ilCtrl->setParameter($this, "hierarchy", "1");
$this->setPageLayout(true);
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::setSubTabs (   $a_active)

Set sub tabs.

Definition at line 2701 of file class.ilObjContentObjectGUI.php.

References $ilSetting.

Referenced by addMenuEntry(), editGlossaries(), editMenuProperties(), editPublicSection(), executeCommand(), initStylePropertiesForm(), properties(), saveProperties(), showEntrySelector(), and showLMGlossarySelector().

{
global $ilTabs, $ilSetting;
if (in_array($a_active,
array("cont_general_properties", "cont_style", "cont_lm_menu", "public_section",
"cont_glossaries", "cont_multilinguality", "obj_multilinguality")))
{
// general properties
$ilTabs->addSubTabTarget("cont_general_properties",
$this->ctrl->getLinkTarget($this, 'properties'),
"", "");
// style properties
$ilTabs->addSubTabTarget("cont_style",
$this->ctrl->getLinkTarget($this, 'editStyleProperties'),
"", "");
// menu properties
$ilTabs->addSubTabTarget("cont_lm_menu",
$this->ctrl->getLinkTarget($this, 'editMenuProperties'),
"", "");
// glossaries
$ilTabs->addSubTabTarget("cont_glossaries",
$this->ctrl->getLinkTarget($this, 'editGlossaries'),
"", "");
if ($ilSetting->get("pub_section"))
{
if ($this->object->getType() != "dbk")
{
// public section
$ilTabs->addSubTabTarget("public_section",
$this->ctrl->getLinkTarget($this, 'editPublicSection'),
"", "");
}
}
// multilinguality
/* $ilTabs->addSubTabTarget("cont_multilinguality",
$this->ctrl->getLinkTargetByClass("ilPageMultiLangGUI", ''),
"", "");*/
$ilTabs->addSubTabTarget("obj_multilinguality",
$this->ctrl->getLinkTargetByClass("ilobjecttranslationgui", ""));
$ilTabs->setSubTabActive($a_active);
}
}

+ Here is the caller graph for this function:

ilObjContentObjectGUI::setTabs (   $a_act = "")

output tabs

Definition at line 2534 of file class.ilObjContentObjectGUI.php.

References ilObjectGUI\$lng, addTabs(), and ilUtil\getImagePath().

{
global $lng, $ilHelp;
$ilHelp->setScreenIdComponent("lm");
$this->addTabs($a_act);
$this->tpl->setTitle($this->object->getTitle());
$this->tpl->setTitleIcon(ilUtil::getImagePath("icon_lm_b.png"),
$lng->txt("obj_lm"));
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::showActions (   $a_actions)

show possible action (form buttons)

public

Definition at line 1827 of file class.ilObjContentObjectGUI.php.

References $d, ilObjectGUI\$lng, $row, and ilUtil\getImagePath().

Referenced by pages().

{
foreach ($a_actions as $name => $lng)
{
$d[$name] = array("name" => $name, "lng" => $lng);
}
$notoperations = array();
$operations = array();
if (is_array($d))
{
foreach ($d as $row)
{
if (!in_array($row["name"], $notoperations))
{
$operations[] = $row;
}
}
}
if (count($operations)>0)
{
foreach ($operations as $val)
{
$this->tpl->setCurrentBlock("operation_btn");
$this->tpl->setVariable("BTN_NAME", $val["name"]);
$this->tpl->setVariable("BTN_VALUE", $this->lng->txt($val["lng"]));
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock("operation");
$this->tpl->setVariable("IMG_ARROW",ilUtil::getImagePath("arrow_downright.png"));
$this->tpl->parseCurrentBlock();
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjContentObjectGUI::showEntrySelector ( )

Definition at line 3189 of file class.ilObjContentObjectGUI.php.

References $_GET, $ilCtrl, ilUtil\formSelect(), ilUtil\sendInfo(), ilExplorer\setExpand(), setSubTabs(), and ilObjectGUI\setTabs().

{
global $ilTabs, $ilCtrl;
$this->setTabs();
$ilTabs->setTabActive("settings");
$this->setSubTabs("cont_lm_menu");
$ilCtrl->saveParameter($this, array("menu_entry"));
$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.lm_menu_object_selector.html","Modules/LearningModule");
ilUtil::sendInfo($this->lng->txt("lm_menu_select_object_to_add"));
require_once ("./Modules/LearningModule/classes/class.ilLMMenuObjectSelector.php");
$exp = new ilLMMenuObjectSelector($this->ctrl->getLinkTarget($this,'test'),$this);
$exp->setExpand($_GET["lm_menu_expand"] ? $_GET["lm_menu_expand"] : $this->tree->readRootId());
$exp->setExpandTarget($this->ctrl->getLinkTarget($this,'showEntrySelector'));
$exp->setTargetGet("ref_id");
$exp->setRefId($this->cur_ref_id);
$sel_types = array('mcst', 'mep', 'cat', 'lm','dbk','glo','frm','exc','tst','svy', 'chat', 'wiki', 'sahs',
"crs", "grp", "book", "tst", "file");
$exp->setSelectableTypes($sel_types);
//$exp->setTargetGet("obj_id");
// build html-output
$exp->setOutput(0);
$output = $exp->getOutput();
// get page ids
foreach ($exp->format_options as $node)
{
if (!$node["container"])
{
$pages[] = $node["child"];
}
}
//$this->tpl->setCurrentBlock("content");
//var_dump($this->object->getPublicAccessMode());
// access mode selector
$this->tpl->setVariable("TXT_SET_PUBLIC_MODE", $this->lng->txt("set_public_mode"));
$this->tpl->setVariable("TXT_CHOOSE_PUBLIC_MODE", $this->lng->txt("choose_public_mode"));
$modes = array("complete" => $this->lng->txt("all_pages"), "selected" => $this->lng->txt("selected_pages_only"));
$select_public_mode = ilUtil::formSelect ($this->object->getPublicAccessMode(),"lm_public_mode",$modes, false, true);
$this->tpl->setVariable("SELECT_PUBLIC_MODE", $select_public_mode);
$this->tpl->setVariable("TXT_EXPLORER_HEADER", $this->lng->txt("choose_public_pages"));
$this->tpl->setVariable("EXP_REFRESH", $this->lng->txt("refresh"));
$this->tpl->setVariable("EXPLORER",$output);
$this->tpl->setVariable("ONCLICK",$js_pages);
$this->tpl->setVariable("TXT_CHECKALL", $this->lng->txt("check_all"));
$this->tpl->setVariable("TXT_UNCHECKALL", $this->lng->txt("uncheck_all"));
$this->tpl->setVariable("TXT_SAVE", $this->lng->txt("save"));
$this->tpl->setVariable("FORMACTION", $this->ctrl->getLinkTarget($this, "savePublicSection"));
//$this->tpl->parseCurrentBlock();
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::showExportIDsOverview (   $a_validation = false)

Show export IDs overview.

Parameters
@return

Definition at line 3517 of file class.ilObjContentObjectGUI.php.

References $ilCtrl, ilObjectGUI\$lng, $options, $si, ilObjectGUI\$tpl, ilSession\get(), ilObjContentObject\isOnlineHelpModule(), setContentSubTabs(), and ilObjectGUI\setTabs().

Referenced by saveExportIds().

{
global $tpl, $ilToolbar, $lng, $ilCtrl;
$this->setTabs();
$this->setContentSubTabs("export_ids");
if (ilObjContentObject::isOnlineHelpModule($this->object->getRefId()))
{
// toolbar
$ilToolbar->setFormAction($ilCtrl->getFormAction($this));
include_once("./Services/Form/classes/class.ilSelectInputGUI.php");
$lm_tree = $this->object->getTree();
$childs = $lm_tree->getChilds($lm_tree->readRootId());
$options = array("" => $lng->txt("all"));
foreach ($childs as $c)
{
$options[$c["child"]] = $c["title"];
}
$si = new ilSelectInputGUI($this->lng->txt("help_component"), "help_chap");
$si->setOptions($options);
$si->setValue(ilSession::get("help_chap"));
$ilToolbar->addInputItem($si, true);
$ilToolbar->addFormButton($lng->txt("help_filter"), "filterHelpChapters");
include_once("./Modules/LearningModule/classes/class.ilHelpMappingTableGUI.php");
$tbl = new ilHelpMappingTableGUI($this, "showExportIDsOverview", $a_validation, false);
}
else
{
include_once("./Modules/LearningModule/classes/class.ilExportIDTableGUI.php");
$tbl = new ilExportIDTableGUI($this, "showExportIDsOverview", $a_validation, false);
}
$tpl->setContent($tbl->getHTML());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjContentObjectGUI::showLMGlossarySelector ( )

Select LM Glossary.

Parameters
@return

Definition at line 3961 of file class.ilObjContentObjectGUI.php.

References $_GET, $ilCtrl, $ilUser, ilObjectGUI\$lng, ilObjectGUI\$tpl, ilObjectGUI\$tree, ilExplorer\setExpand(), setSubTabs(), and ilObjectGUI\setTabs().

{
global $tpl, $lng, $ilCtrl, $tree, $ilUser, $ilTabs;
$this->setTabs();
$ilTabs->setTabActive("settings");
$this->setSubTabs("cont_glossaries");
include_once 'Services/Search/classes/class.ilSearchRootSelector.php';
$exp = new ilSearchRootSelector($ilCtrl->getLinkTarget($this,'showLMGlossarySelector'));
$exp->setExpand($_GET["search_root_expand"] ? $_GET["search_root_expand"] : $tree->readRootId());
$exp->setExpandTarget($ilCtrl->getLinkTarget($this,'showLMGlossarySelector'));
$exp->setTargetClass(get_class($this));
$exp->setCmd('confirmGlossarySelection');
$exp->setClickableTypes(array("glo"));
$exp->addFilter("glo");
// build html-output
$exp->setOutput(0);
$tpl->setContent($exp->getOutput());
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::showMaintenance ( )

Show maintenance.

Definition at line 1557 of file class.ilObjContentObjectGUI.php.

References ilObjectGUI\$tpl, setContentSubTabs(), and ilObjectGUI\setTabs().

{
global $tpl, $ilToolbar;
$this->setTabs();
$this->setContentSubTabs("maintenance");
$ilToolbar->addButton($this->lng->txt("cont_fix_tree"),
$this->ctrl->getLinkTarget($this, "fixTreeConfirm"));
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::showTooltipList ( )

Show export IDs overview.

Parameters
@return

Definition at line 3645 of file class.ilObjContentObjectGUI.php.

References $ilCtrl, ilObjectGUI\$lng, $options, $si, ilObjectGUI\$tpl, ilSession\get(), ilHelp\getTooltipComponents(), setContentSubTabs(), ilTextInputGUI\setMaxLength(), and ilObjectGUI\setTabs().

{
global $tpl, $ilToolbar, $ilCtrl, $lng;
$this->setTabs();
$this->setContentSubTabs("help_tooltips");
$ilToolbar->setFormAction($ilCtrl->getFormAction($this));
include_once("./Services/Form/classes/class.ilTextInputGUI.php");
$ti = new ilTextInputGUI($this->lng->txt("help_tooltip_id"), "tooltip_id");
$ti->setMaxLength(200);
$ti->setSize(20);
$ilToolbar->addInputItem($ti, true);
$ilToolbar->addFormButton($lng->txt("add"), "addTooltip");
$ilToolbar->addSeparator();
include_once("./Services/Form/classes/class.ilSelectInputGUI.php");
if (ilSession::get("help_tt_comp") != "")
{
$options[ilSession::get("help_tt_comp")] = ilSession::get("help_tt_comp");
}
$si = new ilSelectInputGUI($this->lng->txt("help_component"), "help_tt_comp");
$si->setOptions($options);
$si->setValue(ilSession::get("help_tt_comp"));
$ilToolbar->addInputItem($si, true);
$ilToolbar->addFormButton($lng->txt("help_filter"), "filterTooltips");
include_once("./Modules/LearningModule/classes/class.ilHelpTooltipTableGUI.php");
$tbl = new ilHelpTooltipTableGUI($this, "showTooltipList", ilSession::get("help_tt_comp"));
$tpl->setContent($tbl->getHTML());
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::switchToLanguage ( )

Switch to language.

Parameters
@return

Definition at line 4078 of file class.ilObjContentObjectGUI.php.

References $_GET, and $ilCtrl.

{
global $ilCtrl;
$ilCtrl->setParameter($this, "transl", $_GET["totransl"]);
$ilCtrl->redirect($this, "chapters");
}
ilObjContentObjectGUI::updateMenuEntry ( )

update a menu entry

Definition at line 3162 of file class.ilObjContentObjectGUI.php.

References $_POST, $_REQUEST, __initLMMenuEditor(), and ilUtil\sendSuccess().

{
if (empty($_REQUEST["menu_entry"]))
{
$this->ilias->raiseError($this->lng->txt("no_menu_entry_id"),$this->ilias->error_obj->MESSAGE);
}
// check title and target
if (empty($_POST["title"]))
{
$this->ilias->raiseError($this->lng->txt("please_enter_title"),$this->ilias->error_obj->MESSAGE);
}
if (empty($_POST["target"]))
{
$this->ilias->raiseError($this->lng->txt("please_enter_target"),$this->ilias->error_obj->MESSAGE);
}
$this->lmme_obj->readEntry($_REQUEST["menu_entry"]);
$this->lmme_obj->setTitle($_POST["title"]);
$this->lmme_obj->setTarget($_POST["target"]);
$this->lmme_obj->update();
ilUtil::sendSuccess($this->lng->txt("msg_entry_updated"), true);
$this->ctrl->redirect($this, "editMenuProperties");
}

+ Here is the call graph for this function:

ilObjContentObjectGUI::view ( )

view content object

Reimplemented in ilObjLearningModuleGUI.

Definition at line 1920 of file class.ilObjContentObjectGUI.php.

References $_GET, ilObjectGUI\prepareOutput(), and ilObjectGUI\viewObject().

{
if (strtolower($_GET["baseClass"]) == "iladministrationgui")
{
$this->prepareOutput();
}
else
{
$this->viewObject();
}
}

+ Here is the call graph for this function:

Field Documentation

ilObjContentObjectGUI::$ctrl

Definition at line 23 of file class.ilObjContentObjectGUI.php.


The documentation for this class was generated from the following file: