ILIAS  trunk Revision v12.0_alpha-1221-g4e438232683
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)
 Post (successful) object creation hook. More...
 
 setTabs ()
 set admin tabs More...
 
 getTabs ()
 @abstract overwrite in derived GUI class of your object type More...
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 importFileObject (?int $parent_id=null)
 
 afterImport (ilObject $new_object)
 Post (successful) object import hook. More...
 
- 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 ()
 @abstract 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
 
GlobalHttpState $http
 
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
 
CustomIconFactory $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
 

Detailed Description

User Interface class for file based learning modules (HTML)

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de @ilCtrl_Calls ilObjFileBasedLMGUI: ilObjectMetaDataGUI, ilPermissionGUI, ilLearningProgressGUI, ilInfoScreenGUI @ilCtrl_Calls ilObjFileBasedLMGUI: ilCommonActionDispatcherGUI @ilCtrl_Calls ilObjFileBasedLMGUI: ilExportGUI @ilCtrl_Calls ilObjFileBasedLMGUI: ilContainerResourceGUI

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

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.

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 $lng = $DIC->language();
67 $ilCtrl = $DIC->ctrl();
68
69 $this->ctrl = $ilCtrl;
70 $this->ctrl->saveParameter($this, array("ref_id"));
71
72 $this->lm_request = $DIC->htmlLearningModule()
73 ->internal()
74 ->gui()
75 ->standardRequest();
76
77 $this->type = "htlm";
78 $lng->loadLanguageModule("content");
80 $lng->loadLanguageModule("htlm");
81
82 parent::__construct($a_data, $a_id, $a_call_by_reference, false);
83 $this->output_prepared = $a_prepare_output;
84 $this->gui = $DIC->htmlLearningModule()->internal()->gui();
85 }
loadLanguageModule(string $a_module)
Load language module.
ilLanguage $lng
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26

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

+ Here is the call graph for this function:

Member Function Documentation

◆ _goto()

static ilObjFileBasedLMGUI::_goto ( string  $a_target)
static

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

609 : void
610 {
611 global $DIC;
612 $main_tpl = $DIC->ui()->mainTemplate();
613
614 $lng = $DIC->language();
615 $access = $DIC->access();
616
617 if ($access->checkAccess("read", "", $a_target) ||
618 $access->checkAccess("visible", "", $a_target)) {
619 ilObjectGUI::_gotoRepositoryNode($a_target, "infoScreen");
620 } elseif ($access->checkAccess("read", "", ROOT_FOLDER_ID)) {
621 $main_tpl->setOnScreenMessage(
622 'failure',
623 sprintf(
624 $lng->txt("msg_no_perm_read_item"),
626 ),
627 true
628 );
630 }
631
632 throw new ilPermissionException($lng->txt("msg_no_perm_read_lm"));
633 }
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...
ilAccessHandler $access
static _gotoRepositoryRoot(bool $raise_error=false)
Goto repository root.
static _gotoRepositoryNode(int $ref_id, string $cmd="")
static _lookupObjId(int $ref_id)
static _lookupTitle(int $obj_id)
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)

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addLocatorItems()

ilObjFileBasedLMGUI::addLocatorItems ( )
protected

should be overwritten to add object specific items (repository items are preloaded)

Reimplemented from ilObjectGUI.

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

635 : void
636 {
637 $ilLocator = $this->locator;
638
639 if (is_object($this->object)) {
640 $ilLocator->addItem(
641 $this->object->getTitle(),
642 $this->ctrl->getLinkTargetByClass("ilinfoscreengui", "showSummary"),
643 "",
644 $this->requested_ref_id
645 );
646 }
647 }
ilLocatorGUI $locator

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

+ Here is the call graph for this function:

◆ afterImport()

ilObjFileBasedLMGUI::afterImport ( ilObject  $new_object)
protected

Post (successful) object import hook.

Reimplemented from ilObjectGUI.

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

