21require_once
"./Services/Container/classes/class.ilContainerGUI.php";
36 public function __construct($a_data, $a_id = 0, $a_call_by_reference =
true, $a_prepare_output =
false)
40 $this->tree =
$DIC->repositoryTree();
41 $this->tabs =
$DIC->tabs();
42 $this->
user = $DIC->user();
43 $this->ctrl =
$DIC->ctrl();
44 $this->lng =
$DIC->language();
45 $this->access =
$DIC->access();
46 $this->rbacsystem =
$DIC->rbac()->system();
47 $this->
help = $DIC[
"ilHelp"];
48 $this->
error = $DIC[
"ilErr"];
49 $this->tpl =
$DIC[
"tpl"];
54 $this->lng->loadLanguageModule(
"obj");
67 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui") {
73 include_once
'Services/Tracking/classes/class.ilLearningProgress.php';
76 $this->object->getId(),
77 $this->object->getRefId(),
82 $this->tabs_gui->setTabActive(
'view_content');
95 $ilTabs->activateTab(
"view_content");
96 $ret = parent::renderObject();
105 $next_class = $this->ctrl->getNextClass($this);
106 $cmd = $this->ctrl->getCmd();
108 $header_action =
true;
109 switch ($next_class) {
111 $ru = new \ilRepUtilGUI($this);
112 $this->ctrl->setReturn($this,
'trash');
113 $this->ctrl->forwardCommand($ru);
116 case 'ilpermissiongui':
118 $this->tabs_gui->activateTab(
'perm_settings');
119 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
121 $ret = &$this->ctrl->forwardCommand($perm_gui);
125 case 'ilcoursecontentgui':
127 include_once
'./Modules/Course/classes/class.ilCourseContentGUI.php';
129 $this->ctrl->forwardCommand($course_content_obj);
132 case "illearningprogressgui":
134 include_once
'./Services/Tracking/classes/class.ilLearningProgressGUI.php';
138 $this->object->getRefId(),
141 $this->ctrl->forwardCommand($new_gui);
142 $this->tabs_gui->setTabActive(
'learning_progress');
146 case "ilcontainerpagegui":
150 $this->tpl->setContent(
$ret);
152 $header_action =
false;
155 case 'ilinfoscreengui':
160 case 'ilobjectcopygui':
163 include_once
'./Services/Object/classes/class.ilObjectCopyGUI.php';
165 $cp->setType(
'fold');
166 $this->ctrl->forwardCommand($cp);
169 case "ilobjstylesheetgui":
176 $this->tabs_gui->setTabActive(
'export');
177 include_once
'./Services/Export/classes/class.ilExportGUI.php';
179 $exp->addFormat(
'xml');
180 $this->ctrl->forwardCommand($exp);
183 case "ilcommonactiondispatchergui":
186 $this->ctrl->forwardCommand($gui);
189 case 'ildidactictemplategui':
190 $this->ctrl->setReturn($this,
'edit');
191 include_once
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateGUI.php';
193 $this->ctrl->forwardCommand($did);
196 $this->tabs_gui->setTabActive(
'none');
201 case 'ilobjecttranslationgui':
205 include_once(
"./Services/Object/classes/class.ilObjectTranslationGUI.php");
207 $this->ctrl->forwardCommand($transgui);
225 if ($header_action) {
235 $this->folder_tree = &$a_tree;
248 if (parent::importFileObject($parent_id, $a_catch_errors)) {
249 ilUtil::sendSuccess(
$lng->txt(
"msg_obj_modified"),
true);
250 $this->ctrl->returnToParent($this);
265 $lng->loadLanguageModule($this->object->getType());
267 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
269 $form->setFormAction($this->ctrl->getFormAction($this,
"update"));
270 $form->setTitle($this->lng->txt($this->object->getType() .
"_edit"));
276 $ti->setRequired(
true);
289 $pres->setTitle($this->lng->txt(
'fold_presentation'));
290 $form->addItem($pres);
293 $form = $obj_service->commonSettings()->legacyForm($form, $this->
object)->addTitleIconVisibility();
296 $form = $obj_service->commonSettings()->legacyForm($form, $this->
object)->addTopActionsVisibility();
299 $form = $obj_service->commonSettings()->legacyForm($form, $this->
object)->addIcon();
302 $form = $obj_service->commonSettings()->legacyForm($form, $this->
object)->addTileImage();
317 $form->addCommandButton(
"update", $this->lng->txt(
"save"));
327 include_once
'./Services/Container/classes/class.ilContainerSortingSettings.php';
329 $a_values[
"sor"] = $sort->getSortMode();
337 $obj_service->commonSettings()->legacyForm($a_form, $this->
object)->saveTitleIconVisibility();
340 $obj_service->commonSettings()->legacyForm($a_form, $this->
object)->saveTopActionsVisibility();
343 $obj_service->commonSettings()->legacyForm($a_form, $this->
object)->saveIcon();
346 $obj_service->commonSettings()->legacyForm($a_form, $this->
object)->saveTileImage();
362 $this->ctrl->setCmd(
"showSummary");
363 $this->ctrl->setCmdClass(
"ilinfoscreengui");
369 include_once
'./Services/Container/classes/class.ilContainerSortingSettings.php';
375 ilUtil::sendSuccess($this->lng->txt(
"fold_added"),
true);
376 $this->ctrl->setParameter($this,
"ref_id", $a_new_object->
getRefId());
387 $this->ctrl->setCmd(
"showSummary");
388 $this->ctrl->setCmdClass(
"ilinfoscreengui");
399 if (!$ilAccess->checkAccess(
"visible",
"", $this->ref_id)) {
400 $this->
ilias->raiseError($this->lng->txt(
"msg_no_perm_read"), $this->ilias->error_obj->MESSAGE);
403 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
406 $GLOBALS[
'ilTabs']->activateTab(
'info_short');
408 $info->enablePrivateNotes();
410 if ($ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"])) {
415 $info->enableNewsEditing(
false);
416 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"])) {
418 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
420 if ($enable_internal_rss) {
421 $info->setBlockProperty(
"news",
"settings",
true);
422 $info->setBlockProperty(
"news",
"public_notifications_option",
true);
428 $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
431 $this->ctrl->forwardCommand($info);
446 $this->ctrl->setParameter($this,
"ref_id", $this->ref_id);
448 $ilHelp->setScreenIdComponent(
"fold");
450 $this->tabs_gui->setTabActive(
"");
451 if ($ilAccess->checkAccess(
'read',
'', $this->ref_id)) {
452 $this->tabs_gui->addTab(
454 $lng->txt(
"content"),
455 $this->ctrl->getLinkTarget($this,
"")
459 $force_active = ($this->ctrl->getNextClass() ==
"ilinfoscreengui"
460 || strtolower(
$_GET[
"cmdClass"]) ==
"ilnotegui")
463 $this->tabs_gui->addTarget(
465 $this->ctrl->getLinkTargetByClass(
466 array(
"ilobjfoldergui",
"ilinfoscreengui"),
469 array(
"showSummary",
"",
"infoScreen"),
477 if (
$rbacsystem->checkAccess(
'write', $this->ref_id)) {
478 $this->tabs_gui->addTarget(
480 $this->ctrl->getLinkTarget($this,
"edit"),
484 ($ilCtrl->getCmd() ==
"edit")
489 include_once
'./Services/Tracking/classes/class.ilLearningProgressAccess.php';
491 $this->tabs_gui->addTarget(
493 $this->ctrl->getLinkTargetByClass(array(
'ilobjfoldergui',
'illearningprogressgui'),
''),
495 array(
'illplistofobjectsgui',
'illplistofsettingsgui',
'illearningprogressgui',
'illplistofprogressgui')
499 if ($ilAccess->checkAccess(
'write',
'', $this->object->getRefId())) {
500 $this->tabs_gui->addTarget(
502 $this->ctrl->getLinkTargetByClass(
'ilexportgui',
''),
509 if (
$rbacsystem->checkAccess(
'edit_permission', $this->ref_id)) {
510 $this->tabs_gui->addTarget(
512 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"),
513 array(
"perm",
"info",
"owner"),
519 if (
$_GET[
"baseClass"] ==
"ilRepositoryGUI" and !empty(
$_SESSION[
'il_rep_clipboard'])) {
520 $this->tabs_gui->addTarget(
522 $this->ctrl->getLinkTarget($this,
"clipboard"),
532 public static function _goto($a_target)
536 $ilAccess =
$DIC->access();
540 if ($ilAccess->checkAccess(
"read",
"", $a_target)) {
543 if ($ilAccess->checkAccess(
"visible",
"", $a_target)) {
561 if ($course_ref_id =
$tree->checkForParentType($this->object->getRefId(),
'crs')) {
562 include_once(
"./Modules/Course/classes/class.ilObjCourse.php");
563 include_once(
"./Modules/Course/classes/class.ilObjCourseGUI.php");
567 'ilcoursecontentgui',
573 $this->object->getRefId()
592 if (!$crs_ref =
$tree->checkForParentType($this->ref_id,
'crs')) {
595 include_once
'./Modules/Course/classes/class.ilObjCourse.php';
602 include_once
'./Modules/Course/classes/class.ilCourseContentGUI.php';
604 $this->ctrl->setCmdClass(get_class($course_content_obj));
605 $this->ctrl->setCmd(
'editUserTimings');
606 $this->ctrl->forwardCommand($course_content_obj);
626 $ilTabs->activateTab(
"settings");
629 $ilErr->raiseError($this->lng->txt(
"msg_no_perm_write"),
$ilErr->MESSAGE);
635 $form->setValuesByArray($values,
true);
637 $GLOBALS[
'tpl']->setContent($form->getHTML());
651 $lng->txt(
"fold_settings"),
652 $this->ctrl->getLinkTarget($this,
'edit')
655 $this->tabs_gui->addSubTab(
657 $this->lng->txt(
"obj_multilinguality"),
658 $this->ctrl->getLinkTargetByClass(
"ilobjecttranslationgui",
"")
661 $ilTabs->activateSubTab($a_tab);
662 $ilTabs->activateTab(
"settings");
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
An exception for terminatinating execution or to throw for unit testing.
error($a_errmsg)
set error message @access public
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
& forwardToPageObject()
forward command to page object
getEditFormValues()
Get values for edit form.
initSortingForm(ilPropertyFormGUI $form, array $a_sorting_settings)
Append sorting settings to property form.
prepareOutput($a_show_subobjects=true)
prepare output
saveListPresentation(ilPropertyFormGUI $form)
Save list presentation setting.
forwardToStyleSheet()
Forward to style object.
initListPresentationForm(ilPropertyFormGUI $form)
Add list presentation settings to form.
saveSortingSettings(ilPropertyFormGUI $form)
Save sorting settings.
Class ilCourseContentGUI.
GUI class for didactic template settings inside repository objects.
Export User Interface Class.
static checkAccess($a_ref_id, $a_allow_only_read=true)
check access to learning progress
const LP_CONTEXT_REPOSITORY
Class ilObjUserTrackingGUI.
static _tracProgress($a_user_id, $a_obj_id, $a_ref_id, $a_obj_type='')
static _modifyItemGUI( $a_item_list_gui, $a_cmd_class, $a_item_data, $a_show_path, $a_abo_status, $a_course_ref_id, $a_course_obj_id, $a_parent_ref_id=0)
We need a static version of this, e.g.
static _lookupViewMode($a_id)
lookup view mode of container
static _lookupAboStatus($a_id)
setFolderTree($a_tree)
set tree
importFileObject($parent_id=null, $a_catch_errors=true)
Import file object @global type $lng.
modifyItemGUI($a_item_list_gui, $a_item_data, $a_show_path)
Modify Item ListGUI for presentation in container @global type $tree.
renderObject()
Render folder.
getEditFormCustomValues(array &$a_values)
Add values to custom edit fields.
executeCommand()
execute command note: this method is overwritten in all container objects
afterSave(ilObject $a_new_object)
Post (successful) object creation hook.
showPossibleSubObjects()
show possible sub objects selection list
infoScreenObject()
this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually,...
updateCustom(ilPropertyFormGUI $a_form)
Insert custom update form values into object.
setSubTabs($a_tab)
Set sub tabs.
static _goto($a_target)
goto target group
showSummaryObject()
this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually,...
__construct($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=false)
Constructor @access public.
initEditForm()
Init object edit form.
infoScreen()
show information screen
Render add new item selector.
GUI class for the workflow of copying objects.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
static _gotoRepositoryNode($a_ref_id, $a_cmd="frameset")
Goto repository root.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
initDidacticTemplate(ilPropertyFormGUI $form)
Show didactic template types.
addHeaderAction()
Add header action menu.
getObjectService()
Get object service.
redirectToRefId($a_ref_id, $a_cmd="")
redirects to (repository) view per ref id usually to a container and usually used at the end of a sav...
GUI class for object translation handling.
Class ilObject Basic functions for all objects.
static _lookupObjId($a_id)
const TITLE_LENGTH
max length of object title
getRefId()
get reference id @access public
getId()
get object id @access public
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
This class represents a text area property in a property form.
This class represents a text property in a property form.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
redirection script todo: (a better solution should control the processing via a xml file)