19 require_once(
"./Services/Object/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(
"./Services/FileSystem/classes/class.ilFileSystemGUI.php");
38 $this->ctrl->saveParameter($this, array(
"ref_id"));
41 $lng->loadLanguageModule(
"content");
43 parent::ilObjectGUI($a_data, $a_id, $a_call_by_reference,
false);
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),
194 $ilCtrl->redirectByClass(
"ilrepositorygui",
"frameset");
204 global $rbacsystem,
$tree,
$tpl, $ilTabs;
206 $ilTabs->activateTab(
"id_settings");
210 $tpl->setContent($this->form->getHTML());
220 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
227 $ti->setRequired(
true);
228 $this->form->addItem($ti);
234 $this->form->addItem($ta);
240 $this->form->addItem($cb);
243 require_once(
"./Modules/HTMLLearningModule/classes/class.ilObjFileBasedLMAccess.php");
247 if ($startfile !=
"")
249 $ne->
setValue(basename($startfile));
253 $ne->setValue(basename($this->lng->txt(
"no_start_file")));
255 $this->form->addItem($ne);
257 $this->form->addCommandButton(
"saveProperties", $lng->txt(
"save"));
258 $this->form->addCommandButton(
"toFilesystem", $lng->txt(
"cont_set_start_file"));
260 $this->form->setTitle($lng->txt(
"cont_lm_properties"));
261 $this->form->setFormAction($ilCtrl->getFormAction($this,
"saveProperties"));
269 require_once(
"./Modules/HTMLLearningModule/classes/class.ilObjFileBasedLMAccess.php");
273 $values[
"cobj_online"] = $this->
object->getOnline();
274 if ($startfile !=
"")
276 $startfile = basename($startfile);
280 $startfile = $this->lng->txt(
"no_start_file");
283 $values[
"cobj_online"] = $this->
object->getOnline();
284 $values[
"startfile"] = $startfile;
285 $values[
"title"] = $this->
object->getTitle();
286 $values[
"desc"] = $this->
object->getDescription();
288 $this->form->setValuesByArray($values);
301 $ilCtrl->redirectByClass(
"ilfilesystemgui",
"listFiles");
312 if ($this->form->checkInput())
314 $this->
object->setTitle($this->form->getInput(
"title"));
315 $this->
object->setDescription($this->form->getInput(
"desc"));
317 $this->
object->update();
319 $this->ctrl->redirect($this,
"properties");
322 $ilTabs->activateTab(
"id_settings");
323 $this->form->setValuesByPost();
324 $tpl->setContent($this->form->getHtml());
336 if (!$rbacsystem->checkAccess(
"visible,write",$this->object->getRefId()))
338 $this->
ilias->raiseError($this->lng->txt(
"permission_denied"),$this->
ilias->error_obj->MESSAGE);
342 $this->tpl->addBlockfile(
"BUTTONS",
"buttons",
"tpl.buttons.html");
372 ilUtil::redirect(
"ilias.php?baseClass=ilHTLMEditorGUI&ref_id=".$newObj->getRefId());
389 $this->
object->setStartFile($a_file);
390 $this->
object->update();
391 $this->ctrl->redirectByClass(
"ilfilesystemgui",
"listFiles");
399 $this->
setFormAction(
"permSave",
"fblm_edit.php?cmd=permSave&ref_id=".
$_GET[
"ref_id"].
400 "&obj_id=".
$_GET[
"obj_id"]);
401 $this->
setFormAction(
"addRole",
"fblm_edit.php?ref_id=".$_GET[
"ref_id"].
402 "&obj_id=".$_GET[
"obj_id"].
"&cmd=addRole");
413 $ilTabs->activateTab(
"id_bib_data");
415 include_once
"./Modules/LearningModule/classes/class.ilBibItemGUI.php";
417 $bib_gui->setObject($this->
object);
418 $bibItemIndex =
$_POST[
"bibItemIndex"] ?
$_POST[
"bibItemIndex"] :
$_GET[
"bibItemIndex"];
420 if ($bibItemIndex < 0)
424 $bibItemIndex = $bib_gui->save($bibItemIndex);
428 $a_target =
"adm_object.php?ref_id=" . $this->
object->getRefId();
431 $bib_gui->edit(
"ADM_CONTENT",
"adm_content", $a_target, $bibItemIndex);
453 $ilTabs->activateTab(
"id_bib_data");
455 include_once
"./Modules/LearningModule/classes/class.ilBibItemGUI.php";
457 $bib_gui->setObject($this->
object);
458 $bibItemIndex =
$_POST[
"bibItemIndex"] ?
$_POST[
"bibItemIndex"] :
$_GET[
"bibItemIndex"];
460 if ($bibItemIndex < 0)
466 $a_target =
"adm_object.php?ref_id=" . $this->
object->getRefId();
469 $bib_gui->edit(
"ADM_CONTENT",
"adm_content", $a_target, $bibItemIndex);
491 $ilTabs->activateTab(
"id_bib_data");
493 include_once
"./Modules/LearningModule/classes/class.ilBibItemGUI.php";
495 $bib_gui->setObject($this->
object);
496 $bibItemIndex =
$_POST[
"bibItemIndex"] ?
$_POST[
"bibItemIndex"] :
$_GET[
"bibItemIndex"];
497 $bib_gui->bib_obj->delete(
$_GET[
"bibItemName"],
$_GET[
"bibItemPath"], $bibItemIndex);
498 if (strpos($bibItemIndex,
",") > 0)
500 $bibItemIndex = substr($bibItemIndex, 0, strpos($bibItemIndex,
","));
504 $a_target =
"adm_object.php?ref_id=" . $this->
object->getRefId();
507 $bib_gui->edit(
"ADM_CONTENT",
"adm_content", $a_target, $bibItemIndex);
529 $ilTabs->activateTab(
"id_bib_data");
531 $bibItemName =
$_POST[
"bibItemName"] ?
$_POST[
"bibItemName"] :
$_GET[
"bibItemName"];
532 $bibItemIndex =
$_POST[
"bibItemIndex"] ?
$_POST[
"bibItemIndex"] :
$_GET[
"bibItemIndex"];
533 if ($bibItemName ==
"BibItem")
535 include_once
"./Modules/LearningModule/classes/class.ilBibItem.php";
537 $bib_item->setId($this->object->getId());
538 $bib_item->setType($this->object->getType());
542 include_once
"./Modules/LearningModule/classes/class.ilBibItemGUI.php";
544 $bib_gui->setObject($this->
object);
545 if ($bibItemIndex ==
"")
547 $bibItemPath =
$_POST[
"bibItemPath"] ?
$_POST[
"bibItemPath"] :
$_GET[
"bibItemPath"];
550 if ($bibItemName !=
"")
552 $bib_gui->bib_obj->add($bibItemName, $bibItemPath, $bibItemIndex);
553 $data = $bib_gui->bib_obj->getElement(
"BibItem");
554 $bibItemIndex = (count(
$data) - 1);
562 $a_target =
"adm_object.php?ref_id=" . $this->
object->getRefId();
565 $bib_gui->edit(
"ADM_CONTENT",
"adm_content", $a_target, $bibItemIndex);
587 $ilCtrl->setCmdClass(
"ilfilesystemgui");
588 $ilCtrl->setCmd(
"listFiles");
599 $this->tpl->addBlockFile(
"CONTENT",
"content",
"tpl.adm_content.html");
601 $this->tpl->addBlockFile(
"STATUSLINE",
"statusline",
"tpl.statusline.html");
610 include_once
"Services/License/classes/class.ilLicense.php";
612 $this->
object->getRefId());
615 if ($ilUser->getId() != ANONYMOUS_USER_ID)
617 include_once
"Services/Tracking/classes/class.ilLearningProgress.php";
619 $this->
object->getRefId(),
"htlm");
622 require_once(
"./Modules/HTMLLearningModule/classes/class.ilObjFileBasedLMAccess.php");
624 if ($startfile !=
"")
638 $this->ctrl->setCmd(
"showSummary");
639 $this->ctrl->setCmdClass(
"ilinfoscreengui");
656 global
$ilBench, $ilLocator, $ilAccess, $ilTabs;
658 $ilTabs->activateTab(
'id_info');
660 $this->lng->loadLanguageModule(
"meta");
661 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
664 $info->enablePrivateNotes();
665 $info->enableLearningProgress();
668 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"]))
670 $info->enableNewsEditing();
673 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
674 if ($enable_internal_rss)
676 $info->setBlockProperty(
"news",
"settings",
true);
681 if ($ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"]))
683 $info->addButton($this->lng->txt(
"view"),
684 "ilias.php?baseClass=ilHTLMPresentationGUI&ref_id=".$this->object->getRefID(),
685 ' target="ilContObj'.$this->object->getId().
'" ',
690 $info->addMetaDataSections($this->object->getId(),0, $this->
object->getType());
693 $this->ctrl->forwardCommand($info);
706 $this->tpl->setTitle($this->object->getTitle());
716 $ilHelp->setScreenIdComponent(
"htlm");
718 if($ilAccess->checkAccess(
'write',
'', $this->ref_id))
720 $ilTabs->addTab(
"id_list_files",
721 $lng->txt(
"cont_list_files"),
722 $this->ctrl->getLinkTargetByClass(
"ilfilesystemgui",
"listFiles"));
724 $ilTabs->addTab(
"id_info",
725 $lng->txt(
"info_short"),
726 $this->ctrl->getLinkTargetByClass(array(
"ilobjfilebasedlmgui",
"ilinfoscreengui"),
"showSummary"));
728 $ilTabs->addTab(
"id_settings",
729 $lng->txt(
"settings"),
730 $this->ctrl->getLinkTarget($this,
"properties"));
733 include_once
'./Services/Tracking/classes/class.ilLearningProgressAccess.php';
736 $ilTabs->addTab(
"id_learning_progress",
737 $lng->txt(
"learning_progress"),
738 $this->ctrl->getLinkTargetByClass(array(
'ilobjfilebasedlmgui',
'illearningprogressgui'),
''));
741 include_once(
"Services/License/classes/class.ilLicenseAccess.php");
742 if ($ilAccess->checkAccess(
'edit_permission',
'', $this->ref_id)
745 $ilTabs->addTab(
"id_license",
746 $lng->txt(
"license"),
747 $this->ctrl->getLinkTargetByClass(
'illicensegui',
''));
750 if($ilAccess->checkAccess(
'write',
'', $this->ref_id))
752 $ilTabs->addTab(
"id_meta_data",
753 $lng->txt(
"meta_data"),
754 $this->ctrl->getLinkTargetByClass(
'ilmdeditorgui',
''));
756 $ilTabs->addTab(
"id_bib_data",
757 $lng->txt(
"bib_data"),
758 $this->ctrl->getLinkTarget($this,
"editBibItem"));
763 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
765 $ilTabs->addTab(
"export",
767 $this->ctrl->getLinkTargetByClass(
"ilexportgui",
""));
770 if ($ilAccess->checkAccess(
'edit_permission',
'', $this->object->getRefId()))
772 $ilTabs->addTab(
"id_permissions",
773 $lng->txt(
"perm_settings"),
774 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"));
777 require_once(
"./Modules/HTMLLearningModule/classes/class.ilObjFileBasedLMAccess.php");
780 if ($startfile !=
"")
782 $ilTabs->addNonTabbedLink(
"presentation_view",
783 $this->lng->txt(
"glo_presentation_view"),
784 "ilias.php?baseClass=ilHTLMPresentationGUI&ref_id=".$this->object->getRefID(),
800 if ($ilAccess->checkAccess(
"visible",
"", $a_target))
804 else if ($ilAccess->checkAccess(
"read",
"", ROOT_FOLDER_ID))
811 $ilErr->raiseError($lng->txt(
"msg_no_perm_read_lm"), $ilErr->FATAL);
818 if (is_object($this->
object))
820 $ilLocator->addItem($this->object->getTitle(),
821 $this->ctrl->getLinkTargetByClass(
"ilinfoscreengui",
"showSummary"),
"",
$_GET[
"ref_id"]);
836 return parent::importFileObject();
857 $ilErr->raiseError($this->lng->txt(
"no_create_permission"));
864 $newObj->setDescription(
"");
866 $newObj->populateByDirectoy($a_dir,
$filename);
885 $inst_id = IL_INST_ID;
887 include_once(
"./Services/Export/classes/class.ilExport.php");
890 $this->
object->getType());
892 $this->
object->getType());
894 $subdir = $this->
object->getType().
"_".$this->
object->getId();
897 $target_dir = $export_dir.
"/".$subdir;
902 $source_dir = $this->
object->getDataDirectory();
908 $zip_file = $export_dir.
"/".$date.
"__".IL_INST_ID.
"__".
909 $this->
object->getType().
"_".$this->
object->getId().
".zip";
importFileObject($parent_id=null)
Import file.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
afterSave($newObj)
save object public
update()
update properties
outputInfoScreen($a_standard_locator=true)
info screen
getTemplate()
output main header (title and locator)
setValue($a_value)
Set Value.
exportHTML()
create html package
activateLabels($a_act, $a_label_header)
activate file labels
static rCopy($a_sdir, $a_tdir, $preserveTimeAttributes=false)
Copies content of a directory $a_sdir recursively to a directory $a_tdir.
const TITLE_LENGTH
max length of object title
cancelCreationObject($in_rep=false)
cancel action and go back to previous page public
_determineStartUrl($a_id)
check wether learning module is online
addBibItem()
add bib item (module call)
static _isEnabled()
Check, if licencing is enabled This check is called from the ilAccessHandler class.
edit()
edit properties of object (module form)
File Based Learning Module (HTML) object.
static _requiresPurchaseToAccess($a_ref_id, $a_purchasetype='')
this function should be used by all buyable repository objects !!
initCreationForms($a_new_type)
addObserver(&$a_class, $a_method, $a_element)
_createExportDirectory($a_obj_id, $a_export_type="xml", $a_obj_type="")
Create export directory.
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
getSettingsFormValues()
Get current values for settings from.
setFormAction($a_cmd, $a_formaction)
set specific form action for command
cancelObject($in_rep=false)
cancel action and go back to previous page public
static _lookupTitle($a_id)
lookup object title
editObject()
edit properties of object (admin form)
saveProperties()
Save properties form.
toFilesystem()
Set start file.
executeCommand()
execute command
initSettingsForm()
Init settings form.
deleteBibItemObject($a_target="")
delete bib item (admin call)
showInfoScreen()
info screen call from inside learning module
infoScreen()
this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually...
_goto($a_target)
redirect script
saveBibItem()
save bib item (module call)
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
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.
ilObjFileBasedLMGUI($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
Constructor.
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)
Class ilObjectGUI Basic methods of all Output classes.
static _lookupObjId($a_id)
setSize($a_size)
Set Size.
This class represents a text property in a property form.
setCols($a_cols)
Set Cols.
redirection script todo: (a better solution should control the processing via a xml file) ...
frameset()
Frameset -> Output list of files.
initCreateForm($a_new_type)
Init object creation form.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
manifest.xml file not found-exception for import
static zip($a_dir, $a_file, $compress_content=false)
zips given directory/file into given zip.file
prepareOutput()
prepare output
deleteBibItem()
delete bib item (module call)
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 ...
editBibItemObject($a_target="")
edit bib items (admin call)
_tracProgress($a_user_id, $a_obj_id, $a_ref_id, $a_obj_type='')
getTmpDir()
Get temporary directory.
addBibItemObject($a_target="")
add bib item (admin call)
createFromDirectory($a_dir)
Create new object from a html zip file.
saveBibItemObject($a_target="")
save bib item (admin call)
This class represents a non editable value in a property form.
const LP_CONTEXT_REPOSITORY
This class represents a text area property in a property form.
properties()
edit properties of object (admin form)
getCreationMode()
get creation mode
User Interface class for file based learning modules (HTML)
updateObject()
updates object entry in object_data
static _getExportDirectory($a_obj_id, $a_type="xml", $a_obj_type="", $a_entity="")
Get export directory for an repository object.
putObjectInTree(ilObject $a_obj, $a_parent_node_id=null)
Add object to tree at given position.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
getTabs()
adds tabs to tab gui object
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
_noteAccess($a_obj_id, $a_type, $a_ref_id)
Note the access of the current usr to an object.
File System Explorer GUI class.
static yn2tf($a_yn)
convert "y"/"n" to true/false
static redirect($a_script)
http redirect to other script
addHeaderAction()
Add header action menu.
static delDir($a_dir, $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
Class ilObjUserTrackingGUI.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
editBibItem()
edit bib items (module call)