19 require_once(
"classes/class.ilObjectGUI.php");
20 require_once(
"./Modules/HTMLLearningModule/classes/class.ilObjFileBasedLM.php");
21 require_once(
"./Services/Table/classes/class.ilTableGUI.php");
22 require_once(
"classes/class.ilFileSystemGUI.php");
38 $this->ctrl->saveParameter($this, array(
"ref_id"));
41 $lng->loadLanguageModule(
"content");
45 $this->output_prepared = $a_prepare_output;
54 global $ilUser, $ilLocator, $ilTabs;
56 $next_class = $this->ctrl->getNextClass($this);
57 $cmd = $this->ctrl->getCmd();
59 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui" ||
66 if (!in_array(
$cmd, array(
"",
"framset")) || $next_class !=
"")
77 if(IS_PAYMENT_ENABLED)
79 include_once
'Services/Payment/classes/class.ilPaymentObject.php';
82 $this->tpl->getStandardTemplate();
84 include_once
'Services/Payment/classes/class.ilShopPurchaseGUI.php';
86 $ret = $this->ctrl->forwardCommand($pp);
96 $ilTabs->activateTab(
'id_meta_data');
97 include_once
'Services/MetaData/classes/class.ilMDEditorGUI.php';
99 $md_gui =&
new ilMDEditorGUI($this->object->getId(), 0, $this->
object->getType());
100 $md_gui->
addObserver($this->
object,
'MDUpdateListener',
'General');
102 $this->ctrl->forwardCommand($md_gui);
105 case "ilfilesystemgui":
107 $ilTabs->activateTab(
'id_list_files');
110 $fs_gui->setTableId(
"htlmfs".$this->object->getId());
111 if ($this->object->getStartFile() !=
"")
113 $fs_gui->labelFile($this->object->getStartFile(),
114 $this->lng->txt(
"cont_startfile"));
116 $fs_gui->addCommand($this,
"setStartFile", $this->lng->txt(
"cont_set_start_file"));
117 $ret =& $this->ctrl->forwardCommand($fs_gui);
120 case "ilinfoscreengui":
124 case "illearningprogressgui":
125 $ilTabs->activateTab(
'id_learning_progress');
126 include_once
'./Services/Tracking/classes/class.ilLearningProgressGUI.php';
128 $this->object->getRefId(),
129 $_GET[
'user_id'] ?
$_GET[
'user_id'] : $ilUser->getId());
130 $this->ctrl->forwardCommand($new_gui);
133 case 'ilpermissiongui':
134 $ilTabs->activateTab(
'id_permissions');
135 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
137 $ret =& $this->ctrl->forwardCommand($perm_gui);
141 $ilTabs->activateTab(
'id_license');
142 include_once(
"./Services/License/classes/class.ilLicenseGUI.php");
144 $ret =& $this->ctrl->forwardCommand($license_gui);
148 $ilTabs->activateTab(
"export");
149 include_once(
"./Services/Export/classes/class.ilExportGUI.php");
151 $exp_gui->addFormat(
"xml");
152 $exp_gui->addFormat(
"html",
"", $this,
"exportHTML");
153 $ret = $this->ctrl->forwardCommand($exp_gui);
157 case "ilcommonactiondispatchergui":
158 include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
160 $this->ctrl->forwardCommand($gui);
164 $cmd = $this->ctrl->getCmd(
"frameset");
165 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui" ||
179 $forms = array(self::CFORM_NEW => $this->
initCreateForm($a_new_type),
202 global $rbacsystem,
$tree,
$tpl, $ilTabs;
204 $ilTabs->activateTab(
"id_settings");
208 $tpl->setContent($this->form->getHTML());
218 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
225 $ti->setRequired(
true);
226 $this->form->addItem($ti);
232 $this->form->addItem($ta);
238 $this->form->addItem($cb);
241 require_once(
"./Modules/HTMLLearningModule/classes/class.ilObjFileBasedLMAccess.php");
245 if ($startfile !=
"")
247 $ne->
setValue(basename($startfile));
251 $ne->setValue(basename($this->lng->txt(
"no_start_file")));
253 $this->form->addItem($ne);
255 $this->form->addCommandButton(
"saveProperties", $lng->txt(
"save"));
256 $this->form->addCommandButton(
"toFilesystem", $lng->txt(
"cont_set_start_file"));
258 $this->form->setTitle($lng->txt(
"cont_lm_properties"));
259 $this->form->setFormAction($ilCtrl->getFormAction($this,
"saveProperties"));
267 require_once(
"./Modules/HTMLLearningModule/classes/class.ilObjFileBasedLMAccess.php");
271 $values[
"cobj_online"] = $this->
object->getOnline();
272 if ($startfile !=
"")
274 $startfile = basename($startfile);
278 $startfile = $this->lng->txt(
"no_start_file");
281 $values[
"cobj_online"] = $this->
object->getOnline();
282 $values[
"startfile"] = $startfile;
283 $values[
"title"] = $this->
object->getTitle();
284 $values[
"desc"] = $this->
object->getDescription();
286 $this->form->setValuesByArray($values);
299 $ilCtrl->redirectByClass(
"ilfilesystemgui",
"listFiles");
310 if ($this->form->checkInput())
312 $this->
object->setTitle($this->form->getInput(
"title"));
313 $this->
object->setDescription($this->form->getInput(
"desc"));
315 $this->
object->update();
317 $this->ctrl->redirect($this,
"properties");
320 $ilTabs->activateTab(
"id_settings");
321 $this->form->setValuesByPost();
322 $tpl->setContent($this->form->getHtml());
334 if (!$rbacsystem->checkAccess(
"visible,write",$this->object->getRefId()))
336 $this->ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
340 $this->tpl->addBlockfile(
"BUTTONS",
"buttons",
"tpl.buttons.html");
370 ilUtil::redirect(
"ilias.php?baseClass=ilHTLMEditorGUI&ref_id=".$newObj->getRefId());
397 $this->
object->setStartFile($a_file);
398 $this->
object->update();
399 $this->ctrl->redirectByClass(
"ilfilesystemgui",
"listFiles");
407 $this->
setFormAction(
"permSave",
"fblm_edit.php?cmd=permSave&ref_id=".
$_GET[
"ref_id"].
408 "&obj_id=".
$_GET[
"obj_id"]);
409 $this->
setFormAction(
"addRole",
"fblm_edit.php?ref_id=".$_GET[
"ref_id"].
410 "&obj_id=".$_GET[
"obj_id"].
"&cmd=addRole");
421 $ilTabs->activateTab(
"id_bib_data");
423 include_once
"./Modules/LearningModule/classes/class.ilBibItemGUI.php";
425 $bib_gui->setObject($this->
object);
426 $bibItemIndex =
$_POST[
"bibItemIndex"] ?
$_POST[
"bibItemIndex"] :
$_GET[
"bibItemIndex"];
428 if ($bibItemIndex < 0)
432 $bibItemIndex = $bib_gui->save($bibItemIndex);
436 $a_target =
"adm_object.php?ref_id=" . $this->
object->getRefId();
439 $bib_gui->edit(
"ADM_CONTENT",
"adm_content", $a_target, $bibItemIndex);
461 $ilTabs->activateTab(
"id_bib_data");
463 include_once
"./Modules/LearningModule/classes/class.ilBibItemGUI.php";
465 $bib_gui->setObject($this->
object);
466 $bibItemIndex =
$_POST[
"bibItemIndex"] ?
$_POST[
"bibItemIndex"] :
$_GET[
"bibItemIndex"];
468 if ($bibItemIndex < 0)
474 $a_target =
"adm_object.php?ref_id=" . $this->
object->getRefId();
477 $bib_gui->edit(
"ADM_CONTENT",
"adm_content", $a_target, $bibItemIndex);
499 $ilTabs->activateTab(
"id_bib_data");
501 include_once
"./Modules/LearningModule/classes/class.ilBibItemGUI.php";
503 $bib_gui->setObject($this->
object);
504 $bibItemIndex =
$_POST[
"bibItemIndex"] ?
$_POST[
"bibItemIndex"] :
$_GET[
"bibItemIndex"];
505 $bib_gui->bib_obj->delete(
$_GET[
"bibItemName"],
$_GET[
"bibItemPath"], $bibItemIndex);
506 if (strpos($bibItemIndex,
",") > 0)
508 $bibItemIndex = substr($bibItemIndex, 0, strpos($bibItemIndex,
","));
512 $a_target =
"adm_object.php?ref_id=" . $this->
object->getRefId();
515 $bib_gui->edit(
"ADM_CONTENT",
"adm_content", $a_target, $bibItemIndex);
537 $ilTabs->activateTab(
"id_bib_data");
539 $bibItemName =
$_POST[
"bibItemName"] ?
$_POST[
"bibItemName"] :
$_GET[
"bibItemName"];
540 $bibItemIndex =
$_POST[
"bibItemIndex"] ?
$_POST[
"bibItemIndex"] :
$_GET[
"bibItemIndex"];
541 if ($bibItemName ==
"BibItem")
543 include_once
"./Modules/LearningModule/classes/class.ilBibItem.php";
545 $bib_item->setId($this->object->getId());
546 $bib_item->setType($this->object->getType());
550 include_once
"./Modules/LearningModule/classes/class.ilBibItemGUI.php";
552 $bib_gui->setObject($this->
object);
553 if ($bibItemIndex ==
"")
555 $bibItemPath =
$_POST[
"bibItemPath"] ?
$_POST[
"bibItemPath"] :
$_GET[
"bibItemPath"];
558 if ($bibItemName !=
"")
560 $bib_gui->bib_obj->add($bibItemName, $bibItemPath, $bibItemIndex);
561 $data = $bib_gui->bib_obj->getElement(
"BibItem");
562 $bibItemIndex = (count(
$data) - 1);
570 $a_target =
"adm_object.php?ref_id=" . $this->
object->getRefId();
573 $bib_gui->edit(
"ADM_CONTENT",
"adm_content", $a_target, $bibItemIndex);
597 $ilCtrl->setCmdClass(
"ilfilesystemgui");
598 $ilCtrl->setCmd(
"listFiles");
614 $this->tpl =
new ilTemplate(
"tpl.main.html",
true,
true);
618 $this->tpl->addBlockFile(
"CONTENT",
"content",
"tpl.explorer.html");
620 require_once (
"./Modules/HTMLLearningModule/classes/class.ilFileExplorer.php");
632 $this->tpl->addBlockFile(
"CONTENT",
"content",
"tpl.adm_content.html");
634 $this->tpl->addBlockFile(
"STATUSLINE",
"statusline",
"tpl.statusline.html");
641 include_once
"Services/License/classes/class.ilLicense.php";
643 $this->
object->getRefId());
646 include_once
"Services/Tracking/classes/class.ilTracking.php";
649 require_once(
"./Modules/HTMLLearningModule/classes/class.ilObjFileBasedLMAccess.php");
651 if ($startfile !=
"")
665 $this->ctrl->setCmd(
"showSummary");
666 $this->ctrl->setCmdClass(
"ilinfoscreengui");
683 global
$ilBench, $ilLocator, $ilAccess, $ilTabs;
685 $ilTabs->activateTab(
'id_info');
687 $this->lng->loadLanguageModule(
"meta");
688 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
691 $info->enablePrivateNotes();
692 $info->enableLearningProgress();
695 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"]))
697 $info->enableNewsEditing();
700 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
701 if ($enable_internal_rss)
703 $info->setBlockProperty(
"news",
"settings",
true);
708 if ($ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"]))
710 $info->addButton($this->lng->txt(
"view"),
711 "ilias.php?baseClass=ilHTLMPresentationGUI&ref_id=".$this->object->getRefID(),
712 ' target="ilContObj'.$this->object->getId().
'" ');
716 $info->addMetaDataSections($this->object->getId(),0, $this->
object->getType());
719 $this->ctrl->forwardCommand($info);
732 $this->tpl->setTitle($this->object->getTitle());
740 global $ilUser, $ilAccess, $ilTabs,
$lng;
742 if($ilAccess->checkAccess(
'write',
'', $this->ref_id))
744 $ilTabs->addTab(
"id_list_files",
745 $lng->txt(
"cont_list_files"),
746 $this->ctrl->getLinkTargetByClass(
"ilfilesystemgui",
"listFiles"));
748 $ilTabs->addTab(
"id_info",
749 $lng->txt(
"info_short"),
750 $this->ctrl->getLinkTargetByClass(array(
"ilobjfilebasedlmgui",
"ilinfoscreengui"),
"showSummary"));
752 $ilTabs->addTab(
"id_settings",
753 $lng->txt(
"settings"),
754 $this->ctrl->getLinkTarget($this,
"properties"));
757 include_once
'./Services/Tracking/classes/class.ilLearningProgressAccess.php';
760 $ilTabs->addTab(
"id_learning_progress",
761 $lng->txt(
"learning_progress"),
762 $this->ctrl->getLinkTargetByClass(array(
'ilobjfilebasedlmgui',
'illearningprogressgui'),
''));
765 include_once(
"Services/License/classes/class.ilLicenseAccess.php");
766 if ($ilAccess->checkAccess(
'edit_permission',
'', $this->ref_id)
769 $ilTabs->addTab(
"id_license",
770 $lng->txt(
"license"),
771 $this->ctrl->getLinkTargetByClass(
'illicensegui',
''));
774 if($ilAccess->checkAccess(
'write',
'', $this->ref_id))
776 $ilTabs->addTab(
"id_meta_data",
777 $lng->txt(
"meta_data"),
778 $this->ctrl->getLinkTargetByClass(
'ilmdeditorgui',
''));
780 $ilTabs->addTab(
"id_bib_data",
781 $lng->txt(
"bib_data"),
782 $this->ctrl->getLinkTarget($this,
"editBibItem"));
787 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
789 $ilTabs->addTab(
"export",
791 $this->ctrl->getLinkTargetByClass(
"ilexportgui",
""));
794 if ($ilAccess->checkAccess(
'edit_permission',
'', $this->object->getRefId()))
796 $ilTabs->addTab(
"id_permissions",
797 $lng->txt(
"perm_settings"),
798 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"));
801 require_once(
"./Modules/HTMLLearningModule/classes/class.ilObjFileBasedLMAccess.php");
804 if ($startfile !=
"")
806 $ilTabs->addNonTabbedLink(
"presentation_view",
807 $this->lng->txt(
"glo_presentation_view"),
808 "ilias.php?baseClass=ilHTLMPresentationGUI&ref_id=".$this->object->getRefID(),
824 if ($ilAccess->checkAccess(
"visible",
"", $a_target))
826 $_GET[
"ref_id"] = $a_target;
827 $_GET[
"cmd"] =
"infoScreen";
828 include(
"repository.php");
831 else if ($ilAccess->checkAccess(
"read",
"", ROOT_FOLDER_ID))
833 $_GET[
"cmd"] =
"frameset";
834 $_GET[
"target"] =
"";
835 $_GET[
"ref_id"] = ROOT_FOLDER_ID;
838 include(
"repository.php");
842 $ilErr->raiseError($lng->txt(
"msg_no_perm_read_lm"), $ilErr->FATAL);
849 if (is_object($this->
object))
851 $ilLocator->addItem($this->object->getTitle(),
852 $this->ctrl->getLinkTargetByClass(
"ilinfoscreengui",
"showSummary"),
"",
$_GET[
"ref_id"]);
888 $ilErr->raiseError($this->lng->txt(
"no_create_permission"));
895 $newObj->setDescription(
"");
897 $newObj->populateByDirectoy($a_dir,
$filename);
916 $inst_id = IL_INST_ID;
918 include_once(
"./Services/Export/classes/class.ilExport.php");
921 $this->
object->getType());
923 $this->
object->getType());
925 $subdir = $this->
object->getType().
"_".$this->
object->getId();
928 $target_dir = $export_dir.
"/".$subdir;
933 $source_dir = $this->
object->getDataDirectory();
939 $zip_file = $export_dir.
"/".$date.
"__".IL_INST_ID.
"__".
940 $this->
object->getType().
"_".$this->
object->getId().
".zip";