ILIAS  release_4-4 Revision
ilObjFileBasedLMGUI Class Reference

User Interface class for file based learning modules (HTML) More...

+ Inheritance diagram for ilObjFileBasedLMGUI:
+ Collaboration diagram for ilObjFileBasedLMGUI:

Public Member Functions

 ilObjFileBasedLMGUI ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor. More...
 
 executeCommand ()
 execute command More...
 
 cancelCreationObject ($in_rep=false)
 cancel action and go back to previous page public More...
 
 properties ()
 edit properties of object (admin form) More...
 
 initSettingsForm ()
 Init settings form. More...
 
 getSettingsFormValues ()
 Get current values for settings from. More...
 
 toFilesystem ()
 Set start file. More...
 
 saveProperties ()
 Save properties form. More...
 
 editObject ()
 edit properties of object (admin form) More...
 
 edit ()
 edit properties of object (module form) More...
 
 cancel ()
 cancel editing More...
 
 afterSave ($newObj)
 save object public More...
 
 update ()
 update properties More...
 
 setStartFile ($a_file)
 
 perm ()
 permission form More...
 
 saveBibItemObject ($a_target="")
 save bib item (admin call) More...
 
 saveBibItem ()
 save bib item (module call) More...
 
 editBibItemObject ($a_target="")
 edit bib items (admin call) More...
 
 editBibItem ()
 edit bib items (module call) More...
 
 deleteBibItemObject ($a_target="")
 delete bib item (admin call) More...
 
 deleteBibItem ()
 delete bib item (module call) More...
 
 addBibItemObject ($a_target="")
 add bib item (admin call) More...
 
 addBibItem ()
 add bib item (module call) More...
 
 frameset ()
 Frameset -> Output list of files. More...
 
 getTemplate ()
 output main header (title and locator) More...
 
 showLearningModule ()
 
 infoScreen ()
 this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually, if everything works through ilCtrl in the future this may be changed More...
 
 showInfoScreen ()
 info screen call from inside learning module More...
 
 outputInfoScreen ($a_standard_locator=true)
 info screen More...
 
 setTabs ()
 output tabs More...
 
 getTabs ()
 adds tabs to tab gui object More...
 
 _goto ($a_target)
 redirect script More...
 
 addLocatorItems ()
 
 importFileObject ($parent_id=null)
 Import file. More...
 
 createFromDirectory ($a_dir)
 Create new object from a html zip file. More...
 
 exportHTML ()
 create html package More...
 
- Public Member Functions inherited from ilObjectGUI
 ilObjectGUI ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor public. More...
 
executeCommand ()
 execute command More...
 
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui More...
 
 getCreationMode ()
 get creation mode More...
 
 getAdminTabs (&$tabs_gui)
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelDeleteObject ()
 cancel deletion of object More...
 
 cancelObject ($in_rep=false)
 cancel action and go back to previous page public More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 save object More...
 
 editObject ()
 edit object More...
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g. More...
 
 isVisible ($a_ref_id, $a_type)
 
 viewObject ()
 list childs of current object More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 

Data Fields

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

Protected Member Functions

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

Additional Inherited Members

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

Detailed Description

Member Function Documentation

◆ _goto()

ilObjFileBasedLMGUI::_goto (   $a_target)

redirect script

Parameters
string$a_target

Definition at line 796 of file class.ilObjFileBasedLMGUI.php.

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

