ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilObjContentObjectGUI Class Reference

Class ilObjContentObjectGUI. More...

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

Public Member Functions

 __construct ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=false)
 Constructor. More...
 
 executeCommand ()
 execute command More...
 
 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 ($a_new_type)
 Init import form. More...
 
 exportObject ()
 export object More...
 
 importObject ()
 display dialogue for importing XML-LeaningObjects More...
 
 importFileObject ($parent_id=null, $a_catch_errors=true)
 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...
 
 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, $a_lang="", $a_export_all=false)
 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...
 
 listBlockedUsers ()
 List blocked users. More...
 
 resetNumberOfTries ()
 Reset number of tries. More...
 
 unlockQuestion ()
 Unlock blocked question. More...
 
 sendMailToBlockedUsers ()
 Send Mail to blocked users. More...
 
 setTabs ($a_act="")
 output tabs More...
 
 setContentSubTabs ($a_active)
 Set pages tabs. More...
 
 setQuestionsSubTabs ($a_active)
 Set pages tabs. More...
 
 addTabs ($a_act="")
 Adds tabs. More...
 
 setSubTabs ($a_active)
 Set sub tabs. More...
 
 editPublicSection ()
 
 savePublicSection ()
 
 savePublicSectionAccess ()
 Saves lm access mode. More...
 
 savePublicSectionPages ()
 Saves public lm pages. More...
 
 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...
 
 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
 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...
 
 prepareOutput ($a_show_subobjects=true)
 prepare output More...
 
 getAdminTabs ()
 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 ()
 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...
 
 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...
 
 editObject ()
 edit object More...
 
 addExternalEditFormCustom (ilPropertyFormGUI $a_form)
 
 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...
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html. More...
 

Static Public Member Functions

static _forwards ()
 
static getMultiLangHeader ($a_lm_id, $a_gui_class, $a_mode="")
 Get multi lang header. More...
 
static _goto ($a_target)
 redirect script More...
 
static getLayoutOption ($a_txt, $a_var, $a_def_option="")
 Get layout option. 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...
 

Protected Member Functions

 afterSave (ilObject $a_new_object)
 
 getBlockedUsersMailSignature ()
 Get mail signature for blocked users. More...
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 Get object service. More...
 
 assignObject ()
 
 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...
 
 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...
 
 validateCustom (ilPropertyFormGUI $a_form)
 Validate custom values (if not possible with checkInput()) 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, $a_catch_errors=true)
 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...
 
 getTabs ()
 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 (ilColumnGUI $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...
 

Protected Attributes

 $tabs
 
 $error
 
 $rbacsystem
 
 $plugin_admin
 
 $help
 
 $db
 
 $log
 
 $ctrl
 
 $locator
 
- Protected Attributes inherited from ilObjectGUI
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 

Additional Inherited Members

- Data Fields inherited from ilObjectGUI
const COPY_WIZARD_NEEDS_PAGE = 1
 
 $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
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

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

Constructor.

public

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

References $DIC, $ilCtrl, ilObjectGUI\$lng, settings(), and user().

68  {
69  global $DIC;
70 
71  $this->lng = $DIC->language();
72  $this->access = $DIC->access();
73  $this->tabs = $DIC->tabs();
74  $this->error = $DIC["ilErr"];
75  $this->settings = $DIC->settings();
76  $this->user = $DIC->user();
77  $this->tpl = $DIC["tpl"];
78  $this->toolbar = $DIC->toolbar();
79  $this->rbacsystem = $DIC->rbac()->system();
80  $this->tree = $DIC->repositoryTree();
81  $this->plugin_admin = $DIC["ilPluginAdmin"];
82  $this->help = $DIC["ilHelp"];
83  $this->locator = $DIC["ilLocator"];
84  $this->db = $DIC->database();
85  $this->log = $DIC["ilLog"];
86  $lng = $DIC->language();
87  $ilCtrl = $DIC->ctrl();
88  $this->ctrl = $ilCtrl;
89  $lng->loadLanguageModule("content");
90  $lng->loadLanguageModule("obj");
91  parent::__construct($a_data, $a_id, $a_call_by_reference, false);
92  }
settings()
Definition: settings.php:2
global $DIC
Definition: saml.php:7
user()
Definition: user.php:4
global $ilCtrl
Definition: ilias.php:18
+ Here is the call graph for this function:

Member Function Documentation

◆ __initLinkChecker()

ilObjContentObjectGUI::__initLinkChecker ( )

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

References $db, and $ilDB.

Referenced by linkChecker(), and refreshLinkCheck().

2899  {
2900  $ilDB = $this->db;
2901 
2902  include_once './Services/LinkChecker/classes/class.ilLinkChecker.php';
2903 
2904  $this->link_checker_obj = new ilLinkChecker($ilDB, false);
2905  $this->link_checker_obj->setObjId($this->object->getId());
2906 
2907  return true;
2908  }
class for checking external links in page objects Normally used in Cron jobs, but should be extensibl...
global $ilDB
+ Here is the caller graph for this function:

◆ __initLMMenuEditor()

ilObjContentObjectGUI::__initLMMenuEditor ( )

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

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

2911  {
2912  include_once './Modules/LearningModule/classes/class.ilLMMenuEditor.php';
2913 
2914  $this->lmme_obj = new ilLMMenuEditor();
2915  $this->lmme_obj->setObjId($this->object->getId());
2916 
2917  return true;
2918  }
class for editing lm menu
+ Here is the caller graph for this function:

◆ _forwards()

static ilObjContentObjectGUI::_forwards ( )
static

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

408  {
409  return array("ilLMPageObjectGUI", "ilStructureObjectGUI","ilObjStyleSheetGUI");
410  }

◆ _goto()

static ilObjContentObjectGUI::_goto (   $a_target)
static

redirect script

Parameters
string$a_target

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

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

3330  {
3331  global $DIC;
3332 
3333  $ilAccess = $DIC->access();
3334  $ilErr = $DIC["ilErr"];
3335  $lng = $DIC->language();
3336 
3337  if ($ilAccess->checkAccess("read", "", $a_target)) {
3338  $_GET["baseClass"] = "ilLMPresentationGUI";
3339  $_GET["ref_id"] = $a_target;
3340  $_GET["cmd"] = "resume";
3341  include("ilias.php");
3342  exit;
3343  } elseif ($ilAccess->checkAccess("visible", "", $a_target)) {
3344  $_GET["baseClass"] = "ilLMPresentationGUI";
3345  $_GET["ref_id"] = $a_target;
3346  $_GET["cmd"] = "infoScreen";
3347  include("ilias.php");
3348  exit;
3349  } elseif ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
3350  ilUtil::sendFailure(sprintf(
3351  $lng->txt("msg_no_perm_read_item"),
3353  ), true);
3355  }
3356 
3357 
3358  $ilErr->raiseError($lng->txt("msg_no_perm_read_lm"), $ilErr->FATAL);
3359  }
global $DIC
Definition: saml.php:7
$_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.
exit
Definition: backend.php:16
+ Here is the call graph for this function:

◆ activatePages()

ilObjContentObjectGUI::activatePages ( )

activates or deactivates pages

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

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

1408  {
1409  if (is_array($_POST["id"])) {
1410  foreach ($_POST["id"] as $id) {
1411  include_once("./Modules/LearningModule/classes/class.ilLMPage.php");
1412  $act = ilLMPage::_lookupActive($id, $this->object->getType());
1413  ilLMPage::_writeActive($id, $this->object->getType(), !$act);
1414  }
1415  }
1416 
1417  $this->ctrl->redirect($this, "pages");
1418  }
if(!array_key_exists('StateId', $_REQUEST)) $id
static _lookupActive($a_id, $a_parent_type, $a_check_scheduled_activation=false, $a_lang="-")
lookup activation status
static _writeActive($a_id, $a_parent_type, $a_active, $a_reset_scheduled_activation=true, $a_lang="-")
write activation status
$_POST["username"]
+ Here is the call 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 2197 of file class.ilObjContentObjectGUI.php.

References $_GET, $key, $locator, ilObjectGUI\$obj_id, $path, $row, $title, and ilLMPageObject\_getPresentationTitle().

Referenced by executeCommand().

2198  {
2200 
2201  if (!$a_omit_obj_id) {
2202  $obj_id = $_GET["obj_id"];
2203  }
2204  $lmtree = $this->object->getTree();
2205 
2206  if (($obj_id != 0) && $lmtree->isInTree($obj_id)) {
2207  $path = $lmtree->getPathFull($obj_id);
2208  } else {
2209  $path = $lmtree->getPathFull($lmtree->getRootId());
2210  if ($obj_id != 0) {
2211  $path[] = array("type" => "pg", "child" => $this->obj_id,
2212  "title" => ilLMPageObject::_getPresentationTitle($this->obj_id));
2213  }
2214  }
2215 
2216  foreach ($path as $key => $row) {
2217  if ($row["child"] == 1) {
2218  $this->ctrl->setParameter($this, "obj_id", "");
2219  $locator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this, "chapters"));
2220  } else {
2221  $title = $row["title"];
2222  switch ($row["type"]) {
2223  case "st":
2224  $this->ctrl->setParameterByClass("ilstructureobjectgui", "obj_id", $row["child"]);
2225  $locator->addItem($title, $this->ctrl->getLinkTargetByClass("ilstructureobjectgui", "view"));
2226  break;
2227 
2228  case "pg":
2229  $this->ctrl->setParameterByClass("illmpageobjectgui", "obj_id", $row["child"]);
2230  $locator->addItem($title, $this->ctrl->getLinkTargetByClass("illmpageobjectgui", "edit"));
2231  break;
2232  }
2233  }
2234  }
2235  if (!$a_omit_obj_id) {
2236  $this->ctrl->setParameter($this, "obj_id", $_GET["obj_id"]);
2237  }
2238  }
$path
Definition: aliased.php:25
$_GET["client_id"]
$row
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="-", $a_include_short=false)
presentation title doesn't have to be page title, it may be chapter title + page title or chapter tit...
$key
Definition: croninfo.php:18
+ 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 2923 of file class.ilObjContentObjectGUI.php.

References $ctrl, $form, $ilCtrl, $tabs, ilObjectGUI\$toolbar, ilObjectGUI\$tpl, initMenuEntryForm(), setSubTabs(), and ilObjectGUI\setTabs().

2924  {
2925  $ilTabs = $this->tabs;
2926  $ilToolbar = $this->toolbar;
2927  $tpl = $this->tpl;
2928  $ilCtrl = $this->ctrl;
2929 
2930  $this->setTabs();
2931 
2932  $ilTabs->setTabActive("settings");
2933  $this->setSubTabs("cont_lm_menu");
2934 
2935  $ilToolbar->addButton(
2936  $this->lng->txt("lm_menu_select_internal_object"),
2937  $ilCtrl->getLinkTarget($this, "showEntrySelector")
2938  );
2939 
2940  $form = $this->initMenuEntryForm("create");
2941  $this->tpl->setContent($form->getHTML());
2942  }
setSubTabs($a_active)
Set sub tabs.
initMenuEntryForm($a_mode="edit")
Init menu entry form.
global $ilCtrl
Definition: ilias.php:18
if(isset($_POST['submit'])) $form
setTabs()
set admin tabs public
+ Here is the call graph for this function:

◆ addTabs()

ilObjContentObjectGUI::addTabs (   $a_act = "")

Adds tabs.

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

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

Referenced by setTabs().

2520  {
2522  $ilTabs = $this->tabs;
2523  $lng = $this->lng;
2524 
2525  // content
2526  $ilTabs->addTab(
2527  "content",
2528  $lng->txt("content"),
2529  $this->ctrl->getLinkTarget($this, "chapters")
2530  );
2531 
2532  // info
2533  $ilTabs->addTab(
2534  "info",
2535  $lng->txt("info_short"),
2536  $this->ctrl->getLinkTargetByClass("ilinfoscreengui", 'showSummary')
2537  );
2538 
2539  // settings
2540  $ilTabs->addTab(
2541  "settings",
2542  $lng->txt("settings"),
2543  $this->ctrl->getLinkTarget($this, 'properties')
2544  );
2545 
2546  // questions
2547  $ilTabs->addTab(
2548  "questions",
2549  $lng->txt("objs_qst"),
2550  $this->ctrl->getLinkTarget($this, "listQuestions")
2551  );
2552 
2553  // learning progress
2554  include_once './Services/Tracking/classes/class.ilLearningProgressAccess.php';
2555  if (ilLearningProgressAccess::checkAccess($this->object->getRefId()) and ($this->object->getType() == 'lm')) {
2556  $ilTabs->addTab(
2557  'learning_progress',
2558  $lng->txt("learning_progress"),
2559  $this->ctrl->getLinkTargetByClass(array('illearningprogressgui'), '')
2560  );
2561  }
2562 
2563  if ($this->object->getType() != "lm") {
2564  // bibliographical data
2565  $ilTabs->addTab(
2566  "bib_data",
2567  $lng->txt("bib_data"),
2568  $this->ctrl->getLinkTarget($this, "editBibItem")
2569  );
2570  }
2571 
2572  // meta data
2573  include_once "Services/Object/classes/class.ilObjectMetaDataGUI.php";
2574  $mdgui = new ilObjectMetaDataGUI($this->object);
2575  $mdtab = $mdgui->getTab();
2576  if ($mdtab) {
2577  $ilTabs->addTab(
2578  "meta",
2579  $lng->txt("meta_data"),
2580  $mdtab
2581  );
2582  }
2583 
2584  if ($this->object->getType() == "lm") {
2585  // export
2586  $ilTabs->addTab(
2587  "export",
2588  $lng->txt("export"),
2589  $this->ctrl->getLinkTargetByClass("ilexportgui", "")
2590  );
2591  }
2592 
2593  // permissions
2594  if ($rbacsystem->checkAccess('edit_permission', $this->object->getRefId())) {
2595  $ilTabs->addTab(
2596  "perm",
2597  $lng->txt("perm_settings"),
2598  $this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm")
2599  );
2600  }
2601 
2602  if ($a_act != "") {
2603  $ilTabs->activateTab($a_act);
2604  }
2605 
2606  // presentation view
2607  $ilTabs->addNonTabbedLink(
2608  "pres_mode",
2609  $lng->txt("cont_presentation_view"),
2610  "ilias.php?baseClass=ilLMPresentationGUI&ref_id=" . $this->object->getRefID(),
2611  "_top"
2612  );
2613  }
Class ilObjectMetaDataGUI.
static checkAccess($a_ref_id, $a_allow_only_read=true)
check access to learning progress
+ 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 3607 of file class.ilObjContentObjectGUI.php.

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

3608  {
3609  $lng = $this->lng;
3610  $ilCtrl = $this->ctrl;
3611 
3612  $tt_id = ilUtil::stripSlashes($_POST["tooltip_id"]);
3613  if (trim($tt_id) != "") {
3614  if (is_int(strpos($tt_id, "_"))) {
3615  include_once("./Services/Help/classes/class.ilHelp.php");
3616  ilHelp::addTooltip(trim($tt_id), "");
3617  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
3618 
3619  $fu = strpos($tt_id, "_");
3620  $comp = substr($tt_id, 0, $fu);
3621  ilSession::set("help_tt_comp", ilUtil::stripSlashes($comp));
3622  } else {
3623  ilUtil::sendFailure($lng->txt("cont_help_no_valid_tooltip_id"), true);
3624  }
3625  }
3626  $ilCtrl->redirect($this, "showTooltipList");
3627  }
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.
$_POST["username"]
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 1081 of file class.ilObjContentObjectGUI.php.

References ilObject\getRefId(), ilUtil\redirect(), and ilObject\update().

1082  {
1083  $a_new_object->setCleanFrames(true);
1084  $a_new_object->update();
1085 
1086  // create content object tree
1087  $a_new_object->createLMTree();
1088 
1089  // create a first chapter
1090  $a_new_object->addFirstChapterAndPage();
1091 
1092  // always send a message
1093  ilUtil::sendSuccess($this->lng->txt($this->type . "_added"), true);
1094  ilUtil::redirect("ilias.php?ref_id=" . $a_new_object->getRefId() .
1095  "&baseClass=ilLMEditorGUI");
1096  }
getRefId()
get reference id public
update()
update object in db
static redirect($a_script)
+ Here is the call graph for this function:

◆ cancel()

ilObjContentObjectGUI::cancel ( )

cancel action

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

References $_GET.

1760  {
1761  if ($_GET["new_type"] == "pg") {
1762  $this->ctrl->redirect($this, "pages");
1763  } else {
1764  $this->ctrl->redirect($this, "chapters");
1765  }
1766  }
$_GET["client_id"]

◆ cancelDelete()

ilObjContentObjectGUI::cancelDelete ( )

cancel delete

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

References $_GET.

1553  {
1554  $this->ctrl->redirect($this, $_GET["backcmd"]);
1555  }
$_GET["client_id"]

◆ chapters()

ilObjContentObjectGUI::chapters ( )

show chapters

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

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

1238  {
1239  $lng = $this->lng;
1240  $ilCtrl = $this->ctrl;
1241 
1242  $this->setTabs();
1243  $this->setContentSubTabs("chapters");
1244 
1245  $ilCtrl->setParameter($this, "backcmd", "chapters");
1246 
1247  include_once("./Modules/LearningModule/classes/class.ilChapterHierarchyFormGUI.php");
1248  $form_gui = new ilChapterHierarchyFormGUI($this->object->getType(), $_GET["transl"]);
1249  $form_gui->setFormAction($ilCtrl->getFormAction($this));
1250  $form_gui->setTitle($this->object->getTitle());
1251  $form_gui->setIcon(ilUtil::getImagePath("icon_lm.svg"));
1252  $form_gui->setTree($this->lm_tree);
1253  $form_gui->setMaxDepth(0);
1254  $form_gui->setCurrentTopNodeId($this->tree->getRootId());
1255  $form_gui->addMultiCommand($lng->txt("delete"), "delete");
1256  $form_gui->addMultiCommand($lng->txt("cut"), "cutItems");
1257  $form_gui->addMultiCommand($lng->txt("copy"), "copyItems");
1258  if ($this->object->getLayoutPerPage()) {
1259  $form_gui->addMultiCommand($lng->txt("cont_set_layout"), "setPageLayoutInHierarchy");
1260  }
1261  $form_gui->setDragIcon(ilUtil::getImagePath("icon_st.svg"));
1262  $form_gui->addCommand($lng->txt("cont_save_all_titles"), "saveAllTitles");
1263  $up_gui = "ilobjlearningmodulegui";
1264 
1265  $ctpl = new ilTemplate("tpl.chap_and_pages.html", true, true, "Modules/LearningModule");
1266  $ctpl->setVariable("HIERARCHY_FORM", $form_gui->getHTML());
1267  $ilCtrl->setParameter($this, "obj_id", "");
1268 
1269  $ml_head = self::getMultiLangHeader($this->object->getId(), $this);
1270 
1271  $this->tpl->setContent($ml_head . $ctpl->get());
1272  }
$_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.
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 1564 of file class.ilObjContentObjectGUI.php.

References $_GET, $_POST, $error, $id, ilObjectGUI\$ilErr, ilObjectGUI\$tree, ilHistory\_createEntry(), ilLMObject\_lookupTitle(), ilLMObjectFactory\getInstance(), and IL_FIRST_NODE.

Referenced by ilLMObjectGUI\confirmedDelete().

1565  {
1566  $ilErr = $this->error;
1567 
1568  $tree = new ilTree($this->object->getId());
1569  $tree->setTableNames('lm_tree', 'lm_data');
1570  $tree->setTreeTablePK("lm_id");
1571 
1572  // check number of objects
1573  if (!$_POST["id"]) {
1574  $ilErr->raiseError($this->lng->txt("no_checkbox"), $ilErr->MESSAGE);
1575  }
1576 
1577  // delete all selected objects
1578  foreach ($_POST["id"] as $id) {
1579  if ($id != IL_FIRST_NODE) {
1580  $obj = ilLMObjectFactory::getInstance($this->object, $id, false);
1581  $node_data = $tree->getNodeData($id);
1582  if (is_object($obj)) {
1583  $obj->setLMId($this->object->getId());
1584 
1585  include_once("./Services/History/classes/class.ilHistory.php");
1587  $this->object->getId(),
1588  "delete_" . $obj->getType(),
1589  array(ilLMObject::_lookupTitle($id), $id),
1590  $this->object->getType()
1591  );
1592 
1593  $obj->delete();
1594  }
1595  if ($tree->isInTree($id)) {
1596  $tree->deleteTree($node_data);
1597  }
1598  }
1599  }
1600 
1601  // check the tree
1602  $this->object->checkTree();
1603 
1604  // feedback
1605  ilUtil::sendSuccess($this->lng->txt("info_deleted"), true);
1606 
1607  if ($a_parent_subobj_id == 0) {
1608  $this->ctrl->redirect($this, $_GET["backcmd"]);
1609  }
1610  }
$_GET["client_id"]
if(!array_key_exists('StateId', $_REQUEST)) $id
static _lookupTitle($a_obj_id)
Lookup title.
static _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
static getInstance(&$a_content_obj, $a_id=0, $a_halt=true)
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
$_POST["username"]
+ 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 3891 of file class.ilObjContentObjectGUI.php.

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

