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

Static Public Member Functions

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

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)
 
 afterSave (ilObject $a_new_object)
 
- Protected Member Functions inherited from ilObjectGUI
 assignObject ()
 
 prepareOutput ()
 prepare output More...
 
 setTitleAndDescription ()
 called by prepare output More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction ($a_list_gui)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 showMountWebfolderIcon ()
 
 setTabs ()
 set admin tabs public More...
 
 setAdminTabs ()
 set admin tabs public More...
 
 setLocator ()
 set Locator More...
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator ($a_omit=true)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm ($a_new_type)
 Init object creation form. More...
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types. More...
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 Init object edit form. More...
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 Get values for edit form. More...
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm ($a_new_type)
 Init object import form. More...
 
 importFileObject ($parent_id=null)
 Import. More...
 
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook. More...
 
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command More...
 
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command More...
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command More...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) More...
 
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl. More...
 
 getTitlesByRefId ($a_ref_ids)
 get Titles of objects this method is used for error messages in methods cut/copy/paste More...
 
 getTabs (&$tabs_gui)
 get tabs abstract method. More...
 
 __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 More...
 
 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 More...
 
 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. More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 setColumnSettings ($column_gui)
 May be overwritten in subclasses. More...
 
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission. More...
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting. More...
 

Detailed Description

Member Function Documentation

◆ __initLinkChecker()

ilObjContentObjectGUI::__initLinkChecker ( )

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

Referenced by linkChecker(), and refreshLinkCheck().

2976  {
2977  global $ilDB;
2978 
2979  include_once './Services/LinkChecker/classes/class.ilLinkChecker.php';
2980 
2981  $this->link_checker_obj =& new ilLinkChecker($ilDB,false);
2982  $this->link_checker_obj->setObjId($this->object->getId());
2983 
2984  return true;
2985  }
class for checking external links in page objects Normally used in Cron jobs, but should be extensibl...
+ Here is the caller graph for this function:

◆ __initLMMenuEditor()

ilObjContentObjectGUI::__initLMMenuEditor ( )

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

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

2988  {
2989  include_once './Modules/LearningModule/classes/class.ilLMMenuEditor.php';
2990 
2991  $this->lmme_obj =& new ilLMMenuEditor();
2992  $this->lmme_obj->setObjId($this->object->getId());
2993 
2994  return true;
2995  }
class for editing lm menu
+ Here is the caller graph for this function:

◆ _forwards()

ilObjContentObjectGUI::_forwards ( )

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

334  {
335  return array("ilLMPageObjectGUI", "ilStructureObjectGUI","ilObjStyleSheetGUI");
336  }

◆ _goto()

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().

3406  {
3407  global $ilAccess, $ilErr, $lng;
3408 
3409  if ($ilAccess->checkAccess("read", "", $a_target))
3410  {
3411  $_GET["baseClass"] = "ilLMPresentationGUI";
3412  $_GET["ref_id"] = $a_target;
3413  include("ilias.php");
3414  exit;
3415  } else if ($ilAccess->checkAccess("visible", "", $a_target))
3416  {
3417  $_GET["baseClass"] = "ilLMPresentationGUI";
3418  $_GET["ref_id"] = $a_target;
3419  $_GET["cmd"] = "infoScreen";
3420  include("ilias.php");
3421  exit;
3422  }
3423  else if ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID))
3424  {
3425  ilUtil::sendFailure(sprintf($lng->txt("msg_no_perm_read_item"),
3426  ilObject::_lookupTitle(ilObject::_lookupObjId($a_target))), true);
3428  }
3429 
3430 
3431  $ilErr->raiseError($lng->txt("msg_no_perm_read_lm"), $ilErr->FATAL);
3432  }
exit
Definition: login.php:54
$_GET["client_id"]
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
static _lookupTitle($a_id)
lookup object title
static _lookupObjId($a_id)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
+ Here is the call graph for this function:

◆ activatePages()

ilObjContentObjectGUI::activatePages ( )

activates or deactivates pages

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

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

1572  {
1573  if (is_array($_POST["id"]))
1574  {
1575  foreach($_POST["id"] as $id)
1576  {
1577  include_once("./Modules/LearningModule/classes/class.ilLMPage.php");
1578  $act = ilLMPage::_lookupActive($id, $this->object->getType());
1579  ilLMPage::_writeActive($id, $this->object->getType(), !$act);
1580  }
1581  }
1582 
1583  $this->ctrl->redirect($this, "pages");
1584  }
$_POST['username']
Definition: cron.php:12
static _lookupActive($a_id, $a_parent_type, $a_check_scheduled_activation=false, $a_lang="-")
lookup activation status
_writeActive($a_id, $a_parent_type, $a_active, $a_reset_scheduled_activation=true, $a_lang="-")
write activation status
+ Here is the call graph for this function:

◆ addBibItem()

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().

1058  {
1059  $this->setTabs();
1060 
1061  // questionable workaround to make this old stuff work
1062  $this->ctrl->setParameter($this, ilCtrl::IL_RTOKEN_NAME, $this->ctrl->getRequestToken());
1063 
1064  $this->addBibItemObject($this->ctrl->getLinkTarget($this));
1065  }
addBibItemObject($a_target="")
add bib item (admin call)
const IL_RTOKEN_NAME
setTabs()
set admin tabs public
+ Here is the call graph for this function:

◆ addBibItemObject()

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().

1027  {
1028  include_once "./Modules/LearningModule/classes/class.ilBibItemGUI.php";
1029  $bib_gui =& new ilBibItemGUI();
1030  $bib_gui->setObject($this->object);
1031  $bibItemName = $_POST["bibItemName"] ? $_POST["bibItemName"] : $_GET["bibItemName"];
1032  $bibItemIndex = $_POST["bibItemIndex"] ? $_POST["bibItemIndex"] : $_GET["bibItemIndex"];
1033  if ($bibItemIndex == "")
1034  $bibItemIndex = 0;
1035  $bibItemPath = $_POST["bibItemPath"] ? $_POST["bibItemPath"] : $_GET["bibItemPath"];
1036  if ($bibItemName != "")
1037  {
1038  $bib_gui->bib_obj->add($bibItemName, $bibItemPath, $bibItemIndex);
1039  $data = $bib_gui->bib_obj->getElement("BibItem");
1040  $bibItemIndex = (count($data) - 1);
1041  }
1042  else
1043  {
1044  ilUtil::sendInfo($this->lng->txt("bibitem_choose_element"), true);
1045  }
1046  if ($a_target == "")
1047  {
1048  $a_target = "adm_object.php?ref_id=" . $this->object->getRefId();
1049  }
1050 
1051  $bib_gui->edit("ADM_CONTENT", "adm_content", $a_target, $bibItemIndex);
1052  }
$_POST['username']
Definition: cron.php:12
$_GET["client_id"]
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
Class ilBibItemGUI.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addLocations()

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().

2416  {
2417  global $lng, $tree, $ilLocator, $ilCtrl;
2418 
2419  $par_id = $tree->getParentId($_GET["ref_id"]);
2420  $parent_title = ilObject::_lookupTitle(ilObject::_lookupObjId($par_id));
2421 
2422  // parent is not root folder, "shorten" locator
2423  if($par_id != ROOT_FOLDER_ID)
2424  {
2425  $this->ctrl->addLocation("...",
2426  "");
2427  }
2428  else
2429  {
2430  // if parent is root folder and has no custom title
2431  // we adapt it [see $ilLocator->addRepositoryItems()]
2432  if ($parent_title == "ILIAS")
2433  {
2434  $parent_title = $lng->txt("repository");
2435  }
2436  }
2437 
2438  $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $par_id);
2439  $this->ctrl->addLocation($parent_title,
2440  $ilCtrl->getLinkTargetByClass("ilrepositorygui", "frameset"),
2441  ilFrameTargetInfo::_getFrame("MainContent"), $par_id);
2442  $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $_GET["ref_id"]);
2443 
2444  if (!$a_omit_obj_id)
2445  {
2446  $obj_id = $_GET["obj_id"];
2447  }
2448  $lmtree =& $this->object->getTree();
2449 
2450  if (($obj_id != 0) && $lmtree->isInTree($obj_id))
2451  {
2452  $path = $lmtree->getPathFull($obj_id);
2453  }
2454  else
2455  {
2456  $path = $lmtree->getPathFull($lmtree->getRootId());
2457  if ($obj_id != 0)
2458  {
2459  $path[] = array("type" => "pg", "child" => $this->obj_id,
2460  "title" => ilLMPageObject::_getPresentationTitle($this->obj_id));
2461  }
2462  }
2463 
2464  $modifier = 1;
2465 
2466  foreach ($path as $key => $row)
2467  {
2468  if ($row["child"] == 1)
2469  {
2470  $this->ctrl->setParameter($this, "obj_id", "");
2471  $this->ctrl->addLocation(
2472  $this->object->getTitle(),
2473  $this->ctrl->getLinkTarget($this, "chapters"), "", $_GET["ref_id"]);
2474  }
2475  else
2476  {
2477  $title = $row["title"];
2478  switch($row["type"])
2479  {
2480  case "st":
2481  $this->ctrl->setParameterByClass("ilstructureobjectgui", "obj_id", $row["child"]);
2482  $this->ctrl->addLocation(
2483  $title,
2484  $this->ctrl->getLinkTargetByClass("ilstructureobjectgui", "view"));
2485  break;
2486 
2487  case "pg":
2488  $this->ctrl->setParameterByClass("illmpageobjectgui", "obj_id", $row["child"]);
2489  $this->ctrl->addLocation(
2490  $title,
2491  $this->ctrl->getLinkTargetByClass("illmpageobjectgui", "edit"));
2492  break;
2493  }
2494  }
2495  }
2496  if (!$a_omit_obj_id)
2497  {
2498  $this->ctrl->setParameter($this, "obj_id", $_GET["obj_id"]);
2499  }
2500  }
$_GET["client_id"]
static _lookupTitle($a_id)
lookup object title
global $ilCtrl
Definition: ilias.php:18
static _lookupObjId($a_id)
static _getFrame($a_class, $a_type='')
Get content frame name.
$path
Definition: index.php:22
static _getPresentationTitle($a_pg_id, $a_mode=IL_CHAPTER_TITLE, $a_include_numbers=false, $a_time_scheduled_activation=false, $a_force_content=false, $a_lm_id=0, $a_lang="-")
presentation title doesn't have to be page title, it may be chapter title + page title or chapter tit...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addMenuEntry()

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().

3001  {
3002  global $ilTabs, $ilToolbar, $tpl, $ilCtrl;
3003 
3004  $this->setTabs();
3005 
3006  $ilTabs->setTabActive("settings");
3007  $this->setSubTabs("cont_lm_menu");
3008 
3009  $ilToolbar->addButton($this->lng->txt("lm_menu_select_internal_object"),
3010  $ilCtrl->getLinkTarget($this, "showEntrySelector"));
3011 
3012  $form = $this->initMenuEntryForm("create");
3013  $this->tpl->setContent($form->getHTML());
3014  }
setSubTabs($a_active)
Set sub tabs.
initMenuEntryForm($a_mode="edit")
Init menu entry form.
global $ilCtrl
Definition: ilias.php:18
setTabs()
set admin tabs public
+ Here is the call graph for this function:

◆ addRole()

ilObjContentObjectGUI::addRole ( )

add local role

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

References ilObjectGUI\setReturnLocation().

1901  {
1902  $this->setReturnLocation("addRole", $this->ctrl->getLinkTarget($this, "perm"));
1903  $this->addRoleObject();
1904  }
setReturnLocation($a_cmd, $a_location)
set specific return location for command
+ Here is the call graph for this function:

◆ addTabs()

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().

