38 require_once(
"classes/class.ilObjectGUI.php");
39 require_once(
"./Modules/HTMLLearningModule/classes/class.ilObjFileBasedLM.php");
40 require_once(
"./Services/Table/classes/class.ilTableGUI.php");
41 require_once(
"classes/class.ilFileSystemGUI.php");
57 $this->ctrl->saveParameter($this, array(
"ref_id"));
59 #include_once("classes/class.ilTabsGUI.php");
60 #$this->tabs_gui =& new ilTabsGUI();
63 $lng->loadLanguageModule(
"content");
67 $this->output_prepared = $a_prepare_output;
76 global $ilUser, $ilLocator;
78 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui" ||
90 $next_class = $this->ctrl->getNextClass($this);
91 $cmd = $this->ctrl->getCmd();
95 include_once
'payment/classes/class.ilPaymentObject.php';
99 $this->tpl->getStandardTemplate();
101 include_once
'Services/Payment/classes/class.ilShopPurchaseGUI.php';
103 $ret = $this->ctrl->forwardCommand($pp);
110 case 'ilmdeditorgui':
112 include_once
'Services/MetaData/classes/class.ilMDEditorGUI.php';
114 $md_gui =&
new ilMDEditorGUI($this->object->getId(), 0, $this->
object->getType());
115 $md_gui->
addObserver($this->
object,
'MDUpdateListener',
'General');
117 $this->ctrl->forwardCommand($md_gui);
120 case "ilfilesystemgui":
124 $fs_gui->setTableId(
"htlmfs".$this->object->getId());
125 if ($this->object->getStartFile() !=
"")
127 $fs_gui->labelFile($this->object->getStartFile(),
128 $this->lng->txt(
"cont_startfile"));
130 $fs_gui->addCommand($this,
"setStartFile", $this->lng->txt(
"cont_set_start_file"));
131 $ret =& $this->ctrl->forwardCommand($fs_gui);
134 case "ilinfoscreengui":
138 case "illearningprogressgui":
139 include_once
'./Services/Tracking/classes/class.ilLearningProgressGUI.php';
142 $this->object->getRefId(),
143 $_GET[
'user_id'] ?
$_GET[
'user_id'] : $ilUser->getId());
144 $this->ctrl->forwardCommand($new_gui);
145 $this->tabs_gui->setTabActive(
'learning_progress');
148 case 'ilpermissiongui':
149 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
151 $ret =& $this->ctrl->forwardCommand($perm_gui);
155 include_once(
"./Services/License/classes/class.ilLicenseGUI.php");
157 $ret =& $this->ctrl->forwardCommand($license_gui);
161 $cmd = $this->ctrl->getCmd(
"frameset");
162 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui" ||
180 global $rbacsystem,
$tpl;
184 if (!$rbacsystem->checkAccess(
"create",
$_GET[
"ref_id"], $new_type))
186 $this->ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
190 $this->ctrl->setParameter($this,
"new_type", $new_type);
192 $tpl->setContent($this->form->getHTML());
194 $tpl->setContent($this->form->getHTML().$clone_html);
211 if (!$rbacsystem->checkAccess(
"create",
$_GET[
"ref_id"], $new_type))
213 $this->ilias->raiseError($this->lng->txt(
"no_create_permission"), $this->ilias->error_obj->MESSAGE);
215 $this->ctrl->setParameter($this,
"new_type", $new_type);
217 if ($this->form->checkInput())
220 $location = $objDefinition->getLocation($new_type);
223 $class_name =
"ilObj".$objDefinition->getClassName($new_type);
224 include_once(
$location.
"/class.".$class_name.
".php");
225 $newObj =
new $class_name();
226 $newObj->setType($new_type);
230 $newObj->createReference();
231 $newObj->putInTree(
$_GET[
"ref_id"]);
232 $newObj->setPermissions(
$_GET[
"ref_id"]);
238 $this->form->setValuesByPost();
239 $tpl->setContent($this->form->getHtml());
251 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
253 $this->form->setTarget(
"_top");
259 $ti->setRequired(
true);
260 $this->form->addItem($ti);
266 $this->form->addItem($ta);
269 if ($a_mode ==
"create")
271 $this->form->addCommandButton(
"save", $lng->txt($a_new_type.
"_add"));
272 $this->form->addCommandButton(
"cancelCreation", $lng->txt(
"cancel"));
273 $this->form->setTitle($lng->txt($a_new_type.
"_new"));
277 $this->form->addCommandButton(
"update", $lng->txt(
"save"));
278 $this->form->addCommandButton(
"cancelUpdate", $lng->txt(
"cancel"));
279 $this->form->setTitle($lng->txt(
"edit"));
282 $this->form->setFormAction($ilCtrl->getFormAction($this));
291 $values[
"title"] = $this->
object->getTitle();
292 $values[
"desc"] = $this->
object->getDescription();
293 $this->form->setValuesByArray($values);
316 $this->tpl->addBlockfile(
"BUTTONS",
"buttons",
"tpl.buttons.html");
319 require_once(
"./Modules/HTMLLearningModule/classes/class.ilObjFileBasedLMAccess.php");
322 if ($startfile !=
"")
324 $this->tpl->setCurrentBlock(
"btn_cell");
325 $this->tpl->setVariable(
"BTN_LINK",
326 "ilias.php?baseClass=ilHTLMPresentationGUI&ref_id=".$this->object->getRefID());
327 $this->tpl->setVariable(
"BTN_TARGET",
" target=\"ilContObj".$this->object->getID().
"\" ");
328 $this->tpl->setVariable(
"BTN_TXT",$this->lng->txt(
"view"));
329 $this->tpl->parseCurrentBlock();
333 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.fblm_properties.html",
334 'Modules/HTMLLearningModule');
335 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
336 $this->tpl->setVariable(
"TXT_PROPERTIES", $this->lng->txt(
"cont_lm_properties"));
339 $this->tpl->setVariable(
"TXT_ONLINE", $this->lng->txt(
"cont_online"));
340 $this->tpl->setVariable(
"CBOX_ONLINE",
"cobj_online");
341 $this->tpl->setVariable(
"VAL_ONLINE",
"y");
342 if ($this->object->getOnline())
344 $this->tpl->setVariable(
"CHK_ONLINE",
"checked");
348 $this->tpl->setVariable(
"TXT_START_FILE", $this->lng->txt(
"cont_startfile"));
349 if ($startfile !=
"")
351 $this->tpl->setVariable(
"VAL_START_FILE", basename($startfile));
355 $this->tpl->setVariable(
"VAL_START_FILE", $this->lng->txt(
"no_start_file"));
357 $this->tpl->setVariable(
"TXT_SET_START_FILE", $this->lng->txt(
"cont_set_start_file"));
358 $this->tpl->setVariable(
"LINK_SET_START_FILE",
359 $this->ctrl->getLinkTargetByClass(
"ilfilesystemgui",
"listFiles"));
361 $this->tpl->setCurrentBlock(
"commands");
362 $this->tpl->setVariable(
"BTN_NAME",
"saveProperties");
363 $this->tpl->setVariable(
"BTN_TEXT", $this->lng->txt(
"save"));
364 $this->tpl->parseCurrentBlock();
374 $this->
object->update();
376 $this->ctrl->redirect($this,
"properties");
388 if (!$rbacsystem->checkAccess(
"visible,write",$this->object->getRefId()))
390 $this->ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
394 $this->tpl->addBlockfile(
"BUTTONS",
"buttons",
"tpl.buttons.html");
425 ilUtil::redirect(
"ilias.php?baseClass=ilHTLMEditorGUI&ref_id=".$newObj->getRefId());
453 $this->
object->setStartFile($a_file);
454 $this->
object->update();
455 $this->ctrl->redirectByClass(
"ilfilesystemgui",
"listFiles");
463 $this->
setFormAction(
"permSave",
"fblm_edit.php?cmd=permSave&ref_id=".
$_GET[
"ref_id"].
464 "&obj_id=".
$_GET[
"obj_id"]);
465 $this->
setFormAction(
"addRole",
"fblm_edit.php?ref_id=".$_GET[
"ref_id"].
466 "&obj_id=".$_GET[
"obj_id"].
"&cmd=addRole");
475 include_once
"./Modules/LearningModule/classes/class.ilBibItemGUI.php";
477 $bib_gui->setObject($this->
object);
478 $bibItemIndex =
$_POST[
"bibItemIndex"] ?
$_POST[
"bibItemIndex"] :
$_GET[
"bibItemIndex"];
480 if ($bibItemIndex < 0)
484 $bibItemIndex = $bib_gui->save($bibItemIndex);
488 $a_target =
"adm_object.php?ref_id=" . $this->
object->getRefId();
491 $bib_gui->edit(
"ADM_CONTENT",
"adm_content", $a_target, $bibItemIndex);
511 include_once
"./Modules/LearningModule/classes/class.ilBibItemGUI.php";
513 $bib_gui->setObject($this->
object);
514 $bibItemIndex =
$_POST[
"bibItemIndex"] ?
$_POST[
"bibItemIndex"] :
$_GET[
"bibItemIndex"];
516 if ($bibItemIndex < 0)
522 $a_target =
"adm_object.php?ref_id=" . $this->
object->getRefId();
525 $bib_gui->edit(
"ADM_CONTENT",
"adm_content", $a_target, $bibItemIndex);
545 include_once
"./Modules/LearningModule/classes/class.ilBibItemGUI.php";
547 $bib_gui->setObject($this->
object);
548 $bibItemIndex =
$_POST[
"bibItemIndex"] ?
$_POST[
"bibItemIndex"] :
$_GET[
"bibItemIndex"];
549 $bib_gui->bib_obj->delete(
$_GET[
"bibItemName"],
$_GET[
"bibItemPath"], $bibItemIndex);
550 if (strpos($bibItemIndex,
",") > 0)
552 $bibItemIndex = substr($bibItemIndex, 0, strpos($bibItemIndex,
","));
556 $a_target =
"adm_object.php?ref_id=" . $this->
object->getRefId();
559 $bib_gui->edit(
"ADM_CONTENT",
"adm_content", $a_target, $bibItemIndex);
579 $bibItemName =
$_POST[
"bibItemName"] ?
$_POST[
"bibItemName"] :
$_GET[
"bibItemName"];
580 $bibItemIndex =
$_POST[
"bibItemIndex"] ?
$_POST[
"bibItemIndex"] :
$_GET[
"bibItemIndex"];
581 if ($bibItemName ==
"BibItem")
583 include_once
"./Modules/LearningModule/classes/class.ilBibItem.php";
585 $bib_item->setId($this->object->getId());
586 $bib_item->setType($this->object->getType());
590 include_once
"./Modules/LearningModule/classes/class.ilBibItemGUI.php";
592 $bib_gui->setObject($this->
object);
593 if ($bibItemIndex ==
"")
595 $bibItemPath =
$_POST[
"bibItemPath"] ?
$_POST[
"bibItemPath"] :
$_GET[
"bibItemPath"];
598 if ($bibItemName !=
"")
600 $bib_gui->bib_obj->add($bibItemName, $bibItemPath, $bibItemIndex);
601 $data = $bib_gui->bib_obj->getElement(
"BibItem");
602 $bibItemIndex = (count(
$data) - 1);
610 $a_target =
"adm_object.php?ref_id=" . $this->
object->getRefId();
613 $bib_gui->edit(
"ADM_CONTENT",
"adm_content", $a_target, $bibItemIndex);
635 $this->tpl =
new ilTemplate(
"tpl.fblm_edit_frameset.html",
false,
false,
636 "Modules/HTMLLearningModule");
637 $this->tpl->setVariable(
"HREF_FILES",$this->ctrl->getLinkTargetByClass(
638 "ilfilesystemgui",
"listFiles"));
648 $this->tpl =
new ilTemplate(
"tpl.main.html",
true,
true);
652 $this->tpl->addBlockFile(
"CONTENT",
"content",
"tpl.explorer.html");
654 require_once (
"./Modules/HTMLLearningModule/classes/class.ilFileExplorer.php");
666 $this->tpl->addBlockFile(
"CONTENT",
"content",
"tpl.adm_content.html");
668 $this->tpl->addBlockFile(
"STATUSLINE",
"statusline",
"tpl.statusline.html");
675 include_once
"Services/License/classes/class.ilLicense.php";
679 include_once
"Services/Tracking/classes/class.ilTracking.php";
682 require_once(
"./Modules/HTMLLearningModule/classes/class.ilObjFileBasedLMAccess.php");
684 if ($startfile !=
"")
698 $this->ctrl->setCmd(
"showSummary");
699 $this->ctrl->setCmdClass(
"ilinfoscreengui");
716 global
$ilBench, $ilLocator, $ilAccess;
719 $this->tabs_gui->setTabActive(
'info_short');
721 $this->lng->loadLanguageModule(
"meta");
722 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
725 $info->enablePrivateNotes();
726 $info->enableLearningProgress();
729 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"]))
731 $info->enableNewsEditing();
734 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
735 if ($enable_internal_rss)
737 $info->setBlockProperty(
"news",
"settings",
true);
742 if ($ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"]))
744 $info->addButton($this->lng->txt(
"view"),
745 "ilias.php?baseClass=ilHTLMPresentationGUI&ref_id=".$this->object->getRefID(),
746 ' target="ilContObj'.$this->object->getId().
'" ');
750 $info->addMetaDataSections($this->object->getId(),0, $this->
object->getType());
753 $this->ctrl->forwardCommand($info);
763 $this->tpl->setCurrentBlock(
"header_image");
765 $this->tpl->parseCurrentBlock();
767 $this->
getTabs($this->tabs_gui);
768 #$this->tpl->setVariable("TABS", $this->tabs_gui->getHTML());
769 $this->tpl->setVariable(
"HEADER", $this->object->getTitle());
779 global $rbacsystem,$ilUser;
782 if($rbacsystem->checkAccess(
'write',$this->ref_id))
785 $tabs_gui->addTarget(
"cont_list_files",
786 $this->ctrl->getLinkTargetByClass(
"ilfilesystemgui",
"listFiles"),
"",
790 $force_active = (strtolower(
$_GET[
"cmdClass"]) ==
"ilinfoscreengui"
791 || strtolower(
$_GET[
"cmdClass"]) ==
"ilnotegui")
794 $tabs_gui->addTarget(
"info_short",
795 $this->ctrl->getLinkTargetByClass(array(
"ilobjfilebasedlmgui",
804 $tabs_gui->addTarget(
"properties",
805 $this->ctrl->getLinkTarget($this,
"properties"),
"properties",
808 $tabs_gui->addTarget(
"meta_data",
809 $this->ctrl->getLinkTargetByClass(
'ilmdeditorgui',
''),
810 "",
"ilmdeditorgui");
813 $tabs_gui->addTarget(
"bib_data",
814 $this->ctrl->getLinkTarget($this,
"editBibItem"),
815 array(
"editBibItem",
"saveBibItem",
"deleteBibItem",
"addBibItem"),
820 include_once
'./Services/Tracking/classes/class.ilLearningProgressAccess.php';
823 $tabs_gui->addTarget(
'learning_progress',
824 $this->ctrl->getLinkTargetByClass(array(
'ilobjfilebasedlmgui',
'illearningprogressgui'),
''),
826 array(
'illplistofobjectsgui',
'illplistofsettingsgui',
'illearningprogressgui',
'illplistofprogressgui'));
829 include_once(
"Services/License/classes/class.ilLicenseAccess.php");
830 if ($rbacsystem->checkAccess(
'edit_permission',$this->ref_id)
833 $tabs_gui->addTarget(
"license",
834 $this->ctrl->getLinkTargetByClass(
'illicensegui',
''),
839 if ($rbacsystem->checkAccess(
'edit_permission',$this->object->getRefId()))
841 $tabs_gui->addTarget(
"perm_settings",
842 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"), array(
"perm",
"info",
"owner"),
'ilpermissiongui');
855 if ($ilAccess->checkAccess(
"visible",
"", $a_target))
857 $_GET[
"ref_id"] = $a_target;
858 $_GET[
"cmd"] =
"infoScreen";
859 include(
"repository.php");
862 else if ($ilAccess->checkAccess(
"read",
"", ROOT_FOLDER_ID))
864 $_GET[
"cmd"] =
"frameset";
865 $_GET[
"target"] =
"";
866 $_GET[
"ref_id"] = ROOT_FOLDER_ID;
869 include(
"repository.php");
873 $ilErr->raiseError($lng->txt(
"msg_no_perm_read_lm"), $ilErr->FATAL);
880 if (is_object($this->
object))
882 $ilLocator->addItem($this->object->getTitle(),
883 $this->ctrl->getLinkTargetByClass(
"ilinfoscreengui",
"showSummary"),
"",
$_GET[
"ref_id"]);