3892  {
3893  $ilCtrl = $this->ctrl;
3894  $tpl = $this->tpl;
3895  $lng = $this->lng;
3896 
3897  include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
3898  $cgui = new ilConfirmationGUI();
3899  $ilCtrl->setParameter($this, "glo_ref_id", $_GET["root_id"]);
3900  $cgui->setFormAction($ilCtrl->getFormAction($this));
3901  $cgui->setHeaderText($lng->txt("cont_link_glo_in_lm"));
3902  $cgui->setCancel($lng->txt("no"), "selectLMGlossary");
3903  $cgui->setConfirm($lng->txt("yes"), "selectLMGlossaryLink");
3904  $tpl->setContent($cgui->getHTML());
3905  }
$_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 1723 of file class.ilObjContentObjectGUI.php.

References copyItems().

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

◆ copyItems()

ilObjContentObjectGUI::copyItems ( )

Copy items to clipboard.

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

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

Referenced by copyChapter().

3395  {
3396  $ilCtrl = $this->ctrl;
3397  $lng = $this->lng;
3398 
3399  $items = ilUtil::stripSlashesArray($_POST["id"]);
3400  if (!is_array($items)) {
3401  ilUtil::sendFailure($lng->txt("no_checkbox"), true);
3402  $ilCtrl->redirect($this, "chapters");
3403  }
3404 
3405  $todel = array(); // delete IDs < 0 (needed for non-js editing)
3406  foreach ($items as $k => $item) {
3407  if ($item < 0) {
3408  $todel[] = $k;
3409  }
3410  }
3411  foreach ($todel as $k) {
3412  unset($items[$k]);
3413  }
3414  ilLMObject::clipboardCopy($this->object->getId(), $items);
3416  ilUtil::sendInfo($lng->txt("cont_selected_items_have_been_copied"), true);
3417  $ilCtrl->redirect($this, "chapters");
3418  }
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.
static setAction($a_action)
$_POST["username"]
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ copyPage()

ilObjContentObjectGUI::copyPage ( )

copy page

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

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

1480  {
1481  $ilErr = $this->error;
1482 
1483  if (!isset($_POST["id"])) {
1484  $ilErr->raiseError($this->lng->txt("no_checkbox"), $ilErr->MESSAGE);
1485  }
1486 
1487  $items = ilUtil::stripSlashesArray($_POST["id"]);
1488  ilLMObject::clipboardCopy($this->object->getId(), $items);
1490 
1491  ilUtil::sendInfo($this->lng->txt("cont_selected_items_have_been_copied"), true);
1492 
1493  $this->ctrl->redirect($this, "pages");
1494  }
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 stripSlashesArray($a_arr, $a_strip_html=true, $a_allow="")
Strip slashes from array.
static setAction($a_action)
$_POST["username"]
+ Here is the call graph for this function:

◆ createPDF()

ilObjContentObjectGUI::createPDF ( )

export content object

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

2158  {
2159  require_once("./Modules/LearningModule/classes/class.ilContObjectExport.php");
2160  $cont_exp = new ilContObjectExport($this->object, "pdf");
2161  $cont_exp->buildExportFile();
2162  $this->offlineList();
2163  }
Export class for content objects.

◆ createStyle()

ilObjContentObjectGUI::createStyle ( )

Create Style.

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

References $ctrl, and $ilCtrl.

809  {
811 
812  $ilCtrl->redirectByClass("ilobjstylesheetgui", "create");
813  }
global $ilCtrl
Definition: ilias.php:18

◆ cutChapter()

ilObjContentObjectGUI::cutChapter ( )

Cut chapter(s)

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

References cutItems().

3424  {
3425  $this->cutItems("chapters");
3426  }
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 3364 of file class.ilObjContentObjectGUI.php.

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

Referenced by cutChapter().

3365  {
3366  $ilCtrl = $this->ctrl;
3367  $lng = $this->lng;
3368 
3369  $items = ilUtil::stripSlashesArray($_POST["id"]);
3370  if (!is_array($items)) {
3371  ilUtil::sendFailure($lng->txt("no_checkbox"), true);
3372  $ilCtrl->redirect($this, $a_return);
3373  }
3374 
3375  $todel = array(); // delete IDs < 0 (needed for non-js editing)
3376  foreach ($items as $k => $item) {
3377  if ($item < 0) {
3378  $todel[] = $k;
3379  }
3380  }
3381  foreach ($todel as $k) {
3382  unset($items[$k]);
3383  }
3384  ilLMObject::clipboardCut($this->object->getId(), $items);
3386  ilUtil::sendInfo($lng->txt("cont_selected_items_have_been_cut"), true);
3387 
3388  $ilCtrl->redirect($this, $a_return);
3389  }
global $ilCtrl
Definition: ilias.php:18
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static 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.
static setAction($a_action)
$_POST["username"]
+ 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 1503 of file class.ilObjContentObjectGUI.php.

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

Referenced by ilLMObjectGUI\delete().

1504  {
1505  $ilErr = $this->error;
1506 
1507  if (!isset($_POST["id"])) {
1508  $ilErr->raiseError($this->lng->txt("no_checkbox"), $ilErr->MESSAGE);
1509  }
1510 
1511  if (count($_POST["id"]) == 1 && $_POST["id"][0] == IL_FIRST_NODE) {
1512  $ilErr->raiseError($this->lng->txt("cont_select_item"), $ilErr->MESSAGE);
1513  }
1514 
1515  if ($a_parent_subobj_id == 0) {
1516  $this->setTabs();
1517  }
1518 
1519  if ($a_parent_subobj_id != 0) {
1520  $this->ctrl->setParameterByClass("ilStructureObjectGUI", "backcmd", $_GET["backcmd"]);
1521  $this->ctrl->setParameterByClass("ilStructureObjectGUI", "obj_id", $a_parent_subobj_id);
1522  $form_action = $this->ctrl->getFormActionByClass("ilStructureObjectGUI");
1523  } else {
1524  $this->ctrl->setParameter($this, "backcmd", $_GET["backcmd"]);
1525  $form_action = $this->ctrl->getFormAction($this);
1526  }
1527 
1528  // display confirmation message
1529  include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
1530  $cgui = new ilConfirmationGUI();
1531  $cgui->setFormAction($form_action);
1532  $cgui->setHeaderText($this->lng->txt("info_delete_sure"));
1533  $cgui->setCancel($this->lng->txt("cancel"), "cancelDelete");
1534  $cgui->setConfirm($this->lng->txt("confirm"), "confirmedDelete");
1535 
1536  foreach ($_POST["id"] as $id) {
1537  if ($id != IL_FIRST_NODE) {
1538  $obj = new ilLMObject($this->object, $id);
1539  $caption = ilUtil::getImageTagByType($obj->getType(), $this->tpl->tplPath) .
1540  " " . $obj->getTitle();
1541 
1542  $cgui->addItem("id[]", $id, $caption);
1543  }
1544  }
1545 
1546  $this->tpl->setContent($cgui->getHTML());
1547  }
$_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...
if(!array_key_exists('StateId', $_REQUEST)) $id
const IL_FIRST_NODE
Definition: class.ilTree.php:5
setTabs()
set admin tabs public
Class ilLMObject.
$_POST["username"]
Confirmation screen class.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ deleteMenuEntry()

ilObjContentObjectGUI::deleteMenuEntry ( )

drop a menu entry

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

References $_GET, $error, ilObjectGUI\$ilErr, and __initLMMenuEditor().

3045  {
3046  $ilErr = $this->error;
3047 
3048  if (empty($_GET["menu_entry"])) {
3049  $ilErr->raiseError($this->lng->txt("no_menu_entry_id"), $ilErr->MESSAGE);
3050  }
3051 
3052  $this->__initLMMenuEditor();
3053  $this->lmme_obj->delete($_GET["menu_entry"]);
3054 
3055  ilUtil::sendSuccess($this->lng->txt("msg_entry_removed"), true);
3056  $this->ctrl->redirect($this, "editMenuProperties");
3057  }
$_GET["client_id"]
+ Here is the call graph for this function:

◆ deleteStyle()

ilObjContentObjectGUI::deleteStyle ( )

Delete Style.

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

References $ctrl, and $ilCtrl.

829  {
831 
832  $ilCtrl->redirectByClass("ilobjstylesheetgui", "delete");
833  }
global $ilCtrl
Definition: ilias.php:18

◆ deleteTooltips()

ilObjContentObjectGUI::deleteTooltips ( )

Delete tooltips.

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

References $_POST, $ctrl, $id, $ilCtrl, ilObjectGUI\$lng, and ilHelp\deleteTooltip().

3675  {
3676  $lng = $this->lng;
3677  $ilCtrl = $this->ctrl;
3678 
3679  if (is_array($_POST["id"])) {
3680  include_once("./Services/Help/classes/class.ilHelp.php");
3681  foreach ($_POST["id"] as $id) {
3682  ilHelp::deleteTooltip((int) $id);
3683  }
3684  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
3685  }
3686  $ilCtrl->redirect($this, "showTooltipList");
3687  }
if(!array_key_exists('StateId', $_REQUEST)) $id
global $ilCtrl
Definition: ilias.php:18
static deleteTooltip($a_id)
Delete tooltip.
$_POST["username"]
+ Here is the call graph for this function:

◆ downloadPDFFile()

ilObjContentObjectGUI::downloadPDFFile ( )

download export file

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

References $_POST, $error, ilObjectGUI\$ilErr, and ilUtil\deliverFile().

1848  {
1849  $ilErr = $this->error;
1850 
1851  if (!isset($_POST["file"])) {
1852  $ilErr->raiseError($this->lng->txt("no_checkbox"), $ilErr->MESSAGE);
1853  }
1854 
1855  if (count($_POST["file"]) > 1) {
1856  $ilErr->raiseError($this->lng->txt("cont_select_max_one_item"), $ilErr->MESSAGE);
1857  }
1858 
1859 
1860  $export_dir = $this->object->getOfflineDirectory();
1861 
1862  $file = basename($_POST["file"][0]);
1863 
1864  ilUtil::deliverFile($export_dir . "/" . $file, $file);
1865  }
$_POST["username"]
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:

◆ editGlossaries()

ilObjContentObjectGUI::editGlossaries ( )

Edit automatically linked glossaries.

Parameters

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

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

3832  {
3833  $tpl = $this->tpl;
3834  $ilToolbar = $this->toolbar;
3835  $lng = $this->lng;
3836  $ilCtrl = $this->ctrl;
3837  $ilTabs = $this->tabs;
3838 
3839  $this->setTabs();
3840  $ilTabs->setTabActive("settings");
3841  $this->setSubTabs("cont_glossaries");
3842 
3843  $ilToolbar->addButton(
3844  $lng->txt("add"),
3845  $ilCtrl->getLinkTarget($this, "showLMGlossarySelector")
3846  );
3847 
3848  include_once("./Modules/LearningModule/classes/class.ilLMGlossaryTableGUI.php");
3849  $tab = new ilLMGlossaryTableGUI($this->object, $this, "editGlossaries");
3850 
3851  $tpl->setContent($tab->getHTML());
3852  }
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 3970 of file class.ilObjContentObjectGUI.php.

References $_GET, $ctrl, and $ilCtrl.

3971  {
3972  $ilCtrl = $this->ctrl;
3973 
3974  $ilCtrl->setParameter($this, "transl", "");
3975  if ($_GET["lang_switch_mode"] == "short_titles") {
3976  $ilCtrl->redirectByClass("illmeditshorttitlesgui", "");
3977  }
3978  $ilCtrl->redirect($this, "chapters");
3979  }
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18

◆ editMenuEntry()

ilObjContentObjectGUI::editMenuEntry ( )

edit menu entry form

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

References $_GET, $ctrl, $error, $form, $ilCtrl, ilObjectGUI\$ilErr, $tabs, ilObjectGUI\$toolbar, initMenuEntryForm(), setSubTabs(), and ilObjectGUI\setTabs().

3063  {
3064  $ilToolbar = $this->toolbar;
3065  $ilCtrl = $this->ctrl;
3066  $ilTabs = $this->tabs;
3067  $ilErr = $this->error;
3068 
3069  $this->setTabs();
3070 
3071  $ilTabs->setTabActive("settings");
3072  $this->setSubTabs("cont_lm_menu");
3073 
3074 
3075  if (empty($_GET["menu_entry"])) {
3076  $ilErr->raiseError($this->lng->txt("no_menu_entry_id"), $ilErr->MESSAGE);
3077  }
3078 
3079  $ilCtrl->saveParameter($this, array("menu_entry"));
3080  $ilToolbar->addButton(
3081  $this->lng->txt("lm_menu_select_internal_object"),
3082  $ilCtrl->getLinkTarget($this, "showEntrySelector")
3083  );
3084 
3085  $form = $this->initMenuEntryForm("edit");
3086  $this->tpl->setContent($form->getHTML());
3087  }
setSubTabs($a_active)
Set sub tabs.
initMenuEntryForm($a_mode="edit")
Init menu entry form.
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
if(isset($_POST['submit'])) $form
setTabs()
set admin tabs public
+ Here is the call graph for this function:

◆ editMenuProperties()

ilObjContentObjectGUI::editMenuProperties ( )

Edit menu properies.

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

References $ctrl, $form, $ilCtrl, ilObjectGUI\$lng, $table, $tabs, ilObjectGUI\$toolbar, ilObjectGUI\$tpl, __initLMMenuEditor(), initMenuForm(), setSubTabs(), and ilObjectGUI\setTabs().

923  {
924  $lng = $this->lng;
925  $ilTabs = $this->tabs;
927  $tpl = $this->tpl;
928  $ilToolbar = $this->toolbar;
929 
930  $lng->loadLanguageModule("style");
931  $this->setTabs();
932  $ilTabs->setTabActive("settings");
933  $this->setSubTabs("cont_lm_menu");
934 
935  $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
936  $ilToolbar->addFormButton($this->lng->txt("add_menu_entry"), "addMenuEntry");
937  $ilToolbar->setCloseFormTag(false);
938 
939  $form = $this->initMenuForm();
940  $form->setOpenTag(false);
941  $form->setCloseTag(false);
942 
943  $this->__initLMMenuEditor();
944  $entries = $this->lmme_obj->getMenuEntries();
945  include_once("./Modules/LearningModule/classes/class.ilLMMenuItemsTableGUI.php");
946  $table = new ilLMMenuItemsTableGUI($this, "editMenuProperties", $this->lmme_obj);
947  $table->setOpenFormTag(false);
948 
949  $tpl->setContent($form->getHTML() . "<br />" . $table->getHTML());
950  }
TableGUI class for lm menu items.
setSubTabs($a_active)
Set sub tabs.
global $ilCtrl
Definition: ilias.php:18
if(isset($_POST['submit'])) $form
setTabs()
set admin tabs public
if(empty($password)) $table
Definition: pwgen.php:24
+ Here is the call graph for this function:

◆ editPublicSection()

ilObjContentObjectGUI::editPublicSection ( )

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

References ilObjectGUI\$access, $si, $tabs, ilObjectGUI\$toolbar, ilObjectGUI\$tree, ilUtil\sendInfo(), setSubTabs(), and ilObjectGUI\setTabs().

2689  {
2690  $ilTabs = $this->tabs;
2691  $ilToolbar = $this->toolbar;
2692  $ilAccess = $this->access;
2693 
2694 
2695  if (!$ilAccess->checkAccessOfUser(ANONYMOUS_USER_ID, "read", "", $this->object->getRefId())) {
2696  ilUtil::sendInfo($this->lng->txt("cont_anonymous_user_missing_perm"));
2697  }
2698 
2699  $this->setTabs();
2700  $this->setSubTabs("public_section");
2701  $ilTabs->setTabActive("settings");
2702 
2703  $this->tpl->addBlockFile(
2704  "ADM_CONTENT",
2705  "adm_content",
2706  "tpl.lm_public_selector.html",
2707  "Modules/LearningModule"
2708  );
2709 
2710  // get learning module object
2711  $this->lm_obj = new ilObjLearningModule($this->ref_id, true);
2712 
2713 
2714  // public mode
2715  $modes = array("complete" => $this->lng->txt("all_pages"), "selected" => $this->lng->txt("selected_pages_only"));
2716  include_once("./Services/Form/classes/class.ilSelectInputGUI.php");
2717  $si = new ilSelectInputGUI($this->lng->txt("choose_public_mode"), "lm_public_mode");
2718  $si->setOptions($modes);
2719  $si->setValue($this->object->getPublicAccessMode());
2720  $ilToolbar->addInputItem($si, true);
2721  $ilToolbar->addFormButton($this->lng->txt("save"), "savePublicSectionAccess");
2722  $ilToolbar->setFormAction($this->ctrl->getFormAction($this, "savePublicSectionAccess"));
2723 
2724  if ($this->object->getPublicAccessMode() == "selected") {
2725  $this->tpl->setCurrentBlock("select_pages");
2726  $this->tpl->setVariable("FORMACTION", $this->ctrl->getLinkTarget($this, "savePublicSectionPages"));
2727 
2728  include_once("./Modules/LearningModule/classes/class.ilPublicSectionExplorerGUI.php");
2729  $tree = new ilPublicSectionExplorerGUI($this, "editPublicSection", $this->lm_obj);
2730  $tree->setSelectMode("pages", true);
2731  $tree->setSkipRootNode(true);
2732 
2733  $this->tpl->setVariable("EXPLORER", $tree->getHTML());
2734  $this->tpl->setVariable("TXT_SAVE", $this->lng->txt("save"));
2735 
2736  $this->tpl->parseCurrentBlock();
2737  }
2738  }
Class ilObjLearningModule.
setSubTabs($a_active)
Set sub tabs.
This class represents a selection list property in a property form.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
setTabs()
set admin tabs public
+ Here is the call graph for this function:

◆ editStyle()

ilObjContentObjectGUI::editStyle ( )

Edit Style.

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

References $ctrl, and $ilCtrl.

819  {
821 
822  $ilCtrl->redirectByClass("ilobjstylesheetgui", "edit");
823  }
global $ilCtrl
Definition: ilias.php:18

◆ editStyleProperties()

ilObjContentObjectGUI::editStyleProperties ( )

Edit style properties.

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

References ilObjectGUI\$tpl, and initStylePropertiesForm().

719  {
720  $tpl = $this->tpl;
721 
722  $this->initStylePropertiesForm();
723  $tpl->setContent($this->form->getHTML());
724  }
initStylePropertiesForm()
Init style properties form.
+ Here is the call graph for this function:

◆ executeCommand()

ilObjContentObjectGUI::executeCommand ( )

execute command

Returns
bool|mixed
Exceptions
ilCtrlException

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

References $_GET, $_POST, ilObjectGUI\$access, $ctrl, $error, $GLOBALS, $ilCtrl, ilObjectGUI\$ilErr, $info, $l, ilObjectGUI\$lng, $ret, $tabs, ilObjectGUI\addHeaderAction(), addLocations(), explorer(), ilObjectGUI\getCreationMode(), ilLMObjectFactory\getInstance(), ilObjectTranslation\getInstance(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), ilLearningProgressBaseGUI\LP_CONTEXT_REPOSITORY, ilObjectGUI\omitLocator(), ilObjectGUI\prepareOutput(), ilUtil\sendInfo(), setContentSubTabs(), ilLTIProviderObjectSettingGUI\setCustomRolesForSelection(), setSubTabs(), and ilObjectGUI\setTabs().