2624  {
2625  global $rbacsystem, $ilUser, $ilTabs, $lng;
2626 
2627 $tabs_gui = $ilTabs;
2628 
2629  // content
2630  $ilTabs->addTab("content",
2631  $lng->txt("content"),
2632  $this->ctrl->getLinkTarget($this, "chapters"));
2633 
2634  // info
2635  $ilTabs->addTab("info",
2636  $lng->txt("info_short"),
2637  $this->ctrl->getLinkTargetByClass("ilinfoscreengui",'showSummary'));
2638 
2639  // settings
2640  $ilTabs->addTab("settings",
2641  $lng->txt("settings"),
2642  $this->ctrl->getLinkTarget($this,'properties'));
2643 
2644 
2645  // learning progress
2646  include_once './Services/Tracking/classes/class.ilLearningProgressAccess.php';
2647  if(ilLearningProgressAccess::checkAccess($this->object->getRefId()) and ($this->object->getType() == 'lm' or $this->object->getType() == 'dbk'))
2648  {
2649  $ilTabs->addTab('learning_progress',
2650  $lng->txt("learning_progress"),
2651  $this->ctrl->getLinkTargetByClass(array('illearningprogressgui'),''));
2652  }
2653 
2654  if ($this->object->getType() != "lm")
2655  {
2656  // bibliographical data
2657  $ilTabs->addTab("bib_data",
2658  $lng->txt("bib_data"),
2659  $this->ctrl->getLinkTarget($this, "editBibItem"));
2660  }
2661 
2662  // history
2663  $ilTabs->addTab("history",
2664  $lng->txt("history"),
2665  $this->ctrl->getLinkTarget($this, "history"));
2666 
2667  // meta data
2668  $ilTabs->addTab("meta",
2669  $lng->txt("meta_data"),
2670  $this->ctrl->getLinkTargetByClass('ilmdeditorgui',''));
2671 
2672  if ($this->object->getType() == "lm")
2673  {
2674  // export
2675  $ilTabs->addTab("export",
2676  $lng->txt("export"),
2677  $this->ctrl->getLinkTargetByClass("ilexportgui", ""));
2678  }
2679 
2680  // permissions
2681  if ($rbacsystem->checkAccess('edit_permission',$this->object->getRefId()))
2682  {
2683  $ilTabs->addTab("perm",
2684  $lng->txt("perm_settings"),
2685  $this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm"));
2686  }
2687 
2688  if ($a_act != "")
2689  {
2690  $ilTabs->activateTab($a_act);
2691  }
2692 
2693  // presentation view
2694  $ilTabs->addNonTabbedLink("pres_mode", $lng->txt("cont_presentation_view"),
2695  "ilias.php?baseClass=ilLMPresentationGUI&ref_id=".$this->object->getRefID(), "_top");
2696  }
static checkAccess($a_ref_id, $a_allow_only_read=true)
check access to learning progress
global $ilUser
Definition: imgupload.php:15
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addTooltip()

ilObjContentObjectGUI::addTooltip ( )

Add tooltip.

Parameters

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

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

3686  {
3687  global $lng, $ilCtrl;
3688 
3689  $tt_id = ilUtil::stripSlashes($_POST["tooltip_id"]);
3690  if (trim($tt_id) != "")
3691  {
3692  if (is_int(strpos($tt_id, "_")))
3693  {
3694  include_once("./Services/Help/classes/class.ilHelp.php");
3695  ilHelp::addTooltip(trim($tt_id), "");
3696  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
3697 
3698  $fu = strpos($tt_id, "_");
3699  $comp = substr($tt_id, 0, $fu);
3700  ilSession::set("help_tt_comp", ilUtil::stripSlashes($comp));
3701  }
3702  else
3703  {
3704  ilUtil::sendFailure($lng->txt("cont_help_no_valid_tooltip_id"), true);
3705  }
3706  }
3707  $ilCtrl->redirect($this, "showTooltipList");
3708  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
static set($a_var, $a_val)
Set a value.
global $ilCtrl
Definition: ilias.php:18
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static addTooltip($a_tt_id, $a_text, $a_module_id=0)
Add tooltip.
+ Here is the call graph for this function:

◆ afterSave()

ilObjContentObjectGUI::afterSave ( ilObject  $a_new_object)
protected

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

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

968  {
969  $a_new_object->notify("new", $_GET["ref_id"], $_GET["parent_non_rbac_id"],
970  $_GET["ref_id"], $a_new_object->getRefId());
971  $a_new_object->setCleanFrames(true);
972  $a_new_object->update();
973 
974  // create content object tree
975  $a_new_object->createLMTree();
976 
977  // create a first chapter
978  $a_new_object->addFirstChapterAndPage();
979 
980  // always send a message
981  ilUtil::sendSuccess($this->lng->txt($this->type."_added"), true);
982  ilUtil::redirect("ilias.php?ref_id=".$a_new_object->getRefId().
983  "&baseClass=ilLMEditorGUI");
984  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_GET["client_id"]
notify($a_event, $a_ref_id, $a_parent_non_rbac_id, $a_node_id, $a_params=0)
notifys an object about an event occured Based on the event passed, each object may decide how it rea...
getRefId()
get reference id public
update()
update object in db
static redirect($a_script)
http redirect to other script
+ Here is the call graph for this function:

◆ cancel()

ilObjContentObjectGUI::cancel ( )

cancel action

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

References $_GET.

2007  {
2008  if ($_GET["new_type"] == "pg")
2009  {
2010  $this->ctrl->redirect($this, "pages");
2011  }
2012  else
2013  {
2014  $this->ctrl->redirect($this, "chapters");
2015  }
2016  }
$_GET["client_id"]

◆ cancelDelete()

ilObjContentObjectGUI::cancelDelete ( )

cancel delete

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

References $_GET.

1731  {
1732  $this->ctrl->redirect($this, $_GET["backcmd"]);
1733 
1734  }
$_GET["client_id"]

◆ chapters()

ilObjContentObjectGUI::chapters ( )

show chapters

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

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

1261  {
1262  global $tree, $lng, $ilCtrl, $ilUser;
1263 
1264  $this->setTabs();
1265  $this->setContentSubTabs("chapters");
1266 
1267  $ilCtrl->setParameter($this, "backcmd", "chapters");
1268 
1269  include_once("./Modules/LearningModule/classes/class.ilChapterHierarchyFormGUI.php");
1270  $form_gui = new ilChapterHierarchyFormGUI($this->object->getType(), $_GET["transl"]);
1271  $form_gui->setFormAction($ilCtrl->getFormAction($this));
1272  $form_gui->setTitle($this->object->getTitle());
1273  $form_gui->setIcon(ilUtil::getImagePath("icon_lm.png"));
1274  $form_gui->setTree($this->lm_tree);
1275  $form_gui->setMaxDepth(0);
1276  $form_gui->setCurrentTopNodeId($this->tree->getRootId());
1277  $form_gui->addMultiCommand($lng->txt("delete"), "delete");
1278  $form_gui->addMultiCommand($lng->txt("cut"), "cutItems");
1279  $form_gui->addMultiCommand($lng->txt("copy"), "copyItems");
1280  if ($this->object->getLayoutPerPage())
1281  {
1282  $form_gui->addMultiCommand($lng->txt("cont_set_layout"), "setPageLayoutInHierarchy");
1283  }
1284  $form_gui->setDragIcon(ilUtil::getImagePath("icon_st_s.png"));
1285  $form_gui->addCommand($lng->txt("cont_save_all_titles"), "saveAllTitles");
1286  $up_gui = ($this->object->getType() == "dbk")
1287  ? "ilobjdlbookgui"
1288  : "ilobjlearningmodulegui";
1289  $form_gui->setExplorerUpdater("tree", "tree_div",
1290  $ilCtrl->getLinkTargetByClass($up_gui, "explorer", "", true));
1291 
1292  $ctpl = new ilTemplate("tpl.chap_and_pages.html", true, true, "Modules/LearningModule");
1293  $ctpl->setVariable("HIERARCHY_FORM", $form_gui->getHTML());
1294  $ilCtrl->setParameter($this, "obj_id", "");
1295 
1296  $ml_head = self::getMultiLangHeader($this->object->getId(), $this);
1297 
1298  $this->tpl->setContent($ml_head.$ctpl->get());
1299  }
$_GET["client_id"]
setFormAction($a_formaction)
Set FormAction.
global $ilCtrl
Definition: ilias.php:18
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
This class represents a hierarchical form.
special template class to simplify handling of ITX/PEAR
setContentSubTabs($a_active)
Set pages tabs.
global $ilUser
Definition: imgupload.php:15
setTabs()
set admin tabs public
+ Here is the call graph for this function:

◆ confirmedDelete()

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().

1744  {
1745  $tree = new ilTree($this->object->getId());
1746  $tree->setTableNames('lm_tree','lm_data');
1747  $tree->setTreeTablePK("lm_id");
1748 
1749  // check number of objects
1750  if (!$_POST["id"])
1751  {
1752  $this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
1753  }
1754 
1755  // delete all selected objects
1756  foreach ($_POST["id"] as $id)
1757  {
1758  if ($id != IL_FIRST_NODE)
1759  {
1760  $obj =& ilLMObjectFactory::getInstance($this->object, $id, false);
1761  $node_data = $tree->getNodeData($id);
1762  if (is_object($obj))
1763  {
1764  $obj->setLMId($this->object->getId());
1765 
1766  include_once("./Services/History/classes/class.ilHistory.php");
1767  ilHistory::_createEntry($this->object->getId(), "delete_".$obj->getType(),
1768  array(ilLMObject::_lookupTitle($id), $id),
1769  $this->object->getType());
1770 
1771  $obj->delete();
1772  }
1773  if($tree->isInTree($id))
1774  {
1775  $tree->deleteTree($node_data);
1776  }
1777  }
1778  }
1779 
1780  // check the tree
1781  $this->object->checkTree();
1782 
1783  // feedback
1784  ilUtil::sendSuccess($this->lng->txt("info_deleted"),true);
1785 
1786  if ($a_parent_subobj_id == 0)
1787  {
1788  $this->ctrl->redirect($this, $_GET["backcmd"]);
1789  }
1790  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
$_GET["client_id"]
getInstance(&$a_content_obj, $a_id=0, $a_halt=true)
static _lookupTitle($a_obj_id)
Lookup title.
_createEntry($a_obj_id, $a_action, $a_info_params="", $a_obj_type="", $a_user_comment="", $a_update_last=false)
Creates a new history entry for an object.
const IL_FIRST_NODE
Definition: class.ilTree.php:5
redirection script todo: (a better solution should control the processing via a xml file) ...
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ confirmGlossarySelection()

ilObjContentObjectGUI::confirmGlossarySelection ( )

Confirm glossary selection.

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

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

3989  {
3990  global $ilCtrl, $tpl, $lng;
3991 
3992  include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
3993  $cgui = new ilConfirmationGUI();
3994  $ilCtrl->setParameter($this, "glo_ref_id", $_GET["root_id"]);
3995  $cgui->setFormAction($ilCtrl->getFormAction($this));
3996  $cgui->setHeaderText($lng->txt("cont_link_glo_in_lm"));
3997  $cgui->setCancel($lng->txt("no"), "selectLMGlossary");
3998  $cgui->setConfirm($lng->txt("yes"), "selectLMGlossaryLink");
3999  $tpl->setContent($cgui->getHTML());
4000  }
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
Confirmation screen class.

◆ copyChapter()

ilObjContentObjectGUI::copyChapter (   $a_parent_subobj_id = 0)

copy a single chapter (selection)

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

References copyItems().

1970  {
1971  $this->copyItems();
1972  }
copyItems()
Copy items to clipboard.
+ Here is the call graph for this function:

◆ copyItems()

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().

3471  {
3472  global $ilCtrl, $lng;
3473 
3474  $items = ilUtil::stripSlashesArray($_POST["id"]);
3475  if (!is_array($items))
3476  {
3477  ilUtil::sendFailure($lng->txt("no_checkbox"), true);
3478  $ilCtrl->redirect($this, "chapters");
3479  }
3480 
3481  $todel = array(); // delete IDs < 0 (needed for non-js editing)
3482  foreach($items as $k => $item)
3483  {
3484  if ($item < 0)
3485  {
3486  $todel[] = $k;
3487  }
3488  }
3489  foreach($todel as $k)
3490  {
3491  unset($items[$k]);
3492  }
3493  ilLMObject::clipboardCopy($this->object->getId(), $items);
3495  ilUtil::sendInfo($lng->txt("cont_selected_items_have_been_copied"), true);
3496  $ilCtrl->redirect($this, "chapters");
3497  }
$_POST['username']
Definition: cron.php:12
global $ilCtrl
Definition: ilias.php:18
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static clipboardCopy($a_cont_obj_id, $a_ids)
Copy a set of chapters/pages into the clipboard.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static stripSlashesArray($a_arr, $a_strip_html=true, $a_allow="")
Strip slashes from array.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ copyPage()

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().

1651  {
1652  global $ilUser;
1653 
1654  if(!isset($_POST["id"]))
1655  {
1656  $this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
1657  }
1658 
1659  $items = ilUtil::stripSlashesArray($_POST["id"]);
1660  ilLMObject::clipboardCopy($this->object->getId(), $items);
1662 
1663  ilUtil::sendInfo($this->lng->txt("cont_selected_items_have_been_copied"), true);
1664 
1665  $this->ctrl->redirect($this, "pages");
1666  }
$_POST['username']
Definition: cron.php:12
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static clipboardCopy($a_cont_obj_id, $a_ids)
Copy a set of chapters/pages into the clipboard.
redirection script todo: (a better solution should control the processing via a xml file) ...
static stripSlashesArray($a_arr, $a_strip_html=true, $a_allow="")
Strip slashes from array.
global $ilUser
Definition: imgupload.php:15
+ Here is the call graph for this function:

◆ createPDF()

ilObjContentObjectGUI::createPDF ( )

export content object

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

2371  {
2372  require_once("./Modules/LearningModule/classes/class.ilContObjectExport.php");
2373  $cont_exp = new ilContObjectExport($this->object, "pdf");
2374  $cont_exp->buildExportFile();
2375  $this->offlineList();
2376  }
Export class for content objects.

◆ createStyle()

ilObjContentObjectGUI::createStyle ( )

Create Style.

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

References $ilCtrl.

667  {
668  global $ilCtrl;
669 
670  $ilCtrl->redirectByClass("ilobjstylesheetgui", "create");
671  }
global $ilCtrl
Definition: ilias.php:18

◆ cutChapter()

ilObjContentObjectGUI::cutChapter ( )

Cut chapter(s)

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

References cutItems().

3503  {
3504  $this->cutItems("chapters");
3505  }
cutItems($a_return="chapters")
Copy items to clipboard, then cut them from the current tree.
+ Here is the call graph for this function:

◆ cutItems()

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().

3438  {
3439  global $ilCtrl, $lng;
3440 
3441  $items = ilUtil::stripSlashesArray($_POST["id"]);
3442  if (!is_array($items))
3443  {
3444  ilUtil::sendFailure($lng->txt("no_checkbox"), true);
3445  $ilCtrl->redirect($this, $a_return);
3446  }
3447 
3448  $todel = array(); // delete IDs < 0 (needed for non-js editing)
3449  foreach($items as $k => $item)
3450  {
3451  if ($item < 0)
3452  {
3453  $todel[] = $k;
3454  }
3455  }
3456  foreach($todel as $k)
3457  {
3458  unset($items[$k]);
3459  }
3460  ilLMObject::clipboardCut($this->object->getId(), $items);
3462  ilUtil::sendInfo($lng->txt("cont_selected_items_have_been_cut"), true);
3463 
3464  $ilCtrl->redirect($this, $a_return);
3465  }
$_POST['username']
Definition: cron.php:12
global $ilCtrl
Definition: ilias.php:18
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
clipboardCut($a_cont_obj_id, $a_ids)
Copy a set of chapters/pages into the clipboard.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static stripSlashesArray($a_arr, $a_strip_html=true, $a_allow="")
Strip slashes from array.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ delete()

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().

1676  {
1677  if(!isset($_POST["id"]))
1678  {
1679  $this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
1680  }
1681 
1682  if(count($_POST["id"]) == 1 && $_POST["id"][0] == IL_FIRST_NODE)
1683  {
1684  $this->ilias->raiseError($this->lng->txt("cont_select_item"), $this->ilias->error_obj->MESSAGE);
1685  }
1686 
1687  if ($a_parent_subobj_id == 0)
1688  {
1689  $this->setTabs();
1690  }
1691 
1692  if ($a_parent_subobj_id != 0)
1693  {
1694  $this->ctrl->setParameterByClass("ilStructureObjectGUI", "backcmd", $_GET["backcmd"]);
1695  $this->ctrl->setParameterByClass("ilStructureObjectGUI", "obj_id", $a_parent_subobj_id);
1696  $form_action = $this->ctrl->getFormActionByClass("ilStructureObjectGUI");
1697  }
1698  else
1699  {
1700  $this->ctrl->setParameter($this, "backcmd", $_GET["backcmd"]);
1701  $form_action = $this->ctrl->getFormAction($this);
1702  }
1703 
1704  // display confirmation message
1705  include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
1706  $cgui = new ilConfirmationGUI();
1707  $cgui->setFormAction($form_action);
1708  $cgui->setHeaderText($this->lng->txt("info_delete_sure"));
1709  $cgui->setCancel($this->lng->txt("cancel"), "cancelDelete");
1710  $cgui->setConfirm($this->lng->txt("confirm"), "confirmedDelete");
1711 
1712  foreach($_POST["id"] as $id)
1713  {
1714  if ($id != IL_FIRST_NODE)
1715  {
1716  $obj = new ilLMObject($this->object, $id);
1717  $caption = ilUtil::getImageTagByType($obj->getType(), $this->tpl->tplPath).
1718  " ".$obj->getTitle();
1719 
1720  $cgui->addItem("id[]", $id, $caption);
1721  }
1722  }
1723 
1724  $this->tpl->setContent($cgui->getHTML());
1725  }
$_POST['username']
Definition: cron.php:12
$_GET["client_id"]
static getImageTagByType($a_type, $a_path, $a_big=false)
Builds an html image tag TODO: function still in use, but in future use getImagePath and move HTML-Co...
const IL_FIRST_NODE
Definition: class.ilTree.php:5
redirection script todo: (a better solution should control the processing via a xml file) ...
setTabs()
set admin tabs public
Class ilLMObject.
Confirmation screen class.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ deleteBibItem()

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().

1093  {
1094  $this->setTabs();
1095 
1096  // questionable workaround to make this old stuff work
1097  $this->ctrl->setParameter($this, ilCtrl::IL_RTOKEN_NAME, $this->ctrl->getRequestToken());
1098 
1099  $this->deleteBibItemObject($this->ctrl->getLinkTarget($this));
1100  }
deleteBibItemObject($a_target="")
delete bib item (admin call)
const IL_RTOKEN_NAME
setTabs()
set admin tabs public
+ Here is the call graph for this function:

◆ deleteBibItemObject()

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().

1071  {
1072  include_once "./Modules/LearningModule/classes/class.ilBibItemGUI.php";
1073  $bib_gui =& new ilBibItemGUI();
1074  $bib_gui->setObject($this->object);
1075  $bibItemIndex = $_POST["bibItemIndex"] ? $_POST["bibItemIndex"] : $_GET["bibItemIndex"];
1076  $bib_gui->bib_obj->delete($_GET["bibItemName"], $_GET["bibItemPath"], $bibItemIndex);
1077  if (strpos($bibItemIndex, ",") > 0)
1078  {
1079  $bibItemIndex = substr($bibItemIndex, 0, strpos($bibItemIndex, ","));
1080  }
1081  if ($a_target == "")
1082  {
1083  $a_target = "adm_object.php?ref_id=" . $this->object->getRefId();
1084  }
1085 
1086  $bib_gui->edit("ADM_CONTENT", "adm_content", $a_target, $bibItemIndex);
1087  }
$_POST['username']
Definition: cron.php:12
$_GET["client_id"]
Class ilBibItemGUI.
+ Here is the caller graph for this function:

◆ deleteMenuEntry()

ilObjContentObjectGUI::deleteMenuEntry ( )

drop a menu entry

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

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

3126  {
3127  if (empty($_GET["menu_entry"]))
3128  {
3129  $this->ilias->raiseError($this->lng->txt("no_menu_entry_id"),$this->ilias->error_obj->MESSAGE);
3130  }
3131 
3132  $this->__initLMMenuEditor();
3133  $this->lmme_obj->delete($_GET["menu_entry"]);
3134 
3135  ilUtil::sendSuccess($this->lng->txt("msg_entry_removed"), true);
3136  $this->ctrl->redirect($this, "editMenuProperties");
3137  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_GET["client_id"]
redirection script todo: (a better solution should control the processing via a xml file) ...
+ Here is the call graph for this function:

◆ deleteStyle()

ilObjContentObjectGUI::deleteStyle ( )

Delete Style.

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

References $ilCtrl.

687  {
688  global $ilCtrl;
689 
690  $ilCtrl->redirectByClass("ilobjstylesheetgui", "delete");
691  }
global $ilCtrl
Definition: ilias.php:18

◆ deleteTooltips()

ilObjContentObjectGUI::deleteTooltips ( )

Delete tooltips.

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

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

3753  {
3754  global $lng, $ilCtrl;
3755 
3756  if (is_array($_POST["id"]))
3757  {
3758  include_once("./Services/Help/classes/class.ilHelp.php");
3759  foreach ($_POST["id"] as $id)
3760  {
3761  ilHelp::deleteTooltip((int) $id);
3762  }
3763  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
3764  }
3765  $ilCtrl->redirect($this, "showTooltipList");
3766  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
global $ilCtrl
Definition: ilias.php:18
static deleteTooltip($a_id)
Delete tooltip.
+ Here is the call graph for this function:

◆ downloadPDFFile()

ilObjContentObjectGUI::downloadPDFFile ( )

download export file

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

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

2095  {
2096  if(!isset($_POST["file"]))
2097  {
2098  $this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
2099  }
2100 
2101  if (count($_POST["file"]) > 1)
2102  {
2103  $this->ilias->raiseError($this->lng->txt("cont_select_max_one_item"),$this->ilias->error_obj->MESSAGE);
2104  }
2105 
2106 
2107  $export_dir = $this->object->getOfflineDirectory();
2108 
2109  $file = basename($_POST["file"][0]);
2110 
2111  ilUtil::deliverFile($export_dir."/".$file, $file);
2112  }
print $file
$_POST['username']
Definition: cron.php:12
redirection script todo: (a better solution should control the processing via a xml file) ...
static deliverFile($a_file, $a_filename, $a_mime='', $isInline=false, $removeAfterDelivery=false, $a_exit_after=true)
deliver file for download via browser.
+ Here is the call graph for this function:

◆ editBibItem()

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().

1129  {
1130  $this->setTabs();
1131 
1132  // questionable workaround to make this old stuff work
1133  $this->ctrl->setParameter($this, ilCtrl::IL_RTOKEN_NAME, $this->ctrl->getRequestToken());
1134 
1135  $this->editBibItemObject($this->ctrl->getLinkTarget($this));
1136  }
const IL_RTOKEN_NAME
editBibItemObject($a_target="")
edit bib items (admin call)
setTabs()
set admin tabs public
+ Here is the call graph for this function:

◆ editBibItemObject()

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().

1107  {
1108  include_once "./Modules/LearningModule/classes/class.ilBibItemGUI.php";
1109  $bib_gui =& new ilBibItemGUI();
1110  $bib_gui->setObject($this->object);
1111  $bibItemIndex = $_POST["bibItemIndex"] ? $_POST["bibItemIndex"] : $_GET["bibItemIndex"];
1112  $bibItemIndex *= 1;
1113  if ($bibItemIndex < 0)
1114  {
1115  $bibItemIndex = 0;
1116  }
1117  if ($a_target == "")
1118  {
1119  $a_target = "adm_object.php?ref_id=" . $this->object->getRefId();
1120  }
1121 
1122  $bib_gui->edit("ADM_CONTENT", "adm_content", $a_target, $bibItemIndex);
1123  }
$_POST['username']
Definition: cron.php:12
$_GET["client_id"]
Class ilBibItemGUI.
+ Here is the caller graph for this function:

◆ editGlossaries()

ilObjContentObjectGUI::editGlossaries ( )

Edit automatically linked glossaries.

Parameters

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

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

3939  {
3940  global $tpl, $ilToolbar, $lng, $ilCtrl, $ilTabs;
3941 
3942  $this->setTabs();
3943  $ilTabs->setTabActive("settings");
3944  $this->setSubTabs("cont_glossaries");
3945 
3946  $ilToolbar->addButton($lng->txt("add"),
3947  $ilCtrl->getLinkTarget($this, "showLMGlossarySelector"));
3948 
3949  include_once("./Modules/LearningModule/classes/class.ilLMGlossaryTableGUI.php");
3950  $tab = new ilLMGlossaryTableGUI($this->object, $this, "editGlossaries");
3951 
3952  $tpl->setContent($tab->getHTML());
3953  }
setSubTabs($a_active)
Set sub tabs.
global $ilCtrl
Definition: ilias.php:18
TableGUI class for glossary tables.
setTabs()
set admin tabs public
+ Here is the call graph for this function:

◆ editMasterLanguage()

ilObjContentObjectGUI::editMasterLanguage ( )

Edit master language.

Parameters

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

References $ilCtrl.

4065  {
4066  global $ilCtrl;
4067 
4068  $ilCtrl->setParameter($this, "transl", "");
4069  $ilCtrl->redirect($this, "chapters");
4070  }
global $ilCtrl
Definition: ilias.php:18

◆ editMenuEntry()

ilObjContentObjectGUI::editMenuEntry ( )

edit menu entry form

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

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

3143  {
3144  global $ilToolbar, $ilCtrl;
3145 
3146  if (empty($_GET["menu_entry"]))
3147  {
3148  $this->ilias->raiseError($this->lng->txt("no_menu_entry_id"),$this->ilias->error_obj->MESSAGE);
3149  }
3150 
3151  $ilCtrl->saveParameter($this, array("menu_entry"));
3152  $ilToolbar->addButton($this->lng->txt("lm_menu_select_internal_object"),
3153  $ilCtrl->getLinkTarget($this, "showEntrySelector"));
3154 
3155  $form = $this->initMenuEntryForm("edit");
3156  $this->tpl->setContent($form->getHTML());
3157  }
initMenuEntryForm($a_mode="edit")
Init menu entry form.
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
redirection script todo: (a better solution should control the processing via a xml file) ...
+ Here is the call graph for this function:

◆ editMenuProperties()

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().

784  {
785  global $lng, $ilTabs, $ilCtrl, $tpl, $ilToolbar;
786 
787  $lng->loadLanguageModule("style");
788  $this->setTabs();
789  $ilTabs->setTabActive("settings");
790  $this->setSubTabs("cont_lm_menu");
791 
792  $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
793  $ilToolbar->addFormButton($this->lng->txt("add_menu_entry"), "addMenuEntry");
794  $ilToolbar->setCloseFormTag(false);
795 
796  $form = $this->initMenuForm();
797  $form->setOpenTag(false);
798  $form->setCloseTag(false);
799 
800  $this->__initLMMenuEditor();
801  $entries = $this->lmme_obj->getMenuEntries();
802  include_once("./Modules/LearningModule/classes/class.ilLMMenuItemsTableGUI.php");
803  $table = new ilLMMenuItemsTableGUI($this, "editMenuProperties", $this->lmme_obj);
804  $table->setOpenFormTag(false);
805 
806  $tpl->setContent($form->getHTML()."<br />".$table->getHTML());
807  }
TableGUI class for lm menu items.
setSubTabs($a_active)
Set sub tabs.
global $ilCtrl
Definition: ilias.php:18
setTabs()
set admin tabs public
+ Here is the call graph for this function:

◆ editPublicSection()

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().

2753  {
2754  global $ilTabs, $ilToobar, $ilAccess;
2755 
2756 
2757  if (!$ilAccess->checkAccessOfUser(ANONYMOUS_USER_ID, "read", "", $this->object->getRefId()))
2758  {
2759  ilUtil::sendInfo($this->lng->txt("cont_anonymous_user_missing_perm"));
2760  }
2761 
2762  $this->setTabs();
2763  $this->setSubTabs("public_section");
2764  $ilTabs->setTabActive("settings");
2765 
2766  switch ($this->object->getType())
2767  {
2768  case "lm":
2769  $gui_class = "ilobjlearningmodulegui";
2770  break;
2771 
2772  case "dlb":
2773  $gui_class = "ilobjdlbookgui";
2774  break;
2775  }
2776 
2777  $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.lm_public_selector.html",
2778  "Modules/LearningModule");
2779 
2780  // get learning module object
2781  $this->lm_obj = new ilObjLearningModule($this->ref_id, true);
2782 
2783  // public mode
2784  $my_toolbar = new ilToolbarGUI();
2785  $modes = array("complete" => $this->lng->txt("all_pages"), "selected" => $this->lng->txt("selected_pages_only"));
2786  include_once("./Services/Form/classes/class.ilSelectInputGUI.php");
2787  $si = new ilSelectInputGUI($this->lng->txt("choose_public_mode"), "lm_public_mode");
2788  $si->setOptions($modes);
2789  $si->setValue($this->object->getPublicAccessMode());
2790  $my_toolbar->addInputItem($si, true);
2791  $my_toolbar->setOpenFormTag(false);
2792  $my_toolbar->setCloseFormTag(false);
2793  $my_toolbar->addFormButton($this->lng->txt("save"), "savePublicSection");
2794  $this->tpl->setVariable("TOOLBAR", $my_toolbar->getHTML());
2795  $this->tpl->setVariable("FORMACTION", $this->ctrl->getLinkTarget($this, "savePublicSection"));
2796 
2797  if ($this->object->getPublicAccessMode() == "selected")
2798  {
2799  $this->tpl->setCurrentBlock("select_pages");
2800  require_once ("./Modules/LearningModule/classes/class.ilPublicSectionSelector.php");
2801  $exp = new ilPublicSectionSelector($this->ctrl->getLinkTarget($this, "view"),
2802  $this->object, $gui_class);
2803 
2804  $exp->setTargetGet("obj_id");
2805 
2806  // build html-output
2807  $exp->setOutput(0);
2808  $output = $exp->getOutput();
2809 
2810  // get page ids
2811  foreach ($exp->format_options as $node)
2812  {
2813  if (!$node["container"])
2814  {
2815  $pages[] = $node["child"];
2816  }
2817  }
2818 
2819  $js_pages = ilUtil::array_php2js($pages);
2820  $this->tpl->setVariable("EXPLORER",$output);
2821  $this->tpl->setVariable("ONCLICK",$js_pages);
2822  $this->tpl->setVariable("TXT_CHECKALL", $this->lng->txt("check_all"));
2823  $this->tpl->setVariable("TXT_UNCHECKALL", $this->lng->txt("uncheck_all"));
2824  $this->tpl->setVariable("TXT_SAVE", $this->lng->txt("save"));
2825 
2826  $this->tpl->parseCurrentBlock();
2827  }
2828  }
Class ilObjLearningModule.
setSubTabs($a_active)
Set sub tabs.
This class represents a selection list property in a property form.
setTargetGet($a_target_get)
set the varname in Get-string public
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static array_php2js($data)
convert php arrays to javascript arrays
setTabs()
set admin tabs public
+ Here is the call graph for this function:

◆ editStyle()

ilObjContentObjectGUI::editStyle ( )

Edit Style.

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

References $ilCtrl.

677  {
678  global $ilCtrl;
679 
680  $ilCtrl->redirectByClass("ilobjstylesheetgui", "edit");
681  }
global $ilCtrl
Definition: ilias.php:18

◆ editStyleProperties()

ilObjContentObjectGUI::editStyleProperties ( )

Edit style properties.

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

References ilObjectGUI\$tpl, and initStylePropertiesForm().

584  {
585  global $tpl;
586 
587  $this->initStylePropertiesForm();
588  $tpl->setContent($this->form->getHTML());
589  }
initStylePropertiesForm()
Init style properties form.
+ Here is the call graph for this function:

◆ executeCommand()

& ilObjContentObjectGUI::executeCommand ( )

execute command

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().

44  {
45  global $ilAccess, $lng, $ilTabs, $ilCtrl, $ilErr;
46 
47  if ($this->ctrl->getRedirectSource() == "ilinternallinkgui")
48  {
49  $this->explorer();
50  return;
51  }
52 
53  if ($this->ctrl->getCmdClass() == "ilinternallinkgui")
54  {
55  $this->ctrl->setReturn($this, "explorer");
56  }
57 
58  // get next class that processes or forwards current command
59  $next_class = $this->ctrl->getNextClass($this);
60 
61  // get current command
62 // $cmd = $this->ctrl->getCmd("", array("downloadExportFile"));
63  if ($_GET["to_props"] == 1)
64  {
65  $cmd = $this->ctrl->getCmd("properties");
66  }
67  else
68  {
69  $cmd = $this->ctrl->getCmd("chapters");
70  }
71 
72 
73 //echo "-$cmd-".$next_class."-";
74  switch($next_class)
75  {
76  case "illearningprogressgui":
77  $this->addHeaderAction();
78  $this->addLocations();
79  include_once './Services/Tracking/classes/class.ilLearningProgressGUI.php';
80  $this->setTabs("learning_progress");
81 
82  $new_gui =& new ilLearningProgressGUI(ilLearningProgressGUI::LP_CONTEXT_REPOSITORY,$this->object->getRefId());
83  $new_gui->activateStatistics();
84  $this->ctrl->forwardCommand($new_gui);
85 
86  break;
87 
88  case 'ilmdeditorgui':
89  if(!$ilAccess->checkAccess('write','',$this->object->getRefId()))
90  {
91  $ilErr->raiseError($this->lng->txt('permission_denied'),$ilErr->WARNING);
92  }
93 
94  $this->addHeaderAction();
95  $this->addLocations();
96  include_once 'Services/MetaData/classes/class.ilMDEditorGUI.php';
97  $this->setTabs("meta");
98  $md_gui =& new ilMDEditorGUI($this->object->getId(), 0, $this->object->getType());
99  $md_gui->addObserver($this->object,'MDUpdateListener','General');
100 
101  $this->ctrl->forwardCommand($md_gui);
102  break;
103 
104  case "ilobjstylesheetgui":
105  $this->addLocations();
106  include_once ("./Services/Style/classes/class.ilObjStyleSheetGUI.php");
107  $this->ctrl->setReturn($this, "editStyleProperties");
108  $style_gui =& new ilObjStyleSheetGUI("", $this->object->getStyleSheetId(), false, false);
109  $style_gui->omitLocator();
110  if ($cmd == "create" || $_GET["new_type"]=="sty")
111  {
112  $style_gui->setCreationMode(true);
113  }
114  $ret =& $this->ctrl->forwardCommand($style_gui);
115  //$ret =& $style_gui->executeCommand();
116 
117  if ($cmd == "save" || $cmd == "copyStyle" || $cmd == "importStyle")
118  {
119  $style_id = $ret;
120  $this->object->setStyleSheetId($style_id);
121  $this->object->update();
122  $this->ctrl->redirectByClass("ilobjstylesheetgui", "edit");
123  }
124  break;
125 
126  case "illmpageobjectgui":
127 
128  $ilTabs->setBackTarget($lng->txt("learning module"),
129  $ilCtrl->getLinkTarget($this, "chapters"));
130  $this->ctrl->saveParameter($this, array("obj_id"));
131  $this->addLocations();
132  $this->ctrl->setReturn($this, "chapters");
133 //echo "!";
134  //$this->lm_obj =& $this->ilias->obj_factory->getInstanceByRefId($this->ref_id);
135 
136  $pg_gui =& new ilLMPageObjectGUI($this->object);
137  if ($_GET["obj_id"] != "")
138  {
139  $obj =& ilLMObjectFactory::getInstance($this->object, $_GET["obj_id"]);
140  $pg_gui->setLMPageObject($obj);
141  }
142  //$ret =& $pg_gui->executeCommand();
143  $ret =& $this->ctrl->forwardCommand($pg_gui);
144  if ($cmd == "save" || $cmd == "cancel")
145  {
146 // $this->ctrl->redirect($this, "pages");
147  }
148  break;
149 
150  case "ilstructureobjectgui":
151  $ilTabs->setBackTarget($lng->txt("learning module"),
152  $ilCtrl->getLinkTarget($this, "chapters"));
153 
154  $this->ctrl->saveParameter($this, array("obj_id"));
155  $this->addLocations();
156  $this->ctrl->setReturn($this, "chapters");
157  $st_gui =& new ilStructureObjectGUI($this->object, $this->object->lm_tree);
158  if ($_GET["obj_id"] != "")
159  {
160  $obj =& ilLMObjectFactory::getInstance($this->object, $_GET["obj_id"]);
161  $st_gui->setStructureObject($obj);
162  }
163  //$ret =& $st_gui->executeCommand();
164  $ret =& $this->ctrl->forwardCommand($st_gui);
165  if ($cmd == "save" || $cmd == "cancel")
166  {
167  if ($_GET["obj_id"] == "")
168  {
169  $this->ctrl->redirect($this, "chapters");
170  }
171  else
172  {
173  $this->ctrl->setCmd("subchap");
174  $this->executeCommand();
175  }
176  }
177  break;
178 
179  case 'ilpermissiongui':
180  if (strtolower($_GET["baseClass"]) == "iladministrationgui")
181  {
182  $this->prepareOutput();
183  }
184  else
185  {
186  $this->addHeaderAction();
187  $this->addLocations(true);
188  $this->setTabs("perm");
189  }
190  include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
191  $perm_gui =& new ilPermissionGUI($this);
192  $ret =& $this->ctrl->forwardCommand($perm_gui);
193  break;
194 
195  // infoscreen
196  case 'ilinfoscreengui':
197  $this->addHeaderAction();
198  $this->addLocations(true);
199  $this->setTabs("info");
200  include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
201  $info = new ilInfoScreenGUI($this);
202  $info->enablePrivateNotes();
203  $info->enableLearningProgress();
204 
205  $info->enableNews();
206  if ($ilAccess->checkAccess("write", "", $_GET["ref_id"]))
207  {
208  $info->enableNewsEditing();
209  $info->setBlockProperty("news", "settings", true);
210  }
211 
212  // show standard meta data section
213  $info->addMetaDataSections($this->object->getId(), 0,
214  $this->object->getType());
215 
216  $ret =& $this->ctrl->forwardCommand($info);
217  break;
218 
219  case "ilexportgui":
220  $this->addHeaderAction();
221  $this->addLocations(true);
222  $this->setTabs("export");
223  include_once("./Services/Export/classes/class.ilExportGUI.php");
224  $exp_gui = new ilExportGUI($this);
225  $exp_gui->addFormat("xml", "", $this, "export");
226  include_once("./Services/Object/classes/class.ilObjectTranslation.php");
227  $ot = ilObjectTranslation::getInstance($this->object->getId());
228  if ($ot->getContentActivated())
229  {
230  $lng->loadLanguageModule("meta");
231  $langs = $ot->getLanguages();
232  foreach ($langs as $l => $ldata)
233  {
234  $exp_gui->addFormat("html_".$l, "HTML (".$lng->txt("meta_l_".$l).")", $this, "exportHTML");
235  }
236  }
237  else
238  {
239  $exp_gui->addFormat("html", "", $this, "exportHTML");
240  }
241 
242  $exp_gui->addFormat("scorm", "", $this, "exportSCORM");
243  $exp_gui->addCustomColumn($lng->txt("cont_public_access"),
244  $this, "getPublicAccessColValue");
245  $exp_gui->addCustomMultiCommand($lng->txt("cont_public_access"),
246  $this, "publishExportFile");
247  $ret = $this->ctrl->forwardCommand($exp_gui);
248  break;
249 
250  case 'ilobjecttranslationgui':
251  $this->addHeaderAction();
252  $this->addLocations(true);
253  //$this->checkPermissionBool("write");
254  //$this->prepareOutput();
255  //$this->tabs_gui->setTabActive('export');
256  $this->setTabs("settings");
257  $this->setSubTabs("obj_multilinguality");
258  include_once("./Services/Object/classes/class.ilObjectTranslationGUI.php");
259  $transgui = new ilObjectTranslationGUI($this);
260  $transgui->setTitleDescrOnlyMode(false);
261  $this->ctrl->forwardCommand($transgui);
262  break;
263 
264 
265  case "ilcommonactiondispatchergui":
266  include_once("Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
268  $this->ctrl->forwardCommand($gui);
269  break;
270 
271 /* case "ilpagemultilanggui":
272  $this->addHeaderAction();
273  $this->addLocations(true);
274  $ilCtrl->setReturn($this, "properties");
275  include_once("./Services/COPage/classes/class.ilPageMultiLangGUI.php");
276  $ml_gui = new ilPageMultiLangGUI("lm", $this->object->getId());
277  $this->setTabs("settings");
278  $this->setSubTabs("cont_multilinguality");
279  $ret = $this->ctrl->forwardCommand($ml_gui);
280  break;*/
281 
282  default:
283  $new_type = $_POST["new_type"]
284  ? $_POST["new_type"]
285  : $_GET["new_type"];
286 
287 
288  if ($cmd == "create" &&
289  !in_array($new_type, array("dbk", "lm")))
290  {
291  //$this->addLocations();
292  switch ($new_type)
293  {
294  case "pg":
295  $this->setTabs();
296  $this->ctrl->setCmdClass("ilLMPageObjectGUI");
297  $ret =& $this->executeCommand();
298  break;
299 
300  case "st":
301  $this->setTabs();
302  $this->ctrl->setCmdClass("ilStructureObjectGUI");
303  $ret =& $this->executeCommand();
304  break;
305  }
306  }
307  else
308  {
309  // creation of new dbk/lm in repository
310  if ($this->getCreationMode() == true &&
311  in_array($new_type, array("dbk", "lm")))
312  {
313  $this->prepareOutput();
314  if ($cmd == "") // this may be due to too big upload files
315  {
316  $cmd = "create";
317  }
318  $cmd .= "Object";
319  $ret =& $this->$cmd();
320  }
321  else
322  {
323  $this->addHeaderAction();
324  $this->addLocations();
325  $ret =& $this->$cmd();
326  }
327  }
328  break;
329  }
330  return $ret;
331  }
Class ilInfoScreenGUI.
setSubTabs($a_active)
Set sub tabs.
$_POST['username']
Definition: cron.php:12
$_GET["client_id"]
getInstance(&$a_content_obj, $a_id=0, $a_halt=true)
$cmd
Definition: sahs_server.php:35
addObserver(&$a_class, $a_method, $a_element)
Class ilStructureObjectGUI.
global $ilCtrl
Definition: ilias.php:18
Export User Interface Class.
addLocations($a_omit_obj_id=false)
display locator
omitLocator($a_omit=true)
prepareOutput()
prepare output
Class ilLMPageObjectGUI.
Class ilObjStyleSheetGUI.
static getInstance($a_obj_id)
Get instance.
getCreationMode()
get creation mode
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
setTabs()
set admin tabs public
addHeaderAction()
Add header action menu.
Class ilObjUserTrackingGUI.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
GUI class for object translation handling.
+ Here is the call graph for this function:

◆ explorer()

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().

837  {
838  global $ilUser, $ilias, $ilCtrl;
839 
840  switch ($this->object->getType())
841  {
842  case "lm":
843  $gui_class = "ilobjlearningmodulegui";
844  break;
845 
846  case "dlb":
847  $gui_class = "ilobjdlbookgui";
848  break;
849  }
850 
851  $ilCtrl->setParameterByClass($gui_class, "active_node", $_GET["active_node"]);
852 
853  $this->tpl = new ilTemplate("tpl.main.html", true, true);
854  // get learning module object
855  //$this->lm_obj =& new ilObjLearningModule($this->ref_id, true);
856 
857  $this->tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
858 
859  //$this->tpl = new ilTemplate("tpl.explorer.html", false, false);
860  $this->tpl->addBlockFile("CONTENT", "content", "tpl.explorer.html");
861  $this->tpl->setVariable("IMG_SPACE", ilUtil::getImagePath("spacer.png", false));
862 
863  require_once ("./Modules/LearningModule/classes/class.ilLMEditorExplorer.php");
864  $exp = new ilLMEditorExplorer($this->ctrl->getLinkTarget($this, "view"),
865  $this->object, $gui_class);
866 
867  $exp->setTargetGet("obj_id");
868  $exp->setExpandTarget($this->ctrl->getLinkTarget($this, "explorer"));
869 
870  if ($_GET["lmmovecopy"] == "1")
871  {
872  $this->proceedDragDrop();
873  }
874 
875 
876  if ($_GET["lmexpand"] == "")
877  {
878  $mtree = new ilTree($this->object->getId());
879  $mtree->setTableNames('lm_tree','lm_data');
880  $mtree->setTreeTablePK("lm_id");
881  $expanded = $mtree->readRootId();
882  }
883  else
884  {
885  $expanded = $_GET["lmexpand"];
886  }
887  if ($_GET["active_node"] != "")
888  {
889  $path = $this->lm_tree->getPathId($_GET["active_node"]);
890  $exp->setForceOpenPath($path);
891 
892  $exp->highlightNode($_GET["active_node"]);
893  }
894  $exp->setExpand($expanded);
895 
896  // build html-output
897  $exp->setOutput(0);
898  $output = $exp->getOutput();
899 
900  // asynchronous output
901  if ($ilCtrl->isAsynch())
902  {
903  echo $output; exit;
904  }
905 
906  include_once("./Services/COPage/classes/class.ilPageEditorGUI.php");
907 
908  /*if (ilPageEditorGUI::_doJSEditing())
909  {
910  //$this->tpl->touchBlock("includejavascript");
911 
912  $IDS = "";
913  for ($i=0;$i<count($exp->iconList);$i++)
914  {
915  if ($i>0) $IDS .= ",";
916  $IDS .= "'".$exp->iconList[$i]."'";
917  }
918  $this->tpl->setVariable("ICONIDS",$IDS);
919  //$this->ctrl->setParameter($this, "lmovecopy", 1);
920  $this->tpl->setVariable("TESTPFAD",$this->ctrl->getLinkTarget($this, "explorer")."&lmmovecopy=1");
921  //$this->tpl->setVariable("POPUPLINK",$this->ctrl->getLinkTarget($this, "popup")."&ptype=movecopytreenode");
922  $this->tpl->setVariable("POPUPLINK",$this->ctrl->getLinkTarget($this, "popup")."&ptype=movecopytreenode");
923  }*/
924 
925  $this->tpl->setCurrentBlock("content");
926  $this->tpl->setVariable("TXT_EXPLORER_HEADER", $this->lng->txt("cont_chap_and_pages"));
927  $this->tpl->setVariable("EXP_REFRESH", $this->lng->txt("refresh"));
928  $this->tpl->setVariable("EXPLORER",$output);
929  $this->ctrl->setParameter($this, "lmexpand", $_GET["lmexpand"]);
930  $this->tpl->setVariable("ACTION", $this->ctrl->getLinkTarget($this, "explorer"));
931  $this->tpl->parseCurrentBlock();
932  $this->tpl->show(false);
933  exit;
934  }
exit
Definition: login.php:54
static getStyleSheetLocation($mode="output", $a_css_name="", $a_css_location="")
get full style sheet file name (path inclusive) of current user
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
proceedDragDrop()
proceed drag and drop operations on pages/chapters
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
special template class to simplify handling of ITX/PEAR
setTableNames($a_table_tree, $a_table_obj_data, $a_table_obj_reference="")
set table names The primary key of the table containing your object_data must be &#39;obj_id&#39; You may use...
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
global $ilUser
Definition: imgupload.php:15
$path
Definition: index.php:22
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ export()

ilObjContentObjectGUI::export ( )

export content object

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

2023  {
2024  require_once("./Modules/LearningModule/classes/class.ilContObjectExport.php");
2025  $cont_exp = new ilContObjectExport($this->object);
2026  $cont_exp->buildExportFile();
2027 // $this->ctrl->redirect($this, "exportList");
2028  }
Export class for content objects.

◆ exportHTML()

ilObjContentObjectGUI::exportHTML ( )

create html package

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

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

2382  {
2383  include_once("./Services/Object/classes/class.ilObjectTranslation.php");
2384  $ot = ilObjectTranslation::getInstance($this->object->getId());
2385  $lang = "";
2386  if ($ot->getContentActivated())
2387  {
2388  $format = explode("_", $_POST["format"]);
2389  $lang = ilUtil::stripSlashes($format[1]);
2390  }
2391  require_once("./Modules/LearningModule/classes/class.ilContObjectExport.php");
2392  $cont_exp = new ilContObjectExport($this->object, "html", $lang);
2393  $cont_exp->buildExportFile();
2394 //echo $this->tpl->get();
2395 // $this->ctrl->redirect($this, "exportList");
2396  }
$_POST['username']
Definition: cron.php:12
Export class for content objects.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static getInstance($a_obj_id)
Get instance.
+ Here is the call graph for this function:

◆ exportObject()

ilObjContentObjectGUI::exportObject ( )

export object

public

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

1181  {
1182  return;
1183  }

◆ exportSCORM()

ilObjContentObjectGUI::exportSCORM ( )

create scorm package

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

2402  {
2403  require_once("./Modules/LearningModule/classes/class.ilContObjectExport.php");
2404  $cont_exp = new ilContObjectExport($this->object, "scorm");
2405  $cont_exp->buildExportFile();
2406 //echo $this->tpl->get();
2407 // $this->ctrl->redirect($this, "exportList");
2408  }
Export class for content objects.

◆ filterHelpChapters()

ilObjContentObjectGUI::filterHelpChapters ( )

Filter help chapters.

Parameters

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

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

3561  {
3562  global $ilCtrl;
3563 
3564  ilSession::set("help_chap", ilUtil::stripSlashes($_POST["help_chap"]));
3565  $ilCtrl->redirect($this, "showExportIDsOverview");
3566  }
$_POST['username']
Definition: cron.php:12
static set($a_var, $a_val)
Set a value.
global $ilCtrl
Definition: ilias.php:18
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
+ Here is the call graph for this function:

◆ filterTooltips()

ilObjContentObjectGUI::filterTooltips ( )

Filter tooltips.

Parameters

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

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

3717  {
3718  global $lng, $ilCtrl;
3719 
3720  ilSession::set("help_tt_comp", ilUtil::stripSlashes($_POST["help_tt_comp"]));
3721  $ilCtrl->redirect($this, "showTooltipList");
3722  }
$_POST['username']
Definition: cron.php:12
static set($a_var, $a_val)
Set a value.
global $ilCtrl
Definition: ilias.php:18
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
+ Here is the call graph for this function:

◆ fixTree()

ilObjContentObjectGUI::fixTree ( )

Fix tree.

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

References ilUtil\sendSuccess().

2139  {
2140  $this->object->fixTree();
2141  ilUtil::sendSuccess($this->lng->txt("cont_tree_fixed"), true);
2142  $this->ctrl->redirect($this, "showMaintenance");
2143  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
+ Here is the call graph for this function:

◆ fixTreeConfirm()

ilObjContentObjectGUI::fixTreeConfirm ( )

confirm screen for tree fixing

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

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

2120  {
2121  $this->setTabs();
2122  $this->setContentSubTabs("maintenance");
2123 
2124  // display confirmation message
2125  include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
2126  $cgui = new ilConfirmationGUI();
2127  $cgui->setFormAction($this->ctrl->getFormAction($this));
2128  $cgui->setHeaderText($this->lng->txt("cont_fix_tree_confirm"));
2129  $cgui->setCancel($this->lng->txt("cancel"), "showMaintenance");
2130  $cgui->setConfirm($this->lng->txt("cont_fix_tree"), "fixTree");
2131 
2132  $this->tpl->setContent($cgui->getHTML());
2133  }
setContentSubTabs($a_active)
Set pages tabs.
setTabs()
set admin tabs public
Confirmation screen class.
+ Here is the call graph for this function:

◆ formatInvalidLinkArray()

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().

2869  {
2870  $row['title'] = ilLMPageObject::_getPresentationTitle($row['page_id'], $this->object->getPageHeader());
2871 
2872  require_once 'Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php';
2874  $actions->setSelectionHeaderClass('small');
2875  $actions->setItemLinkClass('xsmall');
2876  $actions->setListTitle($this->lng->txt('actions'));
2877  $actions->setId($row['page_id']);
2878  $this->ctrl->setParameterByClass('ilLMPageObjectGUI', 'obj_id', $row['page_id']);
2879  $actions->addItem(
2880  $this->lng->txt('edit'),
2881  '',
2882  $this->ctrl->getLinkTargetByClass('ilLMPageObjectGUI', 'edit')
2883  );
2884  $this->ctrl->clearParametersByClass('ilLMPageObjectGUI');
2885  $row['action_html'] = $actions->getHTML();
2886 
2887  return $row;
2888  }
User interface class for advanced drop-down selection lists.
static _getPresentationTitle($a_pg_id, $a_mode=IL_CHAPTER_TITLE, $a_include_numbers=false, $a_time_scheduled_activation=false, $a_force_content=false, $a_lm_id=0, $a_lang="-")
presentation title doesn&#39;t have to be page title, it may be chapter title + page title or chapter tit...
+ Here is the call graph for this function:

◆ getContextPath()

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

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

References $path.

Referenced by pages().

1801  {
1802  $path = "";
1803 
1804  $tmpPath = $this->lm_tree->getPathFull($a_endnode_id, $a_startnode_id);
1805 
1806  // count -1, to exclude the learning module itself
1807  for ($i = 1; $i < (count($tmpPath) - 1); $i++)
1808  {
1809  if ($path != "")
1810  {
1811  $path .= " > ";
1812  }
1813 
1814  $path .= $tmpPath[$i]["title"];
1815  }
1816 
1817  return $path;
1818  }
$path
Definition: index.php:22
+ Here is the caller graph for this function:

◆ getLayoutOption()

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

Save help mapping.

Parameters

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

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

Referenced by ilStructureObjectGUI\initSetPageLayoutForm().

3802  {
3803  global $lng;
3804 
3805  // default layout
3806  $layout = new ilRadioGroupInputGUI($a_txt, $a_var);
3807  if ($a_def_option != "")
3808  {
3809  if (is_file($im = ilUtil::getImagePath("layout_".$a_def_option.".png")))
3810  {
3811  $im_tag = ilUtil::img($im, $a_def_option);
3812  }
3813  $layout->addOption(new ilRadioOption("<table><tr><td>".$im_tag."</td><td><b>".
3814  $lng->txt("cont_lm_default_layout").
3815  "</b>: ".$lng->txt("cont_layout_".$a_def_option).
3816  "</td></tr></table>", ""));
3817  }
3819  {
3820  $im_tag = "";
3821  if (is_file($im = ilUtil::getImagePath("layout_".$l.".png")))
3822  {
3823  $im_tag = ilUtil::img($im, $l);
3824  }
3825  $layout->addOption(new ilRadioOption("<table><tr><td style='padding: 0px 5px 5px;'>".
3826  $im_tag."</td><td style='padding:5px;'><b>".$lng->txt("cont_layout_".$l)."</b>: ".
3827  $lng->txt("cont_layout_".$l."_desc")."</td></tr></table>", $l));
3828  }
3829 
3830  return $layout;
3831  }
This class represents an option in a radio group.
static img($a_src, $a_alt="", $a_width="", $a_height="", $a_border=0, $a_id="")
Build img tag.
getAvailableLayouts()
get all available lm layouts
This class represents a property in a property form.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getMultiLangHeader()

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

Get multi lang header.

Parameters

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

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

Referenced by ilStructureObjectGUI\showHierarchy().

1308  {
1309  global $lng, $ilCtrl;
1310 
1311  // multi language
1312  include_once("./Services/Object/classes/class.ilObjectTranslation.php");
1313  $ot = ilObjectTranslation::getInstance($a_lm_id);
1314  //include_once("./Services/COPage/classes/class.ilPageMultiLang.php");
1315  //$ml = new ilPageMultiLang("lm", $a_lm_id);
1316  if ($ot->getContentActivated())
1317  {
1318  $lng->loadLanguageModule("meta");
1319 
1320  // info
1321  include_once("./Services/COPage/classes/class.ilPageMultiLangGUI.php");
1322  $ml_gui = new ilPageMultiLangGUI("lm", $a_lm_id);
1323  $ml_head = $ml_gui->getMultiLangInfo($_GET["transl"]);
1324 
1325  // language switch
1326  include_once("./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php");
1327  $list = new ilAdvancedSelectionListGUI();
1328  $list->setListTitle($lng->txt("actions"));
1329  $list->setId("copage_act");
1330  $entries = false;
1331  if (!in_array($_GET["transl"], array("", "-")))
1332  {
1333  $l = $ot->getMasterLanguage();
1334  $list->addItem($lng->txt("cont_edit_language_version").": ".
1335  $lng->txt("meta_l_".$l), "",
1336  $ilCtrl->getLinkTarget($a_gui_class, "editMasterLanguage"));
1337  $entries = true;
1338  }
1339 
1340  foreach ($ot->getLanguages() as $al => $lang)
1341  {
1342  if ($_GET["transl"] != $al &&
1343  $al != $ot->getMasterLanguage())
1344  {
1345  $ilCtrl->setParameter($a_gui_class, "totransl", $al);
1346  $list->addItem($lng->txt("cont_edit_language_version").": ".
1347  $lng->txt("meta_l_".$al), "",
1348  $ilCtrl->getLinkTarget($a_gui_class, "switchToLanguage"));
1349  $ilCtrl->setParameter($a_gui_class, "totransl", $_GET["totransl"]);
1350  }
1351  $entries = true;
1352  }
1353 
1354  if ($entries)
1355  {
1356  $ml_head = '<div class="ilFloatLeft">'.$ml_head.'</div><div style="margin: 5px 0;" class="small ilRight">'.$list->getHTML()."</div>";
1357  }
1358 
1359  }
1360 
1361  return $ml_head;
1362  }
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
Page multilinguality GUI class.
User interface class for advanced drop-down selection lists.
static getInstance($a_obj_id)
Get instance.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPropertiesFormValues()

ilObjContentObjectGUI::getPropertiesFormValues ( )

Get values for properties form.

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

References ilObjectTranslation\getInstance().

Referenced by properties().

462  {
463  $values = array();
464 
465  $title = $this->object->getTitle();
466  $description = $this->object->getDescription();
467  include_once("./Services/Object/classes/class.ilObjectTranslation.php");
468  $ot = ilObjectTranslation::getInstance($this->object->getId());
469  if ($ot->getContentActivated())
470  {
471  $title = $ot->getDefaultTitle();
472  $description = $ot->getDefaultDescription();
473  }
474 
475  $values["title"] = $title;
476  $values["description"] = $description;
477  if ($this->object->getOnline())
478  {
479  $values["cobj_online"] = true;
480  }
481  $values["lm_layout"] = $this->object->getLayout();
482  $values["lm_pg_header"] = $this->object->getPageHeader();
483  if ($this->object->isActiveNumbering())
484  {
485  $values["cobj_act_number"] = true;
486  }
487  $values["toc_mode"] = $this->object->getTOCMode();
488  if ($this->object->publicNotes())
489  {
490  $values["cobj_pub_notes"] = true;
491  }
492  if ($this->object->cleanFrames())
493  {
494  $values["cobj_clean_frames"] = true;
495  }
496  if ($this->object->isActiveHistoryUserComments())
497  {
498  $values["cobj_user_comments"] = true;
499  }
500  $values["layout_per_page"] = $this->object->getLayoutPerPage();
501  $values["rating"] = $this->object->hasRating();
502  $values["rating_pages"] = $this->object->hasRatingPages();
503  $values["disable_def_feedback"] = $this->object->getDisableDefaultFeedback();
504 
505  $this->form->setValuesByArray($values);
506  }
static getInstance($a_obj_id)
Get instance.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPublicAccessColValue()

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.

2034  {
2035  global $lng, $ilCtrl;
2036 
2037  $changelink = "<a href='".$ilCtrl->getLinkTarget($this, "editMenuProperties")."'>".$lng->txt("change")."</a>";
2038  if (!$this->object->isActiveLMMenu())
2039  {
2040  $add = "<br />".$lng->txt("cont_download_no_menu")." ".$changelink;
2041  }
2042  else if (!$this->object->isActiveDownloads())
2043  {
2044  $add = "<br />".$lng->txt("cont_download_no_download")." ".$changelink;
2045  }
2046 
2047 
2048  if ($this->object->getPublicExportFile($a_type) == $a_file)
2049  {
2050  return $lng->txt("yes").$add;
2051  }
2052 
2053  return " ";
2054  }
global $ilCtrl
Definition: ilias.php:18

◆ history()

ilObjContentObjectGUI::history ( )

history

public

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

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

2846  {
2847  $this->setTabs("history");
2848 
2849  require_once("./Services/History/classes/class.ilHistoryGUI.php");
2850  $hist_gui =& new ilHistoryGUI($this->object->getId() ,
2851  $this->object->getType());
2852  $hist_html = $hist_gui->getHistoryTable(
2853  $this->ctrl->getParameterArray($this, "history"),
2854  $this->object->isActiveHistoryUserComments()
2855  );
2856 
2857  $this->tpl->setVariable("ADM_CONTENT", $hist_html);
2858  }
This class provides user interface methods for history entries.
getHistoryTable($a_header_params, $a_user_comment=false)
get history table
setTabs()
set admin tabs public
+ Here is the call graph for this function:

◆ ilObjContentObjectGUI()

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, and ilObjectGUI\$lng.

31  {
32  global $lng, $ilCtrl;
33 //echo "<br>ilobjcontobjgui-constructor-id-$a_id";
34  $this->ctrl =& $ilCtrl;
35  $lng->loadLanguageModule("content");
36  $lng->loadLanguageModule("obj");
37  parent::ilObjectGUI($a_data,$a_id,$a_call_by_reference,false);
38  }
global $ilCtrl
Definition: ilias.php:18

◆ importFileObject()

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().

1204  {
1205  global $_FILES, $rbacsystem, $ilDB, $tpl;
1206 
1207  include_once "./Modules/LearningModule/classes/class.ilObjLearningModule.php";
1208 
1209  if (!$rbacsystem->checkAccess("create", $_GET["ref_id"], $_GET["new_type"]))
1210  {
1211  $this->ilias->raiseError($this->lng->txt("no_create_permission"), $this->ilias->error_obj->MESSAGE);
1212  return;
1213  }
1214 
1215  $form = $this->initImportForm();
1216  if ($form->checkInput())
1217  {
1218  // create and insert object in objecttree
1219  include_once("./Modules/LearningModule/classes/class.ilObjContentObject.php");
1220  $newObj = new ilObjContentObject();
1221  $newObj->setType($_GET["new_type"]);
1222  $newObj->setTitle($_FILES["xmldoc"]["name"]);
1223  $newObj->setDescription("");
1224  $newObj->create(true);
1225  $newObj->createReference();
1226  $newObj->putInTree($_GET["ref_id"]);
1227  $newObj->setPermissions($_GET["ref_id"]);
1228  $newObj->notify("new",$_GET["ref_id"],$_GET["parent_non_rbac_id"],$_GET["ref_id"],$newObj->getRefId());
1229 
1230  // create learning module tree
1231  $newObj->createLMTree();
1232 
1233  // import lm from file
1234  $mess = $newObj->importFromZipFile($_FILES["xmldoc"]["tmp_name"], $_FILES["xmldoc"]["name"],
1235  $_POST["validate"]);
1236 
1237  if ($mess == "")
1238  {
1239  ilUtil::sendSuccess($this->lng->txt($this->type."_added"),true);
1240  ilUtil::redirect("ilias.php?ref_id=".$newObj->getRefId().
1241  "&baseClass=ilLMEditorGUI");
1242  }
1243  else
1244  {
1245  $link = '<a href="'."ilias.php?ref_id=".$newObj->getRefId().
1246  "&baseClass=ilLMEditorGUI".'" target="_top">'.$this->lng->txt("btn_next").'</a>';
1247  $tpl->setContent("<br />".$link."<br /><br />".$mess.$link);
1248  }
1249  }
1250  else
1251  {
1252  $form->setValuesByPost();
1253  $tpl->setContent($form->getHtml());
1254  }
1255  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
$_GET["client_id"]
redirection script todo: (a better solution should control the processing via a xml file) ...
Class ilObjContentObject.
static redirect($a_script)
http redirect to other script
+ Here is the call graph for this function:

◆ importObject()

ilObjContentObjectGUI::importObject ( )

display dialogue for importing XML-LeaningObjects

public

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

References ilObjectGUI\createObject().

1191  {
1192  $this->createObject();
1193  return;
1194  }
createObject()
create new object form
+ Here is the call graph for this function:

◆ info()

ilObjContentObjectGUI::info ( )

info permissions

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

References ilObjectGUI\setTabs().

1891  {
1892  $this->setTabs();
1893  $this->infoObject();
1894  }
setTabs()
set admin tabs public
+ Here is the call graph for this function:

◆ initCreationForms()

ilObjContentObjectGUI::initCreationForms (   $a_new_type)
protected

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

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

960  {
961  $forms = array(self::CFORM_NEW => $this->initCreateForm($a_new_type),
962  self::CFORM_IMPORT => $this->initImportForm());
963 
964  return $forms;
965  }
initCreateForm($a_new_type)
Init object creation form.
+ Here is the call graph for this function:

◆ initImportForm()

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().

990  {
991  global $lng, $ilCtrl;
992 
993  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
994  $form = new ilPropertyFormGUI();
995 
996  $new_type = $_POST["new_type"] ? $_POST["new_type"] : $_GET["new_type"];
997  $this->ctrl->setParameter($this, "new_type", $new_type);
998 
999  $form->setTarget(ilFrameTargetInfo::_getFrame("MainContent"));
1000  $form->setTableWidth("600px");
1001 
1002  // import file
1003  $fi = new ilFileInputGUI($this->lng->txt("file"), "xmldoc");
1004  $fi->setSuffixes(array("zip"));
1005  $fi->setRequired(true);
1006  $fi->setSize(30);
1007  $form->addItem($fi);
1008 
1009  // validation
1010  $cb = new ilCheckboxInputGUI($this->lng->txt("cont_validate_file"), "validate");
1011  $cb->setInfo($this->lng->txt(""));
1012  $form->addItem($cb);
1013 
1014  $form->addCommandButton("importFile", $lng->txt("import"));
1015  $form->addCommandButton("cancel", $lng->txt("cancel"));
1016 
1017  $form->setTitle($this->lng->txt("import_".$new_type));
1018  $form->setFormAction($ilCtrl->getFormAction($this));
1019 
1020  return $form;
1021  }
$_POST['username']
Definition: cron.php:12
This class represents a property form user interface.
$_GET["client_id"]
This class represents a file property in a property form.
This class represents a checkbox property in a property form.
global $ilCtrl
Definition: ilias.php:18
setInfo($a_info)
Set Information Text.
static _getFrame($a_class, $a_type='')
Get content frame name.
setSuffixes($a_suffixes)
Set Accepted Suffixes.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initMenuEntryForm()

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().

3022  {
3023  global $lng, $ilCtrl;
3024 
3025  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
3026  $form = new ilPropertyFormGUI();
3027 
3028  // title
3029  $ti = new ilTextInputGUI($this->lng->txt("lm_menu_entry_title"), "title");
3030  $ti->setMaxLength(255);
3031  $ti->setSize(40);
3032  $form->addItem($ti);
3033 
3034  // target
3035  $ta = new ilTextInputGUI($this->lng->txt("lm_menu_entry_target"), "target");
3036  $ta->setMaxLength(255);
3037  $ta->setSize(40);
3038  $form->addItem($ta);
3039 
3040  if ($a_mode == "edit")
3041  {
3042  $this->__initLMMenuEditor();
3043  $this->lmme_obj->readEntry($_REQUEST["menu_entry"]);
3044  $ti->setValue($this->lmme_obj->getTitle());
3045  $ta->setValue($this->lmme_obj->getTarget());
3046  }
3047 
3048  if (isset($_GET["link_ref_id"]))
3049  {
3050  $link_ref_id = (int) $_GET["link_ref_id"];
3051  $obj_type = ilObject::_lookupType($link_ref_id,true);
3052  $obj_id = ilObject::_lookupObjectId($link_ref_id);
3053  $title = ilObject::_lookupTitle($obj_id);
3054 
3055  $target_link = $obj_type."_".$link_ref_id;
3056  $ti->setValue($title);
3057  $ta->setValue($target_link);
3058 
3059  // link ref id
3060  $hi = new ilHiddenInputGUI("link_ref_id");
3061  $hi->setValue($link_ref_id);
3062  $form->addItem($hi);
3063  }
3064 
3065 
3066  // save and cancel commands
3067  if ($a_mode == "create")
3068  {
3069  $form->addCommandButton("saveMenuEntry", $lng->txt("save"));
3070  $form->addCommandButton("editMenuProperties", $lng->txt("cancel"));
3071  $form->setTitle($lng->txt("lm_menu_new_entry"));
3072  }
3073  else
3074  {
3075  $form->addCommandButton("updateMenuEntry", $lng->txt("save"));
3076  $form->addCommandButton("editMenuProperties", $lng->txt("cancel"));
3077  $form->setTitle($lng->txt("lm_menu_edit_entry"));
3078  }
3079 
3080  $form->setFormAction($ilCtrl->getFormAction($this));
3081 
3082  return $form;
3083  }
This class represents a property form user interface.
$_GET["client_id"]
static _lookupTitle($a_id)
lookup object title
static _lookupObjectId($a_ref_id)
lookup object id
global $ilCtrl
Definition: ilias.php:18
This class represents a hidden form property in a property form.
This class represents a text property in a property form.
setMaxLength($a_maxlength)
Set Max Length.
static _lookupType($a_id, $a_reference=false)
lookup object type
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
Definition: index.php:7
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initMenuForm()

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().

715  {
716  global $lng, $ilCtrl;
717 
718  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
719  $form = new ilPropertyFormGUI();
720 
721  // enable menu
722  $menu = new ilCheckboxInputGUI($this->lng->txt("cont_active"), "cobj_act_lm_menu");
723  $menu->setChecked($this->object->isActiveLMMenu());
724  $form->addItem($menu);
725 
726  // toc
727  $toc = new ilCheckboxInputGUI($this->lng->txt("cont_toc"), "cobj_act_toc");
728  $toc->setChecked($this->object->isActiveTOC());
729  $form->addItem($toc);
730 
731  // print view
732  $print = new ilCheckboxInputGUI($this->lng->txt("cont_print_view"), "cobj_act_print");
733  $print->setChecked($this->object->isActivePrintView());
734  $form->addItem($print);
735 
736  // prevent glossary appendix
737  $glo = new ilCheckboxInputGUI($this->lng->txt("cont_print_view_pre_glo"), "cobj_act_print_prev_glo");
738  $glo->setChecked($this->object->isActivePreventGlossaryAppendix());
739  $print->addSubItem($glo);
740 
741  // hide header and footer in print view
742  $hhfp = new ilCheckboxInputGUI($this->lng->txt("cont_hide_head_foot_print"), "hide_head_foot_print");
743  $hhfp->setChecked($this->object->getHideHeaderFooterPrint());
744  $print->addSubItem($hhfp);
745 
746  // downloads
747  $no_download_file_available =
748  " ".$lng->txt("cont_no_download_file_available").
749  " <a href='".$ilCtrl->getLinkTargetByClass("ilexportgui", "")."'>".$lng->txt("change")."</a>";
750  $types = array("xml", "html", "scorm");
751  foreach($types as $type)
752  {
753  if ($this->object->getPublicExportFile($type) != "")
754  {
755  if (is_file($this->object->getExportDirectory($type)."/".
756  $this->object->getPublicExportFile($type)))
757  {
758  $no_download_file_available = "";
759  }
760  }
761  }
762  $dl = new ilCheckboxInputGUI($this->lng->txt("cont_downloads"), "cobj_act_downloads");
763  $dl->setInfo($this->lng->txt("cont_downloads_desc").$no_download_file_available);
764  $dl->setChecked($this->object->isActiveDownloads());
765  $form->addItem($dl);
766 
767  // downloads in public area
768  $pdl = new ilCheckboxInputGUI($this->lng->txt("cont_downloads_public_desc"), "cobj_act_downloads_public");
769  $pdl->setChecked($this->object->isActiveDownloadsPublic());
770  $dl->addSubItem($pdl);
771 
772  $form->addCommandButton("saveMenuProperties", $lng->txt("save"));
773 
774  $form->setTitle($lng->txt("cont_lm_menu"));
775  $form->setFormAction($ilCtrl->getFormAction($this));
776 
777  return $form;
778  }
This class represents a property form user interface.
This class represents a checkbox property in a property form.
global $ilCtrl
Definition: ilias.php:18
setInfo($a_info)
Set Information Text.
setChecked($a_checked)
Set Checked.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initPropertiesForm()

ilObjContentObjectGUI::initPropertiesForm ( )

Init properties form.

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

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

Referenced by properties(), and saveProperties().

368  {
369  global $ilCtrl, $lng;
370 
371  include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
372  $this->form = new ilPropertyFormGUI();
373 
374  // title
375  $ti = new ilTextInputGUI($lng->txt("title"), "title");
376  //$ti->setMaxLength();
377  //$ti->setSize();
378  //$ti->setInfo($lng->txt(""));
379  $ti->setRequired(true);
380  $this->form->addItem($ti);
381 
382  // description
383  $ta = new ilTextAreaInputGUI($lng->txt("desc"), "description");
384  //$ta->setCols();
385  //$ta->setRows();
386  //$ta->setInfo($lng->txt(""));
387  $this->form->addItem($ta);
388 
389  // online
390  $online = new ilCheckboxInputGUI($lng->txt("cont_online"), "cobj_online");
391  $this->form->addItem($online);
392 
393  // default layout
394  $layout = self::getLayoutOption($lng->txt("cont_def_layout"), "lm_layout");
395  $this->form->addItem($layout);
396 
397  // page header
398  $page_header = new ilSelectInputGUI($lng->txt("cont_page_header"), "lm_pg_header");
399  $option = array ("st_title" => $this->lng->txt("cont_st_title"),
400  "pg_title" => $this->lng->txt("cont_pg_title"),
401  "none" => $this->lng->txt("cont_none"));
402  $page_header->setOptions($option);
403  $this->form->addItem($page_header);
404 
405  // chapter numeration
406  $chap_num = new ilCheckboxInputGUI($lng->txt("cont_act_number"), "cobj_act_number");
407  $this->form->addItem($chap_num);
408 
409  // toc mode
410  $toc_mode = new ilSelectInputGUI($lng->txt("cont_toc_mode"), "toc_mode");
411  $option = array ("chapters" => $this->lng->txt("cont_chapters_only"),
412  "pages" => $this->lng->txt("cont_chapters_and_pages"));
413  $toc_mode->setOptions($option);
414  $this->form->addItem($toc_mode);
415 
416  // public notes
417  if (!$this->ilias->getSetting('disable_comments'))
418  {
419  $this->lng->loadLanguageModule("notes");
420  $pub_nodes = new ilCheckboxInputGUI($lng->txt("notes_comments"), "cobj_pub_notes");
421  $pub_nodes->setInfo($this->lng->txt("cont_lm_comments_desc"));
422  $this->form->addItem($pub_nodes);
423  }
424 
425  // layout per page
426  $lpp = new ilCheckboxInputGUI($lng->txt("cont_layout_per_page"), "layout_per_page");
427  $lpp->setInfo($this->lng->txt("cont_layout_per_page_info"));
428  $this->form->addItem($lpp);
429 
430  // synchronize frames
431  $synch = new ilCheckboxInputGUI($lng->txt("cont_synchronize_frames"), "cobj_clean_frames");
432  $synch->setInfo($this->lng->txt("cont_synchronize_frames_desc"));
433  $this->form->addItem($synch);
434 
435  // history user comments
436  $com = new ilCheckboxInputGUI($lng->txt("enable_hist_user_comments"), "cobj_user_comments");
437  $com->setInfo($this->lng->txt("enable_hist_user_comments_desc"));
438  $this->form->addItem($com);
439 
440  // rating
441  $this->lng->loadLanguageModule('rating');
442  $rate = new ilCheckboxInputGUI($this->lng->txt('rating_activate_rating'), 'rating');
443  $rate->setInfo($this->lng->txt('rating_activate_rating_info'));
444  $this->form->addItem($rate);
445  $ratep = new ilCheckboxInputGUI($this->lng->txt('lm_activate_rating'), 'rating_pages');
446  $this->form->addItem($ratep);
447 
448  // disable default feedback for questions
449  $qfeed = new ilCheckboxInputGUI($lng->txt("cont_disable_def_feedback"), "disable_def_feedback");
450  $qfeed->setInfo($this->lng->txt("cont_disable_def_feedback_info"));
451  $this->form->addItem($qfeed);
452 
453  $this->form->setTitle($lng->txt("cont_general_properties"));
454  $this->form->addCommandButton("saveProperties", $lng->txt("save"));
455  $this->form->setFormAction($ilCtrl->getFormAction($this));
456  }
This class represents a selection list property in a property form.
This class represents a property form user interface.
This class represents a checkbox property in a property form.
global $ilCtrl
Definition: ilias.php:18
setInfo($a_info)
Set Information Text.
This class represents a text property in a property form.
redirection script todo: (a better solution should control the processing via a xml file) ...
setOptions($a_options)
Set Options.
This class represents a text area property in a property form.
setRequired($a_required)
Set Required.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initSetPageLayoutForm()

ilObjContentObjectGUI::initSetPageLayoutForm ( )

Init set page layout form.

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

References $_POST, $ilCtrl, and ilObjectGUI\$lng.

Referenced by setPageLayout().

3874  {
3875  global $lng, $ilCtrl;
3876 
3877  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
3878  $this->form = new ilPropertyFormGUI();
3879 
3880  if (is_array($_POST["id"]))
3881  {
3882  foreach ($_POST["id"] as $id)
3883  {
3884  $hi = new ilHiddenInputGUI("id[]");
3885  $hi->setValue($id);
3886  $this->form->addItem($hi);
3887  }
3888  }
3889  $layout = self::getLayoutOption($lng->txt("cont_layout"), "layout",
3890  $this->object->getLayout());
3891  $this->form->addItem($layout);
3892 
3893  $this->form->addCommandButton("savePageLayout", $lng->txt("save"));
3894  $this->form->addCommandButton("pages", $lng->txt("cancel"));
3895 
3896  $this->form->setTitle($lng->txt("cont_set_layout"));
3897  $this->form->setFormAction($ilCtrl->getFormAction($this));
3898 
3899  }
$_POST['username']
Definition: cron.php:12
This class represents a property form user interface.
global $ilCtrl
Definition: ilias.php:18
This class represents a hidden form property in a property form.
+ Here is the caller graph for this function:

◆ initStylePropertiesForm()

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().

595  {
596  global $ilCtrl, $lng, $ilTabs, $ilSetting;
597 
598  $lng->loadLanguageModule("style");
599  $this->setTabs();
600  $ilTabs->setTabActive("settings");
601  $this->setSubTabs("cont_style");
602 
603  include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
604  $this->form = new ilPropertyFormGUI();
605 
606  $fixed_style = $ilSetting->get("fixed_content_style_id");
607  $style_id = $this->object->getStyleSheetId();
608 
609  if ($fixed_style > 0)
610  {
611  $st = new ilNonEditableValueGUI($lng->txt("cont_current_style"));
612  $st->setValue(ilObject::_lookupTitle($fixed_style)." (".
613  $this->lng->txt("global_fixed").")");
614  $this->form->addItem($st);
615  }
616  else
617  {
618  $st_styles = ilObjStyleSheet::_getStandardStyles(true, false,
619  $_GET["ref_id"]);
620 
621  $st_styles[0] = $this->lng->txt("default");
622  ksort($st_styles);
623 
624  if ($style_id > 0)
625  {
626  // individual style
627  if (!ilObjStyleSheet::_lookupStandard($style_id))
628  {
629  $st = new ilNonEditableValueGUI($lng->txt("cont_current_style"));
630  $st->setValue(ilObject::_lookupTitle($style_id));
631  $this->form->addItem($st);
632 
633 //$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "edit"));
634 
635  // delete command
636  $this->form->addCommandButton("editStyle",
637  $lng->txt("cont_edit_style"));
638  $this->form->addCommandButton("deleteStyle",
639  $lng->txt("cont_delete_style"));
640 //$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "delete"));
641  }
642  }
643 
644  if ($style_id <= 0 || ilObjStyleSheet::_lookupStandard($style_id))
645  {
646  $style_sel = ilUtil::formSelect ($style_id, "style_id",
647  $st_styles, false, true);
648  $style_sel = new ilSelectInputGUI($lng->txt("cont_current_style"), "style_id");
649  $style_sel->setOptions($st_styles);
650  $style_sel->setValue($style_id);
651  $this->form->addItem($style_sel);
652 //$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "create"));
653  $this->form->addCommandButton("saveStyleSettings",
654  $lng->txt("save"));
655  $this->form->addCommandButton("createStyle",
656  $lng->txt("sty_create_ind_style"));
657  }
658  }
659  $this->form->setTitle($lng->txt("cont_style"));
660  $this->form->setFormAction($ilCtrl->getFormAction($this));
661  }
setSubTabs($a_active)
Set sub tabs.
This class represents a selection list property in a property form.
This class represents a property form user interface.
$_GET["client_id"]
static _lookupTitle($a_id)
lookup object title
global $ilCtrl
Definition: ilias.php:18
static formSelect($selected, $varname, $options, $multiple=false, $direct_text=false, $size="0", $style_class="", $attribs="", $disabled=false)
Builds a select form field with options and shows the selected option first.
_getStandardStyles($a_exclude_default_style=false, $a_include_deactivated=false, $a_scope=0)
Get standard styles.
setOptions($a_options)
Set Options.
_lookupStandard($a_id)
Lookup standard flag.
This class represents a non editable value in a property form.
global $ilSetting
Definition: privfeed.php:40
setTabs()
set admin tabs public
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insertChapter()

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().

3317  {
3318  global $ilCtrl, $lng;
3319 
3320  include_once("./Modules/LearningModule/classes/class.ilChapterHierarchyFormGUI.php");
3321 
3324 
3325  if (!ilChapterHierarchyFormGUI::getPostFirstChild()) // insert after node id
3326  {
3327  $parent_id = $this->lm_tree->getParentId($node_id);
3328  $target = $node_id;
3329  }
3330  else // insert as first child
3331  {
3332  $parent_id = $node_id;
3333  $target = IL_FIRST_NODE;
3334  }
3335 
3336  for ($i = 1; $i <= $num; $i++)
3337  {
3338  $chap = new ilStructureObject($this->object);
3339  $chap->setType("st");
3340  $chap->setTitle($lng->txt("cont_new_chap"));
3341  $chap->setLMId($this->object->getId());
3342  $chap->create();
3343  ilLMObject::putInTree($chap, $parent_id, $target);
3344  }
3345 
3346  $ilCtrl->redirect($this, "chapters");
3347  }
static getPostMulti()
Get multi number of _POST input.
static getPostNodeId()
Get node ID of _POST input.
global $ilCtrl
Definition: ilias.php:18
static getPostFirstChild()
Should node be inserted as first child of target node (true) or as successor (false) ...
const IL_FIRST_NODE
Definition: class.ilTree.php:5
static putInTree($a_obj, $a_parent_id="", $a_target_node_id="")
put this object into content object tree
Class ilStructreObject.
+ Here is the call graph for this function:

◆ insertChapterClip()

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().

3353  {
3354  global $ilUser, $ilCtrl, $ilLog;
3355 
3356  include_once("./Modules/LearningModule/classes/class.ilChapterHierarchyFormGUI.php");
3357 
3360 
3361  $ilLog->write("InsertChapterClip, num: $num, node_id: $node_id, ".
3362  " getPostFirstChild ".ilChapterHierarchyFormGUI::getPostFirstChild());
3363 
3364  if (!$first_child) // insert after node id
3365  {
3366  $parent_id = $this->lm_tree->getParentId($node_id);
3367  $target = $node_id;
3368  }
3369  else // insert as first child
3370  {
3371  $parent_id = $node_id;
3372  $target = IL_FIRST_NODE;
3373  }
3374 
3375  // copy and paste
3376  $chapters = $ilUser->getClipboardObjects("st", true);
3377  $copied_nodes = array();
3378  foreach ($chapters as $chap)
3379  {
3380  $ilLog->write("Call pasteTree, Target LM: ".$this->object->getId().", Chapter ID: ".$chap["id"]
3381  .", Parent ID: ".$parent_id.", Target: ".$target);
3382  $cid = ilLMObject::pasteTree($this->object, $chap["id"], $parent_id,
3383  $target, $chap["insert_time"], $copied_nodes,
3384  (ilEditClipboard::getAction() == "copy"));
3385  $target = $cid;
3386  }
3387  ilLMObject::updateInternalLinks($copied_nodes);
3388 
3389  if (ilEditClipboard::getAction() == "cut")
3390  {
3391  $ilUser->clipboardDeleteObjectsOfType("pg");
3392  $ilUser->clipboardDeleteObjectsOfType("st");
3394  }
3395 
3396  $this->object->checkTree();
3397  $ilCtrl->redirect($this, "chapters");
3398  }
static updateInternalLinks($a_copied_nodes, $a_parent_type="lm")
Update internal links, after multiple pages have been copied.
static getPostNodeId()
Get node ID of _POST input.
static pasteTree($a_target_lm, $a_item_id, $a_parent_id, $a_target, $a_insert_time, &$a_copied_nodes, $a_as_copy=false, $a_source_lm=null)
Paste item (tree) from clipboard to current lm.
global $ilCtrl
Definition: ilias.php:18
static getPostFirstChild()
Should node be inserted as first child of target node (true) or as successor (false) ...
const IL_FIRST_NODE
Definition: class.ilTree.php:5
global $ilUser
Definition: imgupload.php:15
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ linkChecker()

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().

2891  {
2892  global $ilias, $ilUser, $tpl;
2893 
2894  $this->__initLinkChecker();
2895 
2896  $this->setTabs();
2897  $this->setContentSubTabs("link_check");
2898 
2899  require_once './Services/LinkChecker/classes/class.ilLinkCheckerTableGUI.php';
2900 
2901  $toolbar = new ilToolbarGUI();
2902 
2903  // #13684
2904  include_once "Services/Cron/classes/class.ilCronManager.php";
2905  if(ilCronManager::isJobActive("lm_link_check"))
2906  {
2907  include_once './Services/LinkChecker/classes/class.ilLinkCheckNotify.php';
2908  include_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
2909 
2910  $chb = new ilCheckboxInputGUI($this->lng->txt('link_check_message_a'), 'link_check_message');
2911  $chb->setValue(1);
2912  $chb->setChecked((bool)ilLinkCheckNotify::_getNotifyStatus($ilUser->getId(),$this->object->getId()));
2913  $chb->setOptionTitle($this->lng->txt('link_check_message_b'));
2914 
2915  $toolbar->addInputItem($chb);
2916  $toolbar->addFormButton($this->lng->txt('save'), 'saveLinkCheck');
2917  $toolbar->setFormAction($this->ctrl->getLinkTarget($this, 'saveLinkCheck'));
2918  }
2919 
2920  $tgui = new ilLinkCheckerTableGUI($this, 'linkChecker');
2921  $tgui->setLinkChecker($this->link_checker_obj)
2922  ->setRowHandler($this)
2923  ->setRefreshButton($this->lng->txt('refresh'), 'refreshLinkCheck');
2924 
2925  return $tpl->setContent($tgui->prepareHTML()->getHTML().$toolbar->getHTML());
2926  }
This class represents a checkbox property in a property form.
class ilLinkCheckerTableGUI
setValue($a_value)
Set Value.
setContentSubTabs($a_active)
Set pages tabs.
global $ilUser
Definition: imgupload.php:15
_getNotifyStatus($a_usr_id, $a_obj_id)
setTabs()
set admin tabs public
static isJobActive($a_job_id)
Check if given job is currently active.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ listLinks()

ilObjContentObjectGUI::listLinks ( )

List all broken links.

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

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

1541  {
1542  global $tpl;
1543 
1544  $this->setTabs();
1545  $this->setContentSubTabs("internal_links");
1546 
1547  include_once("./Modules/LearningModule/classes/class.ilLinksTableGUI.php");
1548  $table_gui = new ilLinksTableGUI($this, "listLinks",
1549  $this->object->getId(), $this->object->getType());
1550 
1551  $tpl->setContent($table_gui->getHTML());
1552  }
TableGUI class for (broken) links in learning module.
setContentSubTabs($a_active)
Set pages tabs.
setTabs()
set admin tabs public
+ Here is the call graph for this function:

◆ listQuestions()

ilObjContentObjectGUI::listQuestions ( )

List questions.

Parameters

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

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

2514  {
2515  global $tpl;
2516 
2517  $this->setTabs();
2518  $this->setContentSubTabs("export_ids");
2519 
2520  include_once("./Modules/LearningModule/classes/class.ilLMQuestionListTableGUI.php");
2521  $table = new ilLMQuestionListTableGUI($this, "listQuestions", $this->object);
2522  $tpl->setContent($table->getHTML());
2523 
2524  }
setContentSubTabs($a_active)
Set pages tabs.
setTabs()
set admin tabs public
+ Here is the call graph for this function:

◆ moveChapter()

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().

1938  {
1939  if(!isset($_POST["id"]))
1940  {
1941  $this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
1942  }
1943 //echo "Hallo::"; exit;
1944  if(count($_POST["id"]) > 1)
1945  {
1946  $this->ilias->raiseError($this->lng->txt("cont_select_max_one_item"),$this->ilias->error_obj->MESSAGE);
1947  }
1948 
1949  if(count($_POST["id"]) == 1 && $_POST["id"][0] == IL_FIRST_NODE)
1950  {
1951  $this->ilias->raiseError($this->lng->txt("cont_select_item"), $this->ilias->error_obj->MESSAGE);
1952  }
1953 
1954  // SAVE POST VALUES
1955  ilEditClipboard::storeContentObject("st", $_POST["id"][0], "move");
1956 
1957  ilUtil::sendInfo($this->lng->txt("cont_chap_select_target_now"), true);
1958 
1959  if ($a_parent_subobj_id == 0)
1960  {
1961  $this->ctrl->redirect($this, "chapters");
1962  }
1963  }
$_POST['username']
Definition: cron.php:12
storeContentObject($a_type, $a_id, $a_action="cut")
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
const IL_FIRST_NODE
Definition: class.ilTree.php:5
redirection script todo: (a better solution should control the processing via a xml file) ...
+ Here is the call graph for this function:

◆ movePage()

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().

1986  {
1987  global $ilUser;
1988 
1989  if(!isset($_POST["id"]))
1990  {
1991  $this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
1992  }
1993 
1994  ilUtil::sendInfo($this->lng->txt("cont_selected_items_have_been_cut"), true);
1995 
1996  $items = ilUtil::stripSlashesArray($_POST["id"]);
1997  ilLMObject::clipboardCut($this->object->getId(), $items);
1999 
2000  $this->ctrl->redirect($this, "pages");
2001  }
$_POST['username']
Definition: cron.php:12
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
clipboardCut($a_cont_obj_id, $a_ids)
Copy a set of chapters/pages into the clipboard.
redirection script todo: (a better solution should control the processing via a xml file) ...
static stripSlashesArray($a_arr, $a_strip_html=true, $a_allow="")
Strip slashes from array.
global $ilUser
Definition: imgupload.php:15
+ Here is the call graph for this function:

◆ owner()

ilObjContentObjectGUI::owner ( )

show owner of content object

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

References ilObjectGUI\setTabs().

1911  {
1912  $this->setTabs();
1913  $this->ownerObject();
1914  }
setTabs()
set admin tabs public
+ Here is the call graph for this function:

◆ pages()

ilObjContentObjectGUI::pages ( )

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

References $ilCtrl, $lm_set, 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().

1369  {
1370  global $tree, $tpl, $ilToolbar, $ilCtrl, $lng;
1371 
1372  $this->setTabs();
1373  $this->setContentSubTabs("pages");
1374 
1375  if (!false)
1376  {
1377  $ilCtrl->setParameter($this, "backcmd", "pages");
1378  $ilCtrl->setParameterByClass("illmpageobjectgui", "new_type", "pg");
1379  $ilToolbar->addButton($lng->txt("pg_add"),
1380  $ilCtrl->getLinkTargetByClass("illmpageobjectgui", "create"));
1381  $ilCtrl->setParameterByClass("illmpageobjectgui", "new_type", "");
1382 
1383  include_once("./Modules/LearningModule/classes/class.ilLMPagesTableGUI.php");
1384  $t = new ilLMPagesTableGUI($this, "pages", $this->object);
1385  $tpl->setContent($t->getHTML());
1386 
1387  return;
1388  }
1389 
1390 
1391  $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.all_pages.html", "Modules/LearningModule");
1392  $num = 0;
1393 
1394  $this->tpl->setCurrentBlock("form");
1395  $this->ctrl->setParameter($this, "backcmd", "pages");
1396  $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
1397  $this->tpl->setVariable("HEADER_TEXT", $this->lng->txt("cont_pages"));
1398  $this->tpl->setVariable("CONTEXT", $this->lng->txt("cont_usage"));
1399  $this->tpl->setVariable("CHECKBOX_TOP", IL_FIRST_NODE);
1400 
1401  $cnt = 0;
1402  $pages = ilLMPageObject::getPageList($this->object->getId());
1403  foreach ($pages as $page)
1404  {
1405  $this->tpl->setCurrentBlock("table_row");
1406 
1407  // check activation
1408  include_once("./Modules/LearningModule/classes/class.ilLMPage.php");
1409  $lm_set = new ilSetting("lm");
1410  $active = ilLMPage::_lookupActive($page["obj_id"], $this->object->getType(),
1411  $lm_set->get("time_scheduled_page_activation"));
1412 
1413  // is page scheduled?
1414  $img_sc = ($lm_set->get("time_scheduled_page_activation") &&
1415  ilLMPage::_isScheduledActivation($page["obj_id"], $this->object->getType()))
1416  ? "_sc"
1417  : "";
1418 
1419  if (!$active)
1420  {
1421  $this->tpl->setVariable("IMG_OBJ", ilUtil::getImagePath("icon_pg_d".$img_sc.".png"));
1422  $this->tpl->setVariable("IMG_ALT",
1423  $this->lng->txt("cont_page_deactivated"));
1424  }
1425  else
1426  {
1428  $this->object->getType()))
1429  {
1430  $this->tpl->setVariable("IMG_OBJ", ilUtil::getImagePath("icon_pg_del".$img_sc.".png"));
1431  $this->tpl->setVariable("IMG_ALT",
1432  $this->lng->txt("cont_page_deactivated_elements"));
1433  }
1434  else
1435  {
1436  $this->tpl->setVariable("IMG_OBJ", ilUtil::getImagePath("icon_pg".$img_sc.".png"));
1437  $this->tpl->setVariable("IMG_ALT",
1438  $this->lng->txt("pg"));
1439  }
1440  }
1441 
1442  // color changing
1443  $css_row = ilUtil::switchColor($cnt++,"tblrow1","tblrow2");
1444 
1445  // checkbox
1446  $this->tpl->setVariable("CHECKBOX_ID", $page["obj_id"]);
1447  $this->tpl->setVariable("CSS_ROW", $css_row);
1448 
1449  // link
1450  $this->ctrl->setParameter($this, "backcmd", "");
1451  $this->ctrl->setParameterByClass("ilLMPageObjectGUI", "obj_id", $page["obj_id"]);
1452 //echo "<br>:".$this->ctrl->getLinkTargetByClass("ilLMPageObjectGUI", "view").":";
1453  $this->tpl->setVariable("LINK_TARGET",
1454  $this->ctrl->getLinkTargetByClass("ilLMPageObjectGUI", "edit"));
1455 
1456  // title
1457  $this->tpl->setVariable("TEXT_CONTENT", $page["title"]);
1458 
1459  // context
1460  if ($this->lm_tree->isInTree($page["obj_id"]))
1461  {
1462  $path_str = $this->getContextPath($page["obj_id"]);
1463  }
1464  else
1465  {
1466  $path_str = "---";
1467  }
1468 
1469  // check whether page is header or footer
1470  $add_str = "";
1471  if ($page["obj_id"] == $this->object->getHeaderPage())
1472  {
1473  $add_str = " <b>(".$this->lng->txt("cont_header").")</b>";
1474  }
1475  if ($page["obj_id"] == $this->object->getFooterPage())
1476  {
1477  $add_str = " <b>(".$this->lng->txt("cont_footer").")</b>";
1478  }
1479 
1480  $this->tpl->setVariable("TEXT_CONTEXT", $path_str.$add_str);
1481 
1482 
1483  $this->tpl->parseCurrentBlock();
1484  }
1485  if($cnt == 0)
1486  {
1487  $this->tpl->setCurrentBlock("notfound");
1488  $this->tpl->setVariable("NUM_COLS", 4);
1489  $this->tpl->setVariable("TXT_OBJECT_NOT_FOUND", $this->lng->txt("obj_not_found"));
1490  $this->tpl->parseCurrentBlock();
1491  }
1492  else
1493  {
1494  $acts = array("delete" => "delete", "movePage" => "movePage", "copyPage" => "copyPage",
1495  "selectHeader" => "selectHeader", "selectFooter" => "selectFooter",
1496  "activatePages" => "cont_de_activate");
1498  ilEditClipboard::getAction() == "copy")
1499  {
1500  $acts["pastePage"] = "pastePage";
1501  }
1502 
1503  /*
1504  if (ilEditClipboard::getContentObjectType() == "st")
1505  {
1506  $acts["pasteChapter"] = "pasteChapter";
1507  }*/
1508  $this->tpl->setVariable("NUM_COLS", 4);
1509  $this->showActions($acts);
1510 
1511  // SHOW VALID ACTIONS
1512  /*
1513  $this->tpl->setCurrentBlock("operation_btn");
1514  $this->tpl->setVariable("BTN_NAME", "delete");
1515  $this->tpl->setVariable("BTN_VALUE", $this->lng->txt("delete"));
1516  $this->tpl->parseCurrentBlock();*/
1517 
1518  }
1519 
1520  // SHOW POSSIBLE SUB OBJECTS
1521  $this->tpl->setVariable("NUM_COLS", 4);
1522  //$this->showPossibleSubObjects("st");
1523  $subobj = array("pg");
1524  $opts = ilUtil::formSelect(12,"new_type",$subobj);
1525  $this->tpl->setCurrentBlock("add_object");
1526  $this->tpl->setVariable("SELECT_OBJTYPE", $opts);
1527  $this->tpl->setVariable("BTN_NAME", "create");
1528  $this->tpl->setVariable("TXT_ADD", $this->lng->txt("create"));
1529  $this->tpl->parseCurrentBlock();
1530 
1531 
1532  $this->tpl->setCurrentBlock("form");
1533  $this->tpl->parseCurrentBlock();
1534 
1535  }
ILIAS Setting Class.
showActions($a_actions)
show possible action (form buttons)
global $ilCtrl
Definition: ilias.php:18
static _lookupActive($a_id, $a_parent_type, $a_check_scheduled_activation=false, $a_lang="-")
lookup activation status
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static formSelect($selected, $varname, $options, $multiple=false, $direct_text=false, $size="0", $style_class="", $attribs="", $disabled=false)
Builds a select form field with options and shows the selected option first.
const IL_FIRST_NODE
Definition: class.ilTree.php:5
getPageList($lm_id)
static
static _lookupContainsDeactivatedElements($a_id, $a_parent_type, $a_lang="-")
lookup whether page contains deactivated elements
static _isScheduledActivation($a_id, $a_parent_type, $a_lang="-")
Check whether page is activated by time schedule.
setContentSubTabs($a_active)
Set pages tabs.
$lm_set
static switchColor($a_num, $a_css1, $a_css2)
switches style sheets for each even $a_num (used for changing colors of different result rows) ...
getContextPath($a_endnode_id, $a_startnode_id=1)
get context path in content object tree
setTabs()
set admin tabs public
TableGUI class for all pages of a learning module.
+ Here is the call graph for this function:

◆ pasteChapter()

ilObjContentObjectGUI::pasteChapter (   $a_parent_subobj_id = 0)

paste chapter

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

References insertChapterClip().

1978  {
1979  return $this->insertChapterClip(false);
1980  }
insertChapterClip()
Insert Chapter from clipboard.
+ Here is the call graph for this function:

◆ pastePage()

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().

1590  {
1592  {
1593  $this->ilias->raiseError($this->lng->txt("no_page_in_clipboard"),$this->ilias->error_obj->MESSAGE);
1594  }
1595 
1596  // paste selected object
1598 
1599  // copy page, if action is copy
1600  if (ilEditClipboard::getAction() == "copy")
1601  {
1602  // check wether page belongs to lm
1604  == $this->object->getID())
1605  {
1606  $lm_page = new ilLMPageObject($this->object, $id);
1607  $new_page =& $lm_page->copy();
1608  $id = $new_page->getId();
1609  }
1610  else
1611  {
1612  // get page from other content object into current content object
1614  $lm_obj =& $this->ilias->obj_factory->getInstanceByObjId($lm_id);
1615  $lm_page = new ilLMPageObject($lm_obj, $id);
1616  $copied_nodes = array();
1617  $new_page =& $lm_page->copyToOtherContObject($this->object, $copied_nodes);
1618  $id = $new_page->getId();
1619  ilLMObject::updateInternalLinks($copied_nodes);
1620  }
1621  }
1622 
1623  // cut is not be possible in "all pages" form yet
1624  if (ilEditClipboard::getAction() == "cut")
1625  {
1626  // check wether page belongs not to lm
1628  != $this->object->getID())
1629  {
1631  $lm_obj =& $this->ilias->obj_factory->getInstanceByObjId($lm_id);
1632  $lm_page = new ilLMPageObject($lm_obj, $id);
1633  $lm_page->setLMId($this->object->getID());
1634  $lm_page->update();
1635  $page =& $lm_page->getPageObject();
1636  $page->buildDom();
1637  $page->setParentId($this->object->getID());
1638  $page->update();
1639  }
1640  }
1641 
1642 
1644  $this->ctrl->redirect($this, "pages");
1645  }
static updateInternalLinks($a_copied_nodes, $a_parent_type="lm")
Update internal links, after multiple pages have been copied.
Class ilLMPageObject.
_lookupContObjID($a_id)
get learning module / digibook id for lm object
redirection script todo: (a better solution should control the processing via a xml file) ...
+ Here is the call graph for this function:

◆ perm()

ilObjContentObjectGUI::perm ( )

edit permissions

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

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

1869  {
1870  $this->setTabs();
1871 
1872  $this->setFormAction("addRole", $this->ctrl->getLinkTarget($this, "addRole"));
1873  $this->setFormAction("permSave", $this->ctrl->getLinkTarget($this, "permSave"));
1874  $this->permObject();
1875  }
setFormAction($a_cmd, $a_formaction)
set specific form action for command
setTabs()
set admin tabs public
+ Here is the call graph for this function:

◆ permSave()

ilObjContentObjectGUI::permSave ( )

save permissions

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

References ilObjectGUI\setReturnLocation().

1882  {
1883  $this->setReturnLocation("permSave", $this->ctrl->getLinkTarget($this, "perm"));
1884  $this->permSaveObject();
1885  }
setReturnLocation($a_cmd, $a_location)
set specific return location for command
+ Here is the call graph for this function:

◆ popup()

ilObjContentObjectGUI::popup ( )

popup window for wysiwyg editor

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

References $_GET, and exit.

940  {
941  include_once "./Services/COPage/classes/class.ilWysiwygUtil.php";
942  $popup = new ilWysiwygUtil();
943  $popup->show($_GET["ptype"]);
944  exit;
945  }
exit
Definition: login.php:54
$_GET["client_id"]

◆ proceedDragDrop()

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().

951  {
952  global $ilCtrl;
953 
954  $this->object->executeDragDrop($_POST["il_hform_source_id"], $_POST["il_hform_target_id"],
955  $_POST["il_hform_fc"], $_POST["il_hform_as_subitem"]);
956  $ilCtrl->redirect($this, "chapters");
957  }
$_POST['username']
Definition: cron.php:12
global $ilCtrl
Definition: ilias.php:18
+ Here is the caller graph for this function:

◆ properties()

ilObjContentObjectGUI::properties ( )

edit properties form

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

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

Referenced by ilObjLearningModuleGUI\view().

342  {
343  global $lng;
344 
345  $lng->loadLanguageModule("style");
346  $this->setTabs("settings");
347  $this->setSubTabs("cont_general_properties");
348 
349  // lm properties
350  $this->initPropertiesForm();
351  $this->getPropertiesFormValues();
352 
353  if($this->object->getType() == "lm")
354  {
355  // Edit ecs export settings
356  include_once 'Modules/LearningModule/classes/class.ilECSLearningModuleSettings.php';
357  $ecs = new ilECSLearningModuleSettings($this->object);
358  $ecs->addSettingsToForm($this->form, 'lm');
359  }
360 
361  $this->tpl->setContent($this->form->getHTML());
362  }
setSubTabs($a_active)
Set sub tabs.
getPropertiesFormValues()
Get values for properties form.
Class ilECSLearningModuleSettings.
initPropertiesForm()
Init properties form.
setTabs()
set admin tabs public
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ publishExportFile()

ilObjContentObjectGUI::publishExportFile (   $a_files)

download export file

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

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

2062  {
2063  global $ilCtrl;
2064 
2065  if(!isset($a_files))
2066  {
2067  ilUtil::sendFailure($this->lng->txt("no_checkbox"), true);
2068  }
2069  else
2070  {
2071  foreach ($a_files as $f)
2072  {
2073  $file = explode(":", $f);
2074  $export_dir = $this->object->getExportDirectory($file[0]);
2075 
2076  if ($this->object->getPublicExportFile($file[0]) ==
2077  $file[1])
2078  {
2079  $this->object->setPublicExportFile($file[0], "");
2080  }
2081  else
2082  {
2083  $this->object->setPublicExportFile($file[0], $file[1]);
2084  }
2085  }
2086  $this->object->update();
2087  }
2088  $ilCtrl->redirectByClass("ilexportgui");
2089  }
print $file
global $ilCtrl
Definition: ilias.php:18
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
+ Here is the call graph for this function:

◆ redrawHeaderAction()

ilObjContentObjectGUI::redrawHeaderAction ( )

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

4087  {
4088  // #12281
4089  return parent::redrawHeaderActionObject();
4090  }

◆ refreshLinkCheck()

ilObjContentObjectGUI::refreshLinkCheck ( )

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

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

2956  {
2957  $this->__initLinkChecker();
2958 
2959  if(!$this->link_checker_obj->checkPear())
2960  {
2961  ilUtil::sendFailure($this->lng->txt('missing_pear_library'));
2962  $this->linkChecker();
2963 
2964  return false;
2965  }
2966 
2967  $this->link_checker_obj->checkLinks();
2968  ilUtil::sendSuccess($this->lng->txt('link_checker_refreshed'));
2969 
2970  $this->linkChecker();
2971 
2972  return true;
2973  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
+ Here is the call graph for this function:

◆ removeLMGlossary()

ilObjContentObjectGUI::removeLMGlossary ( )

Remove lm glossary.

Parameters

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

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

4048  {
4049  global $ilCtrl, $lng;
4050 
4051  $this->object->removeAutoGlossary((int) $_GET["glo_id"]);
4052  $this->object->update();
4053 
4054  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
4055  $ilCtrl->redirect($this, "editGlossaries");
4056  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
+ Here is the call graph for this function:

◆ saveAllTitles()

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().

3305  {
3306  global $ilCtrl;
3307 
3308  ilLMObject::saveTitles($this->object, ilUtil::stripSlashesArray($_POST["title"]), $_GET["transl"]);
3309 
3310  $ilCtrl->redirect($this, "chapters");
3311  }
$_POST['username']
Definition: cron.php:12
$_GET["client_id"]
static saveTitles($a_lm, $a_titles, $a_lang="-")
Save titles for lm objects.
global $ilCtrl
Definition: ilias.php:18
static stripSlashesArray($a_arr, $a_strip_html=true, $a_allow="")
Strip slashes from array.
+ Here is the call graph for this function:

◆ saveBibItem()

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().

1166  {
1167  $this->setTabs();
1168 
1169  // questionable workaround to make this old stuff work
1170  $this->ctrl->setParameter($this, ilCtrl::IL_RTOKEN_NAME, $this->ctrl->getRequestToken());
1171 
1172  $this->saveBibItemObject($this->ctrl->getLinkTarget($this));
1173  }
const IL_RTOKEN_NAME
saveBibItemObject($a_target="")
save bib item (admin call)
setTabs()
set admin tabs public
+ Here is the call graph for this function:

◆ saveBibItemObject()

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().

1142  {
1143  include_once "./Modules/LearningModule/classes/class.ilBibItemGUI.php";
1144  $bib_gui =& new ilBibItemGUI();
1145  $bib_gui->setObject($this->object);
1146  $bibItemIndex = $_POST["bibItemIndex"] ? $_POST["bibItemIndex"] : $_GET["bibItemIndex"];
1147  $bibItemIndex *= 1;
1148  if ($bibItemIndex < 0)
1149  {
1150  $bibItemIndex = 0;
1151  }
1152  $bibItemIndex = $bib_gui->save($bibItemIndex);
1153 
1154  if ($a_target == "")
1155  {
1156  $a_target = "adm_object.php?ref_id=" . $this->object->getRefId();
1157  }
1158 
1159  $bib_gui->edit("ADM_CONTENT", "adm_content", $a_target, $bibItemIndex);
1160  }
$_POST['username']
Definition: cron.php:12
$_GET["client_id"]
Class ilBibItemGUI.
+ Here is the caller graph for this function:

◆ saveExportIds()

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().

3573  {
3574  global $ilCtrl, $lng;
3575 
3576  // check all export ids
3577  $ok = true;
3578  if (is_array($_POST["exportid"]))
3579  {
3580  foreach ($_POST["exportid"] as $pg_id => $exp_id)
3581  {
3582  if ($exp_id != "" && !preg_match("/^([a-zA-Z]+)[0-9a-zA-Z_]*$/",
3583  trim($exp_id)))
3584  {
3585  $ok = false;
3586  }
3587  }
3588  }
3589  if (!$ok)
3590  {
3591  ilUtil::sendFailure($lng->txt("cont_exp_ids_not_resp_format1").": a-z, A-Z, 0-9, '_'. ".
3592  $lng->txt("cont_exp_ids_not_resp_format3")." ".
3593  $lng->txt("cont_exp_ids_not_resp_format2"));
3594  $this->showExportIDsOverview(true);
3595  return;
3596  }
3597 
3598 
3599  if (is_array($_POST["exportid"]))
3600  {
3601  foreach ($_POST["exportid"] as $pg_id => $exp_id)
3602  {
3603  ilLMPageObject::saveExportId($this->object->getId(), $pg_id,
3604  ilUtil::stripSlashes($exp_id), ilLMObject::_lookupType($pg_id));
3605  }
3606  }
3607 
3608  ilUtil::sendSuccess($lng->txt("cont_saved_export_ids"), true);
3609  $ilCtrl->redirect($this, "showExportIdsOverview");
3610  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static saveExportId($a_lm_id, $a_lmobj_id, $a_exp_id, $a_type="pg")
Save export id.
static _lookupType($a_obj_id, $a_lm_id=0)
Lookup type.
$_POST['username']
Definition: cron.php:12
showExportIDsOverview($a_validation=false)
Show export IDs overview.
global $ilCtrl
Definition: ilias.php:18
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
+ Here is the call graph for this function:

◆ saveHelpMapping()

ilObjContentObjectGUI::saveHelpMapping ( )

Save help mapping.

Parameters

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

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

3619  {
3620  global $lng, $ilCtrl;
3621 
3622  include_once("./Services/Help/classes/class.ilHelpMapping.php");
3623  if (is_array($_POST["screen_ids"]))
3624  {
3625  foreach ($_POST["screen_ids"] as $chap => $ids)
3626  {
3627  $ids = explode("\n", $ids);
3629  }
3630  }
3631  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
3632  $ilCtrl->redirect($this, "showExportIdsOverview");
3633  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
global $ilCtrl
Definition: ilias.php:18
saveScreenIdsForChapter($a_chap, $a_ids)
Save screen ids for chapter.
+ Here is the call graph for this function:

◆ saveLinkCheck()

ilObjContentObjectGUI::saveLinkCheck ( )

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

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

2929  {
2930  global $ilDB,$ilUser;
2931 
2932  include_once './Services/LinkChecker/classes/class.ilLinkCheckNotify.php';
2933 
2934  $link_check_notify =& new ilLinkCheckNotify($ilDB);
2935  $link_check_notify->setUserId($ilUser->getId());
2936  $link_check_notify->setObjId($this->object->getId());
2937 
2938  if($_POST['link_check_message'])
2939  {
2940  ilUtil::sendSuccess($this->lng->txt('link_check_message_enabled'));
2941  $link_check_notify->addNotifier();
2942  }
2943  else
2944  {
2945  ilUtil::sendSuccess($this->lng->txt('link_check_message_disabled'));
2946  $link_check_notify->deleteNotifier();
2947  }
2948  $this->linkChecker();
2949 
2950  return true;
2951  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
class for checking external links in page objects.
global $ilUser
Definition: imgupload.php:15
+ Here is the call graph for this function:

◆ saveMenuEntry()

ilObjContentObjectGUI::saveMenuEntry ( )

save new menu entry

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

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

3089  {
3090  global $ilCtrl;
3091 
3092  // check title and target
3093  if (empty($_POST["title"]))
3094  {
3095  //$this->ilias->raiseError($this->lng->txt("please_enter_title"),$this->ilias->error_obj->MESSAGE);
3096  ilUtil::sendFailure($this->lng->txt("please_enter_title") , true);
3097  $ilCtrl->redirect($this, "addMenuEntry");
3098  }
3099  if (empty($_POST["target"]))
3100  {
3101  //$this->ilias->raiseError($this->lng->txt("please_enter_target"),$this->ilias->error_obj->MESSAGE);
3102  ilUtil::sendFailure($this->lng->txt("please_enter_target"), true);
3103  $ilCtrl->redirect($this, "addMenuEntry");
3104  }
3105 
3106  $this->__initLMMenuEditor();
3107  $this->lmme_obj->setTitle($_POST["title"]);
3108  $this->lmme_obj->setTarget($_POST["target"]);
3109  $this->lmme_obj->setLinkRefId($_POST["link_ref_id"]);
3110 
3111  if ($_POST["link_ref_id"])
3112  {
3113  $this->lmme_obj->setLinkType("intern");
3114  }
3115 
3116  $this->lmme_obj->create();
3117 
3118  ilUtil::sendSuccess($this->lng->txt("msg_entry_added"), true);
3119  $this->ctrl->redirect($this, "editMenuProperties");
3120  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
global $ilCtrl
Definition: ilias.php:18
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
+ Here is the call graph for this function:

◆ saveMenuProperties()

ilObjContentObjectGUI::saveMenuProperties ( )

save properties

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

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

813  {
814  global $ilias;
815 
816  $this->object->setActiveLMMenu((int) $_POST["cobj_act_lm_menu"]);
817  $this->object->setActiveTOC((int) $_POST["cobj_act_toc"]);
818  $this->object->setActivePrintView((int) $_POST["cobj_act_print"]);
819  $this->object->setActivePreventGlossaryAppendix((int) $_POST["cobj_act_print_prev_glo"]);
820  $this->object->setHideHeaderFooterPrint((int) $_POST["hide_head_foot_print"]);
821  $this->object->setActiveDownloads((int) $_POST["cobj_act_downloads"]);
822  $this->object->setActiveDownloadsPublic((int) $_POST["cobj_act_downloads_public"]);
823  $this->object->updateProperties();
824 
825  $this->__initLMMenuEditor();
826 //var_dump($_POST["menu_entries"]); exit;
827  $this->lmme_obj->updateActiveStatus($_POST["menu_entries"]);
828 
829  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
830  $this->ctrl->redirect($this, "editMenuProperties");
831  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
+ Here is the call graph for this function:

◆ savePageLayout()

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().

3905  {
3906  global $lng, $ilCtrl;
3907 
3908  $ilCtrl->setParameter($this, "hierarchy", $_GET["hierarchy"]);
3909 
3910  foreach ($_POST["id"] as $id)
3911  {
3913  ilUtil::stripSlashes($_POST["layout"]),
3914  $this->object);
3915  }
3916  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
3917 
3918  if ($_GET["hierarchy"] == 1)
3919  {
3920  $ilCtrl->redirect($this, "chapters");
3921  }
3922  else
3923  {
3924  $ilCtrl->redirect($this, "pages");
3925  }
3926  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
$_GET["client_id"]
static writeLayout($a_obj_id, $a_layout, $a_lm=null)
Write layout setting.
global $ilCtrl
Definition: ilias.php:18
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
+ Here is the call graph for this function:

◆ saveProperties()

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().

512  {
513  global $lng;
514 
515  $valid = false;
516  $this->initPropertiesForm();
517  if ($this->form->checkInput())
518  {
519  include_once("./Services/Object/classes/class.ilObjectTranslation.php");
520  $ot = ilObjectTranslation::getInstance($this->object->getId());
521  if ($ot->getContentActivated())
522  {
523  $ot->setDefaultTitle($_POST['title']);
524  $ot->setDefaultDescription($_POST['description']);
525  $ot->save();
526  }
527 
528  $this->object->setTitle($_POST['title']);
529  $this->object->setDescription($_POST['description']);
530  $this->object->setLayout($_POST["lm_layout"]);
531  $this->object->setPageHeader($_POST["lm_pg_header"]);
532  $this->object->setTOCMode($_POST["toc_mode"]);
533  $this->object->setOnline($_POST["cobj_online"]);
534  $this->object->setActiveNumbering($_POST["cobj_act_number"]);
535  $this->object->setCleanFrames($_POST["cobj_clean_frames"]);
536  if (!$this->ilias->getSetting('disable_comments'))
537  {
538  $this->object->setPublicNotes($_POST["cobj_pub_notes"]);
539  }
540  $this->object->setHistoryUserComments($_POST["cobj_user_comments"]);
541  $this->object->setLayoutPerPage($_POST["layout_per_page"]);
542  $this->object->setRating($_POST["rating"]);
543  $this->object->setRatingPages($_POST["rating_pages"]);
544  $this->object->setDisableDefaultFeedback((int) $_POST["disable_def_feedback"]);
545  $this->object->updateProperties();
546  $this->object->update();
547 
548  if($this->object->getType() == 'lm')
549  {
550  // Update ecs export settings
551  include_once 'Modules/LearningModule/classes/class.ilECSLearningModuleSettings.php';
552  $ecs = new ilECSLearningModuleSettings($this->object);
553  if($ecs->handleSettingsUpdate())
554  {
555  $valid = true;
556  }
557  }
558  else
559  {
560  $valid = true;
561  }
562  }
563 
564  if($valid)
565  {
566  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
567  $this->ctrl->redirect($this, "properties");
568  }
569  else
570  {
571  $lng->loadLanguageModule("style");
572  $this->setTabs("settings");
573  $this->setSubTabs("cont_general_properties");
574 
575  $this->form->setValuesByPost();
576  $this->tpl->setContent($this->form->getHTML());
577  }
578  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
setSubTabs($a_active)
Set sub tabs.
$_POST['username']
Definition: cron.php:12
$valid
Class ilECSLearningModuleSettings.
redirection script todo: (a better solution should control the processing via a xml file) ...
static getInstance($a_obj_id)
Get instance.
initPropertiesForm()
Init properties form.
setTabs()
set admin tabs public
+ Here is the call graph for this function:

◆ savePublicSection()

ilObjContentObjectGUI::savePublicSection ( )

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

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

2831  {
2832  //var_dump($_POST["lm_public_mode"]);exit;
2833  $this->object->setPublicAccessMode($_POST["lm_public_mode"]);
2834  $this->object->updateProperties();
2835  ilLMObject::_writePublicAccessStatus($_POST["pages"],$this->object->getId());
2836  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
2837  $this->ctrl->redirect($this, "editPublicSection");
2838  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
_writePublicAccessStatus($a_pages, $a_cont_obj_id)
update public access flags in lm_data for all pages of a content object
+ Here is the call graph for this function:

◆ saveStyleSettings()

ilObjContentObjectGUI::saveStyleSettings ( )

Save style settings.

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

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

697  {
698  global $ilSetting;
699 
700  if ($ilSetting->get("fixed_content_style_id") <= 0 &&
701  (ilObjStyleSheet::_lookupStandard($this->object->getStyleSheetId())
702  || $this->object->getStyleSheetId() == 0))
703  {
704  $this->object->setStyleSheetId(ilUtil::stripSlashes($_POST["style_id"]));
705  $this->object->update();
706  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
707  }
708  $this->ctrl->redirect($this, "editStyleProperties");
709  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
_lookupStandard($a_id)
Lookup standard flag.
global $ilSetting
Definition: privfeed.php:40
+ Here is the call graph for this function:

◆ saveTooltips()

ilObjContentObjectGUI::saveTooltips ( )

Save tooltips.

Parameters

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

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

3732  {
3733  global $ilCtrl, $lng;
3734 
3735  include_once("./Services/Help/classes/class.ilHelp.php");
3736 
3737  if (is_array($_POST["text"]))
3738  {
3739  foreach ($_POST["text"] as $id => $text)
3740  {
3741  ilHelp::updateTooltip((int) $id, ilUtil::stripSlashes($text),
3742  ilUtil::stripSlashes($_POST["tt_id"][(int) $id]));
3743  }
3744  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
3745  }
3746  $ilCtrl->redirect($this, "showTooltipList");
3747  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
global $ilCtrl
Definition: ilias.php:18
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static updateTooltip($a_id, $a_text, $a_tt_id)
Update tooltip.
+ Here is the call graph for this function:

◆ selectFooter()

ilObjContentObjectGUI::selectFooter ( )

select page as footer

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

References $_POST.

3280  {
3281  if(!isset($_POST["id"]))
3282  {
3283  $this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
3284  }
3285  if(count($_POST["id"]) > 1)
3286  {
3287  $this->ilias->raiseError($this->lng->txt("cont_select_max_one_item"),$this->ilias->error_obj->MESSAGE);
3288  }
3289  if ($_POST["id"][0] != $this->object->getFooterPage())
3290  {
3291  $this->object->setFooterPage($_POST["id"][0]);
3292  }
3293  else
3294  {
3295  $this->object->setFooterPage(0);
3296  }
3297  $this->object->updateProperties();
3298  $this->ctrl->redirect($this, "pages");
3299  }
$_POST['username']
Definition: cron.php:12
redirection script todo: (a better solution should control the processing via a xml file) ...

◆ selectHeader()

ilObjContentObjectGUI::selectHeader ( )

select page as header

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

References $_POST.

3255  {
3256  if(!isset($_POST["id"]))
3257  {
3258  $this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
3259  }
3260  if(count($_POST["id"]) > 1)
3261  {
3262  $this->ilias->raiseError($this->lng->txt("cont_select_max_one_item"),$this->ilias->error_obj->MESSAGE);
3263  }
3264  if ($_POST["id"][0] != $this->object->getHeaderPage())
3265  {
3266  $this->object->setHeaderPage($_POST["id"][0]);
3267  }
3268  else
3269  {
3270  $this->object->setHeaderPage(0);
3271  }
3272  $this->object->updateProperties();
3273  $this->ctrl->redirect($this, "pages");
3274  }
$_POST['username']
Definition: cron.php:12
redirection script todo: (a better solution should control the processing via a xml file) ...

◆ selectLMGlossary()

ilObjContentObjectGUI::selectLMGlossary ( )

Select lm glossary.

Parameters

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

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

Referenced by selectLMGlossaryLink().

4024  {
4025  global $ilCtrl, $lng;
4026 
4027  $glos = $this->object->getAutoGlossaries();
4028  $glo_ref_id = (int) $_GET["glo_ref_id"];
4029  $glo_id = ilObject::_lookupObjId($glo_ref_id);
4030  if (!in_array($glo_id, $glos))
4031  {
4032  $glos[] = $glo_id;
4033  }
4034  $this->object->setAutoGlossaries($glos);
4035  $this->object->update();
4036 
4037  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
4038  $ilCtrl->redirect($this, "editGlossaries");
4039  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
static _lookupObjId($a_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ selectLMGlossaryLink()

ilObjContentObjectGUI::selectLMGlossaryLink ( )

Select a glossary and link all its terms.

Parameters

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

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

4009  {
4010  $glo_ref_id = (int) $_GET["glo_ref_id"];
4011  $glo_id = ilObject::_lookupObjId($glo_ref_id);
4012  $this->object->autoLinkGlossaryTerms($glo_id);
4013  $this->selectLMGlossary();
4014  }
selectLMGlossary()
Select lm glossary.
$_GET["client_id"]
static _lookupObjId($a_id)
+ Here is the call graph for this function:

◆ setContentSubTabs()

ilObjContentObjectGUI::setContentSubTabs (   $a_active)

Set pages tabs.

Parameters

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

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

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

2553  {
2554  global $ilTabs, $lng, $ilCtrl;
2555 
2556  $lm_set = new ilSetting("lm");
2557 
2558  // chapters
2559  $ilTabs->addSubtab("chapters",
2560  $lng->txt("cont_chapters"),
2561  $ilCtrl->getLinkTarget($this, "chapters"));
2562 
2563  // all pages
2564  $ilTabs->addSubtab("pages",
2565  $lng->txt("cont_all_pages"),
2566  $ilCtrl->getLinkTarget($this, "pages"));
2567 
2568  // questions
2569  $ilTabs->addSubtab("questions",
2570  $lng->txt("objs_qst"),
2571  $ilCtrl->getLinkTarget($this, "listQuestions"));
2572 
2573  // export ids
2574  if ($lm_set->get("html_export_ids"))
2575  {
2576  if (!ilObjContentObject::isOnlineHelpModule($this->object->getRefId()))
2577  {
2578  $ilTabs->addSubtab("export_ids",
2579  $lng->txt("cont_html_export_ids"),
2580  $ilCtrl->getLinkTarget($this, "showExportIDsOverview"));
2581  }
2582  }
2583  if (ilObjContentObject::isOnlineHelpModule($this->object->getRefId()))
2584  {
2585  $lng->loadLanguageModule("help");
2586  $ilTabs->addSubtab("export_ids",
2587  $lng->txt("cont_online_help_ids"),
2588  $ilCtrl->getLinkTarget($this, "showExportIDsOverview"));
2589 
2590  $ilTabs->addSubtab("help_tooltips",
2591  $lng->txt("help_tooltips"),
2592  $ilCtrl->getLinkTarget($this, "showTooltipList"));
2593  }
2594 
2595  // list links
2596  $ilTabs->addSubtab("internal_links",
2597  $lng->txt("cont_internal_links"),
2598  $ilCtrl->getLinkTarget($this, "listLinks"));
2599 
2600  // web link checker
2601  if ($this->object->getType() == "lm")
2602  {
2603  if(@include_once('HTTP/Request.php'))
2604  {
2605  $ilTabs->addSubtab("link_check",
2606  $lng->txt("link_check"),
2607  $ilCtrl->getLinkTarget($this, "linkChecker"));
2608  }
2609  }
2610 
2611  // maintenance
2612  $ilTabs->addSubtab("maintenance",
2613  $lng->txt("cont_maintenance"),
2614  $ilCtrl->getLinkTarget($this, "showMaintenance"));
2615 
2616  $ilTabs->activateSubTab($a_active);
2617  $ilTabs->activateTab("content");
2618  }
ILIAS Setting Class.
global $ilCtrl
Definition: ilias.php:18
static isOnlineHelpModule($a_id, $a_as_obj_id=false)
Is module an online module.
$lm_set
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setilLMMenu()

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.

2151  {
2152  global $ilCtrl,$ilUser, $ilAccess, $ilTabs, $rbacsystem, $ilPluginAdmin, $ilHelp;
2153 
2154  $ilHelp->setScreenIdComponent("lm");
2155 
2156  if ($a_as_subtabs)
2157  {
2158  $addcmd = "addSubTabTarget";
2159  $getcmd = "getSubTabHTML";
2160  }
2161  else
2162  {
2163  $addcmd = "addTarget";
2164  $getcmd = "getHTML";
2165  }
2166 
2167  $active[$a_active] = true;
2168 
2169  if (!$this->object->isActiveLMMenu())
2170  {
2171  return "";
2172  }
2173 
2174  if ($a_use_global_tabs)
2175  {
2176  $tabs_gui = $ilTabs;
2177  }
2178  else
2179  {
2180  $tabs_gui = new ilTabsGUI();
2181  }
2182 
2183  // Determine whether the view of a learning resource should
2184  // be shown in the frameset of ilias, or in a separate window.
2185  //$showViewInFrameset = $this->ilias->ini->readVariable("layout","view_target") == "frame";
2186  $showViewInFrameset = true;
2187 
2188  if ($showViewInFrameset && !$a_offline)
2189  {
2190  $buttonTarget = ilFrameTargetInfo::_getFrame("MainContent");
2191  }
2192  else
2193  {
2194  $buttonTarget = "_top";
2195  }
2196 
2197  if ($a_export_format == "scorm")
2198  {
2199  $buttonTarget = "";
2200  }
2201 
2202  include_once("./Services/Payment/classes/class.ilPaymentObject.php");
2203  $requires_purchase_to_access = ilPaymentObject::_requiresPurchaseToAccess((int)$_GET['ref_id']);
2204 
2205  // content
2206  if (!$a_offline && $ilAccess->checkAccess("read", "", $_GET["ref_id"]))
2207  {
2208  $ilCtrl->setParameterByClass("illmpresentationgui", "obj_id", $_GET["obj_id"]);
2209  $tabs_gui->$addcmd("content",
2210  $ilCtrl->getLinkTargetByClass("illmpresentationgui", "layout"),
2211  "", "", $buttonTarget, $active["content"]);
2212  if ($active["content"])
2213  {
2214  $ilHelp->setScreenId("content");
2215  $ilHelp->setSubScreenId("content");
2216  }
2217  }
2218 
2219  // table of contents
2220  if (!$requires_purchase_to_access && $this->object->isActiveTOC() && $ilAccess->checkAccess("read", "", $_GET["ref_id"]))
2221  {
2222  if (!$a_offline)
2223  {
2224  $ilCtrl->setParameterByClass("illmpresentationgui", "obj_id", $_GET["obj_id"]);
2225  $link = $ilCtrl->getLinkTargetByClass("illmpresentationgui", "showTableOfContents");
2226  }
2227  else
2228  {
2229  $link = "./table_of_contents.html";
2230  }
2231 
2232  $tabs_gui->$addcmd("cont_toc", $link,
2233  "", "", $buttonTarget, $active["toc"]);
2234  }
2235 
2236  // print view
2237  if (!$requires_purchase_to_access && $this->object->isActivePrintView() && $ilAccess->checkAccess("read", "", $_GET["ref_id"]))
2238  {
2239  if (!$a_offline) // has to be implemented for offline mode
2240  {
2241  $ilCtrl->setParameterByClass("illmpresentationgui", "obj_id", $_GET["obj_id"]);
2242  $link = $ilCtrl->getLinkTargetByClass("illmpresentationgui", "showPrintViewSelection");
2243  $tabs_gui->$addcmd("cont_print_view", $link,
2244  "", "", $buttonTarget, $active["print"]);
2245  }
2246  }
2247 
2248  // download
2249  if (!$requires_purchase_to_access && $ilUser->getId() == ANONYMOUS_USER_ID)
2250  {
2251  $is_public = $this->object->isActiveDownloadsPublic();
2252  }
2253  else if(!$requires_purchase_to_access)
2254  {
2255  $is_public = true;
2256  }
2257 
2258  if (!$requires_purchase_to_access && $this->object->isActiveDownloads() && !$a_offline && $is_public &&
2259  $ilAccess->checkAccess("read", "", $_GET["ref_id"]))
2260  {
2261  $ilCtrl->setParameterByClass("illmpresentationgui", "obj_id", $_GET["obj_id"]);
2262  $link = $ilCtrl->getLinkTargetByClass("illmpresentationgui", "showDownloadList");
2263  $tabs_gui->$addcmd("download", $link,
2264  "", "", $buttonTarget, $active["download"]);
2265  }
2266 
2267  // info button
2268  if ($a_export_format != "scorm" && !$a_offline)
2269  {
2270  if (!$a_offline)
2271  {
2272  $ilCtrl->setParameterByClass("illmpresentationgui", "obj_id", $_GET["obj_id"]);
2273  $link = $this->ctrl->getLinkTargetByClass(
2274  array("illmpresentationgui", "ilinfoscreengui"), "showSummary");
2275  }
2276  else
2277  {
2278  $link = "./info.html";
2279  }
2280 
2281  $tabs_gui->$addcmd(($requires_purchase_to_access ? 'buy' : 'info_short'), $link,
2282  "", "", $buttonTarget, $active["info"]);
2283  }
2284 
2285  include_once './Services/Tracking/classes/class.ilLearningProgressAccess.php';
2286  if(!$a_offline &&
2287  $ilAccess->checkAccess("read", "", $_GET["ref_id"]) && // #14075
2289  {
2290  include_once './Services/Object/classes/class.ilObjectLP.php';
2291  $olp = ilObjectLP::getInstance($this->object->getId());
2292  if($olp->getCurrentMode() == ilLPObjSettings::LP_MODE_COLLECTION_MANUAL)
2293  {
2294  $tabs_gui->$addcmd("learning_progress",
2295  $this->ctrl->getLinkTargetByClass(array("illmpresentationgui", "illearningprogressgui"), "editmanual"),
2296  "", "", $buttonTarget, $active["learning_progress"]);
2297  }
2298  else if($olp->getCurrentMode() == ilLPObjSettings::LP_MODE_COLLECTION_TLT)
2299  {
2300  $tabs_gui->$addcmd("learning_progress",
2301  $this->ctrl->getLinkTargetByClass(array("illmpresentationgui", "illearningprogressgui"), "showtlt"),
2302  "", "", $buttonTarget, $active["learning_progress"]);
2303  }
2304  }
2305 
2306  // edit learning module
2307  if (!$a_offline && $a_cur_page > 0)
2308  {
2309  if ($rbacsystem->checkAccess("write", $_GET["ref_id"]))
2310  {
2311  //$page_id = $this->getCurrentPageId();
2312  $page_id = $a_cur_page;
2313  $tabs_gui->$addcmd("edit_page", ILIAS_HTTP_PATH."/ilias.php?baseClass=ilLMEditorGUI&ref_id=".$_GET["ref_id"].
2314  "&obj_id=".$page_id."&to_page=1",
2315  "", "", $buttonTarget, $active["edit_page"]);
2316  }
2317  }
2318 
2319  if(!$requires_purchase_to_access)
2320  {
2321  // get user defined menu entries
2322  $this->__initLMMenuEditor();
2323  $entries = $this->lmme_obj->getMenuEntries(true);
2324 
2325  if (count($entries) > 0 && $ilAccess->checkAccess("read", "", $_GET["ref_id"]))
2326  {
2327  foreach ($entries as $entry)
2328  {
2329  // build goto-link for internal resources
2330  if ($entry["type"] == "intern")
2331  {
2332  $entry["link"] = ILIAS_HTTP_PATH."/goto.php?target=".$entry["link"];
2333  }
2334 
2335  // add http:// prefix if not exist
2336  if (!strstr($entry["link"],'://') && !strstr($entry["link"],'mailto:'))
2337  {
2338  $entry["link"] = "http://".$entry["link"];
2339  }
2340 
2341  if (!strstr($entry["link"],'mailto:'))
2342  {
2343  $entry["link"] = ilUtil::appendUrlParameterString($entry["link"], "ref_id=".$this->ref_id."&structure_id=".$this->obj_id);
2344  }
2345  $tabs_gui->$addcmd($entry["title"],
2346  $entry["link"],
2347  "", "", "_blank", "", true);
2348  }
2349  }
2350  }
2351 
2352  // user interface hook [uihk]
2353  $pl_names = $ilPluginAdmin->getActivePluginsForSlot(IL_COMP_SERVICE, "UIComponent", "uihk");
2354  $plugin_html = false;
2355  foreach ($pl_names as $pl)
2356  {
2357  $ui_plugin = ilPluginAdmin::getPluginObject(IL_COMP_SERVICE, "UIComponent", "uihk", $pl);
2358  $gui_class = $ui_plugin->getUIClassInstance();
2359  $resp = $gui_class->modifyGUI("Modules/LearningModule", "lm_menu_tabs",
2360  array("lm_menu_tabs" => $tabs_gui));
2361  }
2362 
2363 
2364  return $tabs_gui->$getcmd();
2365  }
Tabs GUI.
$_GET["client_id"]
static _requiresPurchaseToAccess($a_ref_id, $a_purchasetype='')
this function should be used by all buyable repository objects !!
global $ilCtrl
Definition: ilias.php:18
static checkAccess($a_ref_id, $a_allow_only_read=true)
check access to learning progress
static appendUrlParameterString($a_url, $a_par, $xml_style=false)
append URL parameter string ("par1=value1&par2=value2...") to given URL string
static getPluginObject($a_ctype, $a_cname, $a_slot_id, $a_pname)
Get Plugin Object.
global $ilUser
Definition: imgupload.php:15
static _getFrame($a_class, $a_type='')
Get content frame name.
static getInstance($a_obj_id)
const IL_COMP_SERVICE
+ Here is the call graph for this function:

◆ setPageLayout()

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().

3848  {
3849  global $tpl, $ilCtrl, $lng;
3850 
3851  if (!is_array($_POST["id"]))
3852  {
3853  ilUtil::sendFailure($lng->txt("no_checkbox"), true);
3854 
3855  if ($a_in_hierarchy)
3856  {
3857  $ilCtrl->redirect($this, "chapters");
3858  }
3859  else
3860  {
3861  $ilCtrl->redirect($this, "pages");
3862  }
3863  }
3864 
3865  $this->initSetPageLayoutForm();
3866 
3867  $tpl->setContent($this->form->getHTML());
3868  }
$_POST['username']
Definition: cron.php:12
global $ilCtrl
Definition: ilias.php:18
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
initSetPageLayoutForm()
Init set page layout form.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setPageLayoutInHierarchy()

ilObjContentObjectGUI::setPageLayoutInHierarchy ( )

Set layout for multipl pages.

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

References $ilCtrl, and setPageLayout().

3837  {
3838  global $ilCtrl;
3839  $ilCtrl->setParameter($this, "hierarchy", "1");
3840  $this->setPageLayout(true);
3841  }
global $ilCtrl
Definition: ilias.php:18
setPageLayout($a_in_hierarchy=false)
Set layout for multipl pages.
+ Here is the call graph for this function:

◆ setSubTabs()

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().

2702  {
2703  global $ilTabs, $ilSetting;
2704 
2705  if (in_array($a_active,
2706  array("cont_general_properties", "cont_style", "cont_lm_menu", "public_section",
2707  "cont_glossaries", "cont_multilinguality", "obj_multilinguality")))
2708  {
2709  // general properties
2710  $ilTabs->addSubTabTarget("cont_general_properties",
2711  $this->ctrl->getLinkTarget($this, 'properties'),
2712  "", "");
2713 
2714  // style properties
2715  $ilTabs->addSubTabTarget("cont_style",
2716  $this->ctrl->getLinkTarget($this, 'editStyleProperties'),
2717  "", "");
2718 
2719  // menu properties
2720  $ilTabs->addSubTabTarget("cont_lm_menu",
2721  $this->ctrl->getLinkTarget($this, 'editMenuProperties'),
2722  "", "");
2723 
2724  // glossaries
2725  $ilTabs->addSubTabTarget("cont_glossaries",
2726  $this->ctrl->getLinkTarget($this, 'editGlossaries'),
2727  "", "");
2728 
2729  if ($ilSetting->get("pub_section"))
2730  {
2731  if ($this->object->getType() != "dbk")
2732  {
2733  // public section
2734  $ilTabs->addSubTabTarget("public_section",
2735  $this->ctrl->getLinkTarget($this, 'editPublicSection'),
2736  "", "");
2737  }
2738  }
2739 
2740  // multilinguality
2741  /* $ilTabs->addSubTabTarget("cont_multilinguality",
2742  $this->ctrl->getLinkTargetByClass("ilPageMultiLangGUI", ''),
2743  "", "");*/
2744 
2745  $ilTabs->addSubTabTarget("obj_multilinguality",
2746  $this->ctrl->getLinkTargetByClass("ilobjecttranslationgui", ""));
2747 
2748  $ilTabs->setSubTabActive($a_active);
2749  }
2750  }
global $ilSetting
Definition: privfeed.php:40
+ Here is the caller graph for this function:

◆ setTabs()

ilObjContentObjectGUI::setTabs (   $a_act = "")

output tabs

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

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

2535  {
2536  global $lng, $ilHelp;
2537 
2538  $ilHelp->setScreenIdComponent("lm");
2539 
2540  $this->addTabs($a_act);
2541  $this->tpl->setTitle($this->object->getTitle());
2542  $this->tpl->setTitleIcon(ilUtil::getImagePath("icon_lm_b.png"),
2543  $lng->txt("obj_lm"));
2544  }
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
+ Here is the call graph for this function:

◆ showActions()

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().

1828  {
1829  foreach ($a_actions as $name => $lng)
1830  {
1831  $d[$name] = array("name" => $name, "lng" => $lng);
1832  }
1833 
1834  $notoperations = array();
1835 
1836  $operations = array();
1837 
1838  if (is_array($d))
1839  {
1840  foreach ($d as $row)
1841  {
1842  if (!in_array($row["name"], $notoperations))
1843  {
1844  $operations[] = $row;
1845  }
1846  }
1847  }
1848 
1849  if (count($operations)>0)
1850  {
1851  foreach ($operations as $val)
1852  {
1853  $this->tpl->setCurrentBlock("operation_btn");
1854  $this->tpl->setVariable("BTN_NAME", $val["name"]);
1855  $this->tpl->setVariable("BTN_VALUE", $this->lng->txt($val["lng"]));
1856  $this->tpl->parseCurrentBlock();
1857  }
1858 
1859  $this->tpl->setCurrentBlock("operation");
1860  $this->tpl->setVariable("IMG_ARROW",ilUtil::getImagePath("arrow_downright.png"));
1861  $this->tpl->parseCurrentBlock();
1862  }
1863  }
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showEntrySelector()

ilObjContentObjectGUI::showEntrySelector ( )

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

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

3190  {
3191  global $ilTabs, $ilCtrl;
3192 
3193  $this->setTabs();
3194 
3195  $ilTabs->setTabActive("settings");
3196  $this->setSubTabs("cont_lm_menu");
3197 
3198  $ilCtrl->saveParameter($this, array("menu_entry"));
3199 
3200  $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.lm_menu_object_selector.html","Modules/LearningModule");
3201 
3202  ilUtil::sendInfo($this->lng->txt("lm_menu_select_object_to_add"));
3203 
3204  require_once ("./Modules/LearningModule/classes/class.ilLMMenuObjectSelector.php");
3205  $exp = new ilLMMenuObjectSelector($this->ctrl->getLinkTarget($this,'test'),$this);
3206 
3207  $exp->setExpand($_GET["lm_menu_expand"] ? $_GET["lm_menu_expand"] : $this->tree->readRootId());
3208  $exp->setExpandTarget($this->ctrl->getLinkTarget($this,'showEntrySelector'));
3209  $exp->setTargetGet("ref_id");
3210  $exp->setRefId($this->cur_ref_id);
3211 
3212  $sel_types = array('mcst', 'mep', 'cat', 'lm','dbk','glo','frm','exc','tst','svy', 'chat', 'wiki', 'sahs',
3213  "crs", "grp", "book", "tst", "file");
3214  $exp->setSelectableTypes($sel_types);
3215 
3216  //$exp->setTargetGet("obj_id");
3217 
3218  // build html-output
3219  $exp->setOutput(0);
3220  $output = $exp->getOutput();
3221 
3222  // get page ids
3223  foreach ($exp->format_options as $node)
3224  {
3225  if (!$node["container"])
3226  {
3227  $pages[] = $node["child"];
3228  }
3229  }
3230 
3231  //$this->tpl->setCurrentBlock("content");
3232  //var_dump($this->object->getPublicAccessMode());
3233  // access mode selector
3234  $this->tpl->setVariable("TXT_SET_PUBLIC_MODE", $this->lng->txt("set_public_mode"));
3235  $this->tpl->setVariable("TXT_CHOOSE_PUBLIC_MODE", $this->lng->txt("choose_public_mode"));
3236  $modes = array("complete" => $this->lng->txt("all_pages"), "selected" => $this->lng->txt("selected_pages_only"));
3237  $select_public_mode = ilUtil::formSelect ($this->object->getPublicAccessMode(),"lm_public_mode",$modes, false, true);
3238  $this->tpl->setVariable("SELECT_PUBLIC_MODE", $select_public_mode);
3239 
3240  $this->tpl->setVariable("TXT_EXPLORER_HEADER", $this->lng->txt("choose_public_pages"));
3241  $this->tpl->setVariable("EXP_REFRESH", $this->lng->txt("refresh"));
3242  $this->tpl->setVariable("EXPLORER",$output);
3243  $this->tpl->setVariable("ONCLICK",$js_pages);
3244  $this->tpl->setVariable("TXT_CHECKALL", $this->lng->txt("check_all"));
3245  $this->tpl->setVariable("TXT_UNCHECKALL", $this->lng->txt("uncheck_all"));
3246  $this->tpl->setVariable("TXT_SAVE", $this->lng->txt("save"));
3247  $this->tpl->setVariable("FORMACTION", $this->ctrl->getLinkTarget($this, "savePublicSection"));
3248  //$this->tpl->parseCurrentBlock();
3249  }
setSubTabs($a_active)
Set sub tabs.
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static formSelect($selected, $varname, $options, $multiple=false, $direct_text=false, $size="0", $style_class="", $attribs="", $disabled=false)
Builds a select form field with options and shows the selected option first.
setTabs()
set admin tabs public
setExpand($a_node_id)
set the expand option this value is stored in a SESSION variable to save it different view (lo view...
+ Here is the call graph for this function:

◆ showExportIDsOverview()

ilObjContentObjectGUI::showExportIDsOverview (   $a_validation = false)

Show export IDs overview.

Parameters

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().

3518  {
3519  global $tpl, $ilToolbar, $lng, $ilCtrl;
3520 
3521  $this->setTabs();
3522  $this->setContentSubTabs("export_ids");
3523 
3524  if (ilObjContentObject::isOnlineHelpModule($this->object->getRefId()))
3525  {
3526  // toolbar
3527  $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
3528  include_once("./Services/Form/classes/class.ilSelectInputGUI.php");
3529  $lm_tree = $this->object->getTree();
3530  $childs = $lm_tree->getChilds($lm_tree->readRootId());
3531  $options = array("" => $lng->txt("all"));
3532  foreach ($childs as $c)
3533  {
3534  $options[$c["child"]] = $c["title"];
3535  }
3536  $si = new ilSelectInputGUI($this->lng->txt("help_component"), "help_chap");
3537  $si->setOptions($options);
3538  $si->setValue(ilSession::get("help_chap"));
3539  $ilToolbar->addInputItem($si, true);
3540  $ilToolbar->addFormButton($lng->txt("help_filter"), "filterHelpChapters");
3541 
3542  include_once("./Modules/LearningModule/classes/class.ilHelpMappingTableGUI.php");
3543  $tbl = new ilHelpMappingTableGUI($this, "showExportIDsOverview", $a_validation, false);
3544  }
3545  else
3546  {
3547  include_once("./Modules/LearningModule/classes/class.ilExportIDTableGUI.php");
3548  $tbl = new ilExportIDTableGUI($this, "showExportIDsOverview", $a_validation, false);
3549  }
3550 
3551  $tpl->setContent($tbl->getHTML());
3552  }
This class represents a selection list property in a property form.
static get($a_var)
Get a value.
global $ilCtrl
Definition: ilias.php:18
if(!is_array($argv)) $options
static isOnlineHelpModule($a_id, $a_as_obj_id=false)
Is module an online module.
setContentSubTabs($a_active)
Set pages tabs.
setTabs()
set admin tabs public
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showLMGlossarySelector()

ilObjContentObjectGUI::showLMGlossarySelector ( )

Select LM Glossary.

Parameters

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().

3962  {
3963  global $tpl, $lng, $ilCtrl, $tree, $ilUser, $ilTabs;
3964 
3965  $this->setTabs();
3966  $ilTabs->setTabActive("settings");
3967  $this->setSubTabs("cont_glossaries");
3968 
3969  include_once 'Services/Search/classes/class.ilSearchRootSelector.php';
3970 
3971  $exp = new ilSearchRootSelector($ilCtrl->getLinkTarget($this,'showLMGlossarySelector'));
3972  $exp->setExpand($_GET["search_root_expand"] ? $_GET["search_root_expand"] : $tree->readRootId());
3973  $exp->setExpandTarget($ilCtrl->getLinkTarget($this,'showLMGlossarySelector'));
3974  $exp->setTargetClass(get_class($this));
3975  $exp->setCmd('confirmGlossarySelection');
3976  $exp->setClickableTypes(array("glo"));
3977  $exp->addFilter("glo");
3978 
3979  // build html-output
3980  $exp->setOutput(0);
3981  $tpl->setContent($exp->getOutput());
3982 
3983  }
setSubTabs($a_active)
Set sub tabs.
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
global $ilUser
Definition: imgupload.php:15
setTabs()
set admin tabs public
setExpand($a_node_id)
set the expand option this value is stored in a SESSION variable to save it different view (lo view...
+ Here is the call graph for this function:

◆ showMaintenance()

ilObjContentObjectGUI::showMaintenance ( )

Show maintenance.

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

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

1558  {
1559  global $tpl, $ilToolbar;
1560 
1561  $this->setTabs();
1562  $this->setContentSubTabs("maintenance");
1563 
1564  $ilToolbar->addButton($this->lng->txt("cont_fix_tree"),
1565  $this->ctrl->getLinkTarget($this, "fixTreeConfirm"));
1566  }
setContentSubTabs($a_active)
Set pages tabs.
setTabs()
set admin tabs public
+ Here is the call graph for this function:

◆ showTooltipList()

ilObjContentObjectGUI::showTooltipList ( )

Show export IDs overview.

Parameters

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().

3646  {
3647  global $tpl, $ilToolbar, $ilCtrl, $lng;
3648 
3649  $this->setTabs();
3650  $this->setContentSubTabs("help_tooltips");
3651 
3652  $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
3653  include_once("./Services/Form/classes/class.ilTextInputGUI.php");
3654  $ti = new ilTextInputGUI($this->lng->txt("help_tooltip_id"), "tooltip_id");
3655  $ti->setMaxLength(200);
3656  $ti->setSize(20);
3657  $ilToolbar->addInputItem($ti, true);
3658  $ilToolbar->addFormButton($lng->txt("add"), "addTooltip");
3659  $ilToolbar->addSeparator();
3660 
3661  include_once("./Services/Form/classes/class.ilSelectInputGUI.php");
3663  if (ilSession::get("help_tt_comp") != "")
3664  {
3665  $options[ilSession::get("help_tt_comp")] = ilSession::get("help_tt_comp");
3666  }
3667  $si = new ilSelectInputGUI($this->lng->txt("help_component"), "help_tt_comp");
3668  $si->setOptions($options);
3669  $si->setValue(ilSession::get("help_tt_comp"));
3670  $ilToolbar->addInputItem($si, true);
3671  $ilToolbar->addFormButton($lng->txt("help_filter"), "filterTooltips");
3672 
3673  include_once("./Modules/LearningModule/classes/class.ilHelpTooltipTableGUI.php");
3674  $tbl = new ilHelpTooltipTableGUI($this, "showTooltipList", ilSession::get("help_tt_comp"));
3675 
3676  $tpl->setContent($tbl->getHTML());
3677  }
This class represents a selection list property in a property form.
static get($a_var)
Get a value.
global $ilCtrl
Definition: ilias.php:18
static getTooltipComponents($a_module_id=0)
Get all tooltip components.
if(!is_array($argv)) $options
This class represents a text property in a property form.
setMaxLength($a_maxlength)
Set Max Length.
setContentSubTabs($a_active)
Set pages tabs.
setTabs()
set admin tabs public
+ Here is the call graph for this function:

◆ switchToLanguage()

ilObjContentObjectGUI::switchToLanguage ( )

Switch to language.

Parameters

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

References $_GET, and $ilCtrl.

4079  {
4080  global $ilCtrl;
4081 
4082  $ilCtrl->setParameter($this, "transl", $_GET["totransl"]);
4083  $ilCtrl->redirect($this, "chapters");
4084  }
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18

◆ updateMenuEntry()

ilObjContentObjectGUI::updateMenuEntry ( )

update a menu entry

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

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

3163  {
3164  if (empty($_REQUEST["menu_entry"]))
3165  {
3166  $this->ilias->raiseError($this->lng->txt("no_menu_entry_id"),$this->ilias->error_obj->MESSAGE);
3167  }
3168 
3169  // check title and target
3170  if (empty($_POST["title"]))
3171  {
3172  $this->ilias->raiseError($this->lng->txt("please_enter_title"),$this->ilias->error_obj->MESSAGE);
3173  }
3174  if (empty($_POST["target"]))
3175  {
3176  $this->ilias->raiseError($this->lng->txt("please_enter_target"),$this->ilias->error_obj->MESSAGE);
3177  }
3178 
3179  $this->__initLMMenuEditor();
3180  $this->lmme_obj->readEntry($_REQUEST["menu_entry"]);
3181  $this->lmme_obj->setTitle($_POST["title"]);
3182  $this->lmme_obj->setTarget($_POST["target"]);
3183  $this->lmme_obj->update();
3184 
3185  ilUtil::sendSuccess($this->lng->txt("msg_entry_updated"), true);
3186  $this->ctrl->redirect($this, "editMenuProperties");
3187  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
redirection script todo: (a better solution should control the processing via a xml file) ...
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
Definition: index.php:7
+ Here is the call graph for this function:

◆ view()

ilObjContentObjectGUI::view ( )

view content object

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

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

1921  {
1922  if (strtolower($_GET["baseClass"]) == "iladministrationgui")
1923  {
1924  $this->prepareOutput();
1925  parent::viewObject();
1926  }
1927  else
1928  {
1929  $this->viewObject();
1930  }
1931  }
$_GET["client_id"]
viewObject()
list childs of current object
prepareOutput()
prepare output
+ Here is the call graph for this function:

Field Documentation

◆ $ctrl

ilObjContentObjectGUI::$ctrl

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


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