37 require_once(
"classes/class.ilObjectGUI.php");
38 require_once(
"./Modules/HTMLLearningModule/classes/class.ilObjFileBasedLM.php");
39 require_once(
"./Services/Table/classes/class.ilTableGUI.php");
40 require_once(
"classes/class.ilFileSystemGUI.php");
56 $this->ctrl->saveParameter($this, array(
"ref_id"));
58 #include_once("classes/class.ilTabsGUI.php");
59 #$this->tabs_gui =& new ilTabsGUI();
62 $lng->loadLanguageModule(
"content");
66 $this->output_prepared = $a_prepare_output;
75 global $ilUser, $ilLocator;
77 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui" ||
89 $next_class = $this->ctrl->getNextClass($this);
90 $cmd = $this->ctrl->getCmd();
94 include_once
'payment/classes/class.ilPaymentObject.php';
98 $this->tpl->getStandardTemplate();
100 include_once
'Services/Payment/classes/class.ilShopPurchaseGUI.php';
102 $ret = $this->ctrl->forwardCommand($pp);
109 case 'ilmdeditorgui':
111 include_once
'Services/MetaData/classes/class.ilMDEditorGUI.php';
113 $md_gui =&
new ilMDEditorGUI($this->object->getId(), 0, $this->
object->getType());
114 $md_gui->
addObserver($this->
object,
'MDUpdateListener',
'General');
116 $this->ctrl->forwardCommand($md_gui);
119 case "ilfilesystemgui":
122 if ($this->object->getStartFile() !=
"")
124 $fs_gui->labelFile($this->object->getStartFile(),
125 $this->lng->txt(
"cont_startfile"));
127 $fs_gui->addCommand($this,
"setStartFile", $this->lng->txt(
"cont_set_start_file"));
128 $ret =& $this->ctrl->forwardCommand($fs_gui);
131 case "ilinfoscreengui":
135 case "illearningprogressgui":
136 include_once
'./Services/Tracking/classes/class.ilLearningProgressGUI.php';
139 $this->object->getRefId(),
140 $_GET[
'user_id'] ?
$_GET[
'user_id'] : $ilUser->getId());
141 $this->ctrl->forwardCommand($new_gui);
142 $this->tabs_gui->setTabActive(
'learning_progress');
145 case 'ilpermissiongui':
146 include_once(
"./classes/class.ilPermissionGUI.php");
148 $ret =& $this->ctrl->forwardCommand($perm_gui);
152 $cmd = $this->ctrl->getCmd(
"frameset");
153 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui" ||
173 $new_type = $_POST[
"new_type"] ? $_POST[
"new_type"] :
$_GET[
"new_type"];
175 if (!$rbacsystem->checkAccess(
"create",
$_GET[
"ref_id"], $new_type))
177 $this->ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
183 $data[
"fields"] = array();
189 $this->tpl->setCurrentBlock(
"img");
190 $this->tpl->setVariable(
"TYPE_IMG",
192 $this->tpl->setVariable(
"ALT_IMG",
193 $this->lng->txt(
"obj_".$new_type));
194 $this->tpl->parseCurrentBlock();
196 foreach (
$data[
"fields"] as $key => $val)
198 $this->tpl->setVariable(
"TXT_".strtoupper($key), $this->lng->txt($key));
199 $this->tpl->setVariable(strtoupper($key), $val);
201 if ($this->prepare_output)
203 $this->tpl->parseCurrentBlock();
207 $this->ctrl->setParameter($this,
"new_type", $new_type);
208 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this,
"save"));
211 $this->tpl->setVariable(
"TXT_HEADER", $this->lng->txt($new_type.
"_new"));
212 $this->tpl->setVariable(
"TXT_CANCEL", $this->lng->txt(
"cancel"));
213 $this->tpl->setVariable(
"TXT_SUBMIT", $this->lng->txt($new_type.
"_add"));
214 $this->tpl->setVariable(
"CMD_SUBMIT",
"save");
215 $this->tpl->setVariable(
"TARGET",
' target="'.
217 $this->tpl->setVariable(
"TXT_REQUIRED_FLD", $this->lng->txt(
"required_field"));
232 $this->tpl->addBlockfile(
"BUTTONS",
"buttons",
"tpl.buttons.html");
235 require_once(
"./Modules/HTMLLearningModule/classes/class.ilObjFileBasedLMAccess.php");
238 if ($startfile !=
"")
240 $this->tpl->setCurrentBlock(
"btn_cell");
241 $this->tpl->setVariable(
"BTN_LINK",
242 "ilias.php?baseClass=ilHTLMPresentationGUI&ref_id=".$this->object->getRefID());
243 $this->tpl->setVariable(
"BTN_TARGET",
" target=\"ilContObj".$this->object->getID().
"\" ");
244 $this->tpl->setVariable(
"BTN_TXT",$this->lng->txt(
"view"));
245 $this->tpl->parseCurrentBlock();
249 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.fblm_properties.html",
250 'Modules/HTMLLearningModule');
251 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
252 $this->tpl->setVariable(
"TXT_PROPERTIES", $this->lng->txt(
"cont_lm_properties"));
255 $this->tpl->setVariable(
"TXT_ONLINE", $this->lng->txt(
"cont_online"));
256 $this->tpl->setVariable(
"CBOX_ONLINE",
"cobj_online");
257 $this->tpl->setVariable(
"VAL_ONLINE",
"y");
258 if ($this->object->getOnline())
260 $this->tpl->setVariable(
"CHK_ONLINE",
"checked");
264 $this->tpl->setVariable(
"TXT_START_FILE", $this->lng->txt(
"cont_startfile"));
265 if ($startfile !=
"")
267 $this->tpl->setVariable(
"VAL_START_FILE", basename($startfile));
271 $this->tpl->setVariable(
"VAL_START_FILE", $this->lng->txt(
"no_start_file"));
273 $this->tpl->setVariable(
"TXT_SET_START_FILE", $this->lng->txt(
"cont_set_start_file"));
274 $this->tpl->setVariable(
"LINK_SET_START_FILE",
275 $this->ctrl->getLinkTargetByClass(
"ilfilesystemgui",
"listFiles"));
277 $this->tpl->setCurrentBlock(
"commands");
278 $this->tpl->setVariable(
"BTN_NAME",
"saveProperties");
279 $this->tpl->setVariable(
"BTN_TEXT", $this->lng->txt(
"save"));
280 $this->tpl->parseCurrentBlock();
289 $this->
object->setOnline(
ilUtil::yn2tf($_POST[
"cobj_online"]));
290 $this->
object->update();
292 $this->ctrl->redirect($this,
"properties");
317 ilUtil::redirect(
"ilias.php?baseClass=ilHTLMEditorGUI&ref_id=".$newObj->getRefId());
331 if (!$rbacsystem->checkAccess(
"visible,write",$this->object->getRefId()))
333 $this->ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
337 $this->tpl->addBlockfile(
"BUTTONS",
"buttons",
"tpl.buttons.html");
385 $this->
object->setStartFile($a_file);
386 $this->
object->update();
387 $this->ctrl->redirectByClass(
"ilfilesystemgui",
"listFiles");
395 $this->
setFormAction(
"permSave",
"fblm_edit.php?cmd=permSave&ref_id=".
$_GET[
"ref_id"].
396 "&obj_id=".
$_GET[
"obj_id"]);
397 $this->
setFormAction(
"addRole",
"fblm_edit.php?ref_id=".$_GET[
"ref_id"].
398 "&obj_id=".$_GET[
"obj_id"].
"&cmd=addRole");
407 include_once
"./Modules/LearningModule/classes/class.ilBibItemGUI.php";
409 $bib_gui->setObject($this->
object);
410 $bibItemIndex = $_POST[
"bibItemIndex"] ? $_POST[
"bibItemIndex"] :
$_GET[
"bibItemIndex"];
412 if ($bibItemIndex < 0)
416 $bibItemIndex = $bib_gui->save($bibItemIndex);
420 $a_target =
"adm_object.php?ref_id=" . $this->
object->getRefId();
423 $bib_gui->edit(
"ADM_CONTENT",
"adm_content", $a_target, $bibItemIndex);
440 include_once
"./Modules/LearningModule/classes/class.ilBibItemGUI.php";
442 $bib_gui->setObject($this->
object);
443 $bibItemIndex = $_POST[
"bibItemIndex"] ? $_POST[
"bibItemIndex"] :
$_GET[
"bibItemIndex"];
445 if ($bibItemIndex < 0)
451 $a_target =
"adm_object.php?ref_id=" . $this->
object->getRefId();
454 $bib_gui->edit(
"ADM_CONTENT",
"adm_content", $a_target, $bibItemIndex);
471 include_once
"./Modules/LearningModule/classes/class.ilBibItemGUI.php";
473 $bib_gui->setObject($this->
object);
474 $bibItemIndex = $_POST[
"bibItemIndex"] ? $_POST[
"bibItemIndex"] :
$_GET[
"bibItemIndex"];
475 $bib_gui->bib_obj->delete(
$_GET[
"bibItemName"],
$_GET[
"bibItemPath"], $bibItemIndex);
476 if (strpos($bibItemIndex,
",") > 0)
478 $bibItemIndex = substr($bibItemIndex, 0, strpos($bibItemIndex,
","));
482 $a_target =
"adm_object.php?ref_id=" . $this->
object->getRefId();
485 $bib_gui->edit(
"ADM_CONTENT",
"adm_content", $a_target, $bibItemIndex);
502 $bibItemName = $_POST[
"bibItemName"] ? $_POST[
"bibItemName"] :
$_GET[
"bibItemName"];
503 $bibItemIndex = $_POST[
"bibItemIndex"] ? $_POST[
"bibItemIndex"] :
$_GET[
"bibItemIndex"];
504 if ($bibItemName ==
"BibItem")
506 include_once
"./Modules/LearningModule/classes/class.ilBibItem.php";
508 $bib_item->setId($this->object->getId());
509 $bib_item->setType($this->object->getType());
513 include_once
"./Modules/LearningModule/classes/class.ilBibItemGUI.php";
515 $bib_gui->setObject($this->
object);
516 if ($bibItemIndex ==
"")
518 $bibItemPath = $_POST[
"bibItemPath"] ? $_POST[
"bibItemPath"] :
$_GET[
"bibItemPath"];
521 if ($bibItemName !=
"")
523 $bib_gui->bib_obj->add($bibItemName, $bibItemPath, $bibItemIndex);
524 $data = $bib_gui->bib_obj->getElement(
"BibItem");
525 $bibItemIndex = (count(
$data) - 1);
533 $a_target =
"adm_object.php?ref_id=" . $this->
object->getRefId();
536 $bib_gui->edit(
"ADM_CONTENT",
"adm_content", $a_target, $bibItemIndex);
555 $this->tpl =
new ilTemplate(
"tpl.fblm_edit_frameset.html",
false,
false,
556 "Modules/HTMLLearningModule");
557 $this->tpl->setVariable(
"HREF_FILES",$this->ctrl->getLinkTargetByClass(
558 "ilfilesystemgui",
"listFiles"));
568 $this->tpl =
new ilTemplate(
"tpl.main.html",
true,
true);
572 $this->tpl->addBlockFile(
"CONTENT",
"content",
"tpl.explorer.html");
574 require_once (
"./Modules/HTMLLearningModule/classes/class.ilFileExplorer.php");
586 $this->tpl->addBlockFile(
"CONTENT",
"content",
"tpl.adm_content.html");
588 $this->tpl->addBlockFile(
"STATUSLINE",
"statusline",
"tpl.statusline.html");
595 include_once
"Services/Tracking/classes/class.ilTracking.php";
598 require_once(
"./Modules/HTMLLearningModule/classes/class.ilObjFileBasedLMAccess.php");
600 if ($startfile !=
"")
614 $this->ctrl->setCmd(
"showSummary");
615 $this->ctrl->setCmdClass(
"ilinfoscreengui");
632 global
$ilBench, $ilLocator, $ilAccess;
635 $this->tabs_gui->setTabActive(
'info_short');
637 $this->lng->loadLanguageModule(
"meta");
638 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
641 $info->enablePrivateNotes();
642 $info->enableLearningProgress();
645 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"]))
647 $info->enableNewsEditing();
650 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
651 if ($enable_internal_rss)
653 $info->setBlockProperty(
"news",
"settings",
true);
658 if ($ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"]))
660 $info->addButton($this->lng->txt(
"view"),
661 "ilias.php?baseClass=ilHTLMPresentationGUI&ref_id=".$this->object->getRefID(),
662 ' target="ilContObj'.$this->object->getId().
'" ');
666 $info->addMetaDataSections($this->object->getId(),0, $this->
object->getType());
669 $this->ctrl->forwardCommand($info);
679 $this->tpl->setCurrentBlock(
"header_image");
681 $this->tpl->parseCurrentBlock();
683 $this->
getTabs($this->tabs_gui);
684 #$this->tpl->setVariable("TABS", $this->tabs_gui->getHTML());
685 $this->tpl->setVariable(
"HEADER", $this->object->getTitle());
695 global $rbacsystem,$ilUser;
698 if($rbacsystem->checkAccess(
'write',$this->ref_id))
701 $tabs_gui->addTarget(
"cont_list_files",
702 $this->ctrl->getLinkTargetByClass(
"ilfilesystemgui",
"listFiles"),
"",
706 $force_active = (strtolower(
$_GET[
"cmdClass"]) ==
"ilinfoscreengui"
707 || strtolower(
$_GET[
"cmdClass"]) ==
"ilnotegui")
710 $tabs_gui->addTarget(
"info_short",
711 $this->ctrl->getLinkTargetByClass(array(
"ilobjfilebasedlmgui",
720 $tabs_gui->addTarget(
"properties",
721 $this->ctrl->getLinkTarget($this,
"properties"),
"properties",
724 $tabs_gui->addTarget(
"meta_data",
725 $this->ctrl->getLinkTargetByClass(
'ilmdeditorgui',
''),
726 "",
"ilmdeditorgui");
729 $tabs_gui->addTarget(
"bib_data",
730 $this->ctrl->getLinkTarget($this,
"editBibItem"),
731 array(
"editBibItem",
"saveBibItem",
"deleteBibItem",
"addBibItem"),
736 include_once
'./Services/Tracking/classes/class.ilLearningProgressAccess.php';
739 $tabs_gui->addTarget(
'learning_progress',
740 $this->ctrl->getLinkTargetByClass(array(
'ilobjfilebasedlmgui',
'illearningprogressgui'),
''),
742 array(
'illplistofobjectsgui',
'illplistofsettingsgui',
'illearningprogressgui',
'illplistofprogressgui'));
746 if ($rbacsystem->checkAccess(
'edit_permission',$this->object->getRefId()))
748 $tabs_gui->addTarget(
"perm_settings",
749 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"), array(
"perm",
"info",
"owner"),
'ilpermissiongui');
762 if ($ilAccess->checkAccess(
"visible",
"", $a_target))
764 $_GET[
"ref_id"] = $a_target;
765 $_GET[
"cmd"] =
"infoScreen";
766 include(
"repository.php");
769 else if ($ilAccess->checkAccess(
"read",
"", ROOT_FOLDER_ID))
771 $_GET[
"cmd"] =
"frameset";
772 $_GET[
"target"] =
"";
773 $_GET[
"ref_id"] = ROOT_FOLDER_ID;
776 include(
"repository.php");
780 $ilErr->raiseError($lng->txt(
"msg_no_perm_read_lm"), $ilErr->FATAL);
787 if (is_object($this->
object))
789 $ilLocator->addItem($this->object->getTitle(),
790 $this->ctrl->getLinkTargetByClass(
"ilinfoscreengui",
"showSummary"),
"",
$_GET[
"ref_id"]);