100  {
101  $ilAccess = $this->access;
102  $lng = $this->lng;
103  $ilTabs = $this->tabs;
106 
107  if ($this->ctrl->getRedirectSource() == "ilinternallinkgui") {
108  $this->explorer();
109  return;
110  }
111 
112  if ($this->ctrl->getCmdClass() == "ilinternallinkgui") {
113  $this->ctrl->setReturn($this, "explorer");
114  }
115 
116  // get next class that processes or forwards current command
117  $next_class = $this->ctrl->getNextClass($this);
118 
119  // get current command
120  if ($_GET["to_props"] == 1) {
121  $cmd = $this->ctrl->getCmd("properties");
122  } else {
123  $cmd = $this->ctrl->getCmd("chapters");
124  }
125 
126 
127  switch ($next_class) {
128  case 'illtiproviderobjectsettinggui':
129 
130  $this->setTabs();
131  $ilTabs->setTabActive("settings");
132  $this->setSubTabs("lti_provider");
133 
134  $lti_gui = new ilLTIProviderObjectSettingGUI($this->object->getRefId());
135  $lti_gui->setCustomRolesForSelection($GLOBALS['DIC']->rbac()->review()->getLocalRoles($this->object->getRefId()));
136  $lti_gui->offerLTIRolesForSelection(true);
137  $this->ctrl->forwardCommand($lti_gui);
138  break;
139 
140 
141 
142  case "illearningprogressgui":
143  $this->addHeaderAction();
144  $this->addLocations();
145  include_once './Services/Tracking/classes/class.ilLearningProgressGUI.php';
146  $this->setTabs("learning_progress");
147 
148  $new_gui = new ilLearningProgressGUI(ilLearningProgressGUI::LP_CONTEXT_REPOSITORY, $this->object->getRefId());
149  $this->ctrl->forwardCommand($new_gui);
150 
151  break;
152 
153  case 'ilobjectmetadatagui':
154  if (!$ilAccess->checkAccess('write', '', $this->object->getRefId())) {
155  $ilErr->raiseError($this->lng->txt('permission_denied'), $ilErr->WARNING);
156  }
157 
158  $this->addHeaderAction();
159  $this->addLocations();
160  $this->setTabs("meta");
161 
162  include_once 'Services/Object/classes/class.ilObjectMetaDataGUI.php';
163  $md_gui = new ilObjectMetaDataGUI($this->object);
164  $md_gui->addMDObserver($this->object, 'MDUpdateListener', 'Educational'); // #9510
165  $md_gui->addMDObserver($this->object, 'MDUpdateListener', 'General');
166  $this->ctrl->forwardCommand($md_gui);
167  break;
168 
169  case "ilobjstylesheetgui":
170  $this->addLocations();
171  include_once("./Services/Style/Content/classes/class.ilObjStyleSheetGUI.php");
172  $this->ctrl->setReturn($this, "editStyleProperties");
173  $style_gui = new ilObjStyleSheetGUI("", $this->object->getStyleSheetId(), false, false);
174  $style_gui->omitLocator();
175  if ($cmd == "create" || $_GET["new_type"] == "sty") {
176  $style_gui->setCreationMode(true);
177  }
178  $ret = $this->ctrl->forwardCommand($style_gui);
179 
180  if ($cmd == "save" || $cmd == "copyStyle" || $cmd == "importStyle") {
181  $style_id = $ret;
182  $this->object->setStyleSheetId($style_id);
183  $this->object->update();
184  $this->ctrl->redirectByClass("ilobjstylesheetgui", "edit");
185  }
186  break;
187 
188  case "illmpageobjectgui":
189 
190  $ilTabs->setBackTarget(
191  $lng->txt("learning module"),
192  $ilCtrl->getLinkTarget($this, "chapters")
193  );
194  $this->ctrl->saveParameter($this, array("obj_id"));
195  $this->addLocations();
196  $this->ctrl->setReturn($this, "chapters");
197 
198  $pg_gui = new ilLMPageObjectGUI($this->object);
199  if ($_GET["obj_id"] != "") {
200  $obj = ilLMObjectFactory::getInstance($this->object, $_GET["obj_id"]);
201  $pg_gui->setLMPageObject($obj);
202  }
203  $ret = $this->ctrl->forwardCommand($pg_gui);
204  break;
205 
206  case "ilstructureobjectgui":
207  $ilTabs->setBackTarget(
208  $lng->txt("learning module"),
209  $ilCtrl->getLinkTarget($this, "chapters")
210  );
211 
212  $this->ctrl->saveParameter($this, array("obj_id"));
213  $this->addLocations();
214  $this->ctrl->setReturn($this, "chapters");
215  $st_gui = new ilStructureObjectGUI($this->object, $this->object->lm_tree);
216  if ($_GET["obj_id"] != "") {
217  $obj = ilLMObjectFactory::getInstance($this->object, $_GET["obj_id"]);
218  $st_gui->setStructureObject($obj);
219  }
220  $ret = $this->ctrl->forwardCommand($st_gui);
221  if ($cmd == "save" || $cmd == "cancel") {
222  if ($_GET["obj_id"] == "") {
223  $this->ctrl->redirect($this, "chapters");
224  } else {
225  $this->ctrl->setCmd("subchap");
226  $this->executeCommand();
227  }
228  }
229  break;
230 
231  case 'ilpermissiongui':
232  if (strtolower($_GET["baseClass"]) == "iladministrationgui") {
233  $this->prepareOutput();
234  } else {
235  $this->addHeaderAction();
236  $this->addLocations(true);
237  $this->setTabs("perm");
238  }
239  include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
240  $perm_gui = new ilPermissionGUI($this);
241  $ret = $this->ctrl->forwardCommand($perm_gui);
242  break;
243 
244  // infoscreen
245  case 'ilinfoscreengui':
246  $this->addHeaderAction();
247  $this->addLocations(true);
248  $this->setTabs("info");
249  include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
250  $info = new ilInfoScreenGUI($this);
251  $info->enablePrivateNotes();
252  $info->enableLearningProgress();
253 
254  $info->enableNews();
255  if ($ilAccess->checkAccess("write", "", $_GET["ref_id"])) {
256  $info->enableNewsEditing();
257  $info->setBlockProperty("news", "settings", true);
258  }
259 
260  // show standard meta data section
261  $info->addMetaDataSections(
262  $this->object->getId(),
263  0,
264  $this->object->getType()
265  );
266 
267  $ret = $this->ctrl->forwardCommand($info);
268  break;
269 
270  case "ilexportgui":
271  ilUtil::sendInfo($this->lng->txt("lm_only_one_download_per_type"));
272  $this->addHeaderAction();
273  $this->addLocations(true);
274  $this->setTabs("export");
275  include_once("./Services/Export/classes/class.ilExportGUI.php");
276  $exp_gui = new ilExportGUI($this);
277  $exp_gui->addFormat("xml");
278  include_once("./Services/Object/classes/class.ilObjectTranslation.php");
279  $ot = ilObjectTranslation::getInstance($this->object->getId());
280  if ($ot->getContentActivated()) {
281  $exp_gui->addFormat("xml_master", "XML (" . $lng->txt("cont_master_language_only") . ")", $this, "export");
282  $exp_gui->addFormat("xml_masternomedia", "XML (" . $lng->txt("cont_master_language_only_no_media") . ")", $this, "export");
283 
284  $lng->loadLanguageModule("meta");
285  $langs = $ot->getLanguages();
286  foreach ($langs as $l => $ldata) {
287  $exp_gui->addFormat("html_" . $l, "HTML (" . $lng->txt("meta_l_" . $l) . ")", $this, "exportHTML");
288  }
289  $exp_gui->addFormat("html_all", "HTML (" . $lng->txt("cont_all_languages") . ")", $this, "exportHTML");
290  } else {
291  $exp_gui->addFormat("html", "", $this, "exportHTML");
292  }
293 
294  $exp_gui->addFormat("scorm", "", $this, "exportSCORM");
295  $exp_gui->addCustomColumn(
296  $lng->txt("cont_public_access"),
297  $this,
298  "getPublicAccessColValue"
299  );
300  $exp_gui->addCustomMultiCommand(
301  $lng->txt("cont_public_access"),
302  $this,
303  "publishExportFile"
304  );
305  $ret = $this->ctrl->forwardCommand($exp_gui);
306  break;
307 
308  case 'ilobjecttranslationgui':
309  $this->addHeaderAction();
310  $this->addLocations(true);
311  $this->setTabs("settings");
312  $this->setSubTabs("obj_multilinguality");
313  include_once("./Services/Object/classes/class.ilObjectTranslationGUI.php");
314  $transgui = new ilObjectTranslationGUI($this);
315  $transgui->setTitleDescrOnlyMode(false);
316  $this->ctrl->forwardCommand($transgui);
317  break;
318 
319 
320  case "ilcommonactiondispatchergui":
321  include_once("Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
323  $this->ctrl->forwardCommand($gui);
324  break;
325 
326  case 'ilobjectcopygui':
327  $this->prepareOutput();
328  include_once './Services/Object/classes/class.ilObjectCopyGUI.php';
329  $cp = new ilObjectCopyGUI($this);
330  $cp->setType('lm');
331  $this->ctrl->forwardCommand($cp);
332  break;
333 
334  case "ilmobmultisrtuploadgui":
335  $this->addHeaderAction();
336  $this->addLocations(true);
337  $this->setTabs("content");
338  $this->setContentSubTabs("srt_files");
339  include_once("./Services/MediaObjects/classes/class.ilMobMultiSrtUploadGUI.php");
340  include_once("./Modules/LearningModule/classes/class.ilLMMultiSrt.php");
341  $gui = new ilMobMultiSrtUploadGUI(new ilLMMultiSrt($this->object));
342  $this->ctrl->forwardCommand($gui);
343  break;
344 
345  case "illmimportgui":
346  $this->addHeaderAction();
347  $this->addLocations(true);
348  $this->setTabs("content");
349  $this->setContentSubTabs("import");
350  include_once("./Modules/LearningModule/classes/class.ilLMImportGUI.php");
351  $gui = new ilLMImportGUI($this->object);
352  $this->ctrl->forwardCommand($gui);
353  break;
354 
355  case "illmeditshorttitlesgui":
356  $this->addHeaderAction();
357  $this->addLocations(true);
358  $this->setTabs("content");
359  $this->setContentSubTabs("short_titles");
360  include_once("./Modules/LearningModule/classes/class.ilLMEditShortTitlesGUI.php");
361  $gui = new ilLMEditShortTitlesGUI($this);
362  $this->ctrl->forwardCommand($gui);
363  break;
364 
365  default:
366  $new_type = $_POST["new_type"]
367  ? $_POST["new_type"]
368  : $_GET["new_type"];
369 
370 
371  if ($cmd == "create" &&
372  !in_array($new_type, array("lm"))) {
373  switch ($new_type) {
374  case "pg":
375  $this->setTabs();
376  $this->ctrl->setCmdClass("ilLMPageObjectGUI");
377  $ret = $this->executeCommand();
378  break;
379 
380  case "st":
381  $this->setTabs();
382  $this->ctrl->setCmdClass("ilStructureObjectGUI");
383  $ret = $this->executeCommand();
384  break;
385  }
386  } else {
387  // creation of new dbk/lm in repository
388  if ($this->getCreationMode() == true &&
389  in_array($new_type, array("lm"))) {
390  $this->prepareOutput();
391  if ($cmd == "") { // this may be due to too big upload files
392  $cmd = "create";
393  }
394  $cmd .= "Object";
395  $ret = $this->$cmd();
396  } else {
397  $this->addHeaderAction();
398  $this->addLocations();
399  $ret = $this->$cmd();
400  }
401  }
402  break;
403  }
404  return $ret;
405  }
Class ilObjectMetaDataGUI.
Class ilInfoScreenGUI.
setSubTabs($a_active)
Set sub tabs.
Import related features for learning modules.
GUI class for the workflow of copying objects.
$_GET["client_id"]
Class ilStructureObjectGUI.
global $ilCtrl
Definition: ilias.php:18
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
Export User Interface Class.
setCustomRolesForSelection($a_roles)
Set custom roles for mapping to LTI roles.
prepareOutput($a_show_subobjects=true)
prepare output
addLocations($a_omit_obj_id=false)
display locator
GUI class for LTI provider object settings.
Upload SRT files to a set of media objects.
omitLocator($a_omit=true)
static getInstance(&$a_content_obj, $a_id=0, $a_halt=true)
Class ilLMPageObjectGUI.
setContentSubTabs($a_active)
Set pages tabs.
global $l
Definition: afr.php:30
Class ilObjStyleSheetGUI.
static getInstance($a_obj_id)
Get instance.
$ret
Definition: parser.php:6
getCreationMode()
get creation mode
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
setTabs()
set admin tabs public
$info
Definition: index.php:5
addHeaderAction()
Add header action menu.
Class ilObjUserTrackingGUI.
$_POST["username"]
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.
GUI class for object translation handling.
Handler class for multi srt upload in learning modules.
+ Here is the call graph for this function:

◆ explorer()

ilObjContentObjectGUI::explorer ( )

output explorer tree

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

References $_GET, $ctrl, $ilCtrl, ilObjectGUI\$object, Sabre\VObject\$output, $path, exit, ilUtil\getImagePath(), ilUtil\getStyleSheetLocation(), proceedDragDrop(), and ilTree\setTableNames().

Referenced by executeCommand().

978  {
980 
981  $gui_class = "ilobjlearningmodulegui";
982 
983  $ilCtrl->setParameterByClass($gui_class, "active_node", $_GET["active_node"]);
984 
985  $this->tpl = new ilTemplate("tpl.main.html", true, true);
986 
987  $this->tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
988 
989  $this->tpl->addBlockFile("CONTENT", "content", "tpl.explorer.html");
990  $this->tpl->setVariable("IMG_SPACE", ilUtil::getImagePath("spacer.png", false));
991 
992  require_once("./Modules/LearningModule/classes/class.ilLMEditorExplorer.php");
993  $exp = new ilLMEditorExplorer(
994  $this->ctrl->getLinkTarget($this, "view"),
996  $gui_class
997  );
998 
999  $exp->setTargetGet("obj_id");
1000  $exp->setExpandTarget($this->ctrl->getLinkTarget($this, "explorer"));
1001 
1002  if ($_GET["lmmovecopy"] == "1") {
1003  $this->proceedDragDrop();
1004  }
1005 
1006 
1007  if ($_GET["lmexpand"] == "") {
1008  $mtree = new ilTree($this->object->getId());
1009  $mtree->setTableNames('lm_tree', 'lm_data');
1010  $mtree->setTreeTablePK("lm_id");
1011  $expanded = $mtree->readRootId();
1012  } else {
1013  $expanded = $_GET["lmexpand"];
1014  }
1015  if ($_GET["active_node"] != "") {
1016  $path = $this->lm_tree->getPathId($_GET["active_node"]);
1017  $exp->setForceOpenPath($path);
1018 
1019  $exp->highlightNode($_GET["active_node"]);
1020  }
1021  $exp->setExpand($expanded);
1022 
1023  // build html-output
1024  $exp->setOutput(0);
1025  $output = $exp->getOutput();
1026 
1027  // asynchronous output
1028  if ($ilCtrl->isAsynch()) {
1029  echo $output;
1030  exit;
1031  }
1032 
1033  include_once("./Services/COPage/classes/class.ilPageEditorGUI.php");
1034 
1035  $this->tpl->setCurrentBlock("content");
1036  $this->tpl->setVariable("TXT_EXPLORER_HEADER", $this->lng->txt("cont_chap_and_pages"));
1037  $this->tpl->setVariable("EXP_REFRESH", $this->lng->txt("refresh"));
1038  $this->tpl->setVariable("EXPLORER", $output);
1039  $this->ctrl->setParameter($this, "lmexpand", $_GET["lmexpand"]);
1040  $this->tpl->setVariable("ACTION", $this->ctrl->getLinkTarget($this, "explorer"));
1041  $this->tpl->parseCurrentBlock();
1042  $this->tpl->show(false);
1043  exit;
1044  }
$path
Definition: aliased.php:25
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...
exit
Definition: backend.php:16
+ 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 1772 of file class.ilObjContentObjectGUI.php.

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

1773  {
1774  $ot = ilObjectTranslation::getInstance($this->object->getId());
1775  $opt = "";
1776  if ($ot->getContentActivated()) {
1777  $format = explode("_", $_POST["format"]);
1778  $opt = ilUtil::stripSlashes($format[1]);
1779  }
1780 
1781 
1782  require_once("./Modules/LearningModule/classes/class.ilContObjectExport.php");
1783  $cont_exp = new ilContObjectExport($this->object);
1784  $cont_exp->buildExportFile($opt);
1785  // $this->ctrl->redirect($this, "exportList");
1786  }
$format
Definition: metadata.php:141
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.
$_POST["username"]
+ Here is the call graph for this function:

◆ exportHTML()

ilObjContentObjectGUI::exportHTML ( )

create html package

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

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

2169  {
2170  include_once("./Services/Object/classes/class.ilObjectTranslation.php");
2171  $ot = ilObjectTranslation::getInstance($this->object->getId());
2172  $lang = "";
2173  if ($ot->getContentActivated()) {
2174  $format = explode("_", $_POST["format"]);
2175  $lang = ilUtil::stripSlashes($format[1]);
2176  }
2177  require_once("./Modules/LearningModule/classes/class.ilContObjectExport.php");
2178  $cont_exp = new ilContObjectExport($this->object, "html", $lang);
2179  $cont_exp->buildExportFile();
2180  }
$format
Definition: metadata.php:141
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.
for($i=1; $i<=count($kw_cases_sel); $i+=1) $lang
Definition: langwiz.php:349
$_POST["username"]
+ Here is the call graph for this function:

◆ exportObject()

ilObjContentObjectGUI::exportObject ( )

export object

public

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

1143  {
1144  return;
1145  }

◆ exportSCORM()

ilObjContentObjectGUI::exportSCORM ( )

create scorm package

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

2186  {
2187  require_once("./Modules/LearningModule/classes/class.ilContObjectExport.php");
2188  $cont_exp = new ilContObjectExport($this->object, "scorm");
2189  $cont_exp->buildExportFile();
2190  }
Export class for content objects.

◆ filterHelpChapters()

ilObjContentObjectGUI::filterHelpChapters ( )

Filter help chapters.

Parameters

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

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

3481  {
3482  $ilCtrl = $this->ctrl;
3483 
3484  ilSession::set("help_chap", ilUtil::stripSlashes($_POST["help_chap"]));
3485  $ilCtrl->redirect($this, "showExportIDsOverview");
3486  }
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
$_POST["username"]
+ Here is the call graph for this function:

◆ filterTooltips()

ilObjContentObjectGUI::filterTooltips ( )

Filter tooltips.

Parameters

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

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

3636  {
3637  $lng = $this->lng;
3638  $ilCtrl = $this->ctrl;
3639 
3640  ilSession::set("help_tt_comp", ilUtil::stripSlashes($_POST["help_tt_comp"]));
3641  $ilCtrl->redirect($this, "showTooltipList");
3642  }
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
$_POST["username"]
+ Here is the call graph for this function:

◆ fixTree()

ilObjContentObjectGUI::fixTree ( )

Fix tree.

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

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

◆ fixTreeConfirm()

ilObjContentObjectGUI::fixTreeConfirm ( )

confirm screen for tree fixing

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

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

1873  {
1874  $this->setTabs();
1875  $this->setContentSubTabs("maintenance");
1876 
1877  // display confirmation message
1878  include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
1879  $cgui = new ilConfirmationGUI();
1880  $cgui->setFormAction($this->ctrl->getFormAction($this));
1881  $cgui->setHeaderText($this->lng->txt("cont_fix_tree_confirm"));
1882  $cgui->setCancel($this->lng->txt("cancel"), "showMaintenance");
1883  $cgui->setConfirm($this->lng->txt("cont_fix_tree"), "fixTree");
1884  $issues = $this->object->checkStructure();
1885  $mess = "";
1886  if (count($issues) > 0) {
1887  $mess = "Found Issues: <br>" . implode("<br>", $issues);
1888  }
1889  $this->tpl->setContent($cgui->getHTML() . $mess);
1890  }
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 2802 of file class.ilObjContentObjectGUI.php.

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

2803  {
2804  $row['title'] = ilLMPageObject::_getPresentationTitle($row['page_id'], $this->object->getPageHeader());
2805 
2806  require_once 'Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php';
2808  $actions->setSelectionHeaderClass('small');
2809  $actions->setItemLinkClass('xsmall');
2810  $actions->setListTitle($this->lng->txt('actions'));
2811  $actions->setId($row['page_id']);
2812  $this->ctrl->setParameterByClass('ilLMPageObjectGUI', 'obj_id', $row['page_id']);
2813  $actions->addItem(
2814  $this->lng->txt('edit'),
2815  '',
2816  $this->ctrl->getLinkTargetByClass('ilLMPageObjectGUI', 'edit')
2817  );
2818  $this->ctrl->clearParametersByClass('ilLMPageObjectGUI');
2819  $row['action_html'] = $actions->getHTML();
2820 
2821  return $row;
2822  }
$row
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="-", $a_include_short=false)
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:

◆ getBlockedUsersMailSignature()

ilObjContentObjectGUI::getBlockedUsersMailSignature ( )
protected

Get mail signature for blocked users.

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

References ilLink\_getLink().

Referenced by sendMailToBlockedUsers().

2350  {
2351  $link = chr(13) . chr(10) . chr(13) . chr(10);
2352  $link .= $this->lng->txt('cont_blocked_users_mail_link');
2353  $link .= chr(13) . chr(10) . chr(13) . chr(10);
2354  include_once './Services/Link/classes/class.ilLink.php';
2355  $link .= ilLink::_getLink($this->object->getRefId());
2356  return rawurlencode(base64_encode($link));
2357  }
+ Here is the call graph for this function:
+ Here is the caller 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 1620 of file class.ilObjContentObjectGUI.php.