676 : void
677 {
678 $this->ctrl->setParameter($this, "ref_id", $new_object->getRefId());
679 $this->tpl->setOnScreenMessage('success', $this->lng->txt("object_added"), true);
680 $this->ctrl->redirect($this, "properties");
681 }

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

+ Here is the call graph for this function:

◆ afterSave()

ilObjFileBasedLMGUI::afterSave ( ilObject  $new_object)
protected

Post (successful) object creation hook.

Reimplemented from ilObjectGUI.

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

390 : void
391 {
392 if (!$new_object->getStartFile()) {
393 $new_object->maybeDetermineStartFile();
394 }
395
396 // always send a message
397 $this->tpl->setOnScreenMessage('success', $this->lng->txt("object_added"), true);
398 $this->object = $new_object;
399 $this->redirectAfterCreation();
400 }

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

Referenced by createFromDirectory().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cancel()

ilObjFileBasedLMGUI::cancel ( )

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

385 : void
386 {
387 $this->cancelObject();
388 }
cancelObject()
cancel action and go back to previous page

References ilObjectGUI\cancelObject().

+ Here is the call graph for this function:

◆ cancelCreationObject()

ilObjFileBasedLMGUI::cancelCreationObject ( )
final

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

224 : void
225 {
226 $this->ctrl->redirectByClass("ilrepositorygui", "frameset");
227 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ createFromDirectory()

ilObjFileBasedLMGUI::createFromDirectory ( string  $a_dir)

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

683 : void
684 {
685 if ($a_dir === "" || !$this->checkPermissionBool("create", "", "htlm")) {
686 throw new ilPermissionException($this->lng->txt("no_create_permission"));
687 }
688
689 // create instance
690 $newObj = new ilObjFileBasedLM();
691 $filename = ilUtil::stripSlashes($_FILES["importfile"]["name"]);
692 $newObj->setTitle($filename);
693 $newObj->setDescription("");
694 $newObj->create();
695 $newObj->populateByDirectoy($a_dir, $filename);
696 $this->putObjectInTree($newObj);
697
698 $this->afterSave($newObj);
699 }
$filename
Definition: buildRTE.php:78
afterSave(ilObject $new_object)
Post (successful) object creation hook.
File Based Learning Module (HTML) object.
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.
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")

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

Referenced by importFileObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ edit()

ilObjFileBasedLMGUI::edit ( )

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

379 : void
380 {
381 $this->prepareOutput();
382 $this->editObject();
383 }
prepareOutput(bool $show_sub_objects=true)

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

+ Here is the call graph for this function:

◆ editObject()

ilObjFileBasedLMGUI::editObject ( )

Reimplemented from ilObjectGUI.

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

372 : void
373 {
374 if (!$this->rbac_system->checkAccess("visible,write", $this->object->getRefId())) {
375 throw new ilPermissionException($this->lng->txt("permission_denied"));
376 }
377 }

References ILIAS\Repository\lng().

Referenced by edit().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ilObjFileBasedLMGUI::executeCommand ( )

Reimplemented from ilObjectGUI.

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

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

References $gui, ILIAS\UI\Implementation\Component\Input\Field\$options, $user_id, ILIAS\Repository\access(), ilObjectGUI\addHeaderAction(), ilObjectGUI\checkPermission(), CMD_IMPORT_FROM_UPLOAD_DIR, ILIAS\Repository\ctrl(), ilObjectGUI\getCreationMode(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), getUploadDirectory(), getUploadFiles(), ILIAS\Repository\lng(), ilLearningProgressBaseGUI\LP_CONTEXT_REPOSITORY, ILIAS\Repository\object(), PARAM_PATH, ilObjectGUI\prepareOutput(), ilObjectGUI\setLocator(), setTabs(), showInfoScreen(), ILIAS\Repository\tabs(), and ILIAS\Repository\user().

+ Here is the call graph for this function:

◆ exportHTML()

ilObjFileBasedLMGUI::exportHTML ( )

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

706 : void
707 {
709 $this->object->getId(),
710 "html",
711 $this->object->getType()
712 );
713 $export_dir = ilExport::_getExportDirectory(
714 $this->object->getId(),
715 "html",
716 $this->object->getType()
717 );
718
719 $subdir = $this->object->getType() . "_" . $this->object->getId();
720
721 $target_dir = $export_dir . "/" . $subdir;
722
723 ilFileUtils::delDir($target_dir);
724 ilFileUtils::makeDir($target_dir);
725
726 $source_dir = $this->object->getDataDirectory();
727
728 ilFileUtils::rCopy($source_dir, $target_dir);
729
730 // zip it all
731 $date = time();
732 $zip_file = $export_dir . "/" . $date . "__" . IL_INST_ID . "__" .
733 $this->object->getType() . "_" . $this->object->getId() . ".zip";
734 ilFileUtils::zip($target_dir, $zip_file);
735
736 ilFileUtils::delDir($target_dir);
737 }
static _createExportDirectory(int $a_obj_id, string $a_export_type="xml", string $a_obj_type="")
static _getExportDirectory(int $a_obj_id, string $a_type="xml", string $a_obj_type="", string $a_entity="")
@depricated Get export directory for an repository object
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 ...
static delDir(string $a_dir, bool $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively
static rCopy(string $a_sdir, string $a_tdir, bool $preserveTimeAttributes=false)
Copies content of a directory $a_sdir recursively to a directory $a_tdir.
const IL_INST_ID
Definition: constants.php:40

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

+ Here is the call graph for this function:

◆ getSettingsFormValues()

ilObjFileBasedLMGUI::getSettingsFormValues ( )

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

304 : void
305 {
306 $startfile = ilObjFileBasedLMAccess::_determineStartUrl($this->object->getId());
307
308 $values = array();
309 $values['cobj_online'] = !$this->object->getOfflineStatus();
310 if ($startfile !== "") {
311 $startfile = basename($startfile);
312 } else {
313 $startfile = $this->lng->txt("no_start_file");
314 }
315
316 $values["startfile"] = $startfile;
317 $values["title"] = $this->object->getTitle();
318 $values["desc"] = $this->object->getLongDescription();
319 $values["cont_show_info_tab"] = $this->object->isInfoEnabled();
320
321 $this->form->setValuesByArray($values);
322 }
form(?array $class_path, string $cmd, string $submit_caption="")

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

Referenced by properties().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTabs()

ilObjFileBasedLMGUI::getTabs ( )
protected

@abstract overwrite in derived GUI class of your object type

Reimplemented from ilObjectGUI.

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

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

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

Referenced by setTabs().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getUploadDirectory()

ilObjFileBasedLMGUI::getUploadDirectory ( )

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

803 : string
804 {
805 $lm_set = new ilSetting("lm");
806 $upload_dir = $lm_set->get("cont_upload_dir");
807
808 $import_file_factory = new ilImportDirectoryFactory();
809 try {
810 $import_directory = $import_file_factory->getInstanceForComponent(ilImportDirectoryFactory::TYPE_SAHS);
811 } catch (InvalidArgumentException $e) {
812 return '';
813 }
814 return $import_directory->getAbsolutePath();
815 }
ILIAS Setting Class.
$lm_set

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

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

+ Here is the caller graph for this function:

◆ getUploadFiles()

ilObjFileBasedLMGUI::getUploadFiles ( )

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

817 : array
818 {
819 if (!$upload_dir = $this->getUploadDirectory()) {
820 return array();
821 }
822
823 // get the sorted content of the upload directory
824 $handle = opendir($upload_dir);
825 $files = array();
826 while (false !== ($file = readdir($handle))) {
827 $full_path = $upload_dir . "/" . $file;
828 if (is_file($full_path) and is_readable($full_path)) {
829 $files[] = $file;
830 }
831 }
832 closedir($handle);
833 sort($files);
834
835 return $files;
836 }

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

Referenced by executeCommand().

+ 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 666 of file class.ilObjFileBasedLMGUI.php.

666 : void
667 {
668 try {
669 parent::importFileObject();
671 // since there is no manifest xml we assume that this is an HTML export file
672 $this->createFromDirectory($e->getTmpDir());
673 }
674 }
manifest.xml file not found-exception for import

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

+ Here is the call graph for this function:

◆ importFromUploadDir()

ilObjFileBasedLMGUI::importFromUploadDir ( )

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

756 : void
757 {
758 global $DIC;
759 if (!$this->checkPermissionBool("write", "", "htlm")) {
760 $main_tpl = $DIC->ui()->mainTemplate();
761
762 $main_tpl->setOnScreenMessage(
763 'failure',
764 sprintf(
765 $this->lng->txt("msg_no_perm_write"),
766 ),
767 true
768 );
770 }
771
772 $file = $this->lm_request->getString('form/input_0');
773 $path = $this->getUploadDirectory() . DIRECTORY_SEPARATOR . $file;
774 if ($file === '') {
775 $DIC->ui()->mainTemplate()->setOnScreenMessage(
776 'failure',
777 $this->lng->txt('import_from_upload_dir_info'),
778 true
779 );
780 } elseif (str_starts_with(realpath($path), $this->getUploadDirectory())) {
781 $this->irss->manageContainer()->addStreamToContainer(
782 $this->object->getResource()->getIdentification(),
783 Streams::ofResource(fopen($path, 'rb')),
784 $file
785 );
786 $DIC->ui()->mainTemplate()->setOnScreenMessage(
787 'success',
788 $this->lng->txt('file_imported_from_upload_dir'),
789 true
790 );
791 } else {
792 $DIC->ui()->mainTemplate()->setOnScreenMessage(
793 'failure',
794 $this->lng->txt('file_import_from_upload_dir_failed'),
795 true
796 );
797 }
798
799 $this->ctrl->setParameterByClass("ilObjFileBasedLMGUI", "ref_id", $this->object->getRefId());
800 $this->ctrl->redirectByClass(["ilrepositorygui", "ilObjFileBasedLMGUI", "ilContainerResourceGUI"]);
801 }
$path
Definition: ltiservices.php:30

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

+ 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 479 of file class.ilObjFileBasedLMGUI.php.

479 : void
480 {
481 $this->ctrl->redirectByClass(ilInfoScreenGUI::class, "showSummary");
482 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ initSettingsForm()

ilObjFileBasedLMGUI::initSettingsForm ( )

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

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

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

Referenced by properties(), and saveProperties().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ learningProgress()

ilObjFileBasedLMGUI::learningProgress ( )

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

746 : void
747 {
748 $this->ctrl->redirectByClass("illearningprogressgui", "");
749 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ listFiles()

ilObjFileBasedLMGUI::listFiles ( )
private

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

649 : void
650 {
651 if ($this->object->getResource() !== null) {
652 $this->ctrl->redirectByClass(ilContainerResourceGUI::class);
653 return;
654 }
655 $this->tabs->activateTab("id_list_files");
656
657 $message_box = $this->gui->ui()->factory()->messageBox()->info(
658 $this->lng->txt("infobox_files_not_migrated")
659 );
660
661 $this->tpl->setContent(
662 $this->gui->ui()->renderer()->render([$message_box])
663 );
664 }

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

+ Here is the call graph for this function:

◆ properties()

ilObjFileBasedLMGUI::properties ( )

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

229 : void
230 {
231 if (!$this->checkPermissionBool("write")) {
232 $this->error->raiseError($this->lng->txt("permission_denied"), $this->error->MESSAGE);
233 }
234 $this->tabs->activateTab("id_settings");
235
236 $this->initSettingsForm();
237 $this->getSettingsFormValues();
238 $this->tpl->setContent($this->form->getHTML());
239 }
error(string $a_errmsg)

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

+ Here is the call graph for this function:

◆ redirectAfterCreation()

ilObjFileBasedLMGUI::redirectAfterCreation ( )

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

739 : void
740 {
742 $ctrl->setParameterByClass("ilObjFileBasedLMGUI", "ref_id", $this->object->getRefId());
743 $ctrl->redirectByClass(["ilrepositorygui", "ilObjFileBasedLMGUI"], "properties");
744 }
redirectByClass( $a_class, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false)
@inheritDoc
setParameterByClass(string $a_class, string $a_parameter, $a_value)
@inheritDoc

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

Referenced by afterSave().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ redrawHeaderAction()

ilObjFileBasedLMGUI::redrawHeaderAction ( )

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

751 : void
752 {
754 }
redrawHeaderActionObject()
Ajax call: redraw action header only.

References ilObjectGUI\redrawHeaderActionObject().

+ Here is the call graph for this function:

◆ saveProperties()

ilObjFileBasedLMGUI::saveProperties ( )

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

335 : void
336 {
337 if (!$this->checkPermissionBool("write")) {
338 $this->error->raiseError($this->lng->txt("permission_denied"), $this->error->MESSAGE);
339 }
340
341 $obj_service = $this->getObjectService();
342
343 $this->initSettingsForm();
344 if ($this->form->checkInput()) {
345 $this->object->setTitle($this->form->getInput("title"));
346 $this->object->setDescription($this->form->getInput("desc"));
347 $this->object->setOfflineStatus(!(bool) $this->form->getInput("cobj_online"));
348
349 $this->object->update();
350
351 // tile image
352 $obj_service->commonSettings()->legacyForm($this->form, $this->object)->saveTileImage();
353
354 // services
356 $this->object->getId(),
357 $this->form,
358 array(
360 )
361 );
362
363 $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"), true);
364 $this->ctrl->redirect($this, "properties");
365 }
366
367 $this->tabs->activateTab("id_settings");
368 $this->form->setValuesByPost();
369 $this->tpl->setContent($this->form->getHTML());
370 }
static updateServiceSettingsForm(int $obj_id, ilPropertyFormGUI $form, array $services)

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

+ Here is the call graph for this function:

◆ setStartFile()

ilObjFileBasedLMGUI::setStartFile ( )

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

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

References Vendor\Package\$e, ilObjectGUI\checkPermissionBool(), ILIAS\Repository\ctrl(), error(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), and ILIAS\Repository\refinery().

+ Here is the call graph for this function:

◆ setTabs()

ilObjFileBasedLMGUI::setTabs ( )
protected

set admin tabs

Reimplemented from ilObjectGUI.

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

522 : void
523 {
524 $this->getTabs();
525 $this->setTitleAndDescription();
526 }
getTabs()
@abstract overwrite in derived GUI class of your object type

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

Referenced by executeCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showInfoScreen()

ilObjFileBasedLMGUI::showInfoScreen ( )

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

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

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

Referenced by executeCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toFilesystem()

ilObjFileBasedLMGUI::toFilesystem ( )

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

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

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

+ Here is the call graph for this function:

◆ update()

ilObjFileBasedLMGUI::update ( )

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

402 : void
403 {
404 $this->updateObject();
405 }
updateObject()
updates object entry in object_data

References ilObjectGUI\updateObject().

+ Here is the call graph for this function:

Field Documentation

◆ $form

ilPropertyFormGUI ilObjFileBasedLMGUI::$form
protected

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

◆ $gui

ILIAS HTMLLearningModule InternalGUIService ilObjFileBasedLMGUI::$gui
protected

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

Referenced by executeCommand().

◆ $help

ilHelpGUI ilObjFileBasedLMGUI::$help
protected

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

Referenced by getTabs().

◆ $irss

ILIAS ResourceStorage Services ilObjFileBasedLMGUI::$irss
private

Definition at line 40 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 39 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 37 of file class.ilObjFileBasedLMGUI.php.

Referenced by executeCommand().


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