ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
ilObjFileBasedLMGUI Class Reference

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

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

Public Member Functions

 __construct ( $a_data, int $a_id=0, bool $a_call_by_reference=true, bool $a_prepare_output=true)
 
 executeCommand ()
 
 cancelCreationObject ()
 
 properties ()
 
 initSettingsForm ()
 
 getSettingsFormValues ()
 
 toFilesystem ()
 
 saveProperties ()
 
 editObject ()
 
 edit ()
 
 cancel ()
 
 update ()
 
 setStartFile ()
 
 infoScreen ()
 this one is called from the info button in the repository More...
 
 showInfoScreen ()
 
 createFromDirectory (string $a_dir)
 
 exportHTML ()
 
 redirectAfterCreation ()
 
 learningProgress ()
 
 redrawHeaderAction ()
 
 importFromUploadDir ()
 
 getUploadDirectory ()
 
 getUploadFiles ()
 
- Public Member Functions inherited from ilObjectGUI
 getRefId ()
 
 setAdminMode (string $mode)
 
 getAdminMode ()
 
 getObject ()
 
 executeCommand ()
 
 withReferences ()
 determines whether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode (bool $mode=true)
 If true, a creation screen is displayed the current [ref_id] does belong to the parent class The mode is determined in ilRepositoryGUI. More...
 
 getCreationMode ()
 
 prepareOutput (bool $show_sub_objects=true)
 
 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...
 
 cancelObject ()
 cancel action and go back to previous page More...
 
 createObject ()
 create new object form More...
 
 editAvailabilityPeriodObject ()
 
 saveAvailabilityPeriodObject ()
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 
 getDidacticTemplateVar (string $type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $obj, int $parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 
 addExternalEditFormCustom (ilPropertyFormGUI $form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction (string $cmd, string $default_form_action="")
 Get form action for command (command is method name without "Object", e.g. More...
 
 isVisible (int $ref_id, string $type)
 
 viewObject ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 deleteObject (bool $error=false)
 Display deletion confirmation screen. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 

Static Public Member Functions

static _goto (string $a_target)
 
- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot (bool $raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode (int $ref_id, string $cmd="")
 
static _gotoSharedWorkspaceNode (int $wsp_id)
 

Data Fields

const CMD_LIST_FILES = "listFiles"
 
const CMD_IMPORT_FROM_UPLOAD_DIR = 'importFromUploadDir'
 
bool $output_prepared
 
- Data Fields inherited from ilObjectGUI
const ADMIN_MODE_NONE = ""
 
const ADMIN_MODE_SETTINGS = "settings"
 
const ADMIN_MODE_REPOSITORY = "repository"
 
const UPLOAD_TYPE_LOCAL = 1
 
const UPLOAD_TYPE_UPLOAD_DIRECTORY = 2
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 
const SUPPORTED_IMPORT_MIME_TYPES = [MimeType::APPLICATION__ZIP, MimeType::APPLICATION__X_ZIP_COMPRESSED]
 

Protected Member Functions

 afterSave (ilObject $new_object)
 
 setTabs ()
 
 getTabs ()
 
 addLocatorItems ()
 
 importFileObject (int $parent_id=null)
 
 afterImport (ilObject $new_object)
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 
 assignObject ()
 
 setTitleAndDescription ()
 
 createActionDispatcherGUI ()
 
 initHeaderAction (?string $sub_type=null, ?int $sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction (?ilObjectListGUI $list_gui=null)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 setTabs ()
 set admin tabs More...
 
 setAdminTabs ()
 set admin tabs More...
 
 setLocator ()
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator (bool $omit=true)
 
 addAdminLocatorItems (bool $do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 getCreationFormsHTML (StandardForm|ilPropertyFormGUI|array $form)
 
 getTitleForCreationFormPage ()
 
 getCreationFormTitle ()
 
 initCreateForm (string $new_type)
 
 didacticTemplatesToForm ()
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 
 retrieveAdditionalDidacticTemplateOptions ()
 
 addAdoptContentLinkToToolbar ()
 
 addImportButtonToToolbar ()
 
 addAvailabilityPeriodButtonToToolbar (ilToolbarGUI $toolbar)
 
 parseDidacticTemplateVar (string $var, string $type)
 
 afterSave (ilObject $new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 routeImportCmdObject ()
 
 importFile (string $file_to_import, string $path_to_uploaded_file_in_temp_dir)
 
 deleteUploadedImportFile (string $path_to_uploaded_file_in_temp_dir)
 
 afterImport (ilObject $new_object)
 Post (successful) object import hook. More...
 
 setFormAction (string $cmd, string $form_action)
 
 getReturnLocation (string $cmd, string $default_location="")
 Get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation (string $cmd, string $location)
 set specific return location for command More...
 
 getTargetFrame (string $cmd, string $default_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame (string $cmd, string $target_frame)
 Set specific target frame for command. More...
 
 showPossibleSubObjects ()
 show possible sub objects (pull down menu) More...
 
 getTabs ()
 overwrite in derived GUI class of your object type More...
 
 redirectToRefId (int $ref_id, string $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 ["ref_id"] value of the request More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 checkPermission (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 checkPermissionBool (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 getCreatableObjectTypes ()
 
 buildAddNewItemElements (array $subtypes, string $create_target_class=ilRepositoryGUI::class, ?int $redirect_target_ref_id=null,)
 
 buildGroup (string $create_target_class, array $obj_types_in_group, string $title, array $subtypes)
 

Protected Attributes

ILIAS HTMLLearningModule InternalGUIService $gui
 
StandardGUIRequest $lm_request
 
ilPropertyFormGUI $form
 
ilTabsGUI $tabs
 
ilHelpGUI $help
 
- Protected Attributes inherited from ilObjectGUI
ILIAS Notes Service $notes_service
 
ServerRequestInterface $request
 
ilLocatorGUI $locator
 
ilObjUser $user
 
ilAccessHandler $access
 
ilSetting $settings
 
ilToolbarGUI $toolbar
 
ilRbacAdmin $rbac_admin
 
ilRbacSystem $rbac_system
 
ilRbacReview $rbac_review
 
ilObjectService $object_service
 
ilObjectDefinition $obj_definition
 
ilGlobalTemplateInterface $tpl
 
ilTree $tree
 
ilCtrl $ctrl
 
ilErrorHandling $error
 
ilLanguage $lng
 
ilTabsGUI $tabs_gui
 
ILIAS $ilias
 
ArrayBasedRequestWrapper $post_wrapper
 
RequestWrapper $request_wrapper
 
Refinery $refinery
 
ilFavouritesManager $favourites
 
ilObjectCustomIconFactory $custom_icon_factory
 
UIFactory $ui_factory
 
UIRenderer $ui_renderer
 
Filesystem $temp_file_system
 
ilObject $object = null
 
bool $creation_mode = false
 
 $data
 
int $id
 
bool $call_by_reference = false
 
bool $prepare_output
 
int $ref_id
 
int $obj_id
 
int $maxcount
 
array $form_action = []
 
array $return_location = []
 
array $target_frame = []
 
string $tmp_import_dir
 
string $sub_objects = ""
 
bool $omit_locator = false
 
string $type = ""
 
string $admin_mode = self::ADMIN_MODE_NONE
 
int $requested_ref_id = 0
 
int $requested_crtptrefid = 0
 
int $requested_crtcb = 0
 
string $requested_new_type = ""
 
string $link_params
 
string $html = ""
 

Private Member Functions

 listFiles ()
 

Private Attributes

const PARAM_PATH = "path"
 
ILIAS ResourceStorage Services $irss
 
ILIAS HTTP Services $http
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

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

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

References $DIC, ilObjectGUI\$lng, ILIAS\GlobalScreen\Provider\__construct(), ILIAS\Repository\access(), ILIAS\Repository\ctrl(), ILIAS\Repository\help(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), ilLanguage\loadLanguageModule(), ILIAS\Repository\locator(), ILIAS\Repository\tabs(), ILIAS\Repository\toolbar(), and ILIAS\Repository\user().

53  {
54  global $DIC;
55 
56  $this->irss = $DIC->resourceStorage();
57  $this->lng = $DIC->language();
58  $this->user = $DIC->user();
59  $this->locator = $DIC["ilLocator"];
60  $this->tabs = $DIC->tabs();
61  $this->tree = $DIC->repositoryTree();
62  $this->tpl = $DIC["tpl"];
63  $this->access = $DIC->access();
64  $this->toolbar = $DIC->toolbar();
65  $this->help = $DIC["ilHelp"];
66  $this->http = $DIC->http();
67  $lng = $DIC->language();
68  $ilCtrl = $DIC->ctrl();
69 
70  $this->ctrl = $ilCtrl;
71  $this->ctrl->saveParameter($this, array("ref_id"));
72 
73  $this->lm_request = $DIC->htmlLearningModule()
74  ->internal()
75  ->gui()
76  ->standardRequest();
77 
78  $this->type = "htlm";
79  $lng->loadLanguageModule("content");
80  $lng->loadLanguageModule("obj");
81  $lng->loadLanguageModule("htlm");
82 
83  parent::__construct($a_data, $a_id, $a_call_by_reference, false);
84  $this->output_prepared = $a_prepare_output;
85  $this->gui = $DIC->htmlLearningModule()->internal()->gui();
86  }
loadLanguageModule(string $a_module)
Load language module.
ilLanguage $lng
static http()
Fetches the global http state from ILIAS.
global $DIC
Definition: shib_login.php:25
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ _goto()

static ilObjFileBasedLMGUI::_goto ( string  $a_target)
static

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

References ilObjectGUI\$access, $DIC, ilObjectGUI\$lng, ilObjectGUI\_gotoRepositoryNode(), ilObjectGUI\_gotoRepositoryRoot(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), ilRBACAccessHandler\checkAccess(), ROOT_FOLDER_ID, and ilLanguage\txt().

Referenced by ILIAS\StaticURL\Handler\LegacyGotoHandler\handle().

612  : void
613  {
614  global $DIC;
615  $main_tpl = $DIC->ui()->mainTemplate();
616 
617  $lng = $DIC->language();
618  $access = $DIC->access();
619 
620  if ($access->checkAccess("read", "", $a_target) ||
621  $access->checkAccess("visible", "", $a_target)) {
622  ilObjectGUI::_gotoRepositoryNode($a_target, "infoScreen");
623  } elseif ($access->checkAccess("read", "", ROOT_FOLDER_ID)) {
624  $main_tpl->setOnScreenMessage(
625  'failure',
626  sprintf(
627  $lng->txt("msg_no_perm_read_item"),
629  ),
630  true
631  );
633  }
634 
635  throw new ilPermissionException($lng->txt("msg_no_perm_read_lm"));
636  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
const ROOT_FOLDER_ID
Definition: constants.php:32
checkAccess(string $a_permission, string $a_cmd, int $a_ref_id, string $a_type="", ?int $a_obj_id=null, ?int $a_tree_id=null)
check access for an object (provide $a_type and $a_obj_id if available for better performance) ...
static _gotoRepositoryNode(int $ref_id, string $cmd="")
static _lookupObjId(int $ref_id)
ilLanguage $lng
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupTitle(int $obj_id)
global $DIC
Definition: shib_login.php:25
ilAccessHandler $access
static _gotoRepositoryRoot(bool $raise_error=false)
Goto repository root.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addLocatorItems()

ilObjFileBasedLMGUI::addLocatorItems ( )
protected

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

References ilObjectGUI\$locator, ilObjectGUI\$requested_ref_id, ILIAS\Repository\ctrl(), and ILIAS\Repository\object().

638  : void
639  {
640  $ilLocator = $this->locator;
641 
642  if (is_object($this->object)) {
643  $ilLocator->addItem(
644  $this->object->getTitle(),
645  $this->ctrl->getLinkTargetByClass("ilinfoscreengui", "showSummary"),
646  "",
648  );
649  }
650  }
ilLocatorGUI $locator
+ Here is the call graph for this function:

◆ afterImport()

ilObjFileBasedLMGUI::afterImport ( ilObject  $new_object)
protected

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

References ILIAS\Repository\ctrl(), ilObject\getRefId(), and ILIAS\Repository\lng().

679  : void
680  {
681  $this->ctrl->setParameter($this, "ref_id", $new_object->getRefId());
682  $this->tpl->setOnScreenMessage('success', $this->lng->txt("object_added"), true);
683  $this->ctrl->redirect($this, "properties");
684  }
+ Here is the call graph for this function:

◆ afterSave()

ilObjFileBasedLMGUI::afterSave ( ilObject  $new_object)
protected

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

References ILIAS\Repository\lng(), and redirectAfterCreation().

Referenced by createFromDirectory().

393  : void
394  {
395  if (!$new_object->getStartFile()) {
396  $new_object->maybeDetermineStartFile();
397  }
398 
399  // always send a message
400  $this->tpl->setOnScreenMessage('success', $this->lng->txt("object_added"), true);
401  $this->object = $new_object;
402  $this->redirectAfterCreation();
403  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cancel()

ilObjFileBasedLMGUI::cancel ( )

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

References ilObjectGUI\cancelObject().

388  : void
389  {
390  $this->cancelObject();
391  }
cancelObject()
cancel action and go back to previous page
+ Here is the call graph for this function:

◆ cancelCreationObject()

ilObjFileBasedLMGUI::cancelCreationObject ( )
final

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

References ILIAS\Repository\ctrl().

227  : void
228  {
229  $this->ctrl->redirectByClass("ilrepositorygui", "frameset");
230  }
+ Here is the call graph for this function:

◆ createFromDirectory()

ilObjFileBasedLMGUI::createFromDirectory ( string  $a_dir)

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

References $filename, afterSave(), ilObjectGUI\checkPermissionBool(), ILIAS\Repository\lng(), ilObjectGUI\putObjectInTree(), and ilUtil\stripSlashes().

Referenced by importFileObject().

686  : void
687  {
688  if ($a_dir === "" || !$this->checkPermissionBool("create", "", "htlm")) {
689  throw new ilPermissionException($this->lng->txt("no_create_permission"));
690  }
691 
692  // create instance
693  $newObj = new ilObjFileBasedLM();
694  $filename = ilUtil::stripSlashes($_FILES["importfile"]["name"]);
695  $newObj->setTitle($filename);
696  $newObj->setDescription("");
697  $newObj->create();
698  $newObj->populateByDirectoy($a_dir, $filename);
699  $this->putObjectInTree($newObj);
700 
701  $this->afterSave($newObj);
702  }
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
File Based Learning Module (HTML) object.
afterSave(ilObject $new_object)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$filename
Definition: buildRTE.php:78
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
putObjectInTree(ilObject $obj, int $parent_node_id=null)
Add object to tree at given position.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ edit()

ilObjFileBasedLMGUI::edit ( )

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

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

382  : void
383  {
384  $this->prepareOutput();
385  $this->editObject();
386  }
prepareOutput(bool $show_sub_objects=true)
+ Here is the call graph for this function:

◆ editObject()

ilObjFileBasedLMGUI::editObject ( )

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

References ILIAS\Repository\lng().

Referenced by edit().

375  : void
376  {
377  if (!$this->rbac_system->checkAccess("visible,write", $this->object->getRefId())) {
378  throw new ilPermissionException($this->lng->txt("permission_denied"));
379  }
380  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ilObjFileBasedLMGUI::executeCommand ( )

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

References $user_id, ILIAS\Repository\access(), ilObjectGUI\addHeaderAction(), ilObjectGUI\checkPermission(), CMD_IMPORT_FROM_UPLOAD_DIR, ILIAS\Repository\ctrl(), ILIAS\components\ResourceStorage\Container\View\DATA_TABLE, ilObjectGUI\getCreationMode(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), getUploadDirectory(), getUploadFiles(), ILIAS\Repository\lng(), ilLearningProgressBaseGUI\LP_CONTEXT_REPOSITORY, ILIAS\Repository\object(), ilObjectGUI\prepareOutput(), ilObjectGUI\setLocator(), setTabs(), showInfoScreen(), ILIAS\Repository\tabs(), ILIAS\Repository\user(), and ILIAS\components\ResourceStorage\Container\View\Configuration\withExternalAction().

88  : void
89  {
90  $next_class = $this->ctrl->getNextClass($this);
91  $cmd = $this->ctrl->getCmd();
92 
93  if (
94  $this->getCreationMode() === true ||
95  strtolower($this->lm_request->getBaseClass()) === "iladministrationgui"
96  ) {
97  $this->prepareOutput();
98  } elseif (!in_array($cmd, array("", "framset")) || $next_class != "") {
99  $this->tpl->loadStandardTemplate();
100  $this->setLocator();
101  $this->setTabs();
102  }
103 
104  switch ($next_class) {
105  case strtolower(ilContainerResourceGUI::class):
106  $this->tabs->activateTab('id_list_files');
107  // Check wite access to determine upload and manage capabilities
108  $check_access = $this->access->checkAccess('write', '', $this->object->getRefId());
109 
110  // Build the view configuration
111  $view_configuration = new Configuration(
112  $this->object->getResource(),
113  new ilHTLMStakeholder(),
114  $this->lng->txt('files'),
116  250,
117  $check_access,
118  $check_access
119  );
120 
121  // Add a single action for text-files to set as startfile
122  $view_configuration = $view_configuration->withExternalAction(
123  $this->lng->txt('cont_set_start_file'),
124  self::class,
125  'setStartFile',
126  'lm',
127  self::PARAM_PATH,
128  false,
129  ['text/*']
130  );
131 
132  if ($this->getUploadDirectory()) {
133  foreach ($this->getUploadFiles() as $file) {
134  $options[$file] = $file;
135  }
136 
137  $modal = $this->ui_factory->modal()->roundtrip(
138  $this->lng->txt('import_from_upload_dir'),
139  [],
140  [
141  $this->ui_factory->input()->field()->select(
142  $this->lng->txt('import_from_upload_dir_file_name'),
143  $options,
144  $this->lng->txt('import_from_upload_dir_info'),
145  )->withRequired(true)
146  ],
147  $this->ctrl->getFormActionByClass(
148  \ilObjFileBasedLMGUI::class,
150  )
151  );
152 
153  $top_action = new TopAction(
154  $this->lng->txt('import_from_upload_dir'),
155  $modal->getShowSignal()
156  );
157  $view_configuration = $view_configuration->withExternalTopAction(
158  'import_from_upload_dir',
159  $top_action,
160  $modal
161  );
162  }
163  // build the collection GUI
164  $container_gui = new ilContainerResourceGUI(
165  $view_configuration
166  );
167 
168  // forward the command
169  $this->ctrl->forwardCommand($container_gui);
170  break;
171  case 'ilobjectmetadatagui':
172  $this->checkPermission("write");
173  $this->tabs->activateTab('id_meta_data');
174  $md_gui = new ilObjectMetaDataGUI($this->object);
175  $this->ctrl->forwardCommand($md_gui);
176  break;
177 
178  case "ilinfoscreengui":
179  $this->showInfoScreen();
180  break;
181 
182  case "illearningprogressgui":
183  $this->tabs->activateTab('id_learning_progress');
184  $user_id = ($this->lm_request->getUserId() > 0)
185  ? $this->lm_request->getUserId()
186  : $this->user->getId();
187  $new_gui = new ilLearningProgressGUI(
189  $this->object->getRefId(),
190  $user_id
191  );
192  $this->ctrl->forwardCommand($new_gui);
193  break;
194 
195  case 'ilpermissiongui':
196  $this->tabs->activateTab('id_permissions');
197  $perm_gui = new ilPermissionGUI($this);
198  $ret = $this->ctrl->forwardCommand($perm_gui);
199  break;
200 
201  case "ilexportgui":
202  $this->tabs->activateTab("export");
203  $exp_gui = new ilExportGUI($this);
204  $ret = $this->ctrl->forwardCommand($exp_gui);
205  break;
206 
207  case "ilcommonactiondispatchergui":
209  $this->ctrl->forwardCommand($gui);
210  break;
211 
212  default:
213  $cmd = $this->ctrl->getCmd(self::CMD_LIST_FILES);
214  if (
215  $this->getCreationMode() === true ||
216  strtolower($this->lm_request->getBaseClass()) === "iladministrationgui"
217  ) {
218  $cmd .= "Object";
219  }
220  $ret = $this->$cmd();
221  break;
222  }
223 
224  $this->addHeaderAction();
225  }
Class ilObjectMetaDataGUI.
prepareOutput(bool $show_sub_objects=true)
withExternalAction(string $label, string $target_gui, string $target_cmd, string $parameter_namespace, string $path_parameter='path', bool $supports_directories=false, array $supported_mime_types=[' *'])
ILIAS HTMLLearningModule InternalGUIService $gui
addHeaderAction()
Add header action menu.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
+ Here is the call graph for this function:

◆ exportHTML()

ilObjFileBasedLMGUI::exportHTML ( )

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

References ilExport\_createExportDirectory(), ilExport\_getExportDirectory(), ilFileUtils\delDir(), IL_INST_ID, ilFileUtils\makeDir(), ILIAS\Repository\object(), ilFileUtils\rCopy(), and ilFileUtils\zip().

709  : void
710  {
712  $this->object->getId(),
713  "html",
714  $this->object->getType()
715  );
716  $export_dir = ilExport::_getExportDirectory(
717  $this->object->getId(),
718  "html",
719  $this->object->getType()
720  );
721 
722  $subdir = $this->object->getType() . "_" . $this->object->getId();
723 
724  $target_dir = $export_dir . "/" . $subdir;
725 
726  ilFileUtils::delDir($target_dir);
727  ilFileUtils::makeDir($target_dir);
728 
729  $source_dir = $this->object->getDataDirectory();
730 
731  ilFileUtils::rCopy($source_dir, $target_dir);
732 
733  // zip it all
734  $date = time();
735  $zip_file = $export_dir . "/" . $date . "__" . IL_INST_ID . "__" .
736  $this->object->getType() . "_" . $this->object->getId() . ".zip";
737  ilFileUtils::zip($target_dir, $zip_file);
738 
739  ilFileUtils::delDir($target_dir);
740  }
const IL_INST_ID
Definition: constants.php:40
static rCopy(string $a_sdir, string $a_tdir, bool $preserveTimeAttributes=false)
Copies content of a directory $a_sdir recursively to a directory $a_tdir.
static _getExportDirectory(int $a_obj_id, string $a_type="xml", string $a_obj_type="", string $a_entity="")
Get export directory for an repository object
static _createExportDirectory(int $a_obj_id, string $a_export_type="xml", string $a_obj_type="")
static delDir(string $a_dir, bool $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively
static zip(string $a_dir, string $a_file, bool $compress_content=false)
static makeDir(string $a_dir)
creates a new directory and inherits all filesystem permissions of the parent directory You may pass ...
+ Here is the call graph for this function:

◆ getSettingsFormValues()

ilObjFileBasedLMGUI::getSettingsFormValues ( )

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

References ilObjFileBasedLMAccess\_determineStartUrl(), ILIAS\Repository\form(), ILIAS\Repository\lng(), and ILIAS\Repository\object().

Referenced by properties().

307  : void
308  {
309  $startfile = ilObjFileBasedLMAccess::_determineStartUrl($this->object->getId());
310 
311  $values = array();
312  $values['cobj_online'] = !$this->object->getOfflineStatus();
313  if ($startfile !== "") {
314  $startfile = basename($startfile);
315  } else {
316  $startfile = $this->lng->txt("no_start_file");
317  }
318 
319  $values["startfile"] = $startfile;
320  $values["title"] = $this->object->getTitle();
321  $values["desc"] = $this->object->getLongDescription();
322  $values["cont_show_info_tab"] = $this->object->isInfoEnabled();
323 
324  $this->form->setValuesByArray($values);
325  }
form( $class_path, string $cmd, string $submit_caption="")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTabs()

ilObjFileBasedLMGUI::getTabs ( )
protected

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

References $help, ilObjectGUI\$lng, ilObjFileBasedLMAccess\_determineStartUrl(), ILIAS\Repository\access(), ilLearningProgressAccess\checkAccess(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ILIAS\Repository\object(), ilHelpGUI\setScreenIdComponent(), ILIAS\Repository\tabs(), and ilLanguage\txt().

Referenced by setTabs().

531  : void
532  {
533  $lng = $this->lng;
534  $ilHelp = $this->help;
535 
536  $ilHelp->setScreenIdComponent("htlm");
537 
538  if ($this->access->checkAccess('write', '', $this->ref_id)) {
539  // Depending on whether the module has already been migrated to the IRSS, we add a tab to
540  // ilContainerResourceGUI or internally. internally, it is only indicated that the files cannot be edited.
541  $this->tabs->addTab(
542  "id_list_files",
543  $lng->txt("cont_list_files"),
544  $this->ctrl->getLinkTarget($this, self::CMD_LIST_FILES)
545  );
546  }
547 
548  if ($this->access->checkAccess('visible', '', $this->ref_id) && $this->object->isInfoEnabled()) {
549  $this->tabs->addTab(
550  "id_info",
551  $lng->txt("info_short"),
552  $this->ctrl->getLinkTargetByClass([self::class, ilInfoScreenGUI::class], "showSummary")
553  );
554  }
555 
556  if ($this->access->checkAccess('write', '', $this->ref_id)) {
557  $this->tabs->addTab(
558  "id_settings",
559  $lng->txt("settings"),
560  $this->ctrl->getLinkTarget($this, "properties")
561  );
562  }
563 
564  if (ilLearningProgressAccess::checkAccess($this->object->getRefId())) {
565  $this->tabs->addTab(
566  "id_learning_progress",
567  $lng->txt("learning_progress"),
568  $this->ctrl->getLinkTargetByClass([self::class, ilLearningProgressGUI::class], '')
569  );
570  }
571 
572  if ($this->access->checkAccess('write', '', $this->ref_id)) {
573  $mdgui = new ilObjectMetaDataGUI($this->object);
574  $mdtab = $mdgui->getTab();
575  if ($mdtab) {
576  $this->tabs->addTab(
577  "id_meta_data",
578  $lng->txt("meta_data"),
579  $mdtab
580  );
581  }
582  }
583 
584  // export
585  if ($this->access->checkAccess("write", "", $this->object->getRefId())) {
586  $this->tabs->addTab(
587  "export",
588  $lng->txt("export"),
589  $this->ctrl->getLinkTargetByClass(ilExportGUI::class, "")
590  );
591  }
592 
593  if ($this->access->checkAccess('edit_permission', '', $this->object->getRefId())) {
594  $this->tabs->addTab(
595  "id_permissions",
596  $lng->txt("perm_settings"),
597  $this->ctrl->getLinkTargetByClass([self::class, ilPermissionGUI::class], "perm")
598  );
599  }
600 
601  $startfile = ilObjFileBasedLMAccess::_determineStartUrl($this->object->getId());
602  if ($startfile !== "" && $this->access->checkAccess('read', '', $this->ref_id)) {
603  $this->tabs->addNonTabbedLink(
604  "presentation_view",
605  $this->lng->txt("glo_presentation_view"),
606  "ilias.php?baseClass=ilHTLMPresentationGUI&ref_id=" . $this->object->getRefId(),
607  "_blank"
608  );
609  }
610  }
Class ilObjectMetaDataGUI.
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
static checkAccess(int $a_ref_id, bool $a_allow_only_read=true)
check access to learning progress
ilLanguage $lng
setScreenIdComponent(string $a_comp)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getUploadDirectory()

ilObjFileBasedLMGUI::getUploadDirectory ( )

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

References Vendor\Package\$e, $lm_set, and ilImportDirectoryFactory\TYPE_SAHS.

Referenced by executeCommand(), getUploadFiles(), and importFromUploadDir().

806  : string
807  {
808  $lm_set = new ilSetting("lm");
809  $upload_dir = $lm_set->get("cont_upload_dir");
810 
811  $import_file_factory = new ilImportDirectoryFactory();
812  try {
813  $import_directory = $import_file_factory->getInstanceForComponent(ilImportDirectoryFactory::TYPE_SAHS);
814  } catch (InvalidArgumentException $e) {
815  return '';
816  }
817  return $import_directory->getAbsolutePath();
818  }
$lm_set
+ Here is the caller graph for this function:

◆ getUploadFiles()

ilObjFileBasedLMGUI::getUploadFiles ( )

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

References getUploadDirectory(), and ILIAS\UI\examples\Symbol\Glyph\Sort\sort().

Referenced by executeCommand().

820  : array
821  {
822  if (!$upload_dir = $this->getUploadDirectory()) {
823  return array();
824  }
825 
826  // get the sorted content of the upload directory
827  $handle = opendir($upload_dir);
828  $files = array();
829  while (false !== ($file = readdir($handle))) {
830  $full_path = $upload_dir . "/" . $file;
831  if (is_file($full_path) and is_readable($full_path)) {
832  $files[] = $file;
833  }
834  }
835  closedir($handle);
836  sort($files);
837 
838  return $files;
839  }
sort()
description: > Example for rendering a Sort Glyph.
Definition: sort.php:25
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ importFileObject()

ilObjFileBasedLMGUI::importFileObject ( int  $parent_id = null)
protected

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

References Vendor\Package\$e, createFromDirectory(), and ilManifestFileNotFoundImportException\getTmpDir().

669  : void
670  {
671  try {
672  parent::importFileObject();
674  // since there is no manifest xml we assume that this is an HTML export file
675  $this->createFromDirectory($e->getTmpDir());
676  }
677  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ importFromUploadDir()

ilObjFileBasedLMGUI::importFromUploadDir ( )

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

References $DIC, $path, ilObjectGUI\_gotoRepositoryRoot(), ilObjectGUI\checkPermissionBool(), ILIAS\Repository\ctrl(), getUploadDirectory(), ILIAS\Repository\lng(), and ILIAS\Repository\object().

759  : void
760  {
761  global $DIC;
762  if (!$this->checkPermissionBool("write", "", "htlm")) {
763  $main_tpl = $DIC->ui()->mainTemplate();
764 
765  $main_tpl->setOnScreenMessage(
766  'failure',
767  sprintf(
768  $this->lng->txt("msg_no_perm_write"),
769  ),
770  true
771  );
773  }
774 
775  $file = $this->lm_request->getString('form/input_0');
776  $path = $this->getUploadDirectory() . DIRECTORY_SEPARATOR . $file;
777  if ($file === '') {
778  $DIC->ui()->mainTemplate()->setOnScreenMessage(
779  'failure',
780  $this->lng->txt('import_from_upload_dir_info'),
781  true
782  );
783  } elseif (str_starts_with(realpath($path), $this->getUploadDirectory())) {
784  $this->irss->manageContainer()->addStreamToContainer(
785  $this->object->getResource()->getIdentification(),
786  Streams::ofResource(fopen($path, 'rb')),
787  $file
788  );
789  $DIC->ui()->mainTemplate()->setOnScreenMessage(
790  'success',
791  $this->lng->txt('file_imported_from_upload_dir'),
792  true
793  );
794  } else {
795  $DIC->ui()->mainTemplate()->setOnScreenMessage(
796  'failure',
797  $this->lng->txt('file_import_from_upload_dir_failed'),
798  true
799  );
800  }
801 
802  $this->ctrl->setParameterByClass("ilObjFileBasedLMGUI", "ref_id", $this->object->getRefId());
803  $this->ctrl->redirectByClass(["ilrepositorygui", "ilObjFileBasedLMGUI", "ilContainerResourceGUI"]);
804  }
$path
Definition: ltiservices.php:30
global $DIC
Definition: shib_login.php:25
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
static _gotoRepositoryRoot(bool $raise_error=false)
Goto repository root.
+ Here is the call graph for this function:

◆ infoScreen()

ilObjFileBasedLMGUI::infoScreen ( )

this one is called from the info button in the repository

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

References ILIAS\Repository\ctrl().

482  : void
483  {
484  $this->ctrl->redirectByClass(ilInfoScreenGUI::class, "showSummary");
485  }
+ Here is the call graph for this function:

◆ initSettingsForm()

ilObjFileBasedLMGUI::initSettingsForm ( )

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

References $form, ilObjFileBasedLMAccess\_determineStartUrl(), ILIAS\Repository\ctrl(), ILIAS\Repository\form(), ilObjectGUI\getObjectService(), ilObjectServiceSettingsGUI\INFO_TAB_VISIBILITY, ilObjectServiceSettingsGUI\initServiceSettingsForm(), ILIAS\Repository\lng(), ILIAS\Repository\object(), ilTextAreaInputGUI\setCols(), and ilObject\TITLE_LENGTH.

Referenced by properties(), and saveProperties().

244  : void
245  {
246  $obj_service = $this->getObjectService();
247 
248  $this->form = new ilPropertyFormGUI();
249 
250  // title
251  $ti = new ilTextInputGUI($this->lng->txt("title"), "title");
252  $ti->setSize(min(40, ilObject::TITLE_LENGTH));
253  $ti->setMaxLength(ilObject::TITLE_LENGTH);
254  $ti->setRequired(true);
255  $this->form->addItem($ti);
256 
257  // description
258  $ta = new ilTextAreaInputGUI($this->lng->txt("description"), "desc");
259  $ta->setCols(40);
260  $ta->setRows(2);
261  $this->form->addItem($ta);
262 
263  // online
264  $cb = new ilCheckboxInputGUI($this->lng->txt("cont_online"), "cobj_online");
265  $cb->setOptionTitle($this->lng->txt(""));
266  $cb->setValue("y");
267  $this->form->addItem($cb);
268 
269  // startfile
270  $startfile = ilObjFileBasedLMAccess::_determineStartUrl($this->object->getId());
271 
272  $ne = new ilNonEditableValueGUI($this->lng->txt("cont_startfile"), "");
273  if ($startfile !== "") {
274  $ne->setValue(basename($startfile));
275  } else {
276  $ne->setValue(basename($this->lng->txt("no_start_file")));
277  }
278  $this->form->addItem($ne);
279 
280  $pres = new ilFormSectionHeaderGUI();
281  $pres->setTitle($this->lng->txt('obj_presentation'));
282  $this->form->addItem($pres);
283 
284  // tile image
285  $obj_service->commonSettings()->legacyForm($this->form, $this->object)->addTileImage();
286 
287  $this->form->addCommandButton("saveProperties", $this->lng->txt("save"));
288  $this->form->addCommandButton("toFilesystem", $this->lng->txt("cont_set_start_file"));
289 
290  $this->form->setTitle($this->lng->txt("cont_lm_properties"));
291  $this->form->setFormAction($this->ctrl->getFormAction($this, "saveProperties"));
292 
293  // additional features
294  $section = new ilFormSectionHeaderGUI();
295  $section->setTitle($this->lng->txt('obj_features'));
296  $this->form->addItem($section);
297 
299  $this->object->getId(),
300  $this->form,
301  [
303  ]
304  );
305  }
const TITLE_LENGTH
static initServiceSettingsForm(int $obj_id, ilPropertyFormGUI $form, array $services)
form( $class_path, string $cmd, string $submit_caption="")
This class represents a text area property in a property form.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ learningProgress()

ilObjFileBasedLMGUI::learningProgress ( )

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

References ILIAS\Repository\ctrl().

749  : void
750  {
751  $this->ctrl->redirectByClass("illearningprogressgui", "");
752  }
+ Here is the call graph for this function:

◆ listFiles()

ilObjFileBasedLMGUI::listFiles ( )
private

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

References ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ILIAS\Repository\object(), and ILIAS\Repository\tabs().

652  : void
653  {
654  if ($this->object->getResource() !== null) {
655  $this->ctrl->redirectByClass(ilContainerResourceGUI::class);
656  return;
657  }
658  $this->tabs->activateTab("id_list_files");
659 
660  $message_box = $this->gui->ui()->factory()->messageBox()->info(
661  $this->lng->txt("infobox_files_not_migrated")
662  );
663 
664  $this->tpl->setContent(
665  $this->gui->ui()->renderer()->render([$message_box])
666  );
667  }
+ Here is the call graph for this function:

◆ properties()

ilObjFileBasedLMGUI::properties ( )

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

References ilObjectGUI\checkPermissionBool(), ILIAS\Repository\form(), getSettingsFormValues(), initSettingsForm(), ILIAS\Repository\lng(), and ILIAS\Repository\tabs().

232  : void
233  {
234  if (!$this->checkPermissionBool("write")) {
235  $this->error->raiseError($this->lng->txt("permission_denied"), $this->error->MESSAGE);
236  }
237  $this->tabs->activateTab("id_settings");
238 
239  $this->initSettingsForm();
240  $this->getSettingsFormValues();
241  $this->tpl->setContent($this->form->getHTML());
242  }
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
form( $class_path, string $cmd, string $submit_caption="")
+ Here is the call graph for this function:

◆ redirectAfterCreation()

ilObjFileBasedLMGUI::redirectAfterCreation ( )

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

References ilObjectGUI\$ctrl, ILIAS\Repository\object(), ilCtrl\redirectByClass(), and ilCtrl\setParameterByClass().

Referenced by afterSave().

742  : void
743  {
744  $ctrl = $this->ctrl;
745  $ctrl->setParameterByClass("ilObjFileBasedLMGUI", "ref_id", $this->object->getRefId());
746  $ctrl->redirectByClass(["ilrepositorygui", "ilObjFileBasedLMGUI"], "properties");
747  }
redirectByClass( $a_class, string $a_cmd=null, string $a_anchor=null, bool $is_async=false)
setParameterByClass(string $a_class, string $a_parameter, $a_value)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ redrawHeaderAction()

ilObjFileBasedLMGUI::redrawHeaderAction ( )

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

References ilObjectGUI\redrawHeaderActionObject().

754  : void
755  {
756  $this->redrawHeaderActionObject();
757  }
redrawHeaderActionObject()
Ajax call: redraw action header only.
+ Here is the call graph for this function:

◆ saveProperties()

ilObjFileBasedLMGUI::saveProperties ( )

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

References $form, ilObjectGUI\checkPermissionBool(), ILIAS\Repository\ctrl(), ILIAS\Repository\form(), ilObjectGUI\getObjectService(), ilObjectServiceSettingsGUI\INFO_TAB_VISIBILITY, initSettingsForm(), ILIAS\Repository\lng(), ILIAS\Repository\object(), ILIAS\Repository\tabs(), and ilObjectServiceSettingsGUI\updateServiceSettingsForm().

338  : void
339  {
340  if (!$this->checkPermissionBool("write")) {
341  $this->error->raiseError($this->lng->txt("permission_denied"), $this->error->MESSAGE);
342  }
343 
344  $obj_service = $this->getObjectService();
345 
346  $this->initSettingsForm();
347  if ($this->form->checkInput()) {
348  $this->object->setTitle($this->form->getInput("title"));
349  $this->object->setDescription($this->form->getInput("desc"));
350  $this->object->setOfflineStatus(!(bool) $this->form->getInput("cobj_online"));
351 
352  $this->object->update();
353 
354  // tile image
355  $obj_service->commonSettings()->legacyForm($this->form, $this->object)->saveTileImage();
356 
357  // services
359  $this->object->getId(),
360  $this->form,
361  array(
363  )
364  );
365 
366  $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"), true);
367  $this->ctrl->redirect($this, "properties");
368  }
369 
370  $this->tabs->activateTab("id_settings");
371  $this->form->setValuesByPost();
372  $this->tpl->setContent($this->form->getHTML());
373  }
static updateServiceSettingsForm(int $obj_id, ilPropertyFormGUI $form, array $services)
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
form( $class_path, string $cmd, string $submit_caption="")
+ Here is the call graph for this function:

◆ setStartFile()

ilObjFileBasedLMGUI::setStartFile ( )

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

References Vendor\Package\$e, ilObjFileBasedLMAccess\_determineStartUrl(), ilLearningProgress\_tracProgress(), ilLPStatusWrapper\_updateStatus(), ANONYMOUS_USER_ID, ilObjectGUI\checkPermissionBool(), ILIAS\Repository\ctrl(), ILIAS\UI\examples\Layout\Page\Standard\getURI(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), ILIAS\Repository\object(), ilUtil\redirect(), ILIAS\Repository\refinery(), ilWACSignedPath\signFolderOfStartFile(), and ILIAS\Repository\user().

410  : void
411  {
412  if (!$this->checkPermissionBool("write")) {
413  $this->error->raiseError($this->lng->txt("permission_denied"), $this->error->MESSAGE);
414  }
415 
416  // try to determine start file from request
417  $start_file = $this->http->wrapper()->query()->has('lm_path')
418  ? $start_file = $this->http->wrapper()->query()->retrieve(
419  'lm_path',
420  $this->refinery->kindlyTo()->listOf($this->refinery->kindlyTo()->string())
421  )[0] ?? ''
422  : '';
423  // the ContainerResourceGUI uses e bin2hex/hex2bin serialization of pathes. Due to the internals of
424  // UI\Table\Data it's not possible to have a different handling for the parameter in case of external actions...
425  try {
426  $start_file = hex2bin($start_file);
427  } catch (Throwable $e) {
428  $start_file = '';
429  }
430 
431  if ($start_file === '') {
432  $this->tpl->setOnScreenMessage('failure', $this->lng->txt('cont_no_start_file'), true);
433  } else {
434  $this->object->setStartFile($start_file);
435  $this->object->update();
436  $this->tpl->setOnScreenMessage('success', $this->lng->txt('cont_start_file_set'), true);
437  }
438 
439  $this->ctrl->redirectByClass(ilContainerResourceGUI::class);
440  }
static http()
Fetches the global http state from ILIAS.
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ setTabs()

ilObjFileBasedLMGUI::setTabs ( )
protected

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

References getTabs(), and ilObjectGUI\setTitleAndDescription().

Referenced by executeCommand().

525  : void
526  {
527  $this->getTabs();
528  $this->setTitleAndDescription();
529  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showInfoScreen()

ilObjFileBasedLMGUI::showInfoScreen ( )

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

References ILIAS\Repository\access(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ILIAS\Repository\object(), and ILIAS\Repository\tabs().

Referenced by executeCommand().

487  : void
488  {
489  $this->tabs->activateTab('id_info');
490 
491  $this->lng->loadLanguageModule("meta");
492 
493  $info = new ilInfoScreenGUI($this);
494  $info->enablePrivateNotes();
495  $info->enableLearningProgress();
496 
497  $info->enableNews();
498  if ($this->access->checkAccess("write", "", $this->requested_ref_id)) {
499  $info->enableNewsEditing();
500 
501  $news_set = new ilSetting("news");
502  $enable_internal_rss = $news_set->get("enable_rss_for_internal");
503  if ($enable_internal_rss) {
504  $info->setBlockProperty("news", "settings", true);
505  }
506  }
507 
508  // add read / back button
509  if ($this->access->checkAccess("read", "", $this->requested_ref_id)) {
510  // #15127
511  $this->gui->link(
512  $this->lng->txt("view"),
513  "ilias.php?baseClass=ilHTLMPresentationGUI&ref_id=" . $this->object->getRefId(),
514  true
515  )->primary()->toToolbar();
516  }
517 
518  // show standard meta data section
519  $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
520 
521  // forward the command
522  $this->ctrl->forwardCommand($info);
523  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toFilesystem()

ilObjFileBasedLMGUI::toFilesystem ( )

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

References ILIAS\Repository\ctrl(), and ILIAS\Repository\object().

327  : void
328  {
329  // If we already have a RID, we can redirect to Container GUI
330  // otherwise we display an message which informs the user that the resource is not yet available
331  if ($this->object->getRID() != "") {
332  $this->ctrl->redirectByClass(ilContainerResourceGUI::class);
333  } else {
334  $this->ctrl->redirectByClass(static::class, "properties");
335  }
336  }
+ Here is the call graph for this function:

◆ update()

ilObjFileBasedLMGUI::update ( )

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

References ilObjectGUI\updateObject().

405  : void
406  {
407  $this->updateObject();
408  }
updateObject()
updates object entry in object_data
+ Here is the call graph for this function:

Field Documentation

◆ $form

ilPropertyFormGUI ilObjFileBasedLMGUI::$form
protected

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

Referenced by initSettingsForm(), and saveProperties().

◆ $gui

ILIAS HTMLLearningModule InternalGUIService ilObjFileBasedLMGUI::$gui
protected

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

◆ $help

ilHelpGUI ilObjFileBasedLMGUI::$help
protected

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

Referenced by getTabs().

◆ $http

ILIAS HTTP Services ilObjFileBasedLMGUI::$http
private

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

◆ $irss

ILIAS ResourceStorage Services ilObjFileBasedLMGUI::$irss
private

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

◆ $lm_request

StandardGUIRequest ilObjFileBasedLMGUI::$lm_request
protected

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

◆ $output_prepared

bool ilObjFileBasedLMGUI::$output_prepared

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

◆ $tabs

ilTabsGUI ilObjFileBasedLMGUI::$tabs
protected

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

◆ CMD_IMPORT_FROM_UPLOAD_DIR

const ilObjFileBasedLMGUI::CMD_IMPORT_FROM_UPLOAD_DIR = 'importFromUploadDir'

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

Referenced by executeCommand().

◆ CMD_LIST_FILES

const ilObjFileBasedLMGUI::CMD_LIST_FILES = "listFiles"

◆ PARAM_PATH

const ilObjFileBasedLMGUI::PARAM_PATH = "path"
private

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


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