References $i, and $path.

1621  {
1622  $path = "";
1623 
1624  $tmpPath = $this->lm_tree->getPathFull($a_endnode_id, $a_startnode_id);
1625 
1626  // count -1, to exclude the learning module itself
1627  for ($i = 1; $i < (count($tmpPath) - 1); $i++) {
1628  if ($path != "") {
1629  $path .= " > ";
1630  }
1631 
1632  $path .= $tmpPath[$i]["title"];
1633  }
1634 
1635  return $path;
1636  }
$path
Definition: aliased.php:25
$i
Definition: disco.tpl.php:19

◆ getLayoutOption()

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

Get layout option.

Returns
object layout form option

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

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

Referenced by ilStructureObjectGUI\initSetPageLayoutForm().

3699  {
3700  global $DIC;
3701 
3702  $lng = $DIC->language();
3703 
3704  // default layout
3705  $layout = new ilRadioGroupInputGUI($a_txt, $a_var);
3706  if ($a_def_option != "") {
3707  if (is_file($im = ilUtil::getImagePath("layout_" . $a_def_option . ".png"))) {
3708  $im_tag = ilUtil::img($im, $a_def_option);
3709  }
3710  $layout->addOption(new ilRadioOption("<table><tr><td>" . $im_tag . "</td><td><b>" .
3711  $lng->txt("cont_lm_default_layout") .
3712  "</b>: " . $lng->txt("cont_layout_" . $a_def_option) .
3713  "</td></tr></table>", ""));
3714  }
3716  $im_tag = "";
3717  if (is_file($im = ilUtil::getImagePath("layout_" . $l . ".png"))) {
3718  $im_tag = ilUtil::img($im, $l);
3719  }
3720  $layout->addOption(new ilRadioOption("<table><tr><td style='padding: 0px 5px 5px;'>" .
3721  $im_tag . "</td><td style='padding:5px;'><b>" . $lng->txt("cont_layout_" . $l) . "</b>: " .
3722  $lng->txt("cont_layout_" . $l . "_desc") . "</td></tr></table>", $l));
3723  }
3724 
3725  return $layout;
3726  }
This class represents an option in a radio group.
global $DIC
Definition: saml.php:7
static 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)
static img($a_src, $a_alt=null, $a_width="", $a_height="", $a_border=0, $a_id="", $a_class="")
Build img tag.
global $l
Definition: afr.php:30
+ 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,
  $a_mode = "" 
)
static

Get multi lang header.

Parameters

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

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

Referenced by ilLMEditShortTitlesGUI\listShortTitles(), and ilStructureObjectGUI\showHierarchy().

1281  {
1282  global $DIC;
1283 
1284  $lng = $DIC->language();
1285  $ilCtrl = $DIC->ctrl();
1286 
1287  // multi language
1288  include_once("./Services/Object/classes/class.ilObjectTranslation.php");
1289  $ot = ilObjectTranslation::getInstance($a_lm_id);
1290  if ($ot->getContentActivated()) {
1291  $ilCtrl->setParameter($a_gui_class, "lang_switch_mode", $a_mode);
1292  $lng->loadLanguageModule("meta");
1293 
1294  // info
1295  include_once("./Services/COPage/classes/class.ilPageMultiLangGUI.php");
1296  $ml_gui = new ilPageMultiLangGUI("lm", $a_lm_id);
1297  $ml_head = $ml_gui->getMultiLangInfo($_GET["transl"]);
1298 
1299  // language switch
1300  include_once("./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php");
1302  $list->setListTitle($lng->txt("actions"));
1303  $list->setId("copage_act");
1304  $entries = false;
1305  if (!in_array($_GET["transl"], array("", "-"))) {
1306  $l = $ot->getMasterLanguage();
1307  $list->addItem(
1308  $lng->txt("cont_edit_language_version") . ": " .
1309  $lng->txt("meta_l_" . $l),
1310  "",
1311  $ilCtrl->getLinkTarget($a_gui_class, "editMasterLanguage")
1312  );
1313  $entries = true;
1314  }
1315 
1316  foreach ($ot->getLanguages() as $al => $lang) {
1317  if ($_GET["transl"] != $al &&
1318  $al != $ot->getMasterLanguage()) {
1319  $ilCtrl->setParameter($a_gui_class, "totransl", $al);
1320  $list->addItem(
1321  $lng->txt("cont_edit_language_version") . ": " .
1322  $lng->txt("meta_l_" . $al),
1323  "",
1324  $ilCtrl->getLinkTarget($a_gui_class, "switchToLanguage")
1325  );
1326  $ilCtrl->setParameter($a_gui_class, "totransl", $_GET["totransl"]);
1327  }
1328  $entries = true;
1329  }
1330 
1331  if ($entries) {
1332  $ml_head = '<div class="ilFloatLeft">' . $ml_head . '</div><div style="margin: 5px 0;" class="small ilRight">' . $list->getHTML() . "</div>";
1333  }
1334  $ilCtrl->setParameter($a_gui_class, "lang_switch_mode", "");
1335  }
1336 
1337  return $ml_head;
1338  }
if(isset($_REQUEST['delete'])) $list
Definition: registry.php:41
global $DIC
Definition: saml.php:7
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
Page multilinguality GUI class.
User interface class for advanced drop-down selection lists.
global $l
Definition: afr.php:30
static getInstance($a_obj_id)
Get instance.
for($i=1; $i<=count($kw_cases_sel); $i+=1) $lang
Definition: langwiz.php:349
+ 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 573 of file class.ilObjContentObjectGUI.php.

References $description, $ilUser, $title, ilObjectGUI\$user, $values, ilObjectTranslation\getInstance(), ilNotification\hasNotification(), and ilNotification\TYPE_LM_BLOCKED_USERS.

Referenced by properties().

574  {
576 
577  $values = array();
578 
579  $title = $this->object->getTitle();
580  $description = $this->object->getLongDescription();
581  include_once("./Services/Object/classes/class.ilObjectTranslation.php");
582  $ot = ilObjectTranslation::getInstance($this->object->getId());
583  if ($ot->getContentActivated()) {
584  $title = $ot->getDefaultTitle();
585  $description = $ot->getDefaultDescription();
586  }
587 
588  $values["title"] = $title;
589  $values["description"] = $description;
590  if (!$this->object->getOfflineStatus()) {
591  $values["cobj_online"] = true;
592  }
593  $values["lm_layout"] = $this->object->getLayout();
594  $values["lm_pg_header"] = $this->object->getPageHeader();
595  if ($this->object->isActiveNumbering()) {
596  $values["cobj_act_number"] = true;
597  }
598  $values["toc_mode"] = $this->object->getTOCMode();
599  if ($this->object->publicNotes()) {
600  $values["cobj_pub_notes"] = true;
601  }
602  if ($this->object->cleanFrames()) {
603  $values["cobj_clean_frames"] = true;
604  }
605  if ($this->object->isActiveHistoryUserComments()) {
606  $values["cobj_user_comments"] = true;
607  }
608  $values["layout_per_page"] = $this->object->getLayoutPerPage();
609  $values["rating"] = $this->object->hasRating();
610  $values["rating_pages"] = $this->object->hasRatingPages();
611  $values["disable_def_feedback"] = $this->object->getDisableDefaultFeedback();
612  $values["progr_icons"] = $this->object->getProgressIcons();
613  $values["store_tries"] = $this->object->getStoreTries();
614  $values["restrict_forw_nav"] = $this->object->getRestrictForwardNavigation();
615 
616  include_once "./Services/Notification/classes/class.ilNotification.php";
617  $values["notification_blocked_users"] = ilNotification::hasNotification(
619  $ilUser->getId(),
620  $this->object->getId()
621  );
622 
623  $this->form->setValuesByArray($values);
624  }
static hasNotification($type, $user_id, $id)
Check notification status for object and user.
$values
$ilUser
Definition: imgupload.php:18
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 1791 of file class.ilObjContentObjectGUI.php.

References $a_type, $ctrl, $ilCtrl, and ilObjectGUI\$lng.

1792  {
1793  $lng = $this->lng;
1794  $ilCtrl = $this->ctrl;
1795 
1796  $changelink = "<a href='" . $ilCtrl->getLinkTarget($this, "editMenuProperties") . "'>" . $lng->txt("change") . "</a>";
1797  if (!$this->object->isActiveLMMenu()) {
1798  $add = "<br />" . $lng->txt("cont_download_no_menu") . " " . $changelink;
1799  } elseif (!$this->object->isActiveDownloads()) {
1800  $add = "<br />" . $lng->txt("cont_download_no_download") . " " . $changelink;
1801  }
1802 
1803  $basetype = explode("_", $a_type);
1804  $basetype = $basetype[0];
1805 
1806  if ($this->object->getPublicExportFile($basetype) == $a_file) {
1807  return $lng->txt("yes") . $add;
1808  }
1809 
1810  return " ";
1811  }
global $ilCtrl
Definition: ilias.php:18
$a_type
Definition: workflow.php:92

◆ history()

ilObjContentObjectGUI::history ( )

history

public

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

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

2777  {
2778  $this->setTabs("content");
2779  $this->setContentSubTabs("history");
2780 
2781  require_once("./Services/History/classes/class.ilHistoryTableGUI.php");
2782  $hist_gui = new ilHistoryTableGUI(
2783  $this,
2784  "history",
2785  $this->object->getId(),
2786  $this->object->getType()
2787  );
2788  $hist_gui->initTable();
2789  $hist_gui->setCommentVisibility($this->object->isActiveHistoryUserComments());
2790 
2791  $this->tpl->setContent($hist_gui->getHTML());
2792  }
Copyright (c) 1998-2014 ILIAS open source, Extended GPL, see docs/LICENSE Date: 24.10.14 Time: 10:35.
setContentSubTabs($a_active)
Set pages tabs.
setTabs()
set admin tabs public
+ Here is the call graph for this function:

◆ importFileObject()

ilObjContentObjectGUI::importFileObject (   $parent_id = null,
  $a_catch_errors = true 
)

display status information or report errors messages in case of error

public

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

References $_GET, $_POST, $error, $form, ilObjectGUI\$ilErr, $rbacsystem, ilObjectGUI\$tpl, initImportForm(), ilUtil\redirect(), and ilUtil\sendFailure().

1166  {
1168  $ilErr = $this->error;
1169  $tpl = $this->tpl;
1170 
1171  $form = $this->initImportForm("lm");
1172 
1173  try {
1174  // the new import
1175  parent::importFileObject(null, false);
1176  return;
1178  // we just run through in this case.
1179  $no_manifest = true;
1180  } catch (ilException $e) {
1181  // display message and form again
1182  ilUtil::sendFailure($this->lng->txt("obj_import_file_error") . " <br />" . $e->getMessage());
1183  $form->setValuesByPost();
1184  $tpl->setContent($form->getHtml());
1185  return;
1186  }
1187 
1188  if (!$no_manifest) {
1189  return; // something different has gone wrong, but we have a manifest, this is definitely not "the old" import
1190  }
1191 
1192  // the "old" (pre 5.1) import
1193 
1194  include_once "./Modules/LearningModule/classes/class.ilObjLearningModule.php";
1195 
1196  if (!$rbacsystem->checkAccess("create", $_GET["ref_id"], $_GET["new_type"])) {
1197  $ilErr->raiseError($this->lng->txt("no_create_permission"), $ilErr->MESSAGE);
1198  return;
1199  }
1200 
1201  if ($form->checkInput()) {
1202  // create and insert object in objecttree
1203  include_once("./Modules/LearningModule/classes/class.ilObjContentObject.php");
1204  $newObj = new ilObjContentObject();
1205  $newObj->setType($_GET["new_type"]);
1206  $newObj->setTitle($_FILES["importfile"]["name"]);
1207  $newObj->setDescription("");
1208  $newObj->create(true);
1209  $newObj->createReference();
1210  $newObj->putInTree($_GET["ref_id"]);
1211  $newObj->setPermissions($_GET["ref_id"]);
1212 
1213  // create learning module tree
1214  $newObj->createLMTree();
1215 
1216  // since the "new" import already did the extracting
1217  $mess = $newObj->importFromDirectory($this->tmp_import_dir, $_POST["validate"]);
1218 
1219  if ($mess == "") {
1220  ilUtil::sendSuccess($this->lng->txt($this->type . "_added"), true);
1221  ilUtil::redirect("ilias.php?ref_id=" . $newObj->getRefId() .
1222  "&baseClass=ilLMEditorGUI");
1223  } else {
1224  $link = '<a href="' . "ilias.php?ref_id=" . $newObj->getRefId() .
1225  "&baseClass=ilLMEditorGUI" . '" target="_top">' . $this->lng->txt("btn_next") . '</a>';
1226  $tpl->setContent("<br />" . $link . "<br /><br />" . $mess . $link);
1227  }
1228  } else {
1229  $form->setValuesByPost();
1230  $tpl->setContent($form->getHtml());
1231  }
1232  }
$_GET["client_id"]
initImportForm($a_new_type)
Init import form.
if(isset($_POST['submit'])) $form
manifest.xml file not found-exception for import
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
Class ilObjContentObject.
static redirect($a_script)
$_POST["username"]
+ Here is the call graph for this function:

◆ importObject()

ilObjContentObjectGUI::importObject ( )

display dialogue for importing XML-LeaningObjects

public

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

References ilObjectGUI\createObject().

1153  {
1154  $this->createObject();
1155  return;
1156  }
createObject()
create new object form
+ Here is the call graph for this function:

◆ initImportForm()

ilObjContentObjectGUI::initImportForm (   $a_new_type)

Init import form.

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

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

Referenced by importFileObject().

1102  {
1103  $lng = $this->lng;
1104  $ilCtrl = $this->ctrl;
1105 
1106  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
1107  $form = new ilPropertyFormGUI();
1108 
1109  $new_type = $_POST["new_type"] ? $_POST["new_type"] : $_GET["new_type"];
1110  $this->ctrl->setParameter($this, "new_type", $new_type);
1111 
1112  $form->setTarget(ilFrameTargetInfo::_getFrame("MainContent"));
1113  $form->setTableWidth("600px");
1114 
1115  // import file
1116  //$fi = new ilFileInputGUI($this->lng->txt("file"), "xmldoc");
1117  $fi = new ilFileInputGUI($this->lng->txt("file"), "importfile");
1118  $fi->setSuffixes(array("zip"));
1119  $fi->setRequired(true);
1120  $fi->setSize(30);
1121  $form->addItem($fi);
1122 
1123  // validation
1124  $cb = new ilCheckboxInputGUI($this->lng->txt("cont_validate_file"), "validate");
1125  $cb->setInfo($this->lng->txt(""));
1126  $form->addItem($cb);
1127 
1128  $form->addCommandButton("importFile", $lng->txt("import"));
1129  $form->addCommandButton("cancel", $lng->txt("cancel"));
1130 
1131  $form->setTitle($this->lng->txt("import_" . $new_type));
1132  $form->setFormAction($ilCtrl->getFormAction($this));
1133 
1134  return $form;
1135  }
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.
if(isset($_POST['submit'])) $form
static _getFrame($a_class, $a_type='')
Get content frame name.
setSuffixes($a_suffixes)
Set Accepted Suffixes.
$_POST["username"]
+ 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 2949 of file class.ilObjContentObjectGUI.php.

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

Referenced by addMenuEntry(), and editMenuEntry().

2950  {
2951  $lng = $this->lng;
2952  $ilCtrl = $this->ctrl;
2953 
2954  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
2955  $form = new ilPropertyFormGUI();
2956 
2957  // title
2958  $ti = new ilTextInputGUI($this->lng->txt("lm_menu_entry_title"), "title");
2959  $ti->setMaxLength(255);
2960  $ti->setSize(40);
2961  $form->addItem($ti);
2962 
2963  // target
2964  $ta = new ilTextInputGUI($this->lng->txt("lm_menu_entry_target"), "target");
2965  $ta->setMaxLength(255);
2966  $ta->setSize(40);
2967  $form->addItem($ta);
2968 
2969  if ($a_mode == "edit") {
2970  $this->__initLMMenuEditor();
2971  $this->lmme_obj->readEntry($_REQUEST["menu_entry"]);
2972  $ti->setValue($this->lmme_obj->getTitle());
2973  $ta->setValue($this->lmme_obj->getTarget());
2974  }
2975 
2976  if (isset($_GET["link_ref_id"])) {
2977  $link_ref_id = (int) $_GET["link_ref_id"];
2978  $obj_type = ilObject::_lookupType($link_ref_id, true);
2979  $obj_id = ilObject::_lookupObjectId($link_ref_id);
2981 
2982  $target_link = $obj_type . "_" . $link_ref_id;
2983  $ti->setValue($title);
2984  $ta->setValue($target_link);
2985 
2986  // link ref id
2987  $hi = new ilHiddenInputGUI("link_ref_id");
2988  $hi->setValue($link_ref_id);
2989  $form->addItem($hi);
2990  }
2991 
2992 
2993  // save and cancel commands
2994  if ($a_mode == "create") {
2995  $form->addCommandButton("saveMenuEntry", $lng->txt("save"));
2996  $form->addCommandButton("editMenuProperties", $lng->txt("cancel"));
2997  $form->setTitle($lng->txt("lm_menu_new_entry"));
2998  } else {
2999  $form->addCommandButton("updateMenuEntry", $lng->txt("save"));
3000  $form->addCommandButton("editMenuProperties", $lng->txt("cancel"));
3001  $form->setTitle($lng->txt("lm_menu_edit_entry"));
3002  }
3003 
3004  $form->setFormAction($ilCtrl->getFormAction($this));
3005 
3006  return $form;
3007  }
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.
if(isset($_POST['submit'])) $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
+ 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 855 of file class.ilObjContentObjectGUI.php.

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

Referenced by editMenuProperties().

856  {
857  $lng = $this->lng;
859 
860  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
861  $form = new ilPropertyFormGUI();
862 
863  // enable menu
864  $menu = new ilCheckboxInputGUI($this->lng->txt("cont_active"), "cobj_act_lm_menu");
865  $menu->setChecked($this->object->isActiveLMMenu());
866  $form->addItem($menu);
867 
868  // toc
869  $toc = new ilCheckboxInputGUI($this->lng->txt("cont_toc"), "cobj_act_toc");
870  $toc->setChecked($this->object->isActiveTOC());
871  $form->addItem($toc);
872 
873  // print view
874  $print = new ilCheckboxInputGUI($this->lng->txt("cont_print_view"), "cobj_act_print");
875  $print->setChecked($this->object->isActivePrintView());
876  $form->addItem($print);
877 
878  // prevent glossary appendix
879  $glo = new ilCheckboxInputGUI($this->lng->txt("cont_print_view_pre_glo"), "cobj_act_print_prev_glo");
880  $glo->setChecked($this->object->isActivePreventGlossaryAppendix());
881  $print->addSubItem($glo);
882 
883  // hide header and footer in print view
884  $hhfp = new ilCheckboxInputGUI($this->lng->txt("cont_hide_head_foot_print"), "hide_head_foot_print");
885  $hhfp->setChecked($this->object->getHideHeaderFooterPrint());
886  $print->addSubItem($hhfp);
887 
888  // downloads
889  $no_download_file_available =
890  " " . $lng->txt("cont_no_download_file_available") .
891  " <a href='" . $ilCtrl->getLinkTargetByClass("ilexportgui", "") . "'>" . $lng->txt("change") . "</a>";
892  $types = array("xml", "html", "scorm");
893  foreach ($types as $type) {
894  if ($this->object->getPublicExportFile($type) != "") {
895  if (is_file($this->object->getExportDirectory($type) . "/" .
896  $this->object->getPublicExportFile($type))) {
897  $no_download_file_available = "";
898  }
899  }
900  }
901  $dl = new ilCheckboxInputGUI($this->lng->txt("cont_downloads"), "cobj_act_downloads");
902  $dl->setInfo($this->lng->txt("cont_downloads_desc") . $no_download_file_available);
903  $dl->setChecked($this->object->isActiveDownloads());
904  $form->addItem($dl);
905 
906  // downloads in public area
907  $pdl = new ilCheckboxInputGUI($this->lng->txt("cont_downloads_public_desc"), "cobj_act_downloads_public");
908  $pdl->setChecked($this->object->isActiveDownloadsPublic());
909  $dl->addSubItem($pdl);
910 
911  $form->addCommandButton("saveMenuProperties", $lng->txt("save"));
912 
913  $form->setTitle($lng->txt("cont_lm_menu"));
914  $form->setFormAction($ilCtrl->getFormAction($this));
915 
916  return $form;
917  }
This class represents a property form user interface.
$type
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.
if(isset($_POST['submit'])) $form
+ 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 440 of file class.ilObjContentObjectGUI.php.

