34 public function __construct($a_id = 0, $a_id_type = self::REPOSITORY_NODE_ID, $a_parent_node_id = 0)
37 parent::__construct($a_id, $a_id_type, $a_parent_node_id);
50 $ilNavigationHistory = $DIC[
'ilNavigationHistory'];
53 $ilTabs = $DIC[
'ilTabs'];
54 $ilAccess = $DIC[
'ilAccess'];
57 $next_class = $this->ctrl->getNextClass($this);
58 $cmd = $this->ctrl->getCmd();
60 if ($this->id_type == self::WORKSPACE_NODE_ID) {
65 if ($this->id_type == self::REPOSITORY_NODE_ID
68 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $this->node_id);
69 $link =
$ilCtrl->getLinkTargetByClass(
"ilrepositorygui",
"infoScreen");
70 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
$_GET[
"ref_id"]);
73 $ilNavigationHistory->addItem(
83 switch ($next_class) {
84 case "ilinfoscreengui":
88 case 'ilobjectmetadatagui':
90 $ilErr->raiseError($this->lng->txt(
'permission_denied'),
$ilErr->WARNING);
93 $ilTabs->activateTab(
"id_meta");
100 $this->ctrl->forwardCommand($md_gui);
104 case 'ilpermissiongui':
105 $ilTabs->activateTab(
"id_permissions");
107 $ret = $this->ctrl->forwardCommand($perm_gui);
111 $ilTabs->activateTab(
"export");
113 $exp_gui->addFormat(
"xml");
114 $ret = $this->ctrl->forwardCommand($exp_gui);
117 case 'ilobjectcopygui':
119 $cp->setType(
'file');
120 $this->ctrl->forwardCommand($cp);
124 case "ilworkspaceaccessgui":
125 $ilTabs->activateTab(
"id_permissions");
127 $this->ctrl->forwardCommand($wspacc);
130 case "ilcommonactiondispatchergui":
132 $this->ctrl->forwardCommand($gui);
135 case "illearningprogressgui":
136 $ilTabs->activateTab(
'learning_progress');
139 $this->
object->getRefId(),
142 $this->ctrl->forwardCommand($new_gui);
143 $this->tabs_gui->setTabActive(
'learning_progress');
148 if ($this->id_type == self::WORKSPACE_NODE_ID) {
155 $ilTabs->clearTargets();
157 return parent::executeCommand();
179 if ($this->id_type == self::WORKSPACE_NODE_ID) {
181 $this->lng->loadLanguageModule(
"file");
183 $this->ctrl->redirect($this,
"cancel");
196 if ($this->id_type != self::WORKSPACE_NODE_ID) {
213 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
215 $single_form_gui->setMultipart(
true);
219 $in_title->
setInfo($this->lng->txt(
"if_no_title_then_filename"));
222 $single_form_gui->addItem($in_title);
226 $single_form_gui->addItem($in_descr);
231 $single_form_gui->addItem($in_file);
233 $single_form_gui->addCommandButton(
"save", $this->lng->txt($this->type .
"_add"));
234 $single_form_gui->addCommandButton(
"saveAndMeta", $this->lng->txt(
"file_add_and_metadata"));
235 $single_form_gui->addCommandButton(
"cancel",
$lng->txt(
"cancel"));
237 $single_form_gui->setTableWidth(
"600px");
239 $single_form_gui->setTitle($this->lng->txt($this->type .
"_new"));
240 $single_form_gui->setTitleIcon(
ilUtil::getImagePath(
'icon_file.svg'), $this->lng->txt(
'obj_file'));
242 $this->ctrl->setParameter($this,
"new_type",
"file");
244 $single_form_gui->setFormAction($this->ctrl->getFormAction($this,
"save"));
246 return $single_form_gui;
261 $this->ilErr->raiseError($this->lng->txt(
"permission_denied"), $this->ilErr->MESSAGE);
266 if ($single_form_gui->checkInput()) {
267 $title = $single_form_gui->getInput(
"title");
268 $description = $single_form_gui->getInput(
"description");
269 $upload_file = $single_form_gui->getInput(
"upload_file");
272 $title = $upload_file[
"name"];
277 if ($titleExtension != $fileExtension && strlen($fileExtension) > 0) {
278 $title .=
'.' . $fileExtension;
286 $fileObj->setTitle(
$title);
288 $fileObj->setFileName($upload_file[
"name"]);
292 $upload_file[
"name"],
295 $fileObj->setFileSize($upload_file[
"size"]);
296 $this->object_id = $fileObj->create();
301 $fileObj->createDirectory();
302 if (
$result = $fileObj->getUploadFile($upload_file[
"tmp_name"], $upload_file[
"name"])) {
303 $fileObj->setFileName(
$result->getName());
314 if ($this->ctrl->getCmd() ==
"saveAndMeta") {
315 $this->ctrl->setParameter($this,
"new_type",
"");
316 $target = $this->ctrl->getLinkTargetByClass(
array(
"ilobjectmetadatagui",
"ilmdeditorgui"),
"listSection",
"",
false,
false);
319 $this->ctrl->returnToParent($this);
322 $single_form_gui->setValuesByPost();
323 $this->tpl->setContent($single_form_gui->getHTML());
347 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
349 $zip_form_gui->setMultipart(
true);
354 $in_file->setSuffixes(
array(
"zip"));
355 $zip_form_gui->addItem($in_file);
358 $in_str =
new ilCheckboxInputGUI($this->lng->txt(
"take_over_structure"),
"adopt_structure");
359 $in_str->
setInfo($this->lng->txt(
"take_over_structure_info"));
360 $zip_form_gui->addItem($in_str);
362 $zip_form_gui->addCommandButton(
"saveUnzip", $this->lng->txt($this->type .
"_add"));
363 $zip_form_gui->addCommandButton(
"cancel",
$lng->txt(
"cancel"));
365 $zip_form_gui->setTableWidth(
"600px");
367 $zip_form_gui->setTitle($this->lng->txt(
"header_zip"));
368 $zip_form_gui->setTitleIcon(
ilUtil::getImagePath(
'icon_file.svg'), $this->lng->txt(
'obj_file'));
370 $this->ctrl->setParameter($this,
"new_type",
"file");
372 $zip_form_gui->setFormAction($this->ctrl->getFormAction($this,
"saveUnzip"));
374 return $zip_form_gui;
388 if ($zip_form_gui->checkInput()) {
389 $zip_file = $zip_form_gui->getInput(
"zip_file");
390 $adopt_structure = $zip_form_gui->getInput(
"adopt_structure");
392 include_once(
"Services/Utilities/classes/class.ilFileUtils.php");
399 if ($this->id_type != self::WORKSPACE_NODE_ID) {
411 $containerType =
"WorkspaceFolder";
420 $containerType =
"Category";
426 $containerType =
"Folder";
439 $zip_file[
"tmp_name"],
440 ($adopt_structure && $permission),
452 $this->ctrl->returnToParent($this);
454 $zip_form_gui->setValuesByPost();
455 $this->tpl->setContent($zip_form_gui->getHTML());
458 $this->ilErr->raiseError($this->lng->txt(
"permission_denied"), $this->ilErr->MESSAGE);
471 $ilTabs = $DIC[
'ilTabs'];
474 if (!
$form->checkInput()) {
475 $ilTabs->activateTab(
"settings");
476 $form->setValuesByPost();
477 $this->tpl->setContent(
$form->getHTML());
489 if (strlen(trim(
$title)) == 0) {
494 $this->
object->setTitle(
$title);
496 if (!empty(
$data[
"name"])) {
498 switch (
$form->getInput(
'replace')) {
500 $this->
object->deleteVersions();
501 $this->
object->clearDataDirectory();
509 $this->
object->setFileType(
$result->getMimeType());
510 $this->
object->setFileSize(
$result->getSize());
511 $this->
object->setFilename(
$result->getName());
515 $this->
object->setDescription(
$form->getInput(
'description'));
516 $this->
object->setRating(
$form->getInput(
'rating'));
518 $this->
update = $this->
object->update();
521 if (!empty(
$data[
"name"])) {
522 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
531 include_once
'Modules/File/classes/class.ilECSFileSettings.php';
533 $ecs->handleSettingsUpdate();
536 ilUtil::redirect($this->ctrl->getLinkTarget($this,
'versions',
'',
false,
false));
548 $ilTabs = $DIC[
'ilTabs'];
552 $ilErr->raiseError($this->lng->txt(
"msg_no_perm_write"));
555 $ilTabs->activateTab(
"settings");
560 $val[
'title'] = $this->
object->getTitle();
561 $val[
'description'] = $this->
object->getLongDescription();
562 $val[
'rating'] = $this->
object->hasRating();
563 $form->setValuesByArray($val);
566 include_once
'Modules/File/classes/class.ilECSFileSettings.php';
568 $ecs->addSettingsToForm(
$form,
'file');
570 $this->tpl->setContent(
$form->getHTML());
584 include_once(
'./Services/Form/classes/class.ilPropertyFormGUI.php');
586 $this->lng->loadLanguageModule(
'file');
589 $form->setFormAction($this->ctrl->getFormAction($this),
'update');
590 $form->setTitle($this->lng->txt(
'file_edit'));
591 $form->addCommandButton(
'update', $this->lng->txt(
'save'));
592 $form->addCommandButton(
'cancel', $this->lng->txt(
'cancel'));
596 $title->setInfo($this->lng->txt(
"if_no_title_then_filename"));
599 $upload_possible =
true;
600 if ($this->id_type == self::WORKSPACE_NODE_ID) {
604 if ($upload_possible) {
606 $file->setRequired(
false);
612 $replace =
new ilRadioOption($this->lng->txt(
'replace_file'), 1);
613 $replace->
setInfo($this->lng->txt(
'replace_file_info'));
614 $group->addOption($replace);
616 $keep =
new ilRadioOption($this->lng->txt(
'file_new_version'), 0);
617 $keep->
setInfo($this->lng->txt(
'file_new_version_info'));
618 $group->addOption($keep);
620 $file->addSubItem($group);
623 $file->setValue($this->lng->txt(
"personal_workspace_quota_exceeded_warning"));
630 $form->addItem($desc);
632 if ($this->id_type == self::REPOSITORY_NODE_ID) {
633 $this->lng->loadLanguageModule(
'rating');
635 $rate->
setInfo($this->lng->txt(
'rating_activate_rating_info'));
636 $form->addItem($rate);
648 if (ANONYMOUS_USER_ID == $DIC->user()->getId() && isset(
$_GET[
'transaction'])) {
649 $a_hist_entry_id = isset(
$_GET[
"hist_id"]) ?
$_GET[
"hist_id"] : null;
650 $this->
object->sendFile($a_hist_entry_id);
655 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
660 $this->
object->getRefId(),
661 $this->
object->getId(),
662 $DIC->user()->getId()
666 require_once
'Services/Tracking/classes/class.ilLPStatusWrapper.php';
669 $a_hist_entry_id = isset(
$_GET[
"hist_id"]) ?
$_GET[
"hist_id"] : null;
670 $this->
object->sendFile($a_hist_entry_id);
672 $this->ilErr->raiseError($this->lng->txt(
"permission_denied"), $this->ilErr->MESSAGE);
675 $this->ilErr->raiseError($e->getMessage(), $this->ilErr->MESSAGE);
690 $ilTabs = $DIC[
'ilTabs'];
692 $ilTabs->activateTab(
"id_versions");
695 $this->ilErr->raiseError($this->lng->txt(
"permission_denied"), $this->ilErr->MESSAGE);
699 $versions = $this->
object->getVersions();
702 require_once(
"Modules/File/classes/class.ilFileVersionTableGUI.php");
704 $table->setMaxCount(
sizeof($versions));
705 $table->setData($versions);
707 $this->tpl->setVariable(
"ADM_CONTENT",
$table->getHTML());
718 $this->ctrl->setCmd(
"showSummary");
719 $this->ctrl->setCmdClass(
"ilinfoscreengui");
730 $ilTabs = $DIC[
'ilTabs'];
732 $ilToolbar = $DIC[
'ilToolbar'];
734 $ilTabs->activateTab(
"id_info");
737 $ilErr->raiseError($this->lng->txt(
"msg_no_perm_read"));
740 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
745 $this->lng->loadLanguageModule(
"file");
748 include_once
"Services/UIComponent/Button/classes/class.ilLinkButton.php";
750 $button->setCaption(
"file_download");
751 $button->setPrimary(
true);
754 if ($this->id_type == self::REPOSITORY_NODE_ID) {
757 $button->setUrl($this->ctrl->getLinkTarget($this,
"sendfile"));
760 $ilToolbar->addButtonInstance($button);
763 $info->enablePrivateNotes();
770 $info->enableNewsEditing(
false);
773 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
775 if ($enable_internal_rss) {
776 $info->setBlockProperty(
"news",
"settings",
true);
777 $info->setBlockProperty(
"news",
"public_notifications_option",
true);
782 $info->addMetaDataSections($this->
object->getId(), 0, $this->
object->getType());
785 $info->addSection($this->lng->txt(
"file_info"));
786 $info->addProperty($this->lng->txt(
"filename"), $this->
object->getFileName());
787 $info->addProperty($this->lng->txt(
"type"), $this->
object->guessFileType());
790 $info->addProperty($this->lng->txt(
"version"), $this->
object->getVersion());
792 if ($this->
object->getPageCount() > 0) {
793 $info->addProperty($this->lng->txt(
"page_count"), $this->
object->getPageCount());
797 $uploader = $this->
object->getVersions();
798 $uploader = array_shift($uploader);
799 $uploader = $uploader[
"user_id"];
801 $this->lng->loadLanguageModule(
"file");
802 include_once
"Services/User/classes/class.ilUserUtil.php";
806 if ($this->id_type == self::REPOSITORY_NODE_ID && $this->
checkPermissionBool(
"read",
"sendfile")) {
807 $tpl =
new ilTemplate(
"tpl.download_link.html",
true,
true,
"Modules/File");
809 $info->addProperty($this->lng->txt(
"download_link"),
$tpl->get());
812 if ($this->id_type == self::WORKSPACE_NODE_ID) {
817 include_once(
"./Services/Preview/classes/class.ilPreview.php");
818 if (!$this->ctrl->isAsynch()
822 include_once(
"./Services/Preview/classes/class.ilPreviewGUI.php");
826 switch ($this->id_type) {
827 case self::WORKSPACE_NODE_ID:
828 case self::WORKSPACE_OBJECT_ID:
838 $info->addProperty($this->lng->txt(
"preview"),
$preview->getInlineHTML());
844 $this->ctrl->forwardCommand(
$info);
852 $ilTabs = $DIC[
'ilTabs'];
854 $ilHelp = $DIC[
'ilHelp'];
856 $ilHelp->setScreenIdComponent(
"file");
858 $this->ctrl->setParameter($this,
"ref_id", $this->node_id);
863 $lng->txt(
"info_short"),
864 $this->ctrl->getLinkTargetByClass(
array(
"ilobjfilegui",
"ilinfoscreengui"),
"showSummary")
872 $this->ctrl->getLinkTarget($this,
"edit")
879 $lng->txt(
"versions"),
880 $this->ctrl->getLinkTarget($this,
"versions")
884 require_once
'Services/Tracking/classes/class.ilLearningProgressAccess.php';
888 $lng->txt(
'learning_progress'),
889 $this->ctrl->getLinkTargetByClass(
array(__CLASS__,
'illearningprogressgui'),
'')
895 include_once
"Services/Object/classes/class.ilObjectMetaDataGUI.php";
897 $mdtab = $mdgui->getTab();
901 $lng->txt(
"meta_data"),
912 $this->ctrl->getLinkTargetByClass(
"ilexportgui",
"")
921 public static function _goto($a_target, $a_additional = null)
926 $ilAccess = $DIC[
'ilAccess'];
928 if ($a_additional && substr($a_additional, -3) ==
"wsp") {
929 $_GET[
"baseClass"] =
"ilsharedresourceGUI";
930 $_GET[
"wsp_id"] = $a_target;
931 include(
"ilias.php");
936 if ($a_additional && substr($a_additional, -8) ==
"download") {
942 if ($ilAccess->checkAccess(
"visible",
"", $a_target)
943 || $ilAccess->checkAccess(
"read",
"", $a_target)
947 if ($ilAccess->checkAccess(
"read",
"", ROOT_FOLDER_ID)) {
949 $lng->txt(
"msg_no_perm_read_item"),
966 $ilLocator = $DIC[
'ilLocator'];
968 if (is_object($this->
object)) {
969 $ilLocator->addItem($this->
object->getTitle(), $this->ctrl->getLinkTarget($this,
""),
"",
$this->node_id);
981 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
983 $dnd_form_gui->setMultipart(
true);
984 $dnd_form_gui->setHideLabels();
987 include_once(
"Services/Form/classes/class.ilDragDropFileInputGUI.php");
990 $dnd_input->setCommandButtonNames(
"uploadFiles",
"cancel");
991 $dnd_form_gui->addItem($dnd_input);
994 $dnd_form_gui->addCommandButton(
"uploadFiles", $this->lng->txt(
"upload_files"));
995 $dnd_form_gui->addCommandButton(
"cancel", $this->lng->txt(
"cancel"));
997 $dnd_form_gui->setTableWidth(
"100%");
999 $dnd_form_gui->setTitle($this->lng->txt(
"upload_files_title"));
1000 $dnd_form_gui->setTitleIcon(
ilUtil::getImagePath(
'icon_file.gif'), $this->lng->txt(
'obj_file'));
1002 $this->ctrl->setParameter($this,
"new_type",
"file");
1003 $dnd_form_gui->setFormAction($this->ctrl->getFormAction($this,
"uploadFiles"));
1005 return $dnd_form_gui;
1023 $after_creation_callback = (int) $_REQUEST[
"crtcb"];
1024 if ($after_creation_callback) {
1025 $this->after_creation_callback_objects =
array();
1026 unset($_REQUEST[
"crtcb"]);
1031 if ($dnd_form_gui->checkInput()) {
1034 $response->error = $this->lng->txt(
"permission_denied");
1037 $inp = $dnd_form_gui->getInput(
"upload_files");
1038 $this->log->debug(
"ilObjFileGUI::uploadFiles " . print_r(
$_POST,
true));
1039 $this->log->debug(
"ilObjFileGUI::uploadFiles " . print_r($_FILES,
true));
1049 $dnd_input = $dnd_form_gui->getItemByPostVar(
"upload_files");
1050 $response->error = $dnd_input->getAlert();
1053 if ($after_creation_callback
1054 &&
sizeof($this->after_creation_callback_objects)
1056 foreach ($this->after_creation_callback_objects as $new_file_obj) {
1059 unset($this->after_creation_callback_objects);
1064 header(
'Content-type: text/plain');
1066 foreach ($DIC->upload()->getResults() as
$result) {
1068 $this->lng->loadLanguageModule(
'file');
1069 ilUtil::sendInfo($this->lng->txt(
'file_upload_info_file_with_critical_unknown_extension_later_renamed_when_downloading'),
true);
1094 $temp_name = $file_upload[
"tmp_name"];
1113 $adopt_structure = $keep_structure;
1115 include_once(
"Services/Utilities/classes/class.ilFileUtils.php");
1122 if ($this->id_type != self::WORKSPACE_NODE_ID) {
1134 $containerType =
"WorkspaceFolder";
1143 $containerType =
"Category";
1149 $containerType =
"Folder";
1164 ($adopt_structure && $permission),
1179 if ($this->id_type != self::WORKSPACE_NODE_ID) {
1181 if ($parent_ref_id != $this->parent_id) {
1185 foreach ($objects as
$object) {
1186 $this->after_creation_callback_objects[] =
$object;
1191 if (trim(
$title) ==
"") {
1197 if ($titleExtension != $fileExtension && strlen($fileExtension) > 0) {
1198 $title .=
'.' . $fileExtension;
1205 $fileObj->setTitle(
$title);
1210 $fileObj->setFileSize(
$size);
1211 $this->object_id = $fileObj->create();
1216 if (is_array($this->after_creation_callback_objects)) {
1217 $this->after_creation_callback_objects[] = $fileObj;
1221 $fileObj->createDirectory();
1222 $fileObj->raiseUploadError(
false);
1226 if (empty($fileObj->getTitle())) {
1227 $fileObj->setTitle(
$result->getName());
1229 $fileObj->setFileName(
$result->getName());
1247 $ilTabs = $DIC[
'ilTabs'];
1248 $ilLocator = $DIC[
'ilLocator'];
1252 $request = $DIC->http()->request();
1255 if (isset($request->getQueryParams()[
'hist_id'])) {
1256 $version_ids = [$request->getQueryParams()[
'hist_id']];
1257 } elseif (isset($request->getParsedBody()[
'hist_id'])) {
1258 $version_ids = (
array) $request->getParsedBody()[
'hist_id'];
1261 if (count($version_ids) < 1) {
1263 $this->ctrl->redirect($this,
"versions");
1265 $ilTabs->activateTab(
"id_versions");
1268 $versionsToKeep = array_udiff($this->
object->getVersions(), $version_ids,
array($this,
"compareHistoryIds"));
1269 if (count($versionsToKeep) < 1) {
1274 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
1276 $conf_gui->setFormAction($this->ctrl->getFormAction($this,
"versions"));
1277 $conf_gui->setCancel($this->lng->txt(
"cancel"),
"cancelDeleteFile");
1278 $conf_gui->setConfirm($this->lng->txt(
"confirm"),
"confirmDeleteFile");
1283 $this->
object->getTitle(),
1285 $this->lng->txt(
"icon") .
" " . $this->lng->txt(
"obj_" . $this->
object->getType())
1288 $html = $conf_gui->getHTML();
1290 include_once(
"./Modules/File/classes/class.ilFileVersionTableGUI.php");
1293 $versions = $this->
object->getVersions($version_ids);
1296 $table->setMaxCount(
sizeof($versions));
1297 $table->setData($versions);
1302 $this->tpl->setVariable(
'ADM_CONTENT',
$html);
1313 $ilTabs = $DIC[
'ilTabs'];
1317 $this->ilErr->raiseError($this->lng->txt(
"permission_denied"), $this->ilErr->MESSAGE);
1321 if (count(
$_POST[
"hist_id"]) > 0) {
1322 $this->
object->deleteVersions(
$_POST[
"hist_id"]);
1326 $this->ctrl->setParameter($this,
"hist_id",
"");
1327 $this->ctrl->redirect($this,
"versions");
1336 $this->ctrl->redirect($this,
"versions");
1347 $this->ilErr->raiseError($this->lng->txt(
"permission_denied"), $this->ilErr->MESSAGE);
1351 include_once(
"./Services/Repository/classes/class.ilRepUtilGUI.php");
1353 $ru->deleteObjects($this->parent_id,
array($this->ref_id));
1356 $this->ctrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $this->parent_id);
1357 $this->ctrl->redirectByClass(
"ilrepositorygui");
1366 $this->ctrl->redirect($this,
"versions");
1380 if (is_array($v1)) {
1381 $v1 = (int) $v1[
"hist_entry_id"];
1388 if (is_array($v2)) {
1389 $v2 = (int) $v2[
"hist_entry_id"];
1406 $ilTabs = $DIC[
'ilTabs'];
1410 $this->ilErr->raiseError($this->lng->txt(
"permission_denied"), $this->ilErr->MESSAGE);
1418 if (count($version_ids) != 1) {
1420 $this->ctrl->redirect($this,
"versions");
1424 $new_version = $this->
object->rollback($version_ids[0]);
1426 ilUtil::sendSuccess(sprintf($this->lng->txt(
"file_rollback_done"), $new_version[
"rollback_version"]),
true);
1427 $this->ctrl->redirect($this,
"versions");
1433 $lg = parent::initHeaderAction($a_sub_type, $a_sub_id);
1434 if (is_object(
$lg)) {
1435 if ($this->
object->hasRating()) {
1440 array(
"ilcommonactiondispatchergui",
"ilratinggui")
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static _getIcon( $a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
initSingleUploadForm()
FORM: Init single upload form.
static _recordReadEvent( $a_type, $a_ref_id, $obj_id, $usr_id, $isCatchupWriteEvents=true, $a_ext_rc=false, $a_ext_time=false)
Records a read event and catches up with write events.
This class represents an option in a radio group.
infoScreenForward()
show information screen
static _getPermanentDownloadLink($ref_id)
Gets the permanent download link for the file.
handleFileUpload($file_upload)
Handles the upload of a single file and adds it to the parent object.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
New implementation of ilObjectGUI.
rollbackVersion()
Performs a rollback with the selected file version.
GUI class for the workflow of copying objects.
initCreationForms($a_new_type)
cancelDeleteFile()
Cancels the file deletion.
const TITLE_LENGTH
max length of object title
static hasValidExtension($a_filename)
getAccessHandler()
Get access handler.
static _getFileExtension($a_file_name)
Gets the file extension of the specified file name.
static _updateStatus($a_obj_id, $a_usr_id, $a_obj=null, $a_percentage=false, $a_force_raise=false)
Update status.
static _recordWriteEvent($obj_id, $usr_id, $action, $parent_obj_id=null)
Records a write event.
initZipUploadForm($a_mode="create")
FORM: Init zip upload form.
getPermanentLinkWidget($a_append=null, $a_center=false)
fillCloneTemplate($a_tpl_varname, $a_type)
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
static _lookupTitle($a_id)
lookup object title
setInfo($a_info)
Set Info.
static _goto($a_target, $a_additional=null)
static _catchupWriteEvents($obj_id, $usr_id, $timestamp=null)
Catches up with all write events which occured before the specified timestamp.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
compareHistoryIds($v1, $v2)
Compares two versions either by passing a history entry or an id.
static getMimeType($a_file='', $a_filename='', $a_mime='')
Export User Interface Class.
static checkAccess($a_ref_id, $a_allow_only_read=true)
check access to learning progress
initImportForm($a_new_type)
Init object import form.
static hasPreview($a_obj_id, $a_type="")
Determines whether the object with the specified reference id has a preview.
if(isset($_POST['submit'])) $form
initHeaderAction($a_sub_type=null, $a_sub_id=null)
static _gotoRepositoryNode($a_ref_id, $a_cmd="frameset")
Goto repository root.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
__construct($a_id=0, $a_id_type=self::REPOSITORY_NODE_ID, $a_parent_node_id=0)
Constructor.
confirmDeleteFile()
Deletes this file object.
static _lookupObjId($a_id)
special template class to simplify handling of ITX/PEAR
handleAutoRating(ilObject $a_new_obj)
Repository GUI Utilities.
This class represents a text property in a property form.
static processZipFile($a_directory, $a_file, $structure, $ref_id=null, $containerType=null, $tree=null, $access_handler=null)
unzips in given directory and processes uploaded zip for use as single files
static isUploadPossible($a_additional_size=null)
uploadFiles()
Called after a file was uploaded.
saveUnzip()
saveUnzip object
static handleAfterSaveCallback(ilObject $a_obj, $a_callback_ref_id)
After creation callback.
getTargetFrame($a_cmd, $a_target_frame="")
Add a drawing to the header
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static getNamePresentation( $a_user_id, $a_user_image=false, $a_profile_link=false, $a_profile_back_link="", $a_force_first_lastname=false, $a_omit_login=false, $a_sortable=true, $a_return_data_array=false, $a_ctrl_path="ilpublicuserprofilegui")
Default behaviour is:
static sendQuestion($a_info="", $a_keep=false)
Send Question to Screen.
Create styles array
The data for the language used.
static _lookupType($a_id, $a_reference=false)
lookup object type
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static makeDir($a_dir)
creates a new directory and inherits all filesystem permissions of the parent directory You may pass ...
putObjectInTree(ilObject $a_obj, $a_parent_node_id=null)
Add object to tree at given position.
static ilTempnam($a_temp_path=null)
Create a temporary file in an ILIAS writable directory.
static _lookupFileSize($a_id)
Lookups the file size of the file in bytes.
This class represents a non editable value in a property form.
setRows($a_rows)
Set Rows.
Create new PHPExcel object
obj_idprivate
infoScreen()
this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually...
GUI class for file objects.
const LP_CONTEXT_REPOSITORY
This class represents a text area property in a property form.
confirmDeleteVersions()
Deletes the file versions that were confirmed by the user.
prepareOutput($a_show_subobjects=true)
initMultiUploadForm()
Initializes the upload form for multiple files.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
static getLogger($a_component_id)
Get component logger.
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file
static formatSize($size, $a_mode='short', $a_lng=null)
Returns the specified file size value in a human friendly form.
deleteVersions()
Displays a confirmation screen with selected file versions that should be deleted.
if(empty($password)) $table
cancelDeleteVersions()
Cancels the file version deletion.
static redirect($a_script)
versions()
file versions/history
addHeaderAction()
Add header action menu.
static delDir($a_dir, $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively
Class ilObjUserTrackingGUI.
Class ilFileVersionTableGUI.
Class FlySystemFileAccessTest.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
static isDragAndDropUploadEnabled()
Gets whether drag and drop file upload is enabled.
update()
updates object entry in object_data
Class to report exception.
Confirmation screen class.