797  {
798  global $rbacsystem, $ilErr, $lng, $ilAccess;
799 
800  if ($ilAccess->checkAccess("visible", "", $a_target))
801  {
802  ilObjectGUI::_gotoRepositoryNode($a_target, "infoScreen");
803  }
804  else if ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID))
805  {
806  ilUtil::sendFailure(sprintf($lng->txt("msg_no_perm_read_item"),
809  }
810 
811  $ilErr->raiseError($lng->txt("msg_no_perm_read_lm"), $ilErr->FATAL);
812  }
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
static _lookupTitle($a_id)
lookup object title
static _gotoRepositoryNode($a_ref_id, $a_cmd="frameset")
Goto repository root.
static _lookupObjId($a_id)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
+ Here is the call graph for this function:

◆ addBibItem()

ilObjFileBasedLMGUI::addBibItem ( )

add bib item (module call)

Definition at line 571 of file class.ilObjFileBasedLMGUI.php.

References addBibItemObject(), and ilCtrl\IL_RTOKEN_NAME.

572  {
573  // questionable workaround to make this old stuff work
574  $this->ctrl->setParameter($this, ilCtrl::IL_RTOKEN_NAME, $this->ctrl->getRequestToken());
575 
576  //$this->setTabs();
577  $this->addBibItemObject($this->ctrl->getLinkTarget($this));
578  }
const IL_RTOKEN_NAME
addBibItemObject($a_target="")
add bib item (admin call)
+ Here is the call graph for this function:

◆ addBibItemObject()

ilObjFileBasedLMGUI::addBibItemObject (   $a_target = "")

add bib item (admin call)

Definition at line 525 of file class.ilObjFileBasedLMGUI.php.

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

Referenced by addBibItem().

526  {
527  global $ilTabs;
528 
529  $ilTabs->activateTab("id_bib_data");
530 
531  $bibItemName = $_POST["bibItemName"] ? $_POST["bibItemName"] : $_GET["bibItemName"];
532  $bibItemIndex = $_POST["bibItemIndex"] ? $_POST["bibItemIndex"] : $_GET["bibItemIndex"];
533  if ($bibItemName == "BibItem")
534  {
535  include_once "./Modules/LearningModule/classes/class.ilBibItem.php";
536  $bib_item =& new ilBibItem();
537  $bib_item->setId($this->object->getId());
538  $bib_item->setType($this->object->getType());
539  $bib_item->read();
540  }
541 
542  include_once "./Modules/LearningModule/classes/class.ilBibItemGUI.php";
543  $bib_gui =& new ilBibItemGUI();
544  $bib_gui->setObject($this->object);
545  if ($bibItemIndex == "")
546  $bibItemIndex = 0;
547  $bibItemPath = $_POST["bibItemPath"] ? $_POST["bibItemPath"] : $_GET["bibItemPath"];
548 
549  //if ($bibItemName != "" && $bibItemName != "BibItem")
550  if ($bibItemName != "")
551  {
552  $bib_gui->bib_obj->add($bibItemName, $bibItemPath, $bibItemIndex);
553  $data = $bib_gui->bib_obj->getElement("BibItem");
554  $bibItemIndex = (count($data) - 1);
555  }
556  else
557  {
558  ilUtil::sendInfo($this->lng->txt("bibitem_choose_element"), true);
559  }
560  if ($a_target == "")
561  {
562  $a_target = "adm_object.php?ref_id=" . $this->object->getRefId();
563  }
564 
565  $bib_gui->edit("ADM_CONTENT", "adm_content", $a_target, $bibItemIndex);
566  }
$_POST['username']
Definition: cron.php:12
$_GET["client_id"]
Class ilBibItem.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
Class ilBibItemGUI.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addLocatorItems()

ilObjFileBasedLMGUI::addLocatorItems ( )

Definition at line 814 of file class.ilObjFileBasedLMGUI.php.

References $_GET.

815  {
816  global $ilLocator;
817 
818  if (is_object($this->object))
819  {
820  $ilLocator->addItem($this->object->getTitle(),
821  $this->ctrl->getLinkTargetByClass("ilinfoscreengui", "showSummary"), "", $_GET["ref_id"]);
822  }
823  }
$_GET["client_id"]

◆ afterSave()

ilObjFileBasedLMGUI::afterSave (   $newObj)

save object public

Definition at line 368 of file class.ilObjFileBasedLMGUI.php.

References ilUtil\redirect(), and ilUtil\sendSuccess().

Referenced by createFromDirectory().

369  {
370  // always send a message
371  ilUtil::sendSuccess($this->lng->txt("object_added"),true);
372  ilUtil::redirect("ilias.php?baseClass=ilHTLMEditorGUI&ref_id=".$newObj->getRefId());
373  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static redirect($a_script)
http redirect to other script
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cancel()

ilObjFileBasedLMGUI::cancel ( )

cancel editing

Definition at line 358 of file class.ilObjFileBasedLMGUI.php.

References ilObjectGUI\cancelObject().

359  {
360  //$this->setReturnLocation("cancel","fblm_edit.php?cmd=listFiles&ref_id=".$_GET["ref_id"]);
361  $this->cancelObject();
362  }
cancelObject($in_rep=false)
cancel action and go back to previous page public
+ Here is the call graph for this function:

◆ cancelCreationObject()

ilObjFileBasedLMGUI::cancelCreationObject (   $in_rep = false)
final

cancel action and go back to previous page public

Definition at line 190 of file class.ilObjFileBasedLMGUI.php.

References $ilCtrl.

191  {
192  global $ilCtrl;
193 
194  $ilCtrl->redirectByClass("ilrepositorygui", "frameset");
195  }
global $ilCtrl
Definition: ilias.php:18

◆ createFromDirectory()

ilObjFileBasedLMGUI::createFromDirectory (   $a_dir)

Create new object from a html zip file.

Parameters

Definition at line 851 of file class.ilObjFileBasedLMGUI.php.

References $filename, $ilErr, afterSave(), ilObjectGUI\checkPermissionBool(), ilObjectGUI\putObjectInTree(), and ilUtil\stripSlashes().

Referenced by importFileObject().

852  {
853  global $ilErr;
854 
855  if (!$this->checkPermissionBool("create", "", "htlm") || $a_dir == "")
856  {
857  $ilErr->raiseError($this->lng->txt("no_create_permission"));
858  }
859 
860  // create instance
861  $newObj = new ilObjFileBasedLM();
862  $filename = ilUtil::stripSlashes($_FILES["importfile"]["name"]);
863  $newObj->setTitle($filename);
864  $newObj->setDescription("");
865  $newObj->create();
866  $newObj->populateByDirectoy($a_dir, $filename);
867  $this->putObjectInTree($newObj);
868 
869  $this->afterSave($newObj);
870  }
afterSave($newObj)
save object public
File Based Learning Module (HTML) object.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
$filename
Definition: buildRTE.php:89
putObjectInTree(ilObject $a_obj, $a_parent_node_id=null)
Add object to tree at given position.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ deleteBibItem()

ilObjFileBasedLMGUI::deleteBibItem ( )

delete bib item (module call)

Definition at line 513 of file class.ilObjFileBasedLMGUI.php.

References deleteBibItemObject(), and ilCtrl\IL_RTOKEN_NAME.

514  {
515  // questionable workaround to make this old stuff work
516  $this->ctrl->setParameter($this, ilCtrl::IL_RTOKEN_NAME, $this->ctrl->getRequestToken());
517 
518  //$this->setTabs();
519  $this->deleteBibItemObject($this->ctrl->getLinkTarget($this));
520  }
deleteBibItemObject($a_target="")
delete bib item (admin call)
const IL_RTOKEN_NAME
+ Here is the call graph for this function:

◆ deleteBibItemObject()

ilObjFileBasedLMGUI::deleteBibItemObject (   $a_target = "")

delete bib item (admin call)

Definition at line 487 of file class.ilObjFileBasedLMGUI.php.

References $_GET, and $_POST.

Referenced by deleteBibItem().

488  {
489  global $ilTabs;
490 
491  $ilTabs->activateTab("id_bib_data");
492 
493  include_once "./Modules/LearningModule/classes/class.ilBibItemGUI.php";
494  $bib_gui =& new ilBibItemGUI();
495  $bib_gui->setObject($this->object);
496  $bibItemIndex = $_POST["bibItemIndex"] ? $_POST["bibItemIndex"] : $_GET["bibItemIndex"];
497  $bib_gui->bib_obj->delete($_GET["bibItemName"], $_GET["bibItemPath"], $bibItemIndex);
498  if (strpos($bibItemIndex, ",") > 0)
499  {
500  $bibItemIndex = substr($bibItemIndex, 0, strpos($bibItemIndex, ","));
501  }
502  if ($a_target == "")
503  {
504  $a_target = "adm_object.php?ref_id=" . $this->object->getRefId();
505  }
506 
507  $bib_gui->edit("ADM_CONTENT", "adm_content", $a_target, $bibItemIndex);
508  }
$_POST['username']
Definition: cron.php:12
$_GET["client_id"]
Class ilBibItemGUI.
+ Here is the caller graph for this function:

◆ edit()

ilObjFileBasedLMGUI::edit ( )

edit properties of object (module form)

Definition at line 349 of file class.ilObjFileBasedLMGUI.php.

References editObject(), and ilObjectGUI\prepareOutput().

350  {
351  $this->prepareOutput();
352  $this->editObject();
353  }
editObject()
edit properties of object (admin form)
prepareOutput()
prepare output
+ Here is the call graph for this function:

◆ editBibItem()

ilObjFileBasedLMGUI::editBibItem ( )

edit bib items (module call)

Definition at line 475 of file class.ilObjFileBasedLMGUI.php.

References editBibItemObject(), and ilCtrl\IL_RTOKEN_NAME.

476  {
477  // questionable workaround to make this old stuff work
478  $this->ctrl->setParameter($this, ilCtrl::IL_RTOKEN_NAME, $this->ctrl->getRequestToken());
479 
480  //$this->setTabs();
481  $this->editBibItemObject($this->ctrl->getLinkTarget($this));
482  }
const IL_RTOKEN_NAME
editBibItemObject($a_target="")
edit bib items (admin call)
+ Here is the call graph for this function:

◆ editBibItemObject()

ilObjFileBasedLMGUI::editBibItemObject (   $a_target = "")

edit bib items (admin call)

Definition at line 449 of file class.ilObjFileBasedLMGUI.php.

References $_GET, and $_POST.

Referenced by editBibItem().

450  {
451  global $ilTabs;
452 
453  $ilTabs->activateTab("id_bib_data");
454 
455  include_once "./Modules/LearningModule/classes/class.ilBibItemGUI.php";
456  $bib_gui =& new ilBibItemGUI();
457  $bib_gui->setObject($this->object);
458  $bibItemIndex = $_POST["bibItemIndex"] ? $_POST["bibItemIndex"] : $_GET["bibItemIndex"];
459  $bibItemIndex *= 1;
460  if ($bibItemIndex < 0)
461  {
462  $bibItemIndex = 0;
463  }
464  if ($a_target == "")
465  {
466  $a_target = "adm_object.php?ref_id=" . $this->object->getRefId();
467  }
468 
469  $bib_gui->edit("ADM_CONTENT", "adm_content", $a_target, $bibItemIndex);
470  }
$_POST['username']
Definition: cron.php:12
$_GET["client_id"]
Class ilBibItemGUI.
+ Here is the caller graph for this function:

◆ editObject()

ilObjFileBasedLMGUI::editObject ( )

edit properties of object (admin form)

public

Definition at line 332 of file class.ilObjFileBasedLMGUI.php.

References ilObjectGUI\$tpl, and ilObjectGUI\$tree.

Referenced by edit().

333  {
334  global $rbacsystem, $tree, $tpl;
335 
336  if (!$rbacsystem->checkAccess("visible,write",$this->object->getRefId()))
337  {
338  $this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
339  }
340 
341  // edit button
342  $this->tpl->addBlockfile("BUTTONS", "buttons", "tpl.buttons.html");
343 
344  }
redirection script todo: (a better solution should control the processing via a xml file) ...
+ Here is the caller graph for this function:

◆ executeCommand()

ilObjFileBasedLMGUI::executeCommand ( )

execute command

Definition at line 52 of file class.ilObjFileBasedLMGUI.php.

References $_GET, $cmd, $ilUser, $ret, ilPaymentObject\_requiresPurchaseToAccess(), ilFileSystemGUI\activateLabels(), ilObjectGUI\addHeaderAction(), ilMDEditorGUI\addObserver(), ilObjectGUI\checkPermission(), ilObjectGUI\getCreationMode(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), getTemplate(), ilLearningProgressBaseGUI\LP_CONTEXT_REPOSITORY, outputInfoScreen(), ilObjectGUI\prepareOutput(), ilObjectGUI\setLocator(), and setTabs().

Referenced by frameset().

53  {
54  global $ilUser, $ilLocator, $ilTabs;
55 
56  $next_class = $this->ctrl->getNextClass($this);
57  $cmd = $this->ctrl->getCmd();
58 
59  if (strtolower($_GET["baseClass"]) == "iladministrationgui" ||
60  $this->getCreationMode() == true)
61  {
62  $this->prepareOutput();
63  }
64  else
65  {
66  if (!in_array($cmd, array("", "framset")) || $next_class != "")
67  {
68  $this->getTemplate();
69  $this->setLocator();
70  $this->setTabs();
71  }
72  }
73 
74 
75  if(!$this->getCreationMode())
76  {
77  if(IS_PAYMENT_ENABLED)
78  {
79  include_once 'Services/Payment/classes/class.ilPaymentObject.php';
80  if(ilPaymentObject::_requiresPurchaseToAccess($_GET['ref_id'], $type = (isset($_GET['purchasetype']) ? $_GET['purchasetype'] : NULL) ))
81  {
82  $this->tpl->getStandardTemplate();
83 
84  include_once 'Services/Payment/classes/class.ilShopPurchaseGUI.php';
85  $pp = new ilShopPurchaseGUI((int)$_GET['ref_id']);
86  $ret = $this->ctrl->forwardCommand($pp);
87  return true;
88  }
89  }
90  }
91 
92  switch($next_class)
93  {
94  case 'ilmdeditorgui':
95  $this->checkPermission("write");
96  $ilTabs->activateTab('id_meta_data');
97  include_once 'Services/MetaData/classes/class.ilMDEditorGUI.php';
98 
99  $md_gui =& new ilMDEditorGUI($this->object->getId(), 0, $this->object->getType());
100  $md_gui->addObserver($this->object,'MDUpdateListener','General');
101 
102  $this->ctrl->forwardCommand($md_gui);
103  break;
104 
105  case "ilfilesystemgui":
106  $this->checkPermission("write");
107  $ilTabs->activateTab('id_list_files');
108  $fs_gui =& new ilFileSystemGUI($this->object->getDataDirectory());
109  $fs_gui->activateLabels(true, $this->lng->txt("cont_purpose"));
110  $fs_gui->setTableId("htlmfs".$this->object->getId());
111  if ($this->object->getStartFile() != "")
112  {
113  $fs_gui->labelFile($this->object->getStartFile(),
114  $this->lng->txt("cont_startfile"));
115  }
116  $fs_gui->addCommand($this, "setStartFile", $this->lng->txt("cont_set_start_file"));
117  $ret =& $this->ctrl->forwardCommand($fs_gui);
118  break;
119 
120  case "ilinfoscreengui":
121  $ret =& $this->outputInfoScreen();
122  break;
123 
124  case "illearningprogressgui":
125  $ilTabs->activateTab('id_learning_progress');
126  include_once './Services/Tracking/classes/class.ilLearningProgressGUI.php';
128  $this->object->getRefId(),
129  $_GET['user_id'] ? $_GET['user_id'] : $ilUser->getId());
130  $this->ctrl->forwardCommand($new_gui);
131  break;
132 
133  case 'ilpermissiongui':
134  $ilTabs->activateTab('id_permissions');
135  include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
136  $perm_gui =& new ilPermissionGUI($this);
137  $ret =& $this->ctrl->forwardCommand($perm_gui);
138  break;
139 
140  case 'illicensegui':
141  $ilTabs->activateTab('id_license');
142  include_once("./Services/License/classes/class.ilLicenseGUI.php");
143  $license_gui =& new ilLicenseGUI($this);
144  $ret =& $this->ctrl->forwardCommand($license_gui);
145  break;
146 
147  case "ilexportgui":
148  $ilTabs->activateTab("export");
149  include_once("./Services/Export/classes/class.ilExportGUI.php");
150  $exp_gui = new ilExportGUI($this);
151  $exp_gui->addFormat("xml");
152  $exp_gui->addFormat("html", "", $this, "exportHTML");
153  $ret = $this->ctrl->forwardCommand($exp_gui);
154 // $this->tpl->show();
155  break;
156 
157  case "ilcommonactiondispatchergui":
158  include_once("Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
160  $this->ctrl->forwardCommand($gui);
161  break;
162 
163  default:
164  $cmd = $this->ctrl->getCmd("frameset");
165  if (strtolower($_GET["baseClass"]) == "iladministrationgui" ||
166  $this->getCreationMode() == true)
167  {
168  $cmd.= "Object";
169  }
170  $ret =& $this->$cmd();
171  break;
172  }
173 
174  $this->addHeaderAction();
175  }
outputInfoScreen($a_standard_locator=true)
info screen
getTemplate()
output main header (title and locator)
activateLabels($a_act, $a_label_header)
activate file labels
$_GET["client_id"]
Class ilShopPurchaseGUI.
$cmd
Definition: sahs_server.php:35
static _requiresPurchaseToAccess($a_ref_id, $a_purchasetype='')
this function should be used by all buyable repository objects !!
addObserver(&$a_class, $a_method, $a_element)
Export User Interface Class.
prepareOutput()
prepare output
global $ilUser
Definition: imgupload.php:15
getCreationMode()
get creation mode
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
File System Explorer GUI class.
addHeaderAction()
Add header action menu.
Class ilObjUserTrackingGUI.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
setLocator()
set Locator
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ exportHTML()

ilObjFileBasedLMGUI::exportHTML ( )

create html package

Definition at line 883 of file class.ilObjFileBasedLMGUI.php.

References $filename, ilExport\_createExportDirectory(), ilExport\_getExportDirectory(), ilUtil\delDir(), ilUtil\makeDir(), ilUtil\rCopy(), and ilUtil\zip().

884  {
885  $inst_id = IL_INST_ID;
886 
887  include_once("./Services/Export/classes/class.ilExport.php");
888 
889  ilExport::_createExportDirectory($this->object->getId(), "html",
890  $this->object->getType());
891  $export_dir = ilExport::_getExportDirectory($this->object->getId(), "html",
892  $this->object->getType());
893 
894  $subdir = $this->object->getType()."_".$this->object->getId();
895  $filename = $this->subdir.".zip";
896 
897  $target_dir = $export_dir."/".$subdir;
898 
899  ilUtil::delDir($target_dir);
900  ilUtil::makeDir($target_dir);
901 
902  $source_dir = $this->object->getDataDirectory();
903 
904  ilUtil::rCopy($source_dir, $target_dir);
905 
906  // zip it all
907  $date = time();
908  $zip_file = $export_dir."/".$date."__".IL_INST_ID."__".
909  $this->object->getType()."_".$this->object->getId().".zip";
910  ilUtil::zip($target_dir, $zip_file);
911 
912  ilUtil::delDir($target_dir);
913  }
static rCopy($a_sdir, $a_tdir, $preserveTimeAttributes=false)
Copies content of a directory $a_sdir recursively to a directory $a_tdir.
_createExportDirectory($a_obj_id, $a_export_type="xml", $a_obj_type="")
Create export directory.
static zip($a_dir, $a_file, $compress_content=false)
zips given directory/file into given zip.file
$filename
Definition: buildRTE.php:89
static makeDir($a_dir)
creates a new directory and inherits all filesystem permissions of the parent directory You may pass ...
static _getExportDirectory($a_obj_id, $a_type="xml", $a_obj_type="", $a_entity="")
Get export directory for an repository object.
static delDir($a_dir, $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively
+ Here is the call graph for this function:

◆ frameset()

ilObjFileBasedLMGUI::frameset ( )

Frameset -> Output list of files.

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

References $ilCtrl, and executeCommand().

584  {
585  global $ilCtrl;
586 
587  $ilCtrl->setCmdClass("ilfilesystemgui");
588  $ilCtrl->setCmd("listFiles");
589  return $this->executeCommand();
590  }
executeCommand()
execute command
global $ilCtrl
Definition: ilias.php:18
+ Here is the call graph for this function:

◆ getSettingsFormValues()

ilObjFileBasedLMGUI::getSettingsFormValues ( )

Get current values for settings from.

Definition at line 267 of file class.ilObjFileBasedLMGUI.php.

References ilObjFileBasedLMAccess\_determineStartUrl().

Referenced by properties().

268  {
269  require_once("./Modules/HTMLLearningModule/classes/class.ilObjFileBasedLMAccess.php");
270  $startfile = ilObjFileBasedLMAccess::_determineStartUrl($this->object->getId());
271 
272  $values = array();
273  $values["cobj_online"] = $this->object->getOnline();
274  if ($startfile != "")
275  {
276  $startfile = basename($startfile);
277  }
278  else
279  {
280  $startfile = $this->lng->txt("no_start_file");
281  }
282 
283  $values["cobj_online"] = $this->object->getOnline();
284  $values["startfile"] = $startfile;
285  $values["title"] = $this->object->getTitle();
286  $values["desc"] = $this->object->getDescription();
287 
288  $this->form->setValuesByArray($values);
289  }
_determineStartUrl($a_id)
check wether learning module is online
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTabs()

ilObjFileBasedLMGUI::getTabs ( )

adds tabs to tab gui object

Definition at line 712 of file class.ilObjFileBasedLMGUI.php.

References $ilUser, ilObjectGUI\$lng, ilObjFileBasedLMAccess\_determineStartUrl(), ilLicenseAccess\_isEnabled(), and ilLearningProgressAccess\checkAccess().

Referenced by setTabs().

713  {
714  global $ilUser, $ilAccess, $ilTabs, $lng, $ilHelp;
715 
716  $ilHelp->setScreenIdComponent("htlm");
717 
718  if($ilAccess->checkAccess('write', '', $this->ref_id))
719  {
720  $ilTabs->addTab("id_list_files",
721  $lng->txt("cont_list_files"),
722  $this->ctrl->getLinkTargetByClass("ilfilesystemgui", "listFiles"));
723 
724  $ilTabs->addTab("id_info",
725  $lng->txt("info_short"),
726  $this->ctrl->getLinkTargetByClass(array("ilobjfilebasedlmgui", "ilinfoscreengui"), "showSummary"));
727 
728  $ilTabs->addTab("id_settings",
729  $lng->txt("settings"),
730  $this->ctrl->getLinkTarget($this, "properties"));
731  }
732 
733  include_once './Services/Tracking/classes/class.ilLearningProgressAccess.php';
734  if(ilLearningProgressAccess::checkAccess($this->object->getRefId()))
735  {
736  $ilTabs->addTab("id_learning_progress",
737  $lng->txt("learning_progress"),
738  $this->ctrl->getLinkTargetByClass(array('ilobjfilebasedlmgui','illearningprogressgui'), ''));
739  }
740 
741  include_once("Services/License/classes/class.ilLicenseAccess.php");
742  if ($ilAccess->checkAccess('edit_permission', '', $this->ref_id)
744  {
745  $ilTabs->addTab("id_license",
746  $lng->txt("license"),
747  $this->ctrl->getLinkTargetByClass('illicensegui', ''));
748  }
749 
750  if($ilAccess->checkAccess('write', '', $this->ref_id))
751  {
752  $ilTabs->addTab("id_meta_data",
753  $lng->txt("meta_data"),
754  $this->ctrl->getLinkTargetByClass('ilmdeditorgui',''));
755 
756  $ilTabs->addTab("id_bib_data",
757  $lng->txt("bib_data"),
758  $this->ctrl->getLinkTarget($this, "editBibItem"));
759  }
760 
761 
762  // export
763  if ($ilAccess->checkAccess("write", "", $this->object->getRefId()))
764  {
765  $ilTabs->addTab("export",
766  $lng->txt("export"),
767  $this->ctrl->getLinkTargetByClass("ilexportgui", ""));
768  }
769 
770  if ($ilAccess->checkAccess('edit_permission', '', $this->object->getRefId()))
771  {
772  $ilTabs->addTab("id_permissions",
773  $lng->txt("perm_settings"),
774  $this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm"));
775  }
776 
777  require_once("./Modules/HTMLLearningModule/classes/class.ilObjFileBasedLMAccess.php");
778  $startfile = ilObjFileBasedLMAccess::_determineStartUrl($this->object->getId());
779 
780  if ($startfile != "")
781  {
782  $ilTabs->addNonTabbedLink("presentation_view",
783  $this->lng->txt("glo_presentation_view"),
784  "ilias.php?baseClass=ilHTLMPresentationGUI&ref_id=".$this->object->getRefID(),
785  "_blank"
786  );
787  }
788 
789  }
_determineStartUrl($a_id)
check wether learning module is online
static _isEnabled()
Check, if licencing is enabled This check is called from the ilAccessHandler class.
static checkAccess($a_ref_id, $a_allow_only_read=true)
check access to learning progress
global $ilUser
Definition: imgupload.php:15
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTemplate()

ilObjFileBasedLMGUI::getTemplate ( )

output main header (title and locator)

Definition at line 595 of file class.ilObjFileBasedLMGUI.php.

References ilObjectGUI\$lng.

Referenced by executeCommand().

596  {
597  global $lng;
598 
599  $this->tpl->addBlockFile("CONTENT", "content", "tpl.adm_content.html");
600  //$this->tpl->setVariable("HEADER", $a_header_title);
601  $this->tpl->addBlockFile("STATUSLINE", "statusline", "tpl.statusline.html");
602  //$this->tpl->setVariable("TXT_LOCATOR",$this->lng->txt("locator"));
603  }
+ Here is the caller graph for this function:

◆ ilObjFileBasedLMGUI()

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

Constructor.

public

Definition at line 33 of file class.ilObjFileBasedLMGUI.php.

References $ilCtrl, and ilObjectGUI\$lng.

34  {
35  global $lng, $ilCtrl;
36 
37  $this->ctrl =& $ilCtrl;
38  $this->ctrl->saveParameter($this, array("ref_id"));
39 
40  $this->type = "htlm";
41  $lng->loadLanguageModule("content");
42 
43  parent::ilObjectGUI($a_data, $a_id, $a_call_by_reference, false);
44  //$this->actions = $this->objDefinition->getActions("mep");
45  $this->output_prepared = $a_prepare_output;
46 
47  }
global $ilCtrl
Definition: ilias.php:18

◆ importFileObject()

ilObjFileBasedLMGUI::importFileObject (   $parent_id = null)

Import file.

Parameters

Definition at line 832 of file class.ilObjFileBasedLMGUI.php.

References createFromDirectory(), and ilManifestFileNotFoundImportException\getTmpDir().

833  {
834  try
835  {
836  return parent::importFileObject();
837  }
839  {
840  // since there is no manifest xml we assume that this is an HTML export file
841  $this->createFromDirectory($e->getTmpDir());
842  }
843  }
manifest.xml file not found-exception for import
createFromDirectory($a_dir)
Create new object from a html zip file.
+ Here is the call graph for this function:

◆ infoScreen()

ilObjFileBasedLMGUI::infoScreen ( )

this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually, if everything works through ilCtrl in the future this may be changed

Definition at line 636 of file class.ilObjFileBasedLMGUI.php.

References outputInfoScreen().

637  {
638  $this->ctrl->setCmd("showSummary");
639  $this->ctrl->setCmdClass("ilinfoscreengui");
640  $this->outputInfoScreen();
641  }
outputInfoScreen($a_standard_locator=true)
info screen
+ Here is the call graph for this function:

◆ initCreationForms()

ilObjFileBasedLMGUI::initCreationForms (   $a_new_type)
protected

Definition at line 177 of file class.ilObjFileBasedLMGUI.php.

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

178  {
179  $forms = array(self::CFORM_NEW => $this->initCreateForm($a_new_type),
180  self::CFORM_IMPORT => $this->initImportForm($a_new_type));
181 
182  return $forms;
183  }
initImportForm($a_new_type)
Init object import form.
initCreateForm($a_new_type)
Init object creation form.
+ Here is the call graph for this function:

◆ initSettingsForm()

ilObjFileBasedLMGUI::initSettingsForm ( )

Init settings form.

Definition at line 216 of file class.ilObjFileBasedLMGUI.php.

References $ilCtrl, ilObjectGUI\$lng, ilObjFileBasedLMAccess\_determineStartUrl(), ilTextAreaInputGUI\setCols(), ilCheckboxInputGUI\setOptionTitle(), ilTextInputGUI\setSize(), ilNonEditableValueGUI\setValue(), and ilObject\TITLE_LENGTH.

Referenced by properties(), and saveProperties().

217  {
218  global $lng, $ilCtrl;
219 
220  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
221  $this->form = new ilPropertyFormGUI();
222 
223  // title
224  $ti = new ilTextInputGUI($this->lng->txt("title"), "title");
225  $ti->setSize(min(40, ilObject::TITLE_LENGTH));
226  $ti->setMaxLength(ilObject::TITLE_LENGTH);
227  $ti->setRequired(true);
228  $this->form->addItem($ti);
229 
230  // description
231  $ta = new ilTextAreaInputGUI($this->lng->txt("description"), "desc");
232  $ta->setCols(40);
233  $ta->setRows(2);
234  $this->form->addItem($ta);
235 
236  // online
237  $cb = new ilCheckboxInputGUI($lng->txt("cont_online"), "cobj_online");
238  $cb->setOptionTitle($lng->txt(""));
239  $cb->setValue("y");
240  $this->form->addItem($cb);
241 
242  // startfile
243  require_once("./Modules/HTMLLearningModule/classes/class.ilObjFileBasedLMAccess.php");
244  $startfile = ilObjFileBasedLMAccess::_determineStartUrl($this->object->getId());
245 
246  $ne = new ilNonEditableValueGUI($lng->txt("cont_startfile"), "");
247  if ($startfile != "")
248  {
249  $ne->setValue(basename($startfile));
250  }
251  else
252  {
253  $ne->setValue(basename($this->lng->txt("no_start_file")));
254  }
255  $this->form->addItem($ne);
256 
257  $this->form->addCommandButton("saveProperties", $lng->txt("save"));
258  $this->form->addCommandButton("toFilesystem", $lng->txt("cont_set_start_file"));
259 
260  $this->form->setTitle($lng->txt("cont_lm_properties"));
261  $this->form->setFormAction($ilCtrl->getFormAction($this, "saveProperties"));
262  }
This class represents a property form user interface.
const TITLE_LENGTH
max length of object title
_determineStartUrl($a_id)
check wether learning module is online
This class represents a checkbox property in a property form.
global $ilCtrl
Definition: ilias.php:18
setSize($a_size)
Set Size.
This class represents a text property in a property form.
This class represents a non editable value in a property form.
This class represents a text area property in a property form.
setOptionTitle($a_optiontitle)
Set Option Title (optional).
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ outputInfoScreen()

ilObjFileBasedLMGUI::outputInfoScreen (   $a_standard_locator = true)

info screen

Definition at line 654 of file class.ilObjFileBasedLMGUI.php.

References $_GET, and $ilBench.

Referenced by executeCommand(), infoScreen(), and showInfoScreen().

655  {
656  global $ilBench, $ilLocator, $ilAccess, $ilTabs;
657 
658  $ilTabs->activateTab('id_info');
659 
660  $this->lng->loadLanguageModule("meta");
661  include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
662 
663  $info = new ilInfoScreenGUI($this);
664  $info->enablePrivateNotes();
665  $info->enableLearningProgress();
666 
667  $info->enableNews();
668  if ($ilAccess->checkAccess("write", "", $_GET["ref_id"]))
669  {
670  $info->enableNewsEditing();
671 
672  $news_set = new ilSetting("news");
673  $enable_internal_rss = $news_set->get("enable_rss_for_internal");
674  if ($enable_internal_rss)
675  {
676  $info->setBlockProperty("news", "settings", true);
677  }
678  }
679 
680  // add read / back button
681  if ($ilAccess->checkAccess("read", "", $_GET["ref_id"]))
682  {
683  $info->addButton($this->lng->txt("view"),
684  "ilias.php?baseClass=ilHTLMPresentationGUI&ref_id=".$this->object->getRefID(),
685  ' target="ilContObj'.$this->object->getId().'" ',
686  'top', true);
687  }
688 
689  // show standard meta data section
690  $info->addMetaDataSections($this->object->getId(),0, $this->object->getType());
691 
692  // forward the command
693  $this->ctrl->forwardCommand($info);
694  }
ILIAS Setting Class.
Class ilInfoScreenGUI.
$_GET["client_id"]
global $ilBench
Definition: ilias.php:18
+ Here is the caller graph for this function:

◆ perm()

ilObjFileBasedLMGUI::perm ( )

permission form

Definition at line 397 of file class.ilObjFileBasedLMGUI.php.

References $_GET, and ilObjectGUI\setFormAction().

398  {
399  $this->setFormAction("permSave", "fblm_edit.php?cmd=permSave&ref_id=".$_GET["ref_id"].
400  "&obj_id=".$_GET["obj_id"]);
401  $this->setFormAction("addRole", "fblm_edit.php?ref_id=".$_GET["ref_id"].
402  "&obj_id=".$_GET["obj_id"]."&cmd=addRole");
403  $this->permObject();
404  }
$_GET["client_id"]
setFormAction($a_cmd, $a_formaction)
set specific form action for command
+ Here is the call graph for this function:

◆ properties()

ilObjFileBasedLMGUI::properties ( )

edit properties of object (admin form)

public

Definition at line 202 of file class.ilObjFileBasedLMGUI.php.

References ilObjectGUI\$tpl, ilObjectGUI\$tree, getSettingsFormValues(), and initSettingsForm().

203  {
204  global $rbacsystem, $tree, $tpl, $ilTabs;
205 
206  $ilTabs->activateTab("id_settings");
207 
208  $this->initSettingsForm();
209  $this->getSettingsFormValues();
210  $tpl->setContent($this->form->getHTML());
211  }
getSettingsFormValues()
Get current values for settings from.
initSettingsForm()
Init settings form.
+ Here is the call graph for this function:

◆ saveBibItem()

ilObjFileBasedLMGUI::saveBibItem ( )

save bib item (module call)

Definition at line 437 of file class.ilObjFileBasedLMGUI.php.

References ilCtrl\IL_RTOKEN_NAME, and saveBibItemObject().

438  {
439  // questionable workaround to make this old stuff work
440  $this->ctrl->setParameter($this, ilCtrl::IL_RTOKEN_NAME, $this->ctrl->getRequestToken());
441 
442  //$this->setTabs();
443  $this->saveBibItemObject($this->ctrl->getLinkTarget($this));
444  }
const IL_RTOKEN_NAME
saveBibItemObject($a_target="")
save bib item (admin call)
+ Here is the call graph for this function:

◆ saveBibItemObject()

ilObjFileBasedLMGUI::saveBibItemObject (   $a_target = "")

save bib item (admin call)

Definition at line 409 of file class.ilObjFileBasedLMGUI.php.

References $_GET, and $_POST.

Referenced by saveBibItem().

410  {
411  global $ilTabs;
412 
413  $ilTabs->activateTab("id_bib_data");
414 
415  include_once "./Modules/LearningModule/classes/class.ilBibItemGUI.php";
416  $bib_gui =& new ilBibItemGUI();
417  $bib_gui->setObject($this->object);
418  $bibItemIndex = $_POST["bibItemIndex"] ? $_POST["bibItemIndex"] : $_GET["bibItemIndex"];
419  $bibItemIndex *= 1;
420  if ($bibItemIndex < 0)
421  {
422  $bibItemIndex = 0;
423  }
424  $bibItemIndex = $bib_gui->save($bibItemIndex);
425 
426  if ($a_target == "")
427  {
428  $a_target = "adm_object.php?ref_id=" . $this->object->getRefId();
429  }
430 
431  $bib_gui->edit("ADM_CONTENT", "adm_content", $a_target, $bibItemIndex);
432  }
$_POST['username']
Definition: cron.php:12
$_GET["client_id"]
Class ilBibItemGUI.
+ Here is the caller graph for this function:

◆ saveProperties()

ilObjFileBasedLMGUI::saveProperties ( )

Save properties form.

Definition at line 307 of file class.ilObjFileBasedLMGUI.php.

References $_POST, $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\$tpl, initSettingsForm(), ilUtil\sendSuccess(), and ilUtil\yn2tf().

308  {
309  global $tpl, $lng, $ilCtrl, $ilTabs;
310 
311  $this->initSettingsForm("");
312  if ($this->form->checkInput())
313  {
314  $this->object->setTitle($this->form->getInput("title"));
315  $this->object->setDescription($this->form->getInput("desc"));
316  $this->object->setOnline(ilUtil::yn2tf($_POST["cobj_online"]));
317  $this->object->update();
318  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
319  $this->ctrl->redirect($this, "properties");
320  }
321 
322  $ilTabs->activateTab("id_settings");
323  $this->form->setValuesByPost();
324  $tpl->setContent($this->form->getHtml());
325  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
initSettingsForm()
Init settings form.
global $ilCtrl
Definition: ilias.php:18
static yn2tf($a_yn)
convert "y"/"n" to true/false
+ Here is the call graph for this function:

◆ setStartFile()

ilObjFileBasedLMGUI::setStartFile (   $a_file)

Definition at line 387 of file class.ilObjFileBasedLMGUI.php.

388  {
389  $this->object->setStartFile($a_file);
390  $this->object->update();
391  $this->ctrl->redirectByClass("ilfilesystemgui", "listFiles");
392  }

◆ setTabs()

ilObjFileBasedLMGUI::setTabs ( )

output tabs

Definition at line 701 of file class.ilObjFileBasedLMGUI.php.

References ilUtil\getImagePath(), and getTabs().

Referenced by executeCommand().

702  {
703  $this->tpl->setTitleIcon(ilUtil::getImagePath("icon_lm_b.png"));
704 
705  $this->getTabs();
706  $this->tpl->setTitle($this->object->getTitle());
707  }
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
getTabs()
adds tabs to tab gui object
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showInfoScreen()

ilObjFileBasedLMGUI::showInfoScreen ( )

info screen call from inside learning module

Definition at line 646 of file class.ilObjFileBasedLMGUI.php.

References outputInfoScreen().

647  {
648  $this->outputInfoScreen(true);
649  }
outputInfoScreen($a_standard_locator=true)
info screen
+ Here is the call graph for this function:

◆ showLearningModule()

ilObjFileBasedLMGUI::showLearningModule ( )

Definition at line 605 of file class.ilObjFileBasedLMGUI.php.

References $ilUser, ilObjFileBasedLMAccess\_determineStartUrl(), ilLicense\_noteAccess(), ilLearningProgress\_tracProgress(), and ilUtil\redirect().

606  {
607  global $ilUser;
608 
609  // Note license usage
610  include_once "Services/License/classes/class.ilLicense.php";
611  ilLicense::_noteAccess($this->object->getId(), $this->object->getType(),
612  $this->object->getRefId());
613 
614  // #9483
615  if ($ilUser->getId() != ANONYMOUS_USER_ID)
616  {
617  include_once "Services/Tracking/classes/class.ilLearningProgress.php";
618  ilLearningProgress::_tracProgress($ilUser->getId(), $this->object->getId(),
619  $this->object->getRefId(), "htlm");
620  }
621 
622  require_once("./Modules/HTMLLearningModule/classes/class.ilObjFileBasedLMAccess.php");
623  $startfile = ilObjFileBasedLMAccess::_determineStartUrl($this->object->getId());
624  if ($startfile != "")
625  {
626  ilUtil::redirect($startfile);
627  }
628  }
_determineStartUrl($a_id)
check wether learning module is online
_tracProgress($a_user_id, $a_obj_id, $a_ref_id, $a_obj_type='')
global $ilUser
Definition: imgupload.php:15
_noteAccess($a_obj_id, $a_type, $a_ref_id)
Note the access of the current usr to an object.
static redirect($a_script)
http redirect to other script
+ Here is the call graph for this function:

◆ toFilesystem()

ilObjFileBasedLMGUI::toFilesystem ( )

Set start file.

Parameters

Definition at line 297 of file class.ilObjFileBasedLMGUI.php.

References $ilCtrl.

298  {
299  global $ilCtrl;
300 
301  $ilCtrl->redirectByClass("ilfilesystemgui", "listFiles");
302  }
global $ilCtrl
Definition: ilias.php:18

◆ update()

ilObjFileBasedLMGUI::update ( )

update properties

Definition at line 379 of file class.ilObjFileBasedLMGUI.php.

References ilObjectGUI\updateObject().

380  {
381  //$this->setReturnLocation("update", "fblm_edit.php?cmd=listFiles&ref_id=".$_GET["ref_id"].
382  // "&obj_id=".$_GET["obj_id"]);
383  $this->updateObject();
384  }
updateObject()
updates object entry in object_data
+ Here is the call graph for this function:

Field Documentation

◆ $output_prepared

ilObjFileBasedLMGUI::$output_prepared

Definition at line 26 of file class.ilObjFileBasedLMGUI.php.


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