References $ctrl, $ilCtrl, $ilSetting, ilObjectGUI\$lng, ilObjectGUI\$object_service, $section, ilObjectGUI\$settings, ilFormPropertyGUI\setInfo(), ilSelectInputGUI\setOptions(), ilFormPropertyGUI\setRequired(), ilFormPropertyGUI\setTitle(), and ilRadioGroupInputGUI\setValue().

Referenced by properties(), and saveProperties().

441  {
442  $obj_service = $this->object_service;
443 
445  $lng = $this->lng;
447 
448  include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
449  $this->form = new ilPropertyFormGUI();
450 
451  // title
452  $ti = new ilTextInputGUI($lng->txt("title"), "title");
453  $ti->setRequired(true);
454  $this->form->addItem($ti);
455 
456  // description
457  $ta = new ilTextAreaInputGUI($lng->txt("desc"), "description");
458  $this->form->addItem($ta);
459 
460  $lng->loadLanguageModule("rep");
462  $section->setTitle($this->lng->txt('rep_activation_availability'));
463  $this->form->addItem($section);
464 
465  // online
466  $online = new ilCheckboxInputGUI($lng->txt("cont_online"), "cobj_online");
467  $this->form->addItem($online);
468 
469  // presentation
471  $section->setTitle($this->lng->txt('cont_presentation'));
472  $this->form->addItem($section);
473 
474  // tile image
475  $obj_service->commonSettings()->legacyForm($this->form, $this->object)->addTileImage();
476 
477  // default layout
478  $layout = self::getLayoutOption($lng->txt("cont_def_layout"), "lm_layout");
479  $this->form->addItem($layout);
480 
481  // layout per page
482  $lpp = new ilCheckboxInputGUI($lng->txt("cont_layout_per_page"), "layout_per_page");
483  $lpp->setInfo($this->lng->txt("cont_layout_per_page_info"));
484  $this->form->addItem($lpp);
485 
486  // page header
487  $page_header = new ilSelectInputGUI($lng->txt("cont_page_header"), "lm_pg_header");
488  $option = array("st_title" => $this->lng->txt("cont_st_title"),
489  "pg_title" => $this->lng->txt("cont_pg_title"),
490  "none" => $this->lng->txt("cont_none"));
491  $page_header->setOptions($option);
492  $this->form->addItem($page_header);
493 
494  // chapter numeration
495  $chap_num = new ilCheckboxInputGUI($lng->txt("cont_act_number"), "cobj_act_number");
496  $this->form->addItem($chap_num);
497 
498  // toc mode
499  $toc_mode = new ilSelectInputGUI($lng->txt("cont_toc_mode"), "toc_mode");
500  $option = array("chapters" => $this->lng->txt("cont_chapters_only"),
501  "pages" => $this->lng->txt("cont_chapters_and_pages"));
502  $toc_mode->setOptions($option);
503  $this->form->addItem($toc_mode);
504 
505  // show progress icons
506  $progr_icons = new ilCheckboxInputGUI($lng->txt("cont_progress_icons"), "progr_icons");
507  $progr_icons->setInfo($this->lng->txt("cont_progress_icons_info"));
508  $this->form->addItem($progr_icons);
509 
510  // self assessment
512  $section->setTitle($this->lng->txt('cont_self_assessment'));
513  $this->form->addItem($section);
514 
515  // tries
516  $radg = new ilRadioGroupInputGUI($lng->txt("cont_tries"), "store_tries");
517  $radg->setValue(0);
518  $op1 = new ilRadioOption($lng->txt("cont_tries_reset_on_visit"), 0, $lng->txt("cont_tries_reset_on_visit_info"));
519  $radg->addOption($op1);
520  $op2 = new ilRadioOption($lng->txt("cont_tries_store"), 1, $lng->txt("cont_tries_store_info"));
521  $radg->addOption($op2);
522  $this->form->addItem($radg);
523 
524  // restrict forward navigation
525  $qfeed = new ilCheckboxInputGUI($lng->txt("cont_restrict_forw_nav"), "restrict_forw_nav");
526  $qfeed->setInfo($this->lng->txt("cont_restrict_forw_nav_info"));
527  $this->form->addItem($qfeed);
528 
529  // notification
530  $not = new ilCheckboxInputGUI($lng->txt("cont_notify_on_blocked_users"), "notification_blocked_users");
531  $not->setInfo($this->lng->txt("cont_notify_on_blocked_users_info"));
532  $qfeed->addSubItem($not);
533 
534  // disable default feedback for questions
535  $qfeed = new ilCheckboxInputGUI($lng->txt("cont_disable_def_feedback"), "disable_def_feedback");
536  $qfeed->setInfo($this->lng->txt("cont_disable_def_feedback_info"));
537  $this->form->addItem($qfeed);
538 
539  // additional features
541  $section->setTitle($this->lng->txt('obj_features'));
542  $this->form->addItem($section);
543 
544  // public notes
545  if (!$ilSetting->get('disable_comments')) {
546  $this->lng->loadLanguageModule("notes");
547  $pub_nodes = new ilCheckboxInputGUI($lng->txt("notes_comments"), "cobj_pub_notes");
548  $pub_nodes->setInfo($this->lng->txt("cont_lm_comments_desc"));
549  $this->form->addItem($pub_nodes);
550  }
551 
552  // history user comments
553  $com = new ilCheckboxInputGUI($lng->txt("enable_hist_user_comments"), "cobj_user_comments");
554  $com->setInfo($this->lng->txt("enable_hist_user_comments_desc"));
555  $this->form->addItem($com);
556 
557  // rating
558  $this->lng->loadLanguageModule('rating');
559  $rate = new ilCheckboxInputGUI($this->lng->txt('rating_activate_rating'), 'rating');
560  $rate->setInfo($this->lng->txt('rating_activate_rating_info'));
561  $this->form->addItem($rate);
562  $ratep = new ilCheckboxInputGUI($this->lng->txt('lm_activate_rating'), 'rating_pages');
563  $this->form->addItem($ratep);
564 
565  $this->form->setTitle($lng->txt("cont_lm_properties"));
566  $this->form->addCommandButton("saveProperties", $lng->txt("save"));
567  $this->form->setFormAction($ilCtrl->getFormAction($this));
568  }
This class represents an option in a radio group.
This class represents a selection list property in a property form.
This class represents a property form user interface.
This class represents a section header 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.
$section
Definition: Utf8Test.php:83
This class represents a property in a property form.
setTitle($a_title)
Set Title.
This class represents a text property in a property form.
setOptions($a_options)
Set Options.
global $ilSetting
Definition: privfeed.php:17
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 3766 of file class.ilObjContentObjectGUI.php.

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

Referenced by setPageLayout().

3767  {
3768  $lng = $this->lng;
3769  $ilCtrl = $this->ctrl;
3770 
3771  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
3772  $this->form = new ilPropertyFormGUI();
3773 
3774  if (is_array($_POST["id"])) {
3775  foreach ($_POST["id"] as $id) {
3776  $hi = new ilHiddenInputGUI("id[]");
3777  $hi->setValue($id);
3778  $this->form->addItem($hi);
3779  }
3780  }
3781  $layout = self::getLayoutOption(
3782  $lng->txt("cont_layout"),
3783  "layout",
3784  $this->object->getLayout()
3785  );
3786  $this->form->addItem($layout);
3787 
3788  $this->form->addCommandButton("savePageLayout", $lng->txt("save"));
3789  $this->form->addCommandButton("pages", $lng->txt("cancel"));
3790 
3791  $this->form->setTitle($lng->txt("cont_set_layout"));
3792  $this->form->setFormAction($ilCtrl->getFormAction($this));
3793  }
This class represents a property form user interface.
if(!array_key_exists('StateId', $_REQUEST)) $id
global $ilCtrl
Definition: ilias.php:18
This class represents a hidden form property in a property form.
$_POST["username"]
+ Here is the caller graph for this function:

◆ initStylePropertiesForm()

ilObjContentObjectGUI::initStylePropertiesForm ( )

Init style properties form.

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

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

Referenced by editStyleProperties().

730  {
732  $lng = $this->lng;
733  $ilTabs = $this->tabs;
735 
736  $lng->loadLanguageModule("style");
737  $this->setTabs();
738  $ilTabs->setTabActive("settings");
739  $this->setSubTabs("cont_style");
740 
741  include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
742  $this->form = new ilPropertyFormGUI();
743 
744  $fixed_style = $ilSetting->get("fixed_content_style_id");
745  $def_style = $ilSetting->get("default_content_style_id");
746  $style_id = $this->object->getStyleSheetId();
747 
748  if ($fixed_style > 0) {
749  $st = new ilNonEditableValueGUI($lng->txt("cont_current_style"));
750  $st->setValue(ilObject::_lookupTitle($fixed_style) . " (" .
751  $this->lng->txt("global_fixed") . ")");
752  $this->form->addItem($st);
753  } else {
755  true,
756  false,
757  $_GET["ref_id"]
758  );
759 
760  if ($def_style > 0) {
761  $st_styles[0] = ilObject::_lookupTitle($def_style) . " (" . $this->lng->txt("default") . ")";
762  } else {
763  $st_styles[0] = $this->lng->txt("default");
764  }
765  ksort($st_styles);
766 
767  if ($style_id > 0) {
768  // individual style
769  if (!ilObjStyleSheet::_lookupStandard($style_id)) {
770  $st = new ilNonEditableValueGUI($lng->txt("cont_current_style"));
771  $st->setValue(ilObject::_lookupTitle($style_id));
772  $this->form->addItem($st);
773 
774  // delete command
775  $this->form->addCommandButton(
776  "editStyle",
777  $lng->txt("cont_edit_style")
778  );
779  $this->form->addCommandButton(
780  "deleteStyle",
781  $lng->txt("cont_delete_style")
782  );
783  }
784  }
785 
786  if ($style_id <= 0 || ilObjStyleSheet::_lookupStandard($style_id)) {
787  $style_sel = new ilSelectInputGUI($lng->txt("cont_current_style"), "style_id");
788  $style_sel->setOptions($st_styles);
789  $style_sel->setValue($style_id);
790  $this->form->addItem($style_sel);
791  $this->form->addCommandButton(
792  "saveStyleSettings",
793  $lng->txt("save")
794  );
795  $this->form->addCommandButton(
796  "createStyle",
797  $lng->txt("sty_create_ind_style")
798  );
799  }
800  }
801  $this->form->setTitle($lng->txt("cont_style"));
802  $this->form->setFormAction($ilCtrl->getFormAction($this));
803  }
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
static _getStandardStyles( $a_exclude_default_style=false, $a_include_deactivated=false, $a_scope=0)
Get standard styles.
static _lookupStandard($a_id)
Lookup standard flag.
global $ilCtrl
Definition: ilias.php:18
setOptions($a_options)
Set Options.
This class represents a non editable value in a property form.
global $ilSetting
Definition: privfeed.php:17
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 3240 of file class.ilObjContentObjectGUI.php.

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

3241  {
3242  $ilCtrl = $this->ctrl;
3243  $lng = $this->lng;
3244 
3245  include_once("./Modules/LearningModule/classes/class.ilChapterHierarchyFormGUI.php");
3246 
3249 
3250  if (!ilChapterHierarchyFormGUI::getPostFirstChild()) { // insert after node id
3251  $parent_id = $this->lm_tree->getParentId($node_id);
3252  $target = $node_id;
3253  } else { // insert as first child
3254  $parent_id = $node_id;
3256  }
3257 
3258  for ($i = 1; $i <= $num; $i++) {
3259  $chap = new ilStructureObject($this->object);
3260  $chap->setType("st");
3261  $chap->setTitle($lng->txt("cont_new_chap"));
3262  $chap->setLMId($this->object->getId());
3263  $chap->create();
3264  ilLMObject::putInTree($chap, $parent_id, $target);
3265  }
3266 
3267  $ilCtrl->redirect($this, "chapters");
3268  }
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.
$i
Definition: disco.tpl.php:19
$target
Definition: test.php:19
+ Here is the call graph for this function:

◆ insertChapterClip()

ilObjContentObjectGUI::insertChapterClip ( )

Insert Chapter from clipboard.

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

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

Referenced by pasteChapter().

3274  {
3275  $ilUser = $this->user;
3276  $ilCtrl = $this->ctrl;
3277  $ilLog = $this->log;
3278 
3279  include_once("./Modules/LearningModule/classes/class.ilChapterHierarchyFormGUI.php");
3280 
3283 
3284  $ilLog->write("InsertChapterClip, num: $num, node_id: $node_id, " .
3285  " getPostFirstChild " . ilChapterHierarchyFormGUI::getPostFirstChild());
3286 
3287  if (!$first_child) { // insert after node id
3288  $parent_id = $this->lm_tree->getParentId($node_id);
3289  $target = $node_id;
3290  } else { // insert as first child
3291  $parent_id = $node_id;
3293  }
3294 
3295  // copy and paste
3296  $chapters = $ilUser->getClipboardObjects("st", true);
3297  $copied_nodes = array();
3298  foreach ($chapters as $chap) {
3299  $ilLog->write("Call pasteTree, Target LM: " . $this->object->getId() . ", Chapter ID: " . $chap["id"]
3300  . ", Parent ID: " . $parent_id . ", Target: " . $target);
3301  $cid = ilLMObject::pasteTree(
3302  $this->object,
3303  $chap["id"],
3304  $parent_id,
3305  $target,
3306  $chap["insert_time"],
3307  $copied_nodes,
3308  (ilEditClipboard::getAction() == "copy")
3309  );
3310  $target = $cid;
3311  }
3312  ilLMObject::updateInternalLinks($copied_nodes);
3313 
3314  if (ilEditClipboard::getAction() == "cut") {
3315  $ilUser->clipboardDeleteObjectsOfType("pg");
3316  $ilUser->clipboardDeleteObjectsOfType("st");
3318  }
3319 
3320  $this->object->checkTree();
3321  $ilCtrl->redirect($this, "chapters");
3322  }
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.
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
$ilUser
Definition: imgupload.php:18
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.
$target
Definition: test.php:19
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ linkChecker()

ilObjContentObjectGUI::linkChecker ( )

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

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

Referenced by refreshLinkCheck(), and saveLinkCheck().

2825  {
2826  $ilUser = $this->user;
2827  $tpl = $this->tpl;
2828 
2829  $this->__initLinkChecker();
2830 
2831  $this->setTabs();
2832  $this->setContentSubTabs("link_check");
2833 
2834  require_once './Services/LinkChecker/classes/class.ilLinkCheckerTableGUI.php';
2835 
2836  $toolbar = new ilToolbarGUI();
2837 
2838  // #13684
2839  include_once "Services/Cron/classes/class.ilCronManager.php";
2840  if (ilCronManager::isJobActive("lm_link_check")) {
2841  include_once './Services/LinkChecker/classes/class.ilLinkCheckNotify.php';
2842  include_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
2843 
2844  $chb = new ilCheckboxInputGUI($this->lng->txt('link_check_message_a'), 'link_check_message');
2845  $chb->setValue(1);
2846  $chb->setChecked((bool) ilLinkCheckNotify::_getNotifyStatus($ilUser->getId(), $this->object->getId()));
2847  $chb->setOptionTitle($this->lng->txt('link_check_message_b'));
2848 
2849  $toolbar->addInputItem($chb);
2850  $toolbar->addFormButton($this->lng->txt('save'), 'saveLinkCheck');
2851  $toolbar->setFormAction($this->ctrl->getLinkTarget($this, 'saveLinkCheck'));
2852  }
2853 
2854  $tgui = new ilLinkCheckerTableGUI($this, 'linkChecker');
2855  $tgui->setLinkChecker($this->link_checker_obj)
2856  ->setRowHandler($this)
2857  ->setRefreshButton($this->lng->txt('refresh'), 'refreshLinkCheck');
2858 
2859  return $tpl->setContent($tgui->prepareHTML()->getHTML() . $toolbar->getHTML());
2860  }
This class represents a checkbox property in a property form.
class ilLinkCheckerTableGUI
setValue($a_value)
Set Value.
$ilUser
Definition: imgupload.php:18
setContentSubTabs($a_active)
Set pages tabs.
static _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:

◆ listBlockedUsers()

ilObjContentObjectGUI::listBlockedUsers ( )

List blocked users.

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

References $table, ilObjectGUI\$tpl, setQuestionsSubTabs(), and ilObjectGUI\setTabs().

2264  {
2265  $tpl = $this->tpl;
2266 
2267  $this->setTabs("questions");
2268  $this->setQuestionsSubTabs("blocked_users");
2269 
2270  include_once("./Modules/LearningModule/classes/class.ilLMBlockedUsersTableGUI.php");
2271  $table = new ilLMBlockedUsersTableGUI($this, "listBlockedUsers", $this->object);
2272  $tpl->setContent($table->getHTML());
2273  }
setQuestionsSubTabs($a_active)
Set pages tabs.
setTabs()
set admin tabs public
if(empty($password)) $table
Definition: pwgen.php:24
+ Here is the call graph for this function:

◆ listLinks()

ilObjContentObjectGUI::listLinks ( )

List all broken links.

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

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

1371  {
1372  $tpl = $this->tpl;
1373 
1374  $this->setTabs();
1375  $this->setContentSubTabs("internal_links");
1376 
1377  include_once("./Modules/LearningModule/classes/class.ilLinksTableGUI.php");
1378  $table_gui = new ilLinksTableGUI(
1379  $this,
1380  "listLinks",
1381  $this->object->getId(),
1382  $this->object->getType()
1383  );
1384 
1385  $tpl->setContent($table_gui->getHTML());
1386  }
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.

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

References $table, ilObjectGUI\$tpl, setQuestionsSubTabs(), and ilObjectGUI\setTabs().

2249  {
2250  $tpl = $this->tpl;
2251 
2252  $this->setTabs("questions");
2253  $this->setQuestionsSubTabs("question_stats");
2254 
2255  include_once("./Modules/LearningModule/classes/class.ilLMQuestionListTableGUI.php");
2256  $table = new ilLMQuestionListTableGUI($this, "listQuestions", $this->object);
2257  $tpl->setContent($table->getHTML());
2258  }
setQuestionsSubTabs($a_active)
Set pages tabs.
setTabs()
set admin tabs public
if(empty($password)) $table
Definition: pwgen.php:24
+ Here is the call graph for this function:

◆ moveChapter()

ilObjContentObjectGUI::moveChapter (   $a_parent_subobj_id = 0)

move a single chapter (selection)

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

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

1695  {
1696  $ilErr = $this->error;
1697 
1698  if (!isset($_POST["id"])) {
1699  $ilErr->raiseError($this->lng->txt("no_checkbox"), $ilErr->MESSAGE);
1700  }
1701  if (count($_POST["id"]) > 1) {
1702  $ilErr->raiseError($this->lng->txt("cont_select_max_one_item"), $ilErr->MESSAGE);
1703  }
1704 
1705  if (count($_POST["id"]) == 1 && $_POST["id"][0] == IL_FIRST_NODE) {
1706  $ilErr->raiseError($this->lng->txt("cont_select_item"), $ilErr->MESSAGE);
1707  }
1708 
1709  // SAVE POST VALUES
1710  ilEditClipboard::storeContentObject("st", $_POST["id"][0], "move");
1711 
1712  ilUtil::sendInfo($this->lng->txt("cont_chap_select_target_now"), true);
1713 
1714  if ($a_parent_subobj_id == 0) {
1715  $this->ctrl->redirect($this, "chapters");
1716  }
1717  }
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static storeContentObject($a_type, $a_id, $a_action="cut")
const IL_FIRST_NODE
Definition: class.ilTree.php:5
$_POST["username"]
+ Here is the call graph for this function:

◆ movePage()

ilObjContentObjectGUI::movePage ( )

move page

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

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

1740  {
1741  $ilErr = $this->error;
1742 
1743  if (!isset($_POST["id"])) {
1744  $ilErr->raiseError($this->lng->txt("no_checkbox"), $ilErr->MESSAGE);
1745  }
1746 
1747  ilUtil::sendInfo($this->lng->txt("cont_selected_items_have_been_cut"), true);
1748 
1749  $items = ilUtil::stripSlashesArray($_POST["id"]);
1750  ilLMObject::clipboardCut($this->object->getId(), $items);
1752 
1753  $this->ctrl->redirect($this, "pages");
1754  }
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static clipboardCut($a_cont_obj_id, $a_ids)
Copy a set of chapters/pages into the clipboard.
static stripSlashesArray($a_arr, $a_strip_html=true, $a_allow="")
Strip slashes from array.
static setAction($a_action)
$_POST["username"]
+ Here is the call graph for this function:

◆ pages()

ilObjContentObjectGUI::pages ( )

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

References $ctrl, $ilCtrl, ilObjectGUI\$lng, $t, ilObjectGUI\$toolbar, ilObjectGUI\$tpl, setContentSubTabs(), and ilObjectGUI\setTabs().

1345  {
1346  $tpl = $this->tpl;
1347  $ilToolbar = $this->toolbar;
1348  $ilCtrl = $this->ctrl;
1349  $lng = $this->lng;
1350 
1351  $this->setTabs();
1352  $this->setContentSubTabs("pages");
1353 
1354  $ilCtrl->setParameter($this, "backcmd", "pages");
1355  $ilCtrl->setParameterByClass("illmpageobjectgui", "new_type", "pg");
1356  $ilToolbar->addButton(
1357  $lng->txt("pg_add"),
1358  $ilCtrl->getLinkTargetByClass("illmpageobjectgui", "create")
1359  );
1360  $ilCtrl->setParameterByClass("illmpageobjectgui", "new_type", "");
1361 
1362  include_once("./Modules/LearningModule/classes/class.ilLMPagesTableGUI.php");
1363  $t = new ilLMPagesTableGUI($this, "pages", $this->object);
1364  $tpl->setContent($t->getHTML());
1365  }
global $ilCtrl
Definition: ilias.php:18
setContentSubTabs($a_active)
Set pages tabs.
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 1731 of file class.ilObjContentObjectGUI.php.

References insertChapterClip().

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

◆ pastePage()

ilObjContentObjectGUI::pastePage ( )

paste page

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

References $error, $id, ilObjectGUI\$ilErr, ilLMObject\_lookupContObjID(), ilEditClipboard\clear(), ilEditClipboard\getAction(), ilEditClipboard\getContentObjectId(), ilEditClipboard\getContentObjectType(), ilObjectFactory\getInstanceByObjId(), and ilLMObject\updateInternalLinks().

1424  {
1425  $ilErr = $this->error;
1426 
1427  if (ilEditClipboard::getContentObjectType() != "pg") {
1428  $ilErr->raiseError($this->lng->txt("no_page_in_clipboard"), $ilErr->MESSAGE);
1429  }
1430 
1431  // paste selected object
1433 
1434  // copy page, if action is copy
1435  if (ilEditClipboard::getAction() == "copy") {
1436  // check wether page belongs to lm
1438  == $this->object->getID()) {
1439  $lm_page = new ilLMPageObject($this->object, $id);
1440  $new_page = $lm_page->copy();
1441  $id = $new_page->getId();
1442  } else {
1443  // get page from other content object into current content object
1445  $lm_obj = ilObjectFactory::getInstanceByObjId($lm_id);
1446  $lm_page = new ilLMPageObject($lm_obj, $id);
1447  $copied_nodes = array();
1448  $new_page = $lm_page->copyToOtherContObject($this->object, $copied_nodes);
1449  $id = $new_page->getId();
1450  ilLMObject::updateInternalLinks($copied_nodes);
1451  }
1452  }
1453 
1454  // cut is not be possible in "all pages" form yet
1455  if (ilEditClipboard::getAction() == "cut") {
1456  // check wether page belongs not to lm
1458  != $this->object->getID()) {
1460  $lm_obj = ilObjectFactory::getInstanceByObjId($lm_id);
1461  $lm_page = new ilLMPageObject($lm_obj, $id);
1462  $lm_page->setLMId($this->object->getID());
1463  $lm_page->update();
1464  $page = $lm_page->getPageObject();
1465  $page->buildDom();
1466  $page->setParentId($this->object->getID());
1467  $page->update();
1468  }
1469  }
1470 
1471 
1473  $this->ctrl->redirect($this, "pages");
1474  }
static updateInternalLinks($a_copied_nodes, $a_parent_type="lm")
Update internal links, after multiple pages have been copied.
if(!array_key_exists('StateId', $_REQUEST)) $id
static _lookupContObjID($a_id)
get learning module / digibook id for lm object
Class ilLMPageObject.
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
+ Here is the call graph for this function:

◆ popup()

ilObjContentObjectGUI::popup ( )

popup window for wysiwyg editor

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

References $_GET, and exit.

1050  {
1051  include_once "./Services/COPage/classes/class.ilWysiwygUtil.php";
1052  $popup = new ilWysiwygUtil();
1053  $popup->show($_GET["ptype"]);
1054  exit;
1055  }
$_GET["client_id"]
exit
Definition: backend.php:16

◆ proceedDragDrop()

ilObjContentObjectGUI::proceedDragDrop ( )

proceed drag and drop operations on pages/chapters

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

References $_POST, $ctrl, and $ilCtrl.

Referenced by explorer().

1061  {
1062  $ilCtrl = $this->ctrl;
1063 
1064  $this->object->executeDragDrop(
1065  $_POST["il_hform_source_id"],
1066  $_POST["il_hform_target_id"],
1067  $_POST["il_hform_fc"],
1068  $_POST["il_hform_as_subitem"]
1069  );
1070  $ilCtrl->redirect($this, "chapters");
1071  }
global $ilCtrl
Definition: ilias.php:18
$_POST["username"]
+ Here is the caller graph for this function:

◆ properties()

ilObjContentObjectGUI::properties ( )

edit properties form

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

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

Referenced by ilObjLearningModuleGUI\view().

416  {
417  $lng = $this->lng;
418 
419  $lng->loadLanguageModule("style");
420  $this->setTabs("settings");
421  $this->setSubTabs("settings");
422 
423  // lm properties
424  $this->initPropertiesForm();
425  $this->getPropertiesFormValues();
426 
427  if ($this->object->getType() == "lm") {
428  // Edit ecs export settings
429  include_once 'Modules/LearningModule/classes/class.ilECSLearningModuleSettings.php';
430  $ecs = new ilECSLearningModuleSettings($this->object);
431  $ecs->addSettingsToForm($this->form, 'lm');
432  }
433 
434  $this->tpl->setContent($this->form->getHTML());
435  }
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 1818 of file class.ilObjContentObjectGUI.php.

References $ctrl, $f, $ilCtrl, and ilUtil\sendFailure().

1819  {
1820  $ilCtrl = $this->ctrl;
1821 
1822  if (!isset($a_files)) {
1823  ilUtil::sendFailure($this->lng->txt("no_checkbox"), true);
1824  } else {
1825  foreach ($a_files as $f) {
1826  $file = explode(":", $f);
1827  if (is_int(strpos($file[0], "_"))) {
1828  $file[0] = explode("_", $file[0])[0];
1829  }
1830  $export_dir = $this->object->getExportDirectory($file[0]);
1831 
1832  if ($this->object->getPublicExportFile($file[0]) ==
1833  $file[1]) {
1834  $this->object->setPublicExportFile($file[0], "");
1835  } else {
1836  $this->object->setPublicExportFile($file[0], $file[1]);
1837  }
1838  }
1839  $this->object->update();
1840  }
1841  $ilCtrl->redirectByClass("ilexportgui");
1842  }
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 3998 of file class.ilObjContentObjectGUI.php.

3999  {
4000  // #12281
4001  return parent::redrawHeaderActionObject();
4002  }

◆ refreshLinkCheck()

ilObjContentObjectGUI::refreshLinkCheck ( )

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

References __initLinkChecker(), and linkChecker().

2888  {
2889  $this->__initLinkChecker();
2890  $this->link_checker_obj->checkLinks();
2891  ilUtil::sendSuccess($this->lng->txt('link_checker_refreshed'));
2892 
2893  $this->linkChecker();
2894 
2895  return true;
2896  }
+ Here is the call graph for this function:

◆ removeLMGlossary()

ilObjContentObjectGUI::removeLMGlossary ( )

Remove lm glossary.

Parameters

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

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

3953  {
3954  $ilCtrl = $this->ctrl;
3955  $lng = $this->lng;
3956 
3957  $this->object->removeAutoGlossary((int) $_GET["glo_id"]);
3958  $this->object->update();
3959 
3960  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
3961  $ilCtrl->redirect($this, "editGlossaries");
3962  }
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18

◆ resetNumberOfTries()

ilObjContentObjectGUI::resetNumberOfTries ( )

Reset number of tries.

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

References $_POST, $ctrl, $ilCtrl, ilObjectGUI\$lng, and ilPageQuestionProcessor\resetTries().

2279  {
2280  $lng = $this->lng;
2281  $ilCtrl = $this->ctrl;
2282 
2283  include_once("./Services/COPage/classes/class.ilPageQuestionProcessor.php");
2284  if (is_array($_POST["userquest_id"])) {
2285  foreach ($_POST["userquest_id"] as $uqid) {
2286  $uqid = explode(":", $uqid);
2287  ilPageQuestionProcessor::resetTries((int) $uqid[0], (int) $uqid[1]);
2288  }
2289  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
2290  }
2291  $ilCtrl->redirect($this, "listBlockedUsers");
2292  }
static resetTries($a_q_id, $a_user_id)
Reset tries.
global $ilCtrl
Definition: ilias.php:18
$_POST["username"]
+ Here is the call graph for this function:

◆ saveAllTitles()

ilObjContentObjectGUI::saveAllTitles ( )

Save all titles of chapters/pages.

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

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

3228  {
3229  $ilCtrl = $this->ctrl;
3230 
3231  ilLMObject::saveTitles($this->object, ilUtil::stripSlashesArray($_POST["title"]), $_GET["transl"]);
3232 
3233  ilUtil::sendSuccess($this->lng->txt("lm_save_titles"), true);
3234  $ilCtrl->redirect($this, "chapters");
3235  }
$_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.
$_POST["username"]
+ Here is the call graph for this function:

◆ saveExportIds()

ilObjContentObjectGUI::saveExportIds ( )

Save export IDs.

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

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

3493  {
3494  $ilCtrl = $this->ctrl;
3495  $lng = $this->lng;
3496 
3497  // check all export ids
3498  $ok = true;
3499  if (is_array($_POST["exportid"])) {
3500  foreach ($_POST["exportid"] as $pg_id => $exp_id) {
3501  if ($exp_id != "" && !preg_match(
3502  "/^([a-zA-Z]+)[0-9a-zA-Z_]*$/",
3503  trim($exp_id)
3504  )) {
3505  $ok = false;
3506  }
3507  }
3508  }
3509  if (!$ok) {
3510  ilUtil::sendFailure($lng->txt("cont_exp_ids_not_resp_format1") . ": a-z, A-Z, 0-9, '_'. " .
3511  $lng->txt("cont_exp_ids_not_resp_format3") . " " .
3512  $lng->txt("cont_exp_ids_not_resp_format2"));
3513  $this->showExportIDsOverview(true);
3514  return;
3515  }
3516 
3517 
3518  if (is_array($_POST["exportid"])) {
3519  foreach ($_POST["exportid"] as $pg_id => $exp_id) {
3521  $this->object->getId(),
3522  $pg_id,
3523  ilUtil::stripSlashes($exp_id),
3524  ilLMObject::_lookupType($pg_id)
3525  );
3526  }
3527  }
3528 
3529  ilUtil::sendSuccess($lng->txt("cont_saved_export_ids"), true);
3530  $ilCtrl->redirect($this, "showExportIdsOverview");
3531  }
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.
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.
$_POST["username"]
+ Here is the call graph for this function:

◆ saveHelpMapping()

ilObjContentObjectGUI::saveHelpMapping ( )

Save help mapping.

Parameters

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

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

3540  {
3541  $lng = $this->lng;
3542  $ilCtrl = $this->ctrl;
3543 
3544  include_once("./Services/Help/classes/class.ilHelpMapping.php");
3545  if (is_array($_POST["screen_ids"])) {
3546  foreach ($_POST["screen_ids"] as $chap => $ids) {
3547  $ids = explode("\n", $ids);
3549  }
3550  }
3551  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
3552  $ilCtrl->redirect($this, "showExportIdsOverview");
3553  }
global $ilCtrl
Definition: ilias.php:18
static saveScreenIdsForChapter($a_chap, $a_ids)
Save screen ids for chapter.
$_POST["username"]
+ Here is the call graph for this function:

◆ saveLinkCheck()

ilObjContentObjectGUI::saveLinkCheck ( )

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

References $_POST, $db, $ilDB, $ilUser, ilObjectGUI\$user, and linkChecker().

2863  {
2864  $ilDB = $this->db;
2865  $ilUser = $this->user;
2866 
2867  include_once './Services/LinkChecker/classes/class.ilLinkCheckNotify.php';
2868 
2869  $link_check_notify = new ilLinkCheckNotify($ilDB);
2870  $link_check_notify->setUserId($ilUser->getId());
2871  $link_check_notify->setObjId($this->object->getId());
2872 
2873  if ($_POST['link_check_message']) {
2874  ilUtil::sendSuccess($this->lng->txt('link_check_message_enabled'));
2875  $link_check_notify->addNotifier();
2876  } else {
2877  ilUtil::sendSuccess($this->lng->txt('link_check_message_disabled'));
2878  $link_check_notify->deleteNotifier();
2879  }
2880  $this->linkChecker();
2881 
2882  return true;
2883  }
class for checking external links in page objects.
$ilUser
Definition: imgupload.php:18
global $ilDB
$_POST["username"]
+ Here is the call graph for this function:

◆ saveMenuEntry()

ilObjContentObjectGUI::saveMenuEntry ( )

save new menu entry

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

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

3013  {
3014  $ilCtrl = $this->ctrl;
3015 
3016  // check title and target
3017  if (empty($_POST["title"])) {
3018  ilUtil::sendFailure($this->lng->txt("please_enter_title"), true);
3019  $ilCtrl->redirect($this, "addMenuEntry");
3020  }
3021  if (empty($_POST["target"])) {
3022  ilUtil::sendFailure($this->lng->txt("please_enter_target"), true);
3023  $ilCtrl->redirect($this, "addMenuEntry");
3024  }
3025 
3026  $this->__initLMMenuEditor();
3027  $this->lmme_obj->setTitle($_POST["title"]);
3028  $this->lmme_obj->setTarget($_POST["target"]);
3029  $this->lmme_obj->setLinkRefId($_POST["link_ref_id"]);
3030 
3031  if ($_POST["link_ref_id"]) {
3032  $this->lmme_obj->setLinkType("intern");
3033  }
3034 
3035  $this->lmme_obj->create();
3036 
3037  ilUtil::sendSuccess($this->lng->txt("msg_entry_added"), true);
3038  $this->ctrl->redirect($this, "editMenuProperties");
3039  }
global $ilCtrl
Definition: ilias.php:18
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
$_POST["username"]
+ Here is the call graph for this function:

◆ saveMenuProperties()

ilObjContentObjectGUI::saveMenuProperties ( )

save properties

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

References $_POST, and __initLMMenuEditor().

956  {
957  $this->object->setActiveLMMenu((int) $_POST["cobj_act_lm_menu"]);
958  $this->object->setActiveTOC((int) $_POST["cobj_act_toc"]);
959  $this->object->setActivePrintView((int) $_POST["cobj_act_print"]);
960  $this->object->setActivePreventGlossaryAppendix((int) $_POST["cobj_act_print_prev_glo"]);
961  $this->object->setHideHeaderFooterPrint((int) $_POST["hide_head_foot_print"]);
962  $this->object->setActiveDownloads((int) $_POST["cobj_act_downloads"]);
963  $this->object->setActiveDownloadsPublic((int) $_POST["cobj_act_downloads_public"]);
964  $this->object->updateProperties();
965 
966  $this->__initLMMenuEditor();
967  //var_dump($_POST["menu_entries"]); exit;
968  $this->lmme_obj->updateActiveStatus($_POST["menu_entries"]);
969 
970  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
971  $this->ctrl->redirect($this, "editMenuProperties");
972  }
$_POST["username"]
+ Here is the call graph for this function:

◆ savePageLayout()

ilObjContentObjectGUI::savePageLayout ( )

Save page layout.

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

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

3799  {
3800  $lng = $this->lng;
3801  $ilCtrl = $this->ctrl;
3802 
3803  $ilCtrl->setParameter($this, "hierarchy", $_GET["hierarchy"]);
3804 
3805  foreach ($_POST["id"] as $id) {
3807  ilUtil::stripSlashes($id),
3808  ilUtil::stripSlashes($_POST["layout"]),
3809  $this->object
3810  );
3811  }
3812  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
3813 
3814  if ($_GET["hierarchy"] == 1) {
3815  $ilCtrl->redirect($this, "chapters");
3816  } else {
3817  $ilCtrl->redirect($this, "pages");
3818  }
3819  }
$_GET["client_id"]
if(!array_key_exists('StateId', $_REQUEST)) $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
$_POST["username"]
+ Here is the call graph for this function:

◆ saveProperties()

ilObjContentObjectGUI::saveProperties ( )

save properties

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

References $_POST, $ilSetting, $ilUser, ilObjectGUI\$lng, ilObjectGUI\$object_service, ilObjectGUI\$settings, ilObjectGUI\$user, $valid, ilObjectTranslation\getInstance(), initPropertiesForm(), ilNotification\setNotification(), setSubTabs(), ilObjectGUI\setTabs(), and ilNotification\TYPE_LM_BLOCKED_USERS.

630  {
631  $lng = $this->lng;
634  $obj_service = $this->object_service;
635 
636  $valid = false;
637  $this->initPropertiesForm();
638  if ($this->form->checkInput()) {
639  include_once("./Services/Object/classes/class.ilObjectTranslation.php");
640  $ot = ilObjectTranslation::getInstance($this->object->getId());
641  if ($ot->getContentActivated()) {
642  $ot->setDefaultTitle($_POST['title']);
643  $ot->setDefaultDescription($_POST['description']);
644  $ot->save();
645  }
646 
647  $this->object->setTitle($_POST['title']);
648  $this->object->setDescription($_POST['description']);
649  $this->object->setLayout($_POST["lm_layout"]);
650  $this->object->setPageHeader($_POST["lm_pg_header"]);
651  $this->object->setTOCMode($_POST["toc_mode"]);
652  $this->object->setOfflineStatus(!($_POST['cobj_online']));
653  $this->object->setActiveNumbering($_POST["cobj_act_number"]);
654  $this->object->setCleanFrames($_POST["cobj_clean_frames"]);
655  if (!$ilSetting->get('disable_comments')) {
656  $this->object->setPublicNotes($_POST["cobj_pub_notes"]);
657  }
658  $this->object->setHistoryUserComments($_POST["cobj_user_comments"]);
659  $this->object->setLayoutPerPage($_POST["layout_per_page"]);
660  $this->object->setRating($_POST["rating"]);
661  $this->object->setRatingPages($_POST["rating_pages"]);
662  $this->object->setDisableDefaultFeedback((int) $_POST["disable_def_feedback"]);
663  $this->object->setProgressIcons((int) $_POST["progr_icons"]);
664 
665  $add_info = "";
666  if ($_POST["restrict_forw_nav"] && !$_POST["store_tries"]) {
667  $_POST["store_tries"] = 1;
668  $add_info = "</br>" . $lng->txt("cont_automatically_set_store_tries");
669  $add_info = str_replace("$1", $lng->txt("cont_tries_store"), $add_info);
670  $add_info = str_replace("$2", $lng->txt("cont_restrict_forw_nav"), $add_info);
671  }
672 
673  $this->object->setStoreTries((int) $_POST["store_tries"]);
674  $this->object->setRestrictForwardNavigation((int) $_POST["restrict_forw_nav"]);
675  $this->object->updateProperties();
676  $this->object->update();
677 
678  // tile image
679  $obj_service->commonSettings()->legacyForm($this->form, $this->object)->saveTileImage();
680 
681  include_once "./Services/Notification/classes/class.ilNotification.php";
684  $ilUser->getId(),
685  $this->object->getId(),
686  (bool) $this->form->getInput("notification_blocked_users")
687  );
688 
689 
690  if ($this->object->getType() == 'lm') {
691  // Update ecs export settings
692  include_once 'Modules/LearningModule/classes/class.ilECSLearningModuleSettings.php';
693  $ecs = new ilECSLearningModuleSettings($this->object);
694  if ($ecs->handleSettingsUpdate()) {
695  $valid = true;
696  }
697  } else {
698  $valid = true;
699  }
700  }
701 
702  if ($valid) {
703  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified") . $add_info, true);
704  $this->ctrl->redirect($this, "properties");
705  } else {
706  $lng->loadLanguageModule("style");
707  $this->setTabs("settings");
708  $this->setSubTabs("cont_general_properties");
709 
710  $this->form->setValuesByPost();
711  $this->tpl->setContent($this->form->getHTML());
712  }
713  }
setSubTabs($a_active)
Set sub tabs.
$valid
Class ilECSLearningModuleSettings.
static setNotification($type, $user_id, $id, $status=true)
Set notification status for object and user.
$ilUser
Definition: imgupload.php:18
global $ilSetting
Definition: privfeed.php:17
static getInstance($a_obj_id)
Get instance.
initPropertiesForm()
Init properties form.
setTabs()
set admin tabs public
$_POST["username"]
+ Here is the call graph for this function:

◆ savePublicSection()

ilObjContentObjectGUI::savePublicSection ( )

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

References $_POST, and ilLMObject\_writePublicAccessStatus().

2741  {
2742  //var_dump($_POST["lm_public_mode"]);exit;
2743  $this->object->setPublicAccessMode($_POST["lm_public_mode"]);
2744  $this->object->updateProperties();
2745  ilLMObject::_writePublicAccessStatus($_POST["pages"], $this->object->getId());
2746  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
2747  $this->ctrl->redirect($this, "editPublicSection");
2748  }
static _writePublicAccessStatus($a_pages, $a_cont_obj_id)
update public access flags in lm_data for all pages of a content object
$_POST["username"]
+ Here is the call graph for this function:

◆ savePublicSectionAccess()

ilObjContentObjectGUI::savePublicSectionAccess ( )

Saves lm access mode.

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

References $_POST.

2754  {
2755  $this->object->setPublicAccessMode($_POST["lm_public_mode"]);
2756  $this->object->updateProperties();
2757  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
2758  $this->ctrl->redirect($this, "editPublicSection");
2759  }
$_POST["username"]

◆ savePublicSectionPages()

ilObjContentObjectGUI::savePublicSectionPages ( )

Saves public lm pages.

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

References $_POST, and ilLMObject\_writePublicAccessStatus().

2765  {
2766  ilLMObject::_writePublicAccessStatus($_POST["pages"], $this->object->getId());
2767  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
2768  $this->ctrl->redirect($this, "editPublicSection");
2769  }
static _writePublicAccessStatus($a_pages, $a_cont_obj_id)
update public access flags in lm_data for all pages of a content object
$_POST["username"]
+ Here is the call graph for this function:

◆ saveStyleSettings()

ilObjContentObjectGUI::saveStyleSettings ( )

Save style settings.

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

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

839  {
841 
842  if ($ilSetting->get("fixed_content_style_id") <= 0 &&
843  (ilObjStyleSheet::_lookupStandard($this->object->getStyleSheetId())
844  || $this->object->getStyleSheetId() == 0)) {
845  $this->object->setStyleSheetId(ilUtil::stripSlashes($_POST["style_id"]));
846  $this->object->update();
847  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
848  }
849  $this->ctrl->redirect($this, "editStyleProperties");
850  }
static _lookupStandard($a_id)
Lookup standard flag.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
global $ilSetting
Definition: privfeed.php:17
$_POST["username"]
+ Here is the call graph for this function:

◆ saveTooltips()

ilObjContentObjectGUI::saveTooltips ( )

Save tooltips.

Parameters

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

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

3652  {
3653  $ilCtrl = $this->ctrl;
3654  $lng = $this->lng;
3655 
3656  include_once("./Services/Help/classes/class.ilHelp.php");
3657 
3658  if (is_array($_POST["text"])) {
3659  foreach ($_POST["text"] as $id => $text) {
3661  (int) $id,
3663  ilUtil::stripSlashes($_POST["tt_id"][(int) $id])
3664  );
3665  }
3666  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
3667  }
3668  $ilCtrl->redirect($this, "showTooltipList");
3669  }
if(!array_key_exists('StateId', $_REQUEST)) $id
global $ilCtrl
Definition: ilias.php:18
$text
Definition: errorreport.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.
$_POST["username"]
+ Here is the call graph for this function:

◆ selectFooter()

ilObjContentObjectGUI::selectFooter ( )

select page as footer

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

References $_POST, $error, and ilObjectGUI\$ilErr.

3206  {
3207  $ilErr = $this->error;
3208 
3209  if (!isset($_POST["id"])) {
3210  $ilErr->raiseError($this->lng->txt("no_checkbox"), $ilErr->MESSAGE);
3211  }
3212  if (count($_POST["id"]) > 1) {
3213  $ilErr->raiseError($this->lng->txt("cont_select_max_one_item"), $ilErr->MESSAGE);
3214  }
3215  if ($_POST["id"][0] != $this->object->getFooterPage()) {
3216  $this->object->setFooterPage($_POST["id"][0]);
3217  } else {
3218  $this->object->setFooterPage(0);
3219  }
3220  $this->object->updateProperties();
3221  $this->ctrl->redirect($this, "pages");
3222  }
$_POST["username"]

◆ selectHeader()

ilObjContentObjectGUI::selectHeader ( )

select page as header

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

References $_POST, $error, and ilObjectGUI\$ilErr.

3184  {
3185  $ilErr = $this->error;
3186 
3187  if (!isset($_POST["id"])) {
3188  $ilErr->raiseError($this->lng->txt("no_checkbox"), $ilErr->MESSAGE);
3189  }
3190  if (count($_POST["id"]) > 1) {
3191  $ilErr->raiseError($this->lng->txt("cont_select_max_one_item"), $ilErr->MESSAGE);
3192  }
3193  if ($_POST["id"][0] != $this->object->getHeaderPage()) {
3194  $this->object->setHeaderPage($_POST["id"][0]);
3195  } else {
3196  $this->object->setHeaderPage(0);
3197  }
3198  $this->object->updateProperties();
3199  $this->ctrl->redirect($this, "pages");
3200  }
$_POST["username"]

◆ selectLMGlossary()

ilObjContentObjectGUI::selectLMGlossary ( )

Select lm glossary.

Parameters

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

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

Referenced by selectLMGlossaryLink().

3929  {
3930  $ilCtrl = $this->ctrl;
3931  $lng = $this->lng;
3932 
3933  $glos = $this->object->getAutoGlossaries();
3934  $glo_ref_id = (int) $_GET["glo_ref_id"];
3935  $glo_id = ilObject::_lookupObjId($glo_ref_id);
3936  if (!in_array($glo_id, $glos)) {
3937  $glos[] = $glo_id;
3938  }
3939  $this->object->setAutoGlossaries($glos);
3940  $this->object->update();
3941 
3942  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
3943  $ilCtrl->redirect($this, "editGlossaries");
3944  }
$_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 3913 of file class.ilObjContentObjectGUI.php.

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

3914  {
3915  $glo_ref_id = (int) $_GET["glo_ref_id"];
3916  $glo_id = ilObject::_lookupObjId($glo_ref_id);
3917  $this->object->autoLinkGlossaryTerms($glo_ref_id);
3918  $this->selectLMGlossary();
3919  }
selectLMGlossary()
Select lm glossary.
$_GET["client_id"]
static _lookupObjId($a_id)
+ Here is the call graph for this function:

◆ sendMailToBlockedUsers()

ilObjContentObjectGUI::sendMailToBlockedUsers ( )

Send Mail to blocked users.

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

References $_POST, $ctrl, $ilCtrl, $login, ilObjUser\_lookupLogin(), getBlockedUsersMailSignature(), ilMailFormCall\getRedirectTarget(), ilUtil\redirect(), and ilUtil\sendFailure().

2317  {
2318  $ilCtrl = $this->ctrl;
2319 
2320  if (!is_array($_POST["userquest_id"])) {
2321  ilUtil::sendFailure($this->lng->txt("no_checkbox"), 1);
2322  $ilCtrl->redirect($this, "listBlockedUsers");
2323  }
2324 
2325  $rcps = array();
2326  foreach ($_POST["userquest_id"] as $uqid) {
2327  $uqid = explode(":", $uqid);
2328  $login = ilObjUser::_lookupLogin($uqid[1]);
2329  if (!in_array($login, $rcps)) {
2330  $rcps[] = $login;
2331  }
2332  }
2333  require_once 'Services/Mail/classes/class.ilMailFormCall.php';
2335  $this,
2336  'listBlockedUsers',
2337  array(),
2338  array(
2339  'type' => 'new',
2340  'rcp_to' => implode(',', $rcps),
2341  'sig' => $this->getBlockedUsersMailSignature()
2342  )
2343  ));
2344  }
static _lookupLogin($a_user_id)
lookup login
global $ilCtrl
Definition: ilias.php:18
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static getRedirectTarget($gui, $cmd, array $gui_params=array(), array $mail_params=array(), array $context_params=array())
getBlockedUsersMailSignature()
Get mail signature for blocked users.
$login
Definition: cron.php:13
static redirect($a_script)
$_POST["username"]
+ Here is the call graph for this function:

◆ setContentSubTabs()

ilObjContentObjectGUI::setContentSubTabs (   $a_active)

Set pages tabs.

Parameters
string$a_activeactive subtab

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

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

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

2390  {
2391  $ilTabs = $this->tabs;
2392  $lng = $this->lng;
2393  $ilCtrl = $this->ctrl;
2394 
2395  $lm_set = new ilSetting("lm");
2396 
2397  // chapters
2398  $ilTabs->addSubtab(
2399  "chapters",
2400  $lng->txt("cont_chapters"),
2401  $ilCtrl->getLinkTarget($this, "chapters")
2402  );
2403 
2404  // all pages
2405  $ilTabs->addSubtab(
2406  "pages",
2407  $lng->txt("cont_all_pages"),
2408  $ilCtrl->getLinkTarget($this, "pages")
2409  );
2410 
2411  // all pages
2412  $ilTabs->addSubtab(
2413  "short_titles",
2414  $lng->txt("cont_short_titles"),
2415  $ilCtrl->getLinkTargetByClass("illmeditshorttitlesgui", "")
2416  );
2417 
2418  // export ids
2419  if ($lm_set->get("html_export_ids")) {
2420  if (!ilObjContentObject::isOnlineHelpModule($this->object->getRefId())) {
2421  $ilTabs->addSubtab(
2422  "export_ids",
2423  $lng->txt("cont_html_export_ids"),
2424  $ilCtrl->getLinkTarget($this, "showExportIDsOverview")
2425  );
2426  }
2427  }
2428  if (ilObjContentObject::isOnlineHelpModule($this->object->getRefId())) {
2429  $lng->loadLanguageModule("help");
2430  $ilTabs->addSubtab(
2431  "export_ids",
2432  $lng->txt("cont_online_help_ids"),
2433  $ilCtrl->getLinkTarget($this, "showExportIDsOverview")
2434  );
2435 
2436  $ilTabs->addSubtab(
2437  "help_tooltips",
2438  $lng->txt("help_tooltips"),
2439  $ilCtrl->getLinkTarget($this, "showTooltipList")
2440  );
2441  }
2442 
2443  // list links
2444  $ilTabs->addSubtab(
2445  "internal_links",
2446  $lng->txt("cont_internal_links"),
2447  $ilCtrl->getLinkTarget($this, "listLinks")
2448  );
2449 
2450  // web link checker
2451  $ilTabs->addSubtab(
2452  "link_check",
2453  $lng->txt("link_check"),
2454  $ilCtrl->getLinkTarget($this, "linkChecker")
2455  );
2456 
2457  $ilTabs->addSubtab(
2458  "history",
2459  $lng->txt("history"),
2460  $this->ctrl->getLinkTarget($this, "history")
2461  );
2462 
2463  // maintenance
2464  $ilTabs->addSubtab(
2465  "maintenance",
2466  $lng->txt("cont_maintenance"),
2467  $ilCtrl->getLinkTarget($this, "showMaintenance")
2468  );
2469 
2470  // srt files
2471  $ilTabs->addSubtab(
2472  "srt_files",
2473  $lng->txt("cont_subtitle_files"),
2474  $ilCtrl->getLinkTargetByClass("ilmobmultisrtuploadgui", "")
2475  );
2476 
2477  // srt files
2478  $ilTabs->addSubtab(
2479  "import",
2480  $lng->txt("cont_import"),
2481  $ilCtrl->getLinkTargetByClass("illmimportgui", "")
2482  );
2483 
2484  $ilTabs->activateSubTab($a_active);
2485  $ilTabs->activateTab("content");
2486  }
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,
  $a_lang = "",
  $a_export_all = false 
)

get lm menu html

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

References $_GET, ilObjectGUI\$access, $ctrl, $help, $ilCtrl, $ilUser, $plugin_admin, $rbacsystem, $tabs, ilObjectGUI\$tabs_gui, ilObjectGUI\$user, __initLMMenuEditor(), ilFrameTargetInfo\_getFrame(), ilUtil\appendUrlParameterString(), ilLearningProgressAccess\checkAccess(), ilObjectLP\getInstance(), ilPluginAdmin\getPluginObject(), IL_COMP_SERVICE, ilLPObjSettings\LP_MODE_COLLECTION_MANUAL, and ilLPObjSettings\LP_MODE_COLLECTION_TLT.

1914  {
1915  $ilCtrl = $this->ctrl;
1916  $ilUser = $this->user;
1917  $ilAccess = $this->access;
1918  $ilTabs = $this->tabs;
1920  $ilPluginAdmin = $this->plugin_admin;
1921  $ilHelp = $this->help;
1922 
1923  $ilHelp->setScreenIdComponent("lm");
1924 
1925  if ($a_as_subtabs) {
1926  $addcmd = "addSubTabTarget";
1927  $getcmd = "getSubTabHTML";
1928  } else {
1929  $addcmd = "addTarget";
1930  $getcmd = "getHTML";
1931  }
1932 
1933  $active[$a_active] = true;
1934 
1935  if (!$this->object->isActiveLMMenu()) {
1936  return "";
1937  }
1938 
1939  if ($a_use_global_tabs) {
1940  $tabs_gui = $ilTabs;
1941  } else {
1942  $tabs_gui = new ilTabsGUI();
1943  }
1944 
1945  // workaround for preventing tooltips in export
1946  if ($a_offline) {
1947  $tabs_gui->setSetupMode(true);
1948  }
1949 
1950  // Determine whether the view of a learning resource should
1951  // be shown in the frameset of ilias, or in a separate window.
1952  $showViewInFrameset = true;
1953 
1954  if ($showViewInFrameset && !$a_offline) {
1955  $buttonTarget = ilFrameTargetInfo::_getFrame("MainContent");
1956  } else {
1957  $buttonTarget = "_top";
1958  }
1959 
1960  if ($a_export_format == "scorm") {
1961  $buttonTarget = "";
1962  }
1963 
1964  // content
1965  if (!$a_offline && $ilAccess->checkAccess("read", "", $_GET["ref_id"])) {
1966  $ilCtrl->setParameterByClass("illmpresentationgui", "obj_id", $_GET["obj_id"]);
1967  $tabs_gui->$addcmd(
1968  "content",
1969  $ilCtrl->getLinkTargetByClass("illmpresentationgui", "layout"),
1970  "",
1971  "",
1972  $buttonTarget,
1973  $active["content"]
1974  );
1975  if ($active["content"]) {
1976  $ilHelp->setScreenId("content");
1977  $ilHelp->setSubScreenId("content");
1978  }
1979  } elseif ($a_offline) {
1980  $tabs_gui->setForcePresentationOfSingleTab(true);
1981  }
1982 
1983  // table of contents
1984  if ($this->object->isActiveTOC() && $ilAccess->checkAccess("read", "", $_GET["ref_id"])) {
1985  if (!$a_offline) {
1986  $ilCtrl->setParameterByClass("illmpresentationgui", "obj_id", $_GET["obj_id"]);
1987  $link = $ilCtrl->getLinkTargetByClass("illmpresentationgui", "showTableOfContents");
1988  } else {
1989  if ($a_export_all) {
1990  $link = "./table_of_contents_" . $a_lang . ".html";
1991  } else {
1992  $link = "./table_of_contents.html";
1993  }
1994  }
1995  $tabs_gui->$addcmd(
1996  "cont_toc",
1997  $link,
1998  "",
1999  "",
2000  $buttonTarget,
2001  $active["toc"]
2002  );
2003  }
2004 
2005  // print view
2006  if ($this->object->isActivePrintView() && $ilAccess->checkAccess("read", "", $_GET["ref_id"])) {
2007  if (!$a_offline) { // has to be implemented for offline mode
2008  $ilCtrl->setParameterByClass("illmpresentationgui", "obj_id", $_GET["obj_id"]);
2009  $link = $ilCtrl->getLinkTargetByClass("illmpresentationgui", "showPrintViewSelection");
2010  $tabs_gui->$addcmd(
2011  "cont_print_view",
2012  $link,
2013  "",
2014  "",
2015  $buttonTarget,
2016  $active["print"]
2017  );
2018  }
2019  }
2020 
2021  // download
2022  if ($ilUser->getId() == ANONYMOUS_USER_ID) {
2023  $is_public = $this->object->isActiveDownloadsPublic();
2024  } else {
2025  $is_public = true;
2026  }
2027 
2028  if ($this->object->isActiveDownloads() && !$a_offline && $is_public &&
2029  $ilAccess->checkAccess("read", "", $_GET["ref_id"])) {
2030  $ilCtrl->setParameterByClass("illmpresentationgui", "obj_id", $_GET["obj_id"]);
2031  $link = $ilCtrl->getLinkTargetByClass("illmpresentationgui", "showDownloadList");
2032  $tabs_gui->$addcmd(
2033  "download",
2034  $link,
2035  "",
2036  "",
2037  $buttonTarget,
2038  $active["download"]
2039  );
2040  }
2041 
2042  // info button
2043  if ($a_export_format != "scorm" && !$a_offline) {
2044  if (!$a_offline) {
2045  $ilCtrl->setParameterByClass("illmpresentationgui", "obj_id", $_GET["obj_id"]);
2046  $link = $this->ctrl->getLinkTargetByClass(
2047  array("illmpresentationgui", "ilinfoscreengui"),
2048  "showSummary"
2049  );
2050  } else {
2051  $link = "./info.html";
2052  }
2053 
2054  $tabs_gui->$addcmd(
2055  'info_short',
2056  $link,
2057  "",
2058  "",
2059  $buttonTarget,
2060  $active["info"]
2061  );
2062  }
2063 
2064  include_once './Services/Tracking/classes/class.ilLearningProgressAccess.php';
2065  if (!$a_offline &&
2066  $ilAccess->checkAccess("read", "", $_GET["ref_id"]) && // #14075
2068  include_once './Services/Object/classes/class.ilObjectLP.php';
2069  $olp = ilObjectLP::getInstance($this->object->getId());
2070  if ($olp->getCurrentMode() == ilLPObjSettings::LP_MODE_COLLECTION_MANUAL) {
2071  $tabs_gui->$addcmd(
2072  "learning_progress",
2073  $this->ctrl->getLinkTargetByClass(array("illmpresentationgui", "illearningprogressgui"), "editManual"),
2074  "",
2075  "",
2076  $buttonTarget,
2077  $active["learning_progress"]
2078  );
2079  } elseif ($olp->getCurrentMode() == ilLPObjSettings::LP_MODE_COLLECTION_TLT) {
2080  $tabs_gui->$addcmd(
2081  "learning_progress",
2082  $this->ctrl->getLinkTargetByClass(array("illmpresentationgui", "illearningprogressgui"), "showtlt"),
2083  "",
2084  "",
2085  $buttonTarget,
2086  $active["learning_progress"]
2087  );
2088  }
2089  }
2090 
2091  // get user defined menu entries
2092  $this->__initLMMenuEditor();
2093  $entries = $this->lmme_obj->getMenuEntries(true);
2094  if (count($entries) > 0 && $ilAccess->checkAccess("read", "", $_GET["ref_id"])) {
2095  foreach ($entries as $entry) {
2096  // build goto-link for internal resources
2097  if ($entry["type"] == "intern") {
2098  $entry["link"] = ILIAS_HTTP_PATH . "/goto.php?target=" . $entry["link"];
2099  }
2100 
2101  // add http:// prefix if not exist
2102  if (!strstr($entry["link"], '://') && !strstr($entry["link"], 'mailto:')) {
2103  $entry["link"] = "http://" . $entry["link"];
2104  }
2105 
2106  if (!strstr($entry["link"], 'mailto:')) {
2107  $entry["link"] = ilUtil::appendUrlParameterString($entry["link"], "ref_id=" . $this->ref_id . "&structure_id=" . $this->obj_id);
2108  }
2109  $tabs_gui->$addcmd(
2110  $entry["title"],
2111  $entry["link"],
2112  "",
2113  "",
2114  "_blank",
2115  "",
2116  true
2117  );
2118  }
2119  }
2120 
2121  // edit learning module
2122  if (!$a_offline && $a_cur_page > 0) {
2123  if ($rbacsystem->checkAccess("write", $_GET["ref_id"])) {
2124  //$page_id = $this->getCurrentPageId();
2125  $page_id = $a_cur_page;
2126  $tabs_gui->$addcmd(
2127  "edit_page",
2128  ILIAS_HTTP_PATH . "/ilias.php?baseClass=ilLMEditorGUI&ref_id=" . $_GET["ref_id"] .
2129  "&obj_id=" . $page_id . "&to_page=1",
2130  "",
2131  "",
2132  $buttonTarget,
2133  $active["edit_page"]
2134  );
2135  }
2136  }
2137 
2138  // user interface hook [uihk]
2139  $pl_names = $ilPluginAdmin->getActivePluginsForSlot(IL_COMP_SERVICE, "UIComponent", "uihk");
2140  $plugin_html = false;
2141  foreach ($pl_names as $pl) {
2142  $ui_plugin = ilPluginAdmin::getPluginObject(IL_COMP_SERVICE, "UIComponent", "uihk", $pl);
2143  $gui_class = $ui_plugin->getUIClassInstance();
2144  $resp = $gui_class->modifyGUI(
2145  "Modules/LearningModule",
2146  "lm_menu_tabs",
2147  array("lm_menu_tabs" => $tabs_gui)
2148  );
2149  }
2150 
2151  return $tabs_gui->$getcmd();
2152  }
Tabs GUI.
$_GET["client_id"]
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
$ilUser
Definition: imgupload.php:18
static getPluginObject($a_ctype, $a_cname, $a_slot_id, $a_pname)
Get Plugin Object.
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 3742 of file class.ilObjContentObjectGUI.php.

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

Referenced by setPageLayoutInHierarchy().

3743  {
3744  $tpl = $this->tpl;
3745  $ilCtrl = $this->ctrl;
3746  $lng = $this->lng;
3747 
3748  if (!is_array($_POST["id"])) {
3749  ilUtil::sendFailure($lng->txt("no_checkbox"), true);
3750 
3751  if ($a_in_hierarchy) {
3752  $ilCtrl->redirect($this, "chapters");
3753  } else {
3754  $ilCtrl->redirect($this, "pages");
3755  }
3756  }
3757 
3758  $this->initSetPageLayoutForm();
3759 
3760  $tpl->setContent($this->form->getHTML());
3761  }
global $ilCtrl
Definition: ilias.php:18
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
initSetPageLayoutForm()
Init set page layout form.
$_POST["username"]
+ 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 3731 of file class.ilObjContentObjectGUI.php.

References $ctrl, $ilCtrl, and setPageLayout().

3732  {
3733  $ilCtrl = $this->ctrl;
3734  $ilCtrl->setParameter($this, "hierarchy", "1");
3735  $this->setPageLayout(true);
3736  }
global $ilCtrl
Definition: ilias.php:18
setPageLayout($a_in_hierarchy=false)
Set layout for multipl pages.
+ Here is the call graph for this function:

◆ setQuestionsSubTabs()

ilObjContentObjectGUI::setQuestionsSubTabs (   $a_active)

Set pages tabs.

Parameters
string$a_activeactive subtab

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

References $ctrl, $ilCtrl, ilObjectGUI\$lng, and $tabs.

Referenced by listBlockedUsers(), and listQuestions().

2494  {
2495  $ilTabs = $this->tabs;
2496  $lng = $this->lng;
2497  $ilCtrl = $this->ctrl;
2498 
2499  // chapters
2500  $ilTabs->addSubtab(
2501  "question_stats",
2502  $lng->txt("cont_question_stats"),
2503  $ilCtrl->getLinkTarget($this, "listQuestions")
2504  );
2505 
2506  // blocked users
2507  $ilTabs->addSubtab(
2508  "blocked_users",
2509  $lng->txt("cont_blocked_users"),
2510  $ilCtrl->getLinkTarget($this, "listBlockedUsers")
2511  );
2512 
2513  $ilTabs->activateSubTab($a_active);
2514  }
global $ilCtrl
Definition: ilias.php:18
+ Here is the caller graph for this function:

◆ setSubTabs()

ilObjContentObjectGUI::setSubTabs (   $a_active)

Set sub tabs.

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

References $ilSetting, ilObjectGUI\$settings, and $tabs.

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

2619  {
2620  $ilTabs = $this->tabs;
2622 
2623  if (in_array(
2624  $a_active,
2625  array("settings", "cont_style", "cont_lm_menu", "public_section",
2626  "cont_glossaries", "cont_multilinguality", "obj_multilinguality",
2627  "lti_provider")
2628  )) {
2629  // general properties
2630  $ilTabs->addSubTabTarget(
2631  "settings",
2632  $this->ctrl->getLinkTarget($this, 'properties'),
2633  "",
2634  ""
2635  );
2636 
2637  // style properties
2638  $ilTabs->addSubTabTarget(
2639  "cont_style",
2640  $this->ctrl->getLinkTarget($this, 'editStyleProperties'),
2641  "",
2642  ""
2643  );
2644 
2645  // menu properties
2646  $ilTabs->addSubTabTarget(
2647  "cont_lm_menu",
2648  $this->ctrl->getLinkTarget($this, 'editMenuProperties'),
2649  "",
2650  ""
2651  );
2652 
2653  // glossaries
2654  $ilTabs->addSubTabTarget(
2655  "cont_glossaries",
2656  $this->ctrl->getLinkTarget($this, 'editGlossaries'),
2657  "",
2658  ""
2659  );
2660 
2661  if ($ilSetting->get("pub_section")) {
2662  // public section
2663  $ilTabs->addSubTabTarget(
2664  "public_section",
2665  $this->ctrl->getLinkTarget($this, 'editPublicSection'),
2666  "",
2667  ""
2668  );
2669  }
2670 
2671  $ilTabs->addSubTabTarget(
2672  "obj_multilinguality",
2673  $this->ctrl->getLinkTargetByClass("ilobjecttranslationgui", "")
2674  );
2675 
2676  $lti_settings = new ilLTIProviderObjectSettingGUI($this->object->getRefId());
2677  if ($lti_settings->hasSettingsAccess()) {
2678  $ilTabs->addSubTabTarget(
2679  'lti_provider',
2680  $this->ctrl->getLinkTargetByClass(ilLTIProviderObjectSettingGUI::class)
2681  );
2682  }
2683 
2684  $ilTabs->setSubTabActive($a_active);
2685  }
2686  }
GUI class for LTI provider object settings.
global $ilSetting
Definition: privfeed.php:17
+ Here is the caller graph for this function:

◆ setTabs()

ilObjContentObjectGUI::setTabs (   $a_act = "")

output tabs

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

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

2369  {
2370  $lng = $this->lng;
2371  $ilHelp = $this->help;
2372 
2373  $ilHelp->setScreenIdComponent("lm");
2374 
2375  $this->addTabs($a_act);
2376  parent::setTitleAndDescription();
2377  $this->tpl->setTitle($this->object->getTitle());
2378  $this->tpl->setTitleIcon(
2379  ilUtil::getImagePath("icon_lm.svg"),
2380  $lng->txt("obj_lm")
2381  );
2382  }
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 1645 of file class.ilObjContentObjectGUI.php.

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

1646  {
1647  foreach ($a_actions as $name => $lng) {
1648  $d[$name] = array("name" => $name, "lng" => $lng);
1649  }
1650 
1651  $notoperations = array();
1652 
1653  $operations = array();
1654 
1655  if (is_array($d)) {
1656  foreach ($d as $row) {
1657  if (!in_array($row["name"], $notoperations)) {
1658  $operations[] = $row;
1659  }
1660  }
1661  }
1662 
1663  if (count($operations) > 0) {
1664  foreach ($operations as $val) {
1665  $this->tpl->setCurrentBlock("operation_btn");
1666  $this->tpl->setVariable("BTN_NAME", $val["name"]);
1667  $this->tpl->setVariable("BTN_VALUE", $this->lng->txt($val["lng"]));
1668  $this->tpl->parseCurrentBlock();
1669  }
1670 
1671  $this->tpl->setCurrentBlock("operation");
1672  $this->tpl->setVariable("IMG_ARROW", ilUtil::getImagePath("arrow_downright.svg"));
1673  $this->tpl->parseCurrentBlock();
1674  }
1675  }
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
$row
for($i=6; $i< 13; $i++) for($i=1; $i< 13; $i++) $d
Definition: date.php:296
+ Here is the call graph for this function:

◆ showEntrySelector()

ilObjContentObjectGUI::showEntrySelector ( )

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

References $_GET, $ctrl, $ilCtrl, Sabre\VObject\$output, $tabs, ilUtil\formSelect(), ilUtil\sendInfo(), ilExplorer\setExpand(), setSubTabs(), and ilObjectGUI\setTabs().

3125  {
3126  $ilTabs = $this->tabs;
3127  $ilCtrl = $this->ctrl;
3128 
3129  $this->setTabs();
3130 
3131  $ilTabs->setTabActive("settings");
3132  $this->setSubTabs("cont_lm_menu");
3133 
3134  $ilCtrl->saveParameter($this, array("menu_entry"));
3135 
3136  $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.lm_menu_object_selector.html", "Modules/LearningModule");
3137 
3138  ilUtil::sendInfo($this->lng->txt("lm_menu_select_object_to_add"));
3139 
3140  require_once("./Modules/LearningModule/classes/class.ilLMMenuObjectSelector.php");
3141  $exp = new ilLMMenuObjectSelector($this->ctrl->getLinkTarget($this, 'test'), $this);
3142 
3143  $exp->setExpand($_GET["lm_menu_expand"] ? $_GET["lm_menu_expand"] : $this->tree->readRootId());
3144  $exp->setExpandTarget($this->ctrl->getLinkTarget($this, 'showEntrySelector'));
3145  $exp->setTargetGet("ref_id");
3146  $exp->setRefId($this->cur_ref_id);
3147 
3148  $sel_types = array('mcst', 'mep', 'cat', 'lm','glo','frm','exc','tst','svy', 'chat', 'wiki', 'sahs',
3149  "crs", "grp", "book", "tst", "file");
3150  $exp->setSelectableTypes($sel_types);
3151 
3152  // build html-output
3153  $exp->setOutput(0);
3154  $output = $exp->getOutput();
3155 
3156  // get page ids
3157  foreach ($exp->format_options as $node) {
3158  if (!$node["container"]) {
3159  $pages[] = $node["child"];
3160  }
3161  }
3162 
3163  // access mode selector
3164  $this->tpl->setVariable("TXT_SET_PUBLIC_MODE", $this->lng->txt("set_public_mode"));
3165  $this->tpl->setVariable("TXT_CHOOSE_PUBLIC_MODE", $this->lng->txt("choose_public_mode"));
3166  $modes = array("complete" => $this->lng->txt("all_pages"), "selected" => $this->lng->txt("selected_pages_only"));
3167  $select_public_mode = ilUtil::formSelect($this->object->getPublicAccessMode(), "lm_public_mode", $modes, false, true);
3168  $this->tpl->setVariable("SELECT_PUBLIC_MODE", $select_public_mode);
3169 
3170  $this->tpl->setVariable("TXT_EXPLORER_HEADER", $this->lng->txt("choose_public_pages"));
3171  $this->tpl->setVariable("EXP_REFRESH", $this->lng->txt("refresh"));
3172  $this->tpl->setVariable("EXPLORER", $output);
3173  $this->tpl->setVariable("ONCLICK", $js_pages);
3174  $this->tpl->setVariable("TXT_CHECKALL", $this->lng->txt("check_all"));
3175  $this->tpl->setVariable("TXT_UNCHECKALL", $this->lng->txt("uncheck_all"));
3176  $this->tpl->setVariable("TXT_SAVE", $this->lng->txt("save"));
3177  $this->tpl->setVariable("FORMACTION", $this->ctrl->getLinkTarget($this, "savePublicSection"));
3178  }
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 3438 of file class.ilObjContentObjectGUI.php.

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

Referenced by saveExportIds().

3439  {
3440  $tpl = $this->tpl;
3441  $ilToolbar = $this->toolbar;
3442  $lng = $this->lng;
3443  $ilCtrl = $this->ctrl;
3444 
3445  $this->setTabs();
3446  $this->setContentSubTabs("export_ids");
3447 
3448  if (ilObjContentObject::isOnlineHelpModule($this->object->getRefId())) {
3449  // toolbar
3450  $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
3451  include_once("./Services/Form/classes/class.ilSelectInputGUI.php");
3452  $lm_tree = $this->object->getTree();
3453  $childs = $lm_tree->getChilds($lm_tree->readRootId());
3454  $options = array("" => $lng->txt("all"));
3455  foreach ($childs as $c) {
3456  $options[$c["child"]] = $c["title"];
3457  }
3458  $si = new ilSelectInputGUI($this->lng->txt("help_component"), "help_chap");
3459  $si->setOptions($options);
3460  $si->setValue(ilSession::get("help_chap"));
3461  $ilToolbar->addInputItem($si, true);
3462  $ilToolbar->addFormButton($lng->txt("help_filter"), "filterHelpChapters");
3463 
3464  include_once("./Modules/LearningModule/classes/class.ilHelpMappingTableGUI.php");
3465  $tbl = new ilHelpMappingTableGUI($this, "showExportIDsOverview", $a_validation, false);
3466  } else {
3467  include_once("./Modules/LearningModule/classes/class.ilExportIDTableGUI.php");
3468  $tbl = new ilExportIDTableGUI($this, "showExportIDsOverview", $a_validation, false);
3469  }
3470 
3471  $tpl->setContent($tbl->getHTML());
3472  }
This class represents a selection list property in a property form.
$tbl
Definition: example_048.php:81
static get($a_var)
Get a value.
global $ilCtrl
Definition: ilias.php:18
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 3860 of file class.ilObjContentObjectGUI.php.

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

3861  {
3862  $tpl = $this->tpl;
3863  $lng = $this->lng;
3864  $ilCtrl = $this->ctrl;
3865  $tree = $this->tree;
3866  $ilUser = $this->user;
3867  $ilTabs = $this->tabs;
3868 
3869  $this->setTabs();
3870  $ilTabs->setTabActive("settings");
3871  $this->setSubTabs("cont_glossaries");
3872 
3873  include_once 'Services/Search/classes/class.ilSearchRootSelector.php';
3874 
3875  $exp = new ilSearchRootSelector($ilCtrl->getLinkTarget($this, 'showLMGlossarySelector'));
3876  $exp->setExpand($_GET["search_root_expand"] ? $_GET["search_root_expand"] : $tree->readRootId());
3877  $exp->setExpandTarget($ilCtrl->getLinkTarget($this, 'showLMGlossarySelector'));
3878  $exp->setTargetClass(get_class($this));
3879  $exp->setCmd('confirmGlossarySelection');
3880  $exp->setClickableTypes(array("glo"));
3881  $exp->addFilter("glo");
3882 
3883  // build html-output
3884  $exp->setOutput(0);
3885  $tpl->setContent($exp->getOutput());
3886  }
setSubTabs($a_active)
Set sub tabs.
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
$ilUser
Definition: imgupload.php:18
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 1391 of file class.ilObjContentObjectGUI.php.

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

1392  {
1393  $ilToolbar = $this->toolbar;
1394 
1395  $this->setTabs();
1396  $this->setContentSubTabs("maintenance");
1397 
1398  $ilToolbar->addButton(
1399  $this->lng->txt("cont_fix_tree"),
1400  $this->ctrl->getLinkTarget($this, "fixTreeConfirm")
1401  );
1402  }
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 3565 of file class.ilObjContentObjectGUI.php.

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

3566  {
3567  $tpl = $this->tpl;
3568  $ilToolbar = $this->toolbar;
3569  $ilCtrl = $this->ctrl;
3570  $lng = $this->lng;
3571 
3572  $this->setTabs();
3573  $this->setContentSubTabs("help_tooltips");
3574 
3575  $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
3576  include_once("./Services/Form/classes/class.ilTextInputGUI.php");
3577  $ti = new ilTextInputGUI($this->lng->txt("help_tooltip_id"), "tooltip_id");
3578  $ti->setMaxLength(200);
3579  $ti->setSize(20);
3580  $ilToolbar->addInputItem($ti, true);
3581  $ilToolbar->addFormButton($lng->txt("add"), "addTooltip");
3582  $ilToolbar->addSeparator();
3583 
3584  include_once("./Services/Form/classes/class.ilSelectInputGUI.php");
3586  if (ilSession::get("help_tt_comp") != "") {
3587  $options[ilSession::get("help_tt_comp")] = ilSession::get("help_tt_comp");
3588  }
3589  $si = new ilSelectInputGUI($this->lng->txt("help_component"), "help_tt_comp");
3590  $si->setOptions($options);
3591  $si->setValue(ilSession::get("help_tt_comp"));
3592  $ilToolbar->addInputItem($si, true);
3593  $ilToolbar->addFormButton($lng->txt("help_filter"), "filterTooltips");
3594 
3595  include_once("./Modules/LearningModule/classes/class.ilHelpTooltipTableGUI.php");
3596  $tbl = new ilHelpTooltipTableGUI($this, "showTooltipList", ilSession::get("help_tt_comp"));
3597 
3598  $tpl->setContent($tbl->getHTML());
3599  }
This class represents a selection list property in a property form.
$tbl
Definition: example_048.php:81
static get($a_var)
Get a value.
global $ilCtrl
Definition: ilias.php:18
static getTooltipComponents($a_module_id=0)
Get all tooltip components.
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 3987 of file class.ilObjContentObjectGUI.php.

References $_GET, $ctrl, and $ilCtrl.

3988  {
3989  $ilCtrl = $this->ctrl;
3990 
3991  $ilCtrl->setParameter($this, "transl", $_GET["totransl"]);
3992  if ($_GET["lang_switch_mode"] == "short_titles") {
3993  $ilCtrl->redirectByClass("illmeditshorttitlesgui", "");
3994  }
3995  $ilCtrl->redirect($this, "chapters");
3996  }
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18

◆ unlockQuestion()

ilObjContentObjectGUI::unlockQuestion ( )

Unlock blocked question.

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

References $_POST, $ctrl, $ilCtrl, ilObjectGUI\$lng, and ilPageQuestionProcessor\unlock().

2298  {
2299  $lng = $this->lng;
2300  $ilCtrl = $this->ctrl;
2301 
2302  include_once("./Services/COPage/classes/class.ilPageQuestionProcessor.php");
2303  if (is_array($_POST["userquest_id"])) {
2304  foreach ($_POST["userquest_id"] as $uqid) {
2305  $uqid = explode(":", $uqid);
2306  ilPageQuestionProcessor::unlock((int) $uqid[0], (int) $uqid[1]);
2307  }
2308  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
2309  }
2310  $ilCtrl->redirect($this, "listBlockedUsers");
2311  }
global $ilCtrl
Definition: ilias.php:18
static unlock($a_q_id, $a_user_id)
Reset tries.
$_POST["username"]
+ Here is the call graph for this function:

◆ updateMenuEntry()

ilObjContentObjectGUI::updateMenuEntry ( )

update a menu entry

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

References $_POST, $error, ilObjectGUI\$ilErr, and __initLMMenuEditor().

3093  {
3094  $ilErr = $this->error;
3095 
3096  if (empty($_REQUEST["menu_entry"])) {
3097  $ilErr->raiseError($this->lng->txt("no_menu_entry_id"), $ilErr->MESSAGE);
3098  }
3099 
3100  // check title and target
3101  if (empty($_POST["title"])) {
3102  $ilErr->raiseError($this->lng->txt("please_enter_title"), $ilErr->MESSAGE);
3103  }
3104  if (empty($_POST["target"])) {
3105  $ilErr->raiseError($this->lng->txt("please_enter_target"), $ilErr->MESSAGE);
3106  }
3107 
3108  $this->__initLMMenuEditor();
3109  $this->lmme_obj->readEntry($_REQUEST["menu_entry"]);
3110  $this->lmme_obj->setTitle($_POST["title"]);
3111  $this->lmme_obj->setTarget($_POST["target"]);
3112  if ($_POST["link_ref_id"]) {
3113  $this->lmme_obj->setLinkType("intern");
3114  }
3115  if (is_int(strpos($_POST["target"], "."))) {
3116  $this->lmme_obj->setLinkType("extern");
3117  }
3118  $this->lmme_obj->update();
3119 
3120  ilUtil::sendSuccess($this->lng->txt("msg_entry_updated"), true);
3121  $this->ctrl->redirect($this, "editMenuProperties");
3122  }
$_POST["username"]
+ Here is the call graph for this function:

◆ view()

ilObjContentObjectGUI::view ( )

view content object

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

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

1681  {
1682  if (strtolower($_GET["baseClass"]) == "iladministrationgui") {
1683  $this->prepareOutput();
1684  parent::viewObject();
1685  } else {
1686  $this->viewObject();
1687  }
1688  }
$_GET["client_id"]
viewObject()
list childs of current object
prepareOutput($a_show_subobjects=true)
prepare output
+ Here is the call graph for this function:

Field Documentation

◆ $ctrl

◆ $db

ilObjContentObjectGUI::$db
protected

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

Referenced by __initLinkChecker(), and saveLinkCheck().

◆ $error

◆ $help

ilObjContentObjectGUI::$help
protected

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

Referenced by setilLMMenu(), and setTabs().

◆ $locator

ilObjContentObjectGUI::$locator
protected

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

Referenced by addLocations().

◆ $log

ilObjContentObjectGUI::$log
protected

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

Referenced by insertChapterClip().

◆ $plugin_admin

ilObjContentObjectGUI::$plugin_admin
protected

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

Referenced by setilLMMenu().

◆ $rbacsystem

ilObjContentObjectGUI::$rbacsystem
protected

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

Referenced by addTabs(), importFileObject(), and setilLMMenu().

◆ $tabs


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