ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilObjCourseGUI Class Reference

Class ilObjCourseGUI. More...

+ Inheritance diagram for ilObjCourseGUI:
+ Collaboration diagram for ilObjCourseGUI:

Public Member Functions

 __construct ($a_data, int $a_id, bool $a_call_by_reference=true, bool $a_prepare_output=true)
 
 gatewayObject ()
 
 renderObject ()
 
 deleteObject (bool $error=false)
 Display deletion confirmation screen. More...
 
 renderContainer ()
 
 infoScreenObject ()
 this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually, if everything works through ilCtrl in the future this may be changed More...
 
 infoScreen ()
 
 saveNotificationObject ()
 
 editInfoObject (?ilPropertyFormGUI $a_form=null)
 
 confirmDeleteInfoFilesObject ()
 
 deleteInfoFilesObject ()
 
 initInfoEditor ()
 
 updateInfoObject ()
 
 updateObject ()
 updates object entry in object_data More...
 
 editObject (?ilPropertyFormGUI $form=null)
 
 sendFileObject ()
 
 setSubTabs (string $a_tab)
 
 renderAddNewItem (string ... $disabled_object_types)
 
 readMemberData (array $ids, ?array $selected_columns=null, bool $skip_names=false)
 
 updateLPFromStatus (int $a_member_id, bool $a_has_passed)
 sync course status and lp status More...
 
 autoFillObject ()
 
 leaveObject ()
 
 unsubscribeObject ()
 
 performUnsubscribeObject ()
 
 addContentTab ()
 
 executeCommand ()
 
 editMapSettingsObject ()
 
 saveMapSettingsObject ()
 
 modifyItemGUI (ilObjectListGUI $a_item_list_gui, array $a_item_data)
 @inheritDoc More...
 
 setContentSubTabs ()
 @inheritDoc More...
 
 askResetObject ()
 
 resetObject ()
 
 __checkStartObjects ()
 
 createMailSignature ()
 Create a course mail signature. More...
 
 deliverCertificateObject ()
 
 saveSortingObject ()
 
 getLocalRoles (array $a_exclude=array())
 
 setSideColumnReturn ()
 @inheritDoc More...
 
- Public Member Functions inherited from ilContainerGUI
 executeCommand ()
 
 forwardToPageObject ()
 
 addPageTabs ()
 
 getContainerPageHTML ()
 
 getContentGUI ()
 
 renderObject ()
 
 renderBlockAsynchObject ()
 render the object More...
 
 setContentSubTabs ()
 
 showAdministrationPanel ()
 
 showPermanentLink ()
 
 editPageFrameObject ()
 
 cancelPageContentObject ()
 
 showLinkListObject ()
 
 addHeaderRow (ilTemplate $a_tpl, string $a_type, bool $a_show_image=true)
 
 addMessageRow (ilTemplate $a_tpl, string $a_message, string $a_type)
 
 setPageEditorTabs ()
 
 addStandardContainerSubTabs (bool $a_include_view=true)
 Add standard container subtabs for view, manage, oderdering and text/media editor link. More...
 
 enableAdministrationPanelObject ()
 
 disableAdministrationPanelObject ()
 
 editOrderObject ()
 
 isActiveOrdering ()
 
 isActiveItemOrdering ()
 
 enableMultiDownloadObject ()
 
 isMultiDownloadEnabled ()
 
 cutObject ()
 cut object(s) out from a container and write the information to clipboard @access public More...
 
 copyObject ()
 Copy object(s) out from a container and write the information to clipboard It is not possible to copy multiple objects at once. More...
 
 downloadObject ()
 
 getBucketTitle ()
 
 linkObject ()
 create an new reference of an object in tree it's like a hard link of unix More...
 
 clearObject ()
 clear clipboard and go back to last object More...
 
 performPasteIntoMultipleObjectsObject ()
 
 initAndDisplayLinkIntoMultipleObjectsObject ()
 
 showPasteTreeObject ()
 
 cancelMoveLinkObject ()
 Cancel move|link empty clipboard and return to parent. More...
 
 keepObjectsInClipboardObject ()
 
 initAndDisplayCopyIntoMultipleObjectsObject ()
 
 initAndDisplayMoveIntoObjectObject ()
 
 pasteObject ()
 paste object from clipboard to current place Depending on the chosen command the object(s) are linked, copied or moved More...
 
 clipboardObject ()
 
 isActiveAdministrationPanel ()
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 allowBlocksMoving ()
 Standard is to allow blocks moving. More...
 
 allowBlocksConfigure ()
 Standard is to allow blocks configuration. More...
 
 cloneAllObject ()
 Clone all object Overwritten method for copying container objects. More...
 
 saveSortingObject ()
 
 cloneNodes (int $srcRef, int $dstRef, array &$mapping, ?string $newName=null)
 Recursively clones all nodes of the RBAC tree. More...
 
 modifyItemGUI (ilObjectListGUI $a_item_list_gui, array $a_item_data)
 
 editStylePropertiesObject ()
 
 redrawListItemObject ()
 Redraw a list item (ajax) More...
 
 trashObject ()
 Show trash content of object. More...
 
 trashApplyFilterObject ()
 
 trashResetFilterObject ()
 
 removeFromSystemObject ()
 
 undeleteObject ()
 Get objects back from trash. More...
 
 confirmRemoveFromSystemObject ()
 
 setSideColumnReturn ()
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 competencesObject ()
 
- Public Member Functions inherited from ilObjectGUI
 getRefId ()
 
 setAdminMode (string $mode)
 
 getAdminMode ()
 
 getObject ()
 
 executeCommand ()
 
 withReferences ()
 determines whether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode (bool $mode=true)
 If true, a creation screen is displayed the current [ref_id] does belong to the parent class The mode is determined in ilRepositoryGUI. More...
 
 getCreationMode ()
 
 prepareOutput (bool $show_sub_objects=true)
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelObject ()
 cancel action and go back to previous page More...
 
 createObject ()
 create new object form More...
 
 editAvailabilityPeriodObject ()
 
 saveAvailabilityPeriodObject ()
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 
 getDidacticTemplateVar (string $type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $obj, ?int $parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 
 addExternalEditFormCustom (ilPropertyFormGUI $form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction (string $cmd, string $default_form_action="")
 Get form action for command (command is method name without "Object", e.g. More...
 
 isVisible (int $ref_id, string $type)
 
 viewObject ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 deleteObject (bool $error=false)
 Display deletion confirmation screen. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 
- Public Member Functions inherited from ilDesktopItemHandling
 addToDeskObject ()
 
 removeFromDeskObject ()
 

Static Public Member Functions

static _forwards ()
 
static _goto ($a_target, string $a_add="")
 
static _modifyItemGUI (ilObjectListGUI $a_item_list_gui, string $a_cmd_class, array $a_item_data, bool $a_abo_status, int $a_course_ref_id, int $a_course_obj_id, int $a_parent_ref_id=0)
 
- Static Public Member Functions inherited from ilContainerGUI
static _buildPath (int $a_ref_id, int $a_course_ref_id)
 build path More...
 
- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot (bool $raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode (int $ref_id, string $cmd="")
 
static _gotoSharedWorkspaceNode (int $wsp_id)
 

Data Fields

const BREADCRUMB_DEFAULT = 0
 
const BREADCRUMB_CRS_ONLY = 1
 
const BREADCRUMB_FULL_PATH = 2
 
- Data Fields inherited from ilContainerGUI
int $bl_cnt = 1
 
bool $multi_download_enabled = false
 
- Data Fields inherited from ilObjectGUI
const ADMIN_MODE_NONE = ""
 
const ADMIN_MODE_SETTINGS = "settings"
 
const ADMIN_MODE_REPOSITORY = "repository"
 
const UPLOAD_TYPE_LOCAL = 1
 
const UPLOAD_TYPE_UPLOAD_DIRECTORY = 2
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 
const SUPPORTED_IMPORT_MIME_TYPES = [MimeType::APPLICATION__ZIP, MimeType::APPLICATION__X_ZIP_COMPRESSED]
 

Protected Member Functions

 afterImport (ilObject $new_object)
 Post (successful) object import hook. More...
 
 getSubServices ()
 
 confirmLPSync ()
 
 setLPSyncObject ()
 
 getEditFormValues ()
 values are already set in initEditForm Returning an empty array avoid overriding these values. More...
 
 initEditForm ()
 
 showPossibleSubObjects ()
 @inheritDoc More...
 
 afterSave (ilObject $new_object)
 @inheritDoc More...
 
 getAgreementTabs ()
 
 getTabs ()
 @abstract overwrite in derived GUI class of your object type More...
 
 membersObject ()
 
 initHeaderAction (?string $sub_type=null, ?int $sub_id=null)
 Add header action menu. More...
 
 afterSaveCallback ()
 
 redirectLocToTestConfirmedObject ()
 
 redirectLocToTestObject ($a_force_new_run=null)
 
 redirectLocToTestConfirmation (int $a_objective_id, int $a_test_id)
 Show confirmation whether user wants to start a new run or resume a previous run. More...
 
 hasAdminPermission ()
 
 jump2UsersGalleryObject ()
 
- Protected Member Functions inherited from ilContainerGUI
 getModeManager ()
 
 getItemPresentation ( $include_empty_blocks=true, ?string $lang=null)
 
 getEditFormValues ()
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 setTitleAndDescription ()
 
 showPossibleSubObjects ()
 show possible sub objects (pull down menu) More...
 
 supportsPageEditor ()
 
 gotItems ()
 
 getTabs ()
 @abstract overwrite in derived GUI class of your object type More...
 
 showContainerPageTabs ()
 
 showPasswordInstructionObject (bool $a_init=true)
 
 initFormPasswordInstruction ()
 Init password form. More...
 
 savePasswordObject ()
 
 initEditForm ()
 
 initSortingForm (ilPropertyFormGUI $form, array $a_sorting_settings)
 Append sorting settings to property form. More...
 
 initListPresentationForm (ilPropertyFormGUI $form)
 Add list presentation settings to form. More...
 
 saveListPresentation (ilPropertyFormGUI $form)
 
 initSortingDirectionForm (ilContainerSortingSettings $sorting_settings, ilRadioOption $element, string $a_prefix)
 Add sorting direction. More...
 
 initManualSortingOptionForm (ilContainerSortingSettings $settings, ilRadioOption $element, string $a_prefix, array $a_sorting_settings)
 Add manual sorting options. More...
 
 saveSortingSettings (ilPropertyFormGUI $form)
 
 trashHandleFilter (bool $action_apply, bool $action_reset)
 
 restoreToNewLocationObject (?ilPropertyFormGUI $form=null)
 
 getTreeSelectorGUI (string $cmd)
 
 initFilter ()
 
 showContainerFilter ()
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 
 assignObject ()
 
 setTitleAndDescription ()
 
 createActionDispatcherGUI ()
 
 initHeaderAction (?string $sub_type=null, ?int $sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction (?ilObjectListGUI $list_gui=null)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 setTabs ()
 set admin tabs More...
 
 setAdminTabs ()
 set admin tabs More...
 
 setLocator ()
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator (bool $omit=true)
 
 addAdminLocatorItems (bool $do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 getCreationFormsHTML (StandardForm|ilPropertyFormGUI|array $form)
 
 getTitleForCreationFormPage ()
 
 getCreationFormTitle ()
 
 initCreateForm (string $new_type)
 
 didacticTemplatesToForm ()
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 
 retrieveAdditionalDidacticTemplateOptions ()
 
 addAdoptContentLinkToToolbar ()
 
 addImportButtonToToolbar ()
 
 addAvailabilityPeriodButtonToToolbar (ilToolbarGUI $toolbar)
 
 parseDidacticTemplateVar (string $var, string $type)
 
 afterSave (ilObject $new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 routeImportCmdObject ()
 
 importFile (string $file_to_import, string $path_to_uploaded_file_in_temp_dir)
 
 deleteUploadedImportFile (string $path_to_uploaded_file_in_temp_dir)
 
 afterImport (ilObject $new_object)
 Post (successful) object import hook. More...
 
 setFormAction (string $cmd, string $form_action)
 
 getReturnLocation (string $cmd, string $default_location="")
 Get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation (string $cmd, string $location)
 set specific return location for command More...
 
 getTargetFrame (string $cmd, string $default_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame (string $cmd, string $target_frame)
 Set specific target frame for command. More...
 
 showPossibleSubObjects ()
 show possible sub objects (pull down menu) More...
 
 getTabs ()
 @abstract overwrite in derived GUI class of your object type More...
 
 redirectToRefId (int $ref_id, string $cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current ["ref_id"] value of the request More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 checkPermission (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 checkPermissionBool (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 getCreatableObjectTypes ()
 
 buildAddNewItemElements (array $subtypes, string $create_target_class=ilRepositoryGUI::class, ?int $redirect_target_ref_id=null,)
 
 buildGroup (string $create_target_class, array $obj_types_in_group, string $title, array $subtypes)
 

Protected Attributes

News $news
 
Factory $refinery
 
ilHelpGUI $help
 
ilNavigationHistory $navigation_history
 
- Protected Attributes inherited from ilContainerGUI
ILIAS Container InternalGUIService $gui
 
ILIAS Style Content GUIService $content_style_gui
 
ilRbacSystem $rbacsystem
 
ilRbacReview $rbacreview
 
ILIAS Container Content ItemPresentationManager $item_presentation = null
 
ILIAS Container InternalDomainService $domain
 
ilTabsGUI $tabs
 
ilErrorHandling $error
 
ilObjectDefinition $obj_definition
 
ilRbacAdmin $rbacadmin
 
ilPropertyFormGUI $form
 
ilLogger $log
 
ilObjectDataCache $obj_data_cache
 
Services $global_screen
 
ilAppEventHandler $app_event_handler
 
UIServices $ui
 
ilContainerFilterService $container_filter_service
 
ilContainerUserFilter $container_user_filter = null
 
Standard $ui_filter = null
 
bool $edit_order = false
 
bool $adminCommands = false
 
string $requested_redirectSource = ""
 
int $current_position = 0
 
ClipboardManager $clipboard
 
StandardGUIRequest $std_request
 
ModeManager $mode_manager = null
 
ilComponentFactory $component_factory
 
ILIAS Style Content DomainService $content_style_domain
 
- Protected Attributes inherited from ilObjectGUI
ILIAS Notes Service $notes_service
 
GlobalHttpState $http
 
ServerRequestInterface $request
 
ilLocatorGUI $locator
 
ilObjUser $user
 
ilAccessHandler $access
 
ilSetting $settings
 
ilToolbarGUI $toolbar
 
ilRbacAdmin $rbac_admin
 
ilRbacSystem $rbac_system
 
ilRbacReview $rbac_review
 
ilObjectService $object_service
 
ilObjectDefinition $obj_definition
 
ilGlobalTemplateInterface $tpl
 
ilTree $tree
 
ilCtrl $ctrl
 
ilErrorHandling $error
 
ilLanguage $lng
 
ilTabsGUI $tabs_gui
 
ILIAS $ilias
 
ArrayBasedRequestWrapper $post_wrapper
 
RequestWrapper $request_wrapper
 
Refinery $refinery
 
ilFavouritesManager $favourites
 
CustomIconFactory $custom_icon_factory
 
UIFactory $ui_factory
 
UIRenderer $ui_renderer
 
Filesystem $temp_file_system
 
ilObject $object = null
 
bool $creation_mode = false
 
 $data
 
int $id
 
bool $call_by_reference = false
 
bool $prepare_output
 
int $ref_id
 
int $obj_id
 
int $maxcount
 
array $form_action = []
 
array $return_location = []
 
array $target_frame = []
 
string $tmp_import_dir
 
string $sub_objects = ""
 
bool $omit_locator = false
 
string $type = ""
 
string $admin_mode = self::ADMIN_MODE_NONE
 
int $requested_ref_id = 0
 
int $requested_crtptrefid = 0
 
int $requested_crtcb = 0
 
string $requested_new_type = ""
 
string $link_params
 
string $html = ""
 

Private Member Functions

 checkAgreement ()
 

Private Attributes

ilAdvancedMDRecordGUI $record_gui = null
 
ilContainerStartObjects $start_obj = null
 
ilLogger $logger
 

Detailed Description

Class ilObjCourseGUI.

Author
Stefan Meyer smeye.nosp@m.r.il.nosp@m.ias@g.nosp@m.mx.d.nosp@m.e $Id$ @ilCtrl_Calls ilObjCourseGUI: ilCourseRegistrationGUI, ilCourseObjectivesGUI @ilCtrl_Calls ilObjCourseGUI: ilObjCourseGroupingGUI, ilInfoScreenGUI, ilLearningProgressGUI, ilPermissionGUI @ilCtrl_Calls ilObjCourseGUI: ilRepositorySearchGUI, ilConditionHandlerGUI @ilCtrl_Calls ilObjCourseGUI: ilCourseContentGUI, ILIAS\User\Profile\PublicProfileGUI, ilMemberExportGUI @ilCtrl_Calls ilObjCourseGUI: ilObjectCustomUserFieldsGUI, ilMemberAgreementGUI, ilSessionOverviewGUI @ilCtrl_Calls ilObjCourseGUI: ilColumnGUI, ilContainerPageGUI @ilCtrl_Calls ilObjCourseGUI: ilObjectCopyGUI, ilObjectContentStyleSettingsGUI @ilCtrl_Calls ilObjCourseGUI: ilCourseParticipantsGroupsGUI, ilExportGUI, ilCommonActionDispatcherGUI @ilCtrl_Calls ilObjCourseGUI: ilDidacticTemplateGUI, ilCertificateGUI, ilObjectServiceSettingsGUI @ilCtrl_Calls ilObjCourseGUI: ilContainerStartObjectsGUI, ilContainerStartObjectsPageGUI @ilCtrl_Calls ilObjCourseGUI: ilMailMemberSearchGUI, ilBadgeManagementGUI @ilCtrl_Calls ilObjCourseGUI: ilLOPageGUI, ilObjectMetaDataGUI, ilNewsTimelineGUI, ilContainerNewsSettingsGUI @ilCtrl_Calls ilObjCourseGUI: ilCourseMembershipGUI, ilPropertyFormGUI, ilContainerSkillGUI, ilCalendarPresentationGUI @ilCtrl_Calls ilObjCourseGUI: ilMemberExportSettingsGUI @ilCtrl_Calls ilObjCourseGUI: ilLTIProviderObjectSettingGUI, ILIAS\ILIASObject\Properties\Translations\TranslationGUI, ilBookingGatewayGUI, ilRepositoryTrashGUI

Definition at line 47 of file class.ilObjCourseGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilObjCourseGUI::__construct (   $a_data,
int  $a_id,
bool  $a_call_by_reference = true,
bool  $a_prepare_output = true 
)

Definition at line 62 of file class.ilObjCourseGUI.php.

63 {
64 global $DIC;
65
66 $this->type = "crs";
67 parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
68
69 $this->help = $DIC->help();
70 $this->logger = $DIC->logger()->crs();
71 $this->navigation_history = $DIC['ilNavigationHistory'];
72 $this->ctrl->saveParameter($this, ['ref_id']);
73 $this->lng->loadLanguageModule('crs');
74 $this->lng->loadLanguageModule('cert');
75 $this->lng->loadLanguageModule('obj');
76
77 $this->refinery = $DIC->refinery();
78 $this->news = $DIC->news();
79 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), ILIAS\Repository\ctrl(), ILIAS\Repository\help(), ILIAS\Repository\lng(), ILIAS\Repository\logger(), and ILIAS\Repository\refinery().

+ Here is the call graph for this function:

Member Function Documentation

◆ __checkStartObjects()

ilObjCourseGUI::__checkStartObjects ( )

Definition at line 2826 of file class.ilObjCourseGUI.php.

2826 : bool
2827 {
2828 if ($this->access->checkAccess('write', '', $this->object->getRefId())) {
2829 return true;
2830 }
2831 $this->start_obj = new ilContainerStartObjects(
2832 $this->object->getRefId(),
2833 $this->object->getId()
2834 );
2835 if (count($this->start_obj->getStartObjects()) &&
2836 !$this->start_obj->allFullfilled($this->user->getId())) {
2837 return false;
2838 }
2839 return true;
2840 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References ILIAS\Repository\access(), and ILIAS\Repository\object().

Referenced by executeCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _forwards()

static ilObjCourseGUI::_forwards ( )
static

Definition at line 2545 of file class.ilObjCourseGUI.php.

2545 : array
2546 {
2547 return array("ilCourseRegisterGUI", 'ilConditionHandlerGUI');
2548 }

◆ _goto()

static ilObjCourseGUI::_goto (   $a_target,
string  $a_add = "" 
)
static

Definition at line 2555 of file class.ilObjCourseGUI.php.

2555 : void
2556 {
2557 global $DIC;
2558 $main_tpl = $DIC->ui()->mainTemplate();
2559 $ilAccess = $DIC['ilAccess'];
2560 $ilErr = $DIC['ilErr'];
2561 $lng = $DIC['lng'];
2562 $ilUser = $DIC['ilUser'];
2563 $http = $DIC->http();
2564 $refinery = $DIC->refinery();
2565
2566 $a_target = (int) $a_target;
2567
2568 if (substr($a_add, 0, 5) == 'rcode') {
2569 if ($ilUser->getId() == ANONYMOUS_USER_ID) {
2570 $target = '';
2571 if ($http->wrapper()->query()->has('target')) {
2572 $target = $http->wrapper()->query()->retrieve(
2573 'target',
2574 $refinery->kindlyTo()->string()
2575 );
2576 }
2577 // Redirect to login for anonymous
2579 "login.php?target=" . $target . "&cmd=force_login&lang=" .
2580 $ilUser->getCurrentLanguage()
2581 );
2582 }
2583
2584 // Redirects to target location after assigning user to course
2586 $a_target,
2588 substr($a_add, 5)
2589 );
2590 }
2591
2592 if ($a_add == "mem" && $ilAccess->checkAccess("manage_members", "", $a_target)) {
2593 ilObjectGUI::_gotoRepositoryNode($a_target, "members");
2594 }
2595
2596 if ($a_add == "comp" && ilContSkillPresentationGUI::isAccessible($a_target)) {
2597 ilObjectGUI::_gotoRepositoryNode($a_target, "competences");
2598 }
2599
2600 if ($ilAccess->checkAccess("read", "", $a_target)) {
2602 } else {
2603 // to do: force flat view
2604 if ($ilAccess->checkAccess("visible", "", $a_target)) {
2605 ilObjectGUI::_gotoRepositoryNode($a_target, "infoScreenGoto");
2606 } else {
2607 if ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
2608 $main_tpl->setOnScreenMessage('failure', sprintf(
2609 $lng->txt("msg_no_perm_read_item"),
2611 ), true);
2613 }
2614 }
2615 }
2616 $ilErr->raiseError($lng->txt("msg_no_perm_read"), $ilErr->FATAL);
2617 }
kindlyTo()
Combined validations and transformations for primitive data types that establish a baseline for furth...
Definition: Factory.php:55
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
static handleCode(int $a_ref_id, string $a_type, string $a_code)
static _gotoRepositoryRoot(bool $raise_error=false)
Goto repository root.
GlobalHttpState $http
static _gotoRepositoryNode(int $ref_id, string $cmd="")
ilLanguage $lng
static _lookupType(int $id, bool $reference=false)
static _lookupObjId(int $ref_id)
static _lookupTitle(int $obj_id)
static redirect(string $a_script)
const ANONYMOUS_USER_ID
Definition: constants.php:27
const ROOT_FOLDER_ID
Definition: constants.php:32
$ilErr
Definition: raiseError.php:33

References $DIC, ilObjectGUI\$http, $ilErr, ilObjectGUI\$lng, $refinery, ilObjectGUI\_gotoRepositoryNode(), ilObjectGUI\_gotoRepositoryRoot(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), ilObject\_lookupType(), ANONYMOUS_USER_ID, ilMembershipRegistrationCodeUtils\handleCode(), ILIAS\Repository\int(), ilContSkillPresentationGUI\isAccessible(), ILIAS\Refinery\Factory\kindlyTo(), ilUtil\redirect(), ROOT_FOLDER_ID, and ilLanguage\txt().

Referenced by ILIAS\StaticURL\Handler\LegacyGotoHandler\handle().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _modifyItemGUI()

static ilObjCourseGUI::_modifyItemGUI ( ilObjectListGUI  $a_item_list_gui,
string  $a_cmd_class,
array  $a_item_data,
bool  $a_abo_status,
int  $a_course_ref_id,
int  $a_course_obj_id,
int  $a_parent_ref_id = 0 
)
static

Definition at line 2716 of file class.ilObjCourseGUI.php.

2724 : void {
2725 global $DIC;
2726 $lng = $DIC->language();
2727 $ilAccess = $DIC->access();
2728
2729 // this is set for folders within the course
2730 if ($a_parent_ref_id == 0) {
2731 $a_parent_ref_id = $a_course_ref_id;
2732 }
2733
2734 // Special handling for tests in courses with learning objectives
2735 if ($a_item_data['type'] == 'tst' && ilObjCourse::_lookupViewMode($a_course_obj_id) == ilContainer::VIEW_OBJECTIVE) {
2736 $a_item_list_gui->addCommandLinkParameter(array('crs_show_result' => $a_course_ref_id));
2737 }
2738
2739 $a_item_list_gui->enableSubscribe($a_abo_status);
2740
2741 $is_tutor = ($ilAccess->checkAccess(
2742 'write',
2743 '',
2744 $a_course_ref_id,
2745 'crs',
2746 $a_course_obj_id
2747 ));
2748 }
static _lookupViewMode(int $a_id)
enableSubscribe(bool $status)

Referenced by modifyItemGUI(), ilObjFolderGUI\modifyItemGUI(), ilObjGroupGUI\modifyItemGUI(), and ilObjSessionGUI\modifyItemGUI().

+ Here is the caller graph for this function:

◆ addContentTab()

ilObjCourseGUI::addContentTab ( )

Definition at line 1831 of file class.ilObjCourseGUI.php.

1831 : void
1832 {
1833 $this->tabs_gui->addTab(
1834 "view_content",
1835 $this->lng->txt("content"),
1836 $this->ctrl->getLinkTarget($this, "view")
1837 );
1838 }

References ILIAS\Repository\lng().

Referenced by getTabs().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ afterImport()

ilObjCourseGUI::afterImport ( ilObject  $new_object)
protected

Post (successful) object import hook.

Reimplemented from ilObjectGUI.

Definition at line 89 of file class.ilObjCourseGUI.php.

89 : void
90 {
92 $part->add($this->user->getId(), ilCourseConstants::CRS_ADMIN);
93 $part->updateNotification(
94 $this->user->getId(),
95 (bool) $this->settings->get('mail_crs_admin_notification', '1')
96 );
97 parent::afterImport($new_object);
98 }
static _getInstanceByObjId(int $a_obj_id)

References ilCourseParticipants\_getInstanceByObjId(), ilCourseConstants\CRS_ADMIN, ilObject\getId(), and ILIAS\Repository\user().

+ Here is the call graph for this function:

◆ afterSave()

ilObjCourseGUI::afterSave ( ilObject  $new_object)
protected

@inheritDoc

Reimplemented from ilObjectGUI.

Definition at line 1607 of file class.ilObjCourseGUI.php.

1607 : void
1608 {
1609 $new_object->getMemberObject()->add($this->user->getId(), ilParticipants::IL_CRS_ADMIN);
1610 $new_object->getMemberObject()->updateNotification(
1611 $this->user->getId(),
1612 $this->settings->get('mail_crs_admin_notification', '1')
1613 );
1614 $new_object->getMemberObject()->updateContact($this->user->getId(), 1);
1615 $new_object->update();
1616
1617 ilChangeEvent::_recordWriteEvent($new_object->getId(), $this->user->getId(), 'create');
1618 // END ChangeEvent: Record write event.
1619
1620 // always send a message
1621 $this->tpl->setOnScreenMessage('success', $this->lng->txt("crs_added"), true);
1622 $this->ctrl->setParameter($this, "ref_id", $new_object->getRefId());
1624 "save",
1625 $this->ctrl->getLinkTarget($this, "edit", "")
1626 ));
1627 }
static _recordWriteEvent(int $obj_id, int $usr_id, string $action, ?int $parent_obj_id=null)
Records a write event.
getReturnLocation(string $cmd, string $default_location="")
Get return location for command (command is method name without "Object", e.g.

References ilChangeEvent\_recordWriteEvent(), ILIAS\Repository\ctrl(), ilObject\getId(), ilObject\getRefId(), ilObjectGUI\getReturnLocation(), ilParticipants\IL_CRS_ADMIN, ILIAS\Repository\lng(), ilUtil\redirect(), ilObject\update(), and ILIAS\Repository\user().

+ Here is the call graph for this function:

◆ afterSaveCallback()

ilObjCourseGUI::afterSaveCallback ( )
protected

Definition at line 2956 of file class.ilObjCourseGUI.php.

2956 : void
2957 {
2958 $this->ctrl->redirectByClass(array('ilrepositorygui', 'ilobjcoursegui', 'illoeditorgui'), 'materials');
2959 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ askResetObject()

ilObjCourseGUI::askResetObject ( )

Definition at line 2798 of file class.ilObjCourseGUI.php.

2798 : void
2799 {
2800 //$this->tpl->setOnScreenMessage('question', $this->lng->txt('crs_objectives_reset_sure'));
2801 $confirm = new ilConfirmationGUI();
2802 $confirm->setHeaderText($this->lng->txt('crs_objectives_reset_sure'));
2803 $confirm->setFormAction($this->ctrl->getFormAction($this));
2804 $confirm->setConfirm($this->lng->txt('reset'), 'reset');
2805 $confirm->setCancel($this->lng->txt('cancel'), 'cancel');
2806 $this->tpl->setContent($confirm->getHTML());
2807 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ autoFillObject()

ilObjCourseGUI::autoFillObject ( )

Definition at line 1745 of file class.ilObjCourseGUI.php.

1745 : bool
1746 {
1747 $this->checkPermission('write');
1748 if (
1749 $this->object->isSubscriptionMembershipLimited() &&
1750 $this->object->getSubscriptionMaxMembers() &&
1751 $this->object->getSubscriptionMaxMembers() <= $this->object->getMembersObject()->getCountMembers()
1752 ) {
1753 $this->tpl->setOnScreenMessage('failure', $this->lng->txt("crs_max_members_reached"));
1754 $this->membersObject();
1755 return false;
1756 }
1757 if ($number = $this->object->getMembersObject()->autoFillSubscribers()) {
1758 $this->tpl->setOnScreenMessage('success', $this->lng->txt("crs_number_users_added") . " " . $number);
1759 } else {
1760 $this->tpl->setOnScreenMessage('failure', $this->lng->txt("crs_no_users_added"));
1761 }
1762 $this->membersObject();
1763 return true;
1764 }
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)

References ilObjectGUI\checkPermission(), ILIAS\Repository\lng(), membersObject(), and ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ checkAgreement()

ilObjCourseGUI::checkAgreement ( )
private

Definition at line 2510 of file class.ilObjCourseGUI.php.

2510 : bool
2511 {
2512 if ($this->access->checkAccess('write', '', $this->object->getRefId())) {
2513 return true;
2514 }
2515
2516 // Disable aggrement if is not member of course
2517 if (!$this->object->getMemberObject()->isAssigned()) {
2518 return true;
2519 }
2520
2521 if (ilMemberViewSettings::getInstance()->isActive()) {
2522 return true;
2523 }
2524
2525 $privacy = ilPrivacySettings::getInstance();
2526
2527 // Check agreement
2528 if (
2529 (
2530 $privacy->courseConfirmationRequired() || ilCourseDefinedFieldDefinition::_hasFields($this->object->getId())
2531 ) &&
2532 !ilMemberAgreement::_hasAccepted($this->user->getId(), $this->object->getId())
2533 ) {
2534 $this->logger->warning('Missing course confirmation.');
2535 return false;
2536 }
2537 // Check required fields
2538 if (!ilCourseUserData::_checkRequired($this->user->getId(), $this->object->getId())) {
2539 $this->logger->warning('Missing required fields');
2540 return false;
2541 }
2542 return true;
2543 }
static _hasFields(int $a_container_id)
Check if there are any define fields.
static _checkRequired(int $a_usr_id, int $a_obj_id)
static _hasAccepted(int $a_usr_id, int $a_obj_id)
Check if user has accepted agreement.

References ilCourseUserData\_checkRequired(), ilMemberAgreement\_hasAccepted(), ilCourseDefinedFieldDefinition\_hasFields(), ILIAS\Repository\access(), ilMemberViewSettings\getInstance(), ilPrivacySettings\getInstance(), ILIAS\Repository\logger(), ILIAS\Repository\object(), and ILIAS\Repository\user().

+ Here is the call graph for this function:

◆ confirmDeleteInfoFilesObject()

ilObjCourseGUI::confirmDeleteInfoFilesObject ( )

Definition at line 499 of file class.ilObjCourseGUI.php.

499 : void
500 {
501 $file_ids = [];
502 if ($this->http->wrapper()->post()->has('file_id')) {
503 $file_ids = $this->http->wrapper()->post()->retrieve(
504 'file_id',
505 $this->refinery->kindlyTo()->listOf(
506 $this->refinery->kindlyTo()->int()
507 )
508 );
509 }
510 if (count($file_ids) === 0) {
511 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('select_one'));
512 $this->editInfoObject();
513 return;
514 }
515
516 $this->setSubTabs('properties');
517 $this->tabs_gui->setTabActive('settings');
518 $this->tabs_gui->setSubTabActive('crs_info_settings');
519
520 $c_gui = new ilConfirmationGUI();
521
522 // set confirm/cancel commands
523 $c_gui->setFormAction($this->ctrl->getFormAction($this, "deleteInfoFiles"));
524 $c_gui->setHeaderText($this->lng->txt("info_delete_sure"));
525 $c_gui->setCancel($this->lng->txt("cancel"), "editInfo");
526 $c_gui->setConfirm($this->lng->txt("confirm"), "deleteInfoFiles");
527
528 // add items to delete
529 foreach ($file_ids as $file_id) {
530 $file = new ilCourseFile($file_id);
531 $c_gui->addItem("file_id[]", $file_id, $file->getFileName());
532 }
533 $this->tpl->setContent($c_gui->getHTML());
534 }
editInfoObject(?ilPropertyFormGUI $a_form=null)
setSubTabs(string $a_tab)
static http()
Fetches the global http state from ILIAS.

References ILIAS\Repository\ctrl(), editInfoObject(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), ILIAS\Repository\refinery(), and setSubTabs().

+ Here is the call graph for this function:

◆ confirmLPSync()

ilObjCourseGUI::confirmLPSync ( )
protected

Definition at line 969 of file class.ilObjCourseGUI.php.

969 : void
970 {
971 $cgui = new ilConfirmationGUI();
972 $cgui->setFormAction($this->ctrl->getFormAction($this, "setLPSync"));
973 $cgui->setHeaderText($this->lng->txt("crs_status_determination_sync"));
974 $cgui->setCancel($this->lng->txt("cancel"), "edit");
975 $cgui->setConfirm($this->lng->txt("confirm"), "setLPSync");
976 $this->tpl->setContent($cgui->getHTML());
977 }

References ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

Referenced by updateObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ createMailSignature()

ilObjCourseGUI::createMailSignature ( )

Create a course mail signature.

Returns
string

Definition at line 2846 of file class.ilObjCourseGUI.php.

2846 : string
2847 {
2848 $link = chr(13) . chr(10) . chr(13) . chr(10);
2849 $link .= $this->lng->txt('crs_mail_permanent_link');
2850 $link .= chr(13) . chr(10) . chr(13) . chr(10);
2851 $link .= ilLink::_getLink($this->object->getRefId());
2852 return rawurlencode(base64_encode($link));
2853 }

References ILIAS\Repository\lng(), and ILIAS\Repository\object().

Referenced by infoScreen().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ deleteInfoFilesObject()

ilObjCourseGUI::deleteInfoFilesObject ( )

Definition at line 536 of file class.ilObjCourseGUI.php.

536 : void
537 {
538 $file_ids = [];
539 if ($this->http->wrapper()->post()->has('file_id')) {
540 $file_ids = $this->http->wrapper()->post()->retrieve(
541 'file_id',
542 $this->refinery->kindlyTo()->listOf(
543 $this->refinery->kindlyTo()->int()
544 )
545 );
546 }
547
548 if (count($file_ids) === 0) {
549 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('select_one'));
550 $this->editInfoObject();
551 return;
552 }
553
554 foreach ($file_ids as $file_id) {
555 $file = new ilCourseFile($file_id);
556 if ($this->object->getId() == $file->getCourseId()) {
557 $file->delete();
558 }
559 }
560 $this->tpl->setOnScreenMessage('success', $this->lng->txt('settings_saved'));
561 $this->editInfoObject();
562 }

References editInfoObject(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), ILIAS\Repository\object(), and ILIAS\Repository\refinery().

+ Here is the call graph for this function:

◆ deleteObject()

ilObjCourseGUI::deleteObject ( bool  $error = false)

Display deletion confirmation screen.

Only for referenced objects. For user,role & rolt overwrite this function in the appropriate Object folders classes (ilObjUserFolderGUI,ilObjRoleFolderGUI)

Reimplemented from ilObjectGUI.

Definition at line 158 of file class.ilObjCourseGUI.php.

158 : void
159 {
160 $this->tabs_gui->activateTab('view_content');
161 parent::deleteObject($error);
162 }
ilErrorHandling $error

References ilContainerGUI\$error.

◆ deliverCertificateObject()

ilObjCourseGUI::deliverCertificateObject ( )
Todo:
get rid of cert logger

Definition at line 2919 of file class.ilObjCourseGUI.php.

2919 : void
2920 {
2921 $user_id = null;
2922 if ($this->access->checkAccess('manage_members', '', $this->ref_id)) {
2923 $user_id = 0;
2924 if ($this->http->wrapper()->query()->has('member_id')) {
2925 $user_id = $this->http->wrapper()->query()->retrieve(
2926 'member_id',
2927 $this->refinery->kindlyTo()->int()
2928 );
2929 }
2930 }
2931 if (!$user_id) {
2932 $user_id = $this->user->getId();
2933 }
2934
2935 $objId = $this->object->getId();
2936
2937 $validator = new ilCertificateDownloadValidator();
2938
2939 if (false === $validator->isCertificateDownloadable($user_id, $objId)) {
2940 $this->tpl->setOnScreenMessage('failure', $this->lng->txt("permission_denied"), true);
2941 $this->ctrl->redirect($this);
2942 }
2943
2944 $repository = new ilUserCertificateRepository();
2945
2946 $pdfGenerator = new ilPdfGenerator($repository);
2947
2948 $pdfAction = new ilCertificatePdfAction(
2949 $pdfGenerator,
2951 $this->lng->txt('error_creating_certificate_pdf')
2952 );
2953 $pdfAction->downloadPdf((int) $user_id, $objId);
2954 }
Validates if an active certificate is stored in the database and can be downloaded by the user.
Just a wrapper class to create Unit Test for other classes.
$objId
Definition: xapitoken.php:57

References $objId, $user_id, ILIAS\Repository\access(), ILIAS\Repository\ctrl(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), ILIAS\Repository\refinery(), and ILIAS\Repository\user().

+ Here is the call graph for this function:

◆ editInfoObject()

ilObjCourseGUI::editInfoObject ( ?ilPropertyFormGUI  $a_form = null)

Definition at line 465 of file class.ilObjCourseGUI.php.

465 : void
466 {
467 $this->checkPermission('write');
468 $this->setSubTabs('properties');
469 $this->tabs_gui->setTabActive('settings');
470 $this->tabs_gui->setSubTabActive('crs_info_settings');
471
472 if (!$a_form) {
473 $a_form = $this->initInfoEditor();
474 }
475 $this->tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.edit_info.html', 'components/ILIAS/Course');
476 $this->tpl->setVariable('INFO_TABLE', $a_form->getHTML());
477
478 if (!count($files = ilCourseFile::_readFilesByCourse($this->object->getId()))) {
479 return;
480 }
481 $rows = array();
482 foreach ($files as $file) {
483 $table_data['id'] = $file->getFileId();
484 $table_data['filename'] = $file->getFileName();
485 $table_data['filetype'] = $file->getFileType();
486 $table_data['filesize'] = $file->getFileSize();
487
488 $rows[] = $table_data;
489 }
490 $table_gui = new ilCourseInfoFileTableGUI($this, 'editInfo');
491 $table_gui->setTitle($this->lng->txt("crs_info_download"));
492 $table_gui->setData($rows);
493 $table_gui->addCommandButton("cancel", $this->lng->txt("cancel"));
494 $table_gui->addMultiCommand("confirmDeleteInfoFiles", $this->lng->txt("delete"));
495 $table_gui->setSelectAllCheckbox("file_id");
496 $this->tpl->setVariable('INFO_FILE_TABLE', $table_gui->getHTML());
497 }
static _readFilesByCourse(int $a_course_id)

References ilCourseFile\_readFilesByCourse(), ilObjectGUI\checkPermission(), initInfoEditor(), ILIAS\Repository\lng(), ILIAS\Repository\object(), and setSubTabs().

Referenced by confirmDeleteInfoFilesObject(), deleteInfoFilesObject(), and updateInfoObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ editMapSettingsObject()

ilObjCourseGUI::editMapSettingsObject ( )

Definition at line 2619 of file class.ilObjCourseGUI.php.

2619 : void
2620 {
2621 $this->setSubTabs("properties");
2622 $this->tabs_gui->activateTab('settings');
2623 $this->tabs_gui->activateSubTab('crs_map_settings');
2624
2625 if (!ilMapUtil::isActivated() ||
2626 !$this->access->checkAccess("write", "", $this->object->getRefId())) {
2627 return;
2628 }
2629
2630 $latitude = $this->object->getLatitude();
2631 $longitude = $this->object->getLongitude();
2632 $zoom = $this->object->getLocationZoom();
2633
2634 // Get Default settings, when nothing is set
2635 if ($latitude == 0 && $longitude == 0 && $zoom == 0) {
2637 $latitude = $def["latitude"];
2638 $longitude = $def["longitude"];
2639 $zoom = $def["zoom"];
2640 }
2641
2642 $form = new ilPropertyFormGUI();
2643 $form->setFormAction($this->ctrl->getFormAction($this));
2644 $form->setTitle($this->lng->txt("crs_map_settings"));
2645
2646 // enable map
2647 $public = new ilCheckboxInputGUI(
2648 $this->lng->txt("crs_enable_map"),
2649 "enable_map"
2650 );
2651 $public->setValue("1");
2652 $public->setChecked($this->object->getEnableCourseMap());
2653 $form->addItem($public);
2654
2655 // map location
2656 $loc_prop = new ilLocationInputGUI(
2657 $this->lng->txt("crs_map_location"),
2658 "location"
2659 );
2660 $loc_prop->setLatitude((float) $latitude);
2661 $loc_prop->setLongitude((float) $longitude);
2662 $loc_prop->setZoom((int) $zoom);
2663 $form->addItem($loc_prop);
2664
2665 $form->addCommandButton("saveMapSettings", $this->lng->txt("save"));
2666
2667 $this->tpl->setVariable("ADM_CONTENT", $form->getHTML());
2668 //$this->tpl->show();
2669 }
This class represents a checkbox property in a property form.
ilPropertyFormGUI $form
setFormAction(string $a_formaction)
This class represents a location property in a property form.
static isActivated()
Checks whether Map feature is activated.
static getDefaultSettings()
Get default longitude, latitude and zoom.
This class represents a property form user interface.
addCommandButton(string $a_cmd, string $a_text, string $a_id="")

References ilContainerGUI\$form, ILIAS\Repository\access(), ilPropertyFormGUI\addCommandButton(), ilPropertyFormGUI\addItem(), ILIAS\Repository\ctrl(), ilMapUtil\getDefaultSettings(), ilPropertyFormGUI\getHTML(), ilMapUtil\isActivated(), ILIAS\Repository\lng(), ILIAS\Repository\object(), ilFormGUI\setFormAction(), setSubTabs(), and ilPropertyFormGUI\setTitle().

+ Here is the call graph for this function:

◆ editObject()

ilObjCourseGUI::editObject ( ?ilPropertyFormGUI  $form = null)

Definition at line 988 of file class.ilObjCourseGUI.php.

988 : void
989 {
990 $this->setSubTabs('properties');
991 $this->tabs_gui->setSubTabActive('general');
992
993 if ($form instanceof ilPropertyFormGUI) {
994 $GLOBALS['DIC']['tpl']->setContent($form->getHTML());
995 } else {
996 parent::editObject();
997 }
998 }
$GLOBALS["DIC"]
Definition: wac.php:54

References ilContainerGUI\$form, $GLOBALS, ilPropertyFormGUI\getHTML(), and setSubTabs().

+ Here is the call graph for this function:

◆ executeCommand()

ilObjCourseGUI::executeCommand ( )

Reimplemented from ilContainerGUI.

Definition at line 2035 of file class.ilObjCourseGUI.php.

2035 : void
2036 {
2037 $next_class = $this->ctrl->getNextClass($this);
2038 $cmd = $this->ctrl->getCmd();
2039
2040 $this->prepareOutput();
2041
2042 // add entry to navigation history
2043 if (!$this->getCreationMode() &&
2044 $this->access->checkAccess('read', '', $this->ref_id)) {
2045 $this->navigation_history->addItem(
2046 $this->ref_id,
2047 ilLink::_getLink($this->ref_id, "crs"),
2048 "crs"
2049 );
2050 }
2051 $header_action = true;
2052 switch ($next_class) {
2053 case strtolower(ilRepositoryTrashGUI::class):
2054 $ru = new \ilRepositoryTrashGUI($this);
2055 $this->ctrl->setReturn($this, 'trash');
2056 $this->ctrl->forwardCommand($ru);
2057 break;
2058
2059 case 'illtiproviderobjectsettinggui':
2060
2061 $this->setSubTabs('properties');
2062 $this->tabs_gui->activateTab('settings');
2063 $this->tabs_gui->activateSubTab('lti_provider');
2064 $lti_gui = new ilLTIProviderObjectSettingGUI($this->object->getRefId());
2065 $lti_gui->setCustomRolesForSelection($GLOBALS['DIC']->rbac()->review()->getLocalRoles($this->object->getRefId()));
2066 $lti_gui->offerLTIRolesForSelection(false);
2067 $this->ctrl->forwardCommand($lti_gui);
2068 break;
2069
2070 case 'ilcoursemembershipgui':
2071
2072 $this->tabs_gui->activateTab('members');
2073
2074 $mem_gui = new ilCourseMembershipGUI($this, $this->object);
2075 $this->ctrl->forwardCommand($mem_gui);
2076 break;
2077
2078 case "ilinfoscreengui":
2079 $this->infoScreen(); // forwards command
2080 break;
2081
2082 case 'ilobjectmetadatagui':
2083 if (!$this->access->checkAccess('write', '', $this->object->getRefId())) {
2084 $this->error->raiseError($this->lng->txt('permission_denied'), $this->error->WARNING);
2085 }
2086 $this->tabs_gui->setTabActive('meta_data');
2087 $md_gui = new ilObjectMetaDataGUI($this->object);
2088 $this->ctrl->forwardCommand($md_gui);
2089 break;
2090
2091 case 'ilcourseregistrationgui':
2092 $this->ctrl->setReturn($this, '');
2093 $this->tabs_gui->setTabActive('join');
2094 $registration = new ilCourseRegistrationGUI($this->object, $this);
2095 $this->ctrl->forwardCommand($registration);
2096 break;
2097
2098 case 'ilobjectcustomuserfieldsgui':
2099 $cdf_gui = new ilObjectCustomUserFieldsGUI($this->object->getId());
2100 $this->setSubTabs('properties');
2101 $this->tabs_gui->activateTab('settings');
2102 $this->tabs_gui->activateSubTab('crs_custom_user_fields');
2103 $this->ctrl->forwardCommand($cdf_gui);
2104 break;
2105
2106 case "ilcourseobjectivesgui":
2107
2108 $this->ctrl->setReturn($this, "");
2109 $reg_gui = new ilCourseObjectivesGUI($this->object->getRefId());
2110 $this->ctrl->forwardCommand($reg_gui);
2111 break;
2112
2113 case 'ilobjcoursegroupinggui':
2114
2115 $this->ctrl->setReturn($this, 'edit');
2116 $this->setSubTabs('properties');
2117 $this->tabs_gui->activateTab('settings');
2118 $this->tabs_gui->activateSubTab('groupings');
2119
2120 $grouping_id = 0;
2121 if ($this->http->wrapper()->query()->has('obj_id')) {
2122 $grouping_id = $this->http->wrapper()->query()->retrieve(
2123 'obj_id',
2124 $this->refinery->kindlyTo()->int()
2125 );
2126 }
2127 $crs_grp_gui = new ilObjCourseGroupingGUI($this->object, $grouping_id);
2128 $this->ctrl->forwardCommand($crs_grp_gui);
2129 break;
2130
2131 case "ilpropertyformgui":
2132 // only case is currently adv metadata internal link in info settings, see #24497
2133 $form = $this->initInfoEditor();
2134 $this->ctrl->forwardCommand($form);
2135 break;
2136
2137 case "ilcolumngui":
2138 $this->ctrl->setReturn($this, "");
2139 $this->tabs_gui->setTabActive('none');
2140 $this->checkPermission("read");
2141 //$this->prepareOutput();
2142 //$this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
2143 // ilObjStyleSheet::getContentStylePath(0));
2144 //$this->renderObject();
2145 $this->viewObject();
2146 break;
2147
2148 case "ilconditionhandlergui":
2149 // preconditions for whole course
2150 $this->setSubTabs("properties");
2151 $this->tabs_gui->activateTab('settings');
2152 $this->tabs_gui->activateSubTab('preconditions');
2153 $new_gui = new ilConditionHandlerGUI($this->object->getRefId());
2154 $this->ctrl->forwardCommand($new_gui);
2155 break;
2156
2157 case "illearningprogressgui":
2158
2159 $user_id = $this->user->getId();
2160 if ($this->http->wrapper()->query()->has('user_id')) {
2161 $user_id = $this->http->wrapper()->query()->retrieve(
2162 'user_id',
2163 $this->refinery->kindlyTo()->int()
2164 );
2165 }
2166 $new_gui = new ilLearningProgressGUI(
2168 $this->object->getRefId(),
2169 $user_id
2170 );
2171 $this->ctrl->forwardCommand($new_gui);
2172 $this->tabs_gui->setTabActive('learning_progress');
2173 break;
2174
2175 case 'ilpermissiongui':
2176 $this->tabs_gui->setTabActive('perm_settings');
2177 $perm_gui = new ilPermissionGUI($this);
2178 $this->ctrl->forwardCommand($perm_gui);
2179 break;
2180
2181 case 'ilcalendarpresentationgui':
2182 $cal = new ilCalendarPresentationGUI($this->object->getRefId());
2183 $ret = $this->ctrl->forwardCommand($cal);
2184 $header_action = false;
2185 break;
2186
2187 case 'ilcoursecontentgui':
2188 $this->ctrl->setReturn($this, 'members');
2189 $course_content_obj = new ilCourseContentGUI($this);
2190 $this->ctrl->forwardCommand($course_content_obj);
2191 break;
2192
2193 case strtolower(PublicProfileGUI::class):
2194 $this->tpl->enableDragDropFileUpload(null);
2195 $this->setSubTabs('members');
2196 $this->tabs_gui->setTabActive('members');
2197
2198 $user_id = $this->user->getId();
2199 if ($this->http->wrapper()->query()->has('user_id')) {
2200 $user_id = $this->http->wrapper()->query()->retrieve(
2201 'user_id',
2202 $this->refinery->kindlyTo()->int()
2203 );
2204 }
2205 $profile_gui = new PublicProfileGUI($user_id);
2206 $profile_gui->setBackUrl($this->ctrl->getLinkTargetByClass(["ilCourseMembershipGUI",
2207 "ilUsersGalleryGUI"
2208 ], 'view'));
2209 $this->tabs_gui->setSubTabActive('crs_members_gallery');
2210 $html = $this->ctrl->forwardCommand($profile_gui);
2211 $this->tpl->setVariable("ADM_CONTENT", $html);
2212 break;
2213
2214 case 'ilmemberagreementgui':
2215 $this->tabs_gui->clearTargets();
2216
2217 $this->ctrl->setReturn($this, '');
2218 $agreement = new ilMemberAgreementGUI($this->object->getRefId());
2219 $this->ctrl->forwardCommand($agreement);
2220 break;
2221
2222 // container page editing
2223 case "ilcontainerpagegui":
2224 $ret = $this->forwardToPageObject();
2225 if ($ret != "") {
2226 $this->tpl->setContent($ret);
2227 }
2228 $header_action = false;
2229 break;
2230
2231 case "ilcontainerstartobjectspagegui":
2232 // file downloads, etc. (currently not active)
2233 $pgui = new ilContainerStartObjectsPageGUI($this->object->getId());
2234 $ret = $this->ctrl->forwardCommand($pgui);
2235 if ($ret) {
2236 $this->tpl->setContent($ret);
2237 }
2238 break;
2239
2240 case 'ilobjectcopygui':
2241 $cp = new ilObjectCopyGUI($this);
2242 $cp->setType('crs');
2243 $this->ctrl->forwardCommand($cp);
2244 break;
2245
2246 case "ilobjectcontentstylesettingsgui":
2247
2248 global $DIC;
2249
2250 $this->checkPermission("write");
2251 $this->setTitleAndDescription();
2252 $this->showContainerPageTabs();
2253 $settings_gui = $DIC->contentStyle()->gui()
2254 ->objectSettingsGUIForRefId(
2255 null,
2256 $this->object->getRefId()
2257 );
2258 $this->ctrl->forwardCommand($settings_gui);
2259 break;
2260
2261 case 'ilexportgui':
2262 $this->tabs_gui->setTabActive('export');
2263 $exp = new ilExportGUI($this);
2264 $exp->addFormat('xml');
2265 $this->ctrl->forwardCommand($exp);
2266 break;
2267
2268 case "ilcommonactiondispatchergui":
2270 $this->ctrl->forwardCommand($gui);
2271 break;
2272
2273 case 'ildidactictemplategui':
2274 $this->ctrl->setReturn($this, 'edit');
2275 $did = new ilDidacticTemplateGUI($this);
2276 $this->ctrl->forwardCommand($did);
2277 break;
2278
2279 case "ilcertificategui":
2280 $this->tabs_gui->activateTab("settings");
2281 $this->setSubTabs("properties");
2282 $this->tabs_gui->activateSubTab('certificate');
2283
2284 $guiFactory = new ilCertificateGUIFactory();
2285 $output_gui = $guiFactory->create($this->object);
2286 $this->ctrl->forwardCommand($output_gui);
2287 break;
2288
2289 case 'illoeditorgui':
2290 #$this->tabs_gui->clearTargets();
2291 #$this->tabs_gui->setBackTarget($this->lng->txt('back'),$this->ctrl->getLinkTarget($this,''));
2292 $this->tabs_gui->activateTab('crs_objectives');
2293
2294 $editor = new ilLOEditorGUI($this);
2295 $this->ctrl->forwardCommand($editor);
2296 if (strtolower($this->ctrl->getCmdClass()) === "illopagegui") {
2297 $header_action = false;
2298 }
2299 break;
2300
2301 case 'ilcontainerstartobjectsgui':
2302 $this->ctrl->setReturn($this, 'edit');
2303 $this->tabs_gui->clearTargets();
2304 $this->tabs_gui->setBackTarget(
2305 $this->lng->txt("back_to_crs_content"),
2306 $this->ctrl->getLinkTarget($this, "edit")
2307 );
2308 $this->tabs_gui->addTab(
2309 "start",
2310 $this->lng->txt("crs_start_objects"),
2311 $this->ctrl->getLinkTargetByClass("ilcontainerstartobjectsgui", "listStructure")
2312 );
2313 $this->tabs_gui->activateTab("start");
2314 if (strtolower($this->ctrl->getCmdClass()) ==
2315 "ilcontainerstartobjectspagegui") {
2316 $header_action = false;
2317 }
2318 global $DIC;
2319
2320 $ilHelp = $DIC['ilHelp'];
2321 $this->help->setScreenIdComponent("crs");
2322 $stgui = new ilContainerStartObjectsGUI($this->object);
2323 $this->ctrl->forwardCommand($stgui);
2324 break;
2325
2326 case 'illomembertestresultgui':
2327 $GLOBALS['DIC']['ilCtrl']->setReturn($this, 'members');
2328 $GLOBALS['DIC']['ilTabs']->clearTargets();
2329 $GLOBALS['DIC']['ilTabs']->setBackTarget(
2330 $GLOBALS['DIC']['lng']->txt('back'),
2331 $GLOBALS['DIC']['ilCtrl']->getLinkTarget($this, 'members')
2332 );
2333
2334 $uid = 0;
2335 if ($this->http->wrapper()->query()->has('uid')) {
2336 $uid = $this->http->wrapper()->query()->retrieve(
2337 'uid',
2338 $this->refinery->kindlyTo()->int()
2339 );
2340 }
2341 $result_view = new ilLOMemberTestResultGUI($this, $this->object, $uid);
2342 $this->ctrl->forwardCommand($result_view);
2343 break;
2344
2345 case 'ilmailmembersearchgui':
2346 $mail = new ilMail($this->user->getId());
2347
2348 if (
2349 !($this->object->getMailToMembersType() == ilCourseConstants::MAIL_ALLOWED_ALL ||
2350 $this->access->checkAccess('manage_members', "", $this->object->getRefId())) &&
2351 $this->rbac_system->checkAccess('internal_mail', $mail->getMailObjectReferenceId())) {
2352 $this->error->raiseError($this->lng->txt("msg_no_perm_read"), $this->error->MESSAGE);
2353 }
2354
2355 $this->tabs_gui->setTabActive('members');
2356
2357 $mail_search = new ilMailMemberSearchGUI(
2358 $this,
2359 $this->object->getRefId(),
2361 );
2362 $mail_search->setObjParticipants(
2364 );
2365 $this->ctrl->forwardCommand($mail_search);
2366 break;
2367
2368 case 'ilbadgemanagementgui':
2369 $this->tabs_gui->setTabActive('obj_tool_setting_badges');
2370 $bgui = new ilBadgeManagementGUI($this->object->getRefId(), $this->object->getId(), 'crs');
2371 $this->ctrl->forwardCommand($bgui);
2372 break;
2373
2374 case "ilcontainernewssettingsgui":
2375 $this->setSubTabs("properties");
2376 $this->tabs_gui->activateTab('settings');
2377 $this->tabs_gui->activateSubTab('obj_news_settings');
2378 $news_set_gui = new ilContainerNewsSettingsGUI($this);
2379 $news_set_gui->setTimeline(true);
2380 $news_set_gui->setCronNotifications(true);
2381 $news_set_gui->setHideByDate(true);
2382 $this->ctrl->forwardCommand($news_set_gui);
2383 break;
2384
2385 case "ilnewstimelinegui":
2386 if (!$this->__checkStartObjects()) { // see #37236
2387 $this->ctrl->redirectByClass(self::class, "view");
2388 }
2389 $this->tabs_gui->setTabActive('news_timeline');
2391 $this->object->getRefId(),
2392 $this->object->getNewsTimelineAutoEntries()
2393 );
2394 $t->setUserEditAll($this->access->checkAccess('write', '', $this->object->getRefId(), 'grp'));
2395 $this->showPermanentLink();
2396 $this->ctrl->forwardCommand($t);
2398 $this->user->getId(),
2399 $this->object->getId(),
2400 $this->object->getRefId(),
2401 'crs'
2402 );
2403 break;
2404
2405 case 'ilmemberexportsettingsgui':
2406 $this->setSubTabs('properties');
2407 $this->tabs_gui->activateTab('properties');
2408 $this->tabs_gui->activateSubTab('export_members');
2409 $settings_gui = new ilMemberExportSettingsGUI($this->object->getType(), $this->object->getId());
2410 $this->ctrl->forwardCommand($settings_gui);
2411 break;
2412
2413 case "ilcontainerskillgui":
2414 $this->tabs_gui->activateTab('obj_tool_setting_skills');
2415 $gui = new ilContainerSkillGUI($this);
2416 $this->ctrl->forwardCommand($gui);
2417 break;
2418
2419 case strtolower(TranslationGUI::class):
2420 $this->checkPermissionBool("write");
2421 $this->setSubTabs("properties");
2422 $this->tabs_gui->activateTab("settings");
2423 $this->tabs_gui->activateSubTab("obj_multilinguality");
2424 $transgui = new TranslationGUI(
2425 $this->getObject(),
2426 $this->lng,
2427 $this->access,
2428 $this->user,
2429 $this->ctrl,
2430 $this->tpl,
2431 $this->ui_factory,
2432 $this->ui_renderer,
2433 $this->http,
2434 $this->refinery,
2435 $this->toolbar
2436 );
2437 $this->ctrl->forwardCommand($transgui);
2438 break;
2439
2440 case "ilbookinggatewaygui":
2441 $this->tabs_gui->activateTab('obj_tool_setting_booking');
2442 $gui = new ilBookingGatewayGUI($this);
2443 $this->ctrl->forwardCommand($gui);
2444 break;
2445
2446 default:
2447 // #9401 - see also ilStartupGUI::_checkGoto()
2448 if ($cmd == 'infoScreenGoto') {
2449 if (ilObjCourse::_isActivated($this->object->getId()) &&
2450 ilObjCourse::_registrationEnabled($this->object->getId())) {
2451 $cmd = 'join';
2452 } else {
2453 $cmd = 'infoScreen';
2454 }
2455 }
2456
2457 if (!$this->creation_mode) {
2458 if ($cmd == "infoScreen") {
2459 $this->checkPermission("visible");
2460 } else {
2461 // $this->checkPermission("read");
2462 }
2463 }
2464
2465 if (!$this->creation_mode
2466 && $cmd != 'infoScreen'
2467 && $cmd != 'sendfile'
2468 && $cmd != 'unsubscribe'
2469 && $cmd != 'deliverCertificate'
2470 && $cmd != 'performUnsubscribe'
2471 && $cmd != 'removeFromDesk'
2472 && $cmd !== 'leave'
2473 && !$this->access->checkAccess("read", '', $this->object->getRefId())
2474 || $cmd == 'join'
2475 || $cmd == 'subscribe'
2476 || $cmd === 'leaveWaitList') {
2477 if ($this->rbac_system->checkAccess('join', $this->object->getRefId()) &&
2478 !ilCourseParticipants::_isParticipant($this->object->getRefId(), $this->user->getId())) {
2479 $this->ctrl->redirectByClass("ilCourseRegistrationGUI");
2480 } else {
2481 $this->infoScreenObject();
2482 break;
2483 }
2484 }
2485
2486 if ($cmd == 'listObjectives') {
2487 $this->ctrl->setReturn($this, "");
2488 $obj_gui = new ilCourseObjectivesGUI($this->object->getRefId());
2489 $this->ctrl->forwardCommand($obj_gui);
2490 break;
2491 }
2492 // if news timeline is landing page, redirect if necessary
2493 if ($cmd == "" && $this->object->isNewsTimelineLandingPageEffective()) {
2494 $this->ctrl->redirectByClass("ilnewstimelinegui");
2495 }
2496
2497 if (!$cmd) {
2498 $cmd = 'view';
2499 }
2500 $cmd .= 'Object';
2501 $this->$cmd();
2502 break;
2503 }
2504
2505 if ($header_action) {
2506 $this->addHeaderAction();
2507 }
2508 }
GUI class for public user profile presentation.
error(string $a_errmsg)
@ilCtrl_Calls ilBadgeManagementGUI: ilPropertyFormGUI
This class is used for integration of the booking manager as a service into other repository objects,...
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
class ilConditionHandlerGUI
ILIAS Container InternalGUIService $gui
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Skills for container (course/group) (top gui class)
Class ilContainerStartObjectsGUI.
Container start objects page GUI class.
Class ilCourseContentGUI.
class ilobjcourseobjectivesgui
GUI class for course registrations.
GUI class for didactic template settings inside repository objects.
Export User Interface Class.
Class ilLOEditorGUI.
GUI class for LTI provider object settings.
Class ilObjUserTrackingGUI.
static _tracProgress(int $a_user_id, int $a_obj_id, int $a_ref_id, string $a_obj_type='')
Class ilMailMemberCourseRoles.
static getInstance(int $a_ref_id, bool $a_include_auto_entries)
infoScreenObject()
this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually,...
getLocalRoles(array $a_exclude=array())
Class ilObjCourseGroupingGUI.
static _registrationEnabled(int $a_obj_id)
Registration enabled? Method is in Access class, since it is needed by Access/ListGUI.
static _isActivated(int $a_obj_id)
Is activated.
GUI class for the workflow of copying objects.
enableDragDropFileUpload()
Enables the file upload into this object by dropping files.
viewObject()
viewObject container presentation for "administration -> repository, trash, permissions"
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
addHeaderAction()
Add header action menu.
prepareOutput(bool $show_sub_objects=true)
Class ilObjectMetaDataGUI.
static _isParticipant(int $a_ref_id, int $a_usr_id)
Static function to check if a user is a participant of the container object.
Repository GUI Utilities.

References $DIC, ilContainerGUI\$form, $GLOBALS, ilContainerGUI\$gui, ilObjectGUI\$html, $user_id, __checkStartObjects(), ilCourseParticipants\_getInstanceByObjId(), ilObjCourse\_isActivated(), ilParticipants\_isParticipant(), ilObjCourse\_registrationEnabled(), ilLearningProgress\_tracProgress(), ILIAS\Repository\access(), ilObjectGUI\addHeaderAction(), ilObjectGUI\checkPermission(), ilObjectGUI\checkPermissionBool(), ILIAS\Repository\ctrl(), error(), ilContainerGUI\forwardToPageObject(), ilObjectGUI\getCreationMode(), ilNewsTimelineGUI\getInstance(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), getLocalRoles(), ilObjectGUI\getObject(), ILIAS\Repository\help(), ILIAS\FileDelivery\http(), infoScreen(), infoScreenObject(), initInfoEditor(), ILIAS\Repository\lng(), ilLearningProgressBaseGUI\LP_CONTEXT_REPOSITORY, ilCourseConstants\MAIL_ALLOWED_ALL, ILIAS\Repository\object(), ilObjectGUI\prepareOutput(), ILIAS\Repository\rbac(), ILIAS\Repository\refinery(), setSubTabs(), ilContainerGUI\setTitleAndDescription(), ilContainerGUI\showContainerPageTabs(), ilContainerGUI\showPermanentLink(), ILIAS\Repository\toolbar(), ILIAS\Repository\user(), and ilObjectGUI\viewObject().

+ Here is the call graph for this function:

◆ gatewayObject()

ilObjCourseGUI::gatewayObject ( )
Todo:
check deletable

Definition at line 84 of file class.ilObjCourseGUI.php.

84 : void
85 {
86 $this->viewObject();
87 }

References ilObjectGUI\viewObject().

+ Here is the call graph for this function:

◆ getAgreementTabs()

ilObjCourseGUI::getAgreementTabs ( )
protected

Definition at line 1806 of file class.ilObjCourseGUI.php.

1806 : void
1807 {
1808 if ($this->access->checkAccess('visible', '', $this->ref_id)) {
1809 $this->tabs->addTarget(
1810 "info_short",
1811 $this->ctrl->getLinkTargetByClass(
1812 array("ilobjcoursegui", "ilinfoscreengui"),
1813 "showSummary"
1814 ),
1815 "infoScreen"
1816 );
1817 }
1818 if (
1819 $this->access->checkAccess('leave', '', $this->object->getRefId()) &&
1820 $this->object->getMemberObject()->isMember()
1821 ) {
1822 $this->tabs->addTarget(
1823 "crs_unsubscribe",
1824 $this->ctrl->getLinkTarget($this, "unsubscribe"),
1825 'leave',
1826 ""
1827 );
1828 }
1829 }

References ILIAS\Repository\access(), ILIAS\Repository\ctrl(), and ILIAS\Repository\tabs().

+ Here is the call graph for this function:

◆ getEditFormValues()

ilObjCourseGUI::getEditFormValues ( )
protected

values are already set in initEditForm Returning an empty array avoid overriding these values.

Reimplemented from ilContainerGUI.

Definition at line 1004 of file class.ilObjCourseGUI.php.

1004 : array
1005 {
1006 return [];
1007 }

◆ getLocalRoles()

ilObjCourseGUI::getLocalRoles ( array  $a_exclude = array())
Returns
array localroles
Parameters
int[]$a_excludea list of role ids which will not added to the results (optional) returns all local roles [role_id] => title

Definition at line 3087 of file class.ilObjCourseGUI.php.

3087 : array
3088 {
3089 $crs_admin = $this->object->getDefaultAdminRole();
3090 $crs_member = $this->object->getDefaultMemberRole();
3091 $local_roles = $this->object->getLocalCourseRoles(false);
3092 $crs_roles = [];
3093
3094 //put the course member role to the top of the crs_roles array
3095 if (in_array($crs_member, $local_roles)) {
3096 #$crs_roles[$crs_member] = ilObjRole::_getTranslation(array_search ($crs_member, $local_roles));
3097 #unset($local_roles[$crs_roles[$crs_member]]);
3098 }
3099
3100 foreach ($local_roles as $title => $role_id) {
3101 if ($role_id == $crs_admin && !$this->hasAdminPermission()) {
3102 continue;
3103 }
3104
3105 $crs_roles[$role_id] = ilObjRole::_getTranslation($title);
3106 }
3107
3108 if ($a_exclude !== []) {
3109 foreach ($a_exclude as $excluded_role) {
3110 if (isset($crs_roles[$excluded_role])) {
3111 unset($crs_roles[$excluded_role]);
3112 }
3113 }
3114 }
3115 return $crs_roles;
3116 }
static _getTranslation(string $a_role_title)

References ilObjRole\_getTranslation().

Referenced by executeCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSubServices()

ilObjCourseGUI::getSubServices ( )
protected

Definition at line 949 of file class.ilObjCourseGUI.php.

949 : array
950 {
951 $subs = array(
961 );
962 if ($this->news->isGloballyActivated()) {
964 }
965
966 return $subs;
967 }

References ilObjectServiceSettingsGUI\AUTO_RATING_NEW_OBJECTS, ilObjectServiceSettingsGUI\BADGES, ilObjectServiceSettingsGUI\BOOKING, ilObjectServiceSettingsGUI\CALENDAR_CONFIGURATION, ilObjectServiceSettingsGUI\CUSTOM_METADATA, ilObjectServiceSettingsGUI\EXTERNAL_MAIL_PREFIX, ilObjectServiceSettingsGUI\ORGU_POSITION_ACCESS, ilObjectServiceSettingsGUI\SKILLS, ilObjectServiceSettingsGUI\TAG_CLOUD, and ilObjectServiceSettingsGUI\USE_NEWS.

◆ getTabs()

ilObjCourseGUI::getTabs ( )
protected

@abstract overwrite in derived GUI class of your object type

Reimplemented from ilContainerGUI.

Definition at line 1840 of file class.ilObjCourseGUI.php.

1840 : void
1841 {
1842 $this->help->setScreenIdComponent("crs");
1843 $this->ctrl->setParameter($this, "ref_id", $this->ref_id);
1844
1845 if ($this->access->checkAccess('read', '', $this->ref_id)) {
1846 // default activation
1847 $this->tabs_gui->activateTab('view_content');
1848 if ($this->object->isNewsTimelineEffective()) {
1849 if (!$this->object->isNewsTimelineLandingPageEffective()) {
1850 $this->addContentTab();
1851 }
1852 $this->tabs_gui->addTab(
1853 "news_timeline",
1854 $this->lng->txt("cont_news_timeline_tab"),
1855 $this->ctrl->getLinkTargetByClass("ilnewstimelinegui", "show")
1856 );
1857 if ($this->object->isNewsTimelineLandingPageEffective()) {
1858 $this->addContentTab();
1859 }
1860 } else {
1861 $this->addContentTab();
1862 }
1863 }
1864
1865 if ($this->object->getViewMode() == ilCourseConstants::IL_CRS_VIEW_TIMING && $this->access->checkAccess('write', '', $this->ref_id)
1866 ) {
1867 $this->tabs->addTab(
1868 'timings_timings',
1869 $this->lng->txt('timings_timings'),
1870 $this->ctrl->getLinkTargetByClass('ilcoursecontentgui', 'manageTimings')
1871 );
1872 } elseif (
1873 $this->object->getViewMode() == ilCourseConstants::IL_CRS_VIEW_TIMING && $this->object->getMemberObject()->isParticipant() && $this->access->checkAccess('read', '', $this->ref_id)) {
1874 $this->tabs->addTab(
1875 'timings_timings',
1876 $this->lng->txt('timings_timings'),
1877 $this->ctrl->getLinkTargetByClass('ilcoursecontentgui', 'managePersonalTimings')
1878 );
1879 }
1880
1881 // learning objectives
1882 if ($this->access->checkAccess('write', '', $this->ref_id)) {
1883 if ($this->object->getViewMode() == ilCourseConstants::IL_CRS_VIEW_OBJECTIVE or ilCourseObjective::_getCountObjectives($this->object->getId())) {
1884 $this->tabs_gui->addTarget(
1885 'crs_objectives',
1886 $this->ctrl->getLinkTargetByClass('illoeditorgui', ''),
1887 'illoeditorgui'
1888 );
1889 }
1890 }
1891
1892 if (
1893 $this->access->checkAccess('visible', '', $this->ref_id) ||
1894 $this->access->checkAccess('join', '', $this->ref_id) ||
1895 $this->access->checkAccess('read', '', $this->ref_id)
1896 ) {
1897 $force_active =
1898 strcasecmp($this->ctrl->getCmdClass(), ilInfoScreenGUI::class) === 0 ||
1899 strcasecmp($this->ctrl->getCmdClass(), ilNoteGUI::class) === 0;
1900 $this->tabs_gui->addTarget(
1901 "info_short",
1902 $this->ctrl->getLinkTargetByClass(
1903 array("ilobjcoursegui", "ilinfoscreengui"),
1904 "showSummary"
1905 ),
1906 "infoScreen",
1907 "",
1908 "",
1909 $force_active
1910 );
1911 }
1912 if ($this->access->checkAccess('write', '', $this->ref_id)) {
1913 $force_active =
1914 strcasecmp($this->ctrl->getCmdClass(), ilConditionHandlerGUI::class) &&
1915 !$this->http->wrapper()->query()->has('item_id');
1916 $this->tabs_gui->addTarget(
1917 "settings",
1918 $this->ctrl->getLinkTarget($this, "edit"),
1919 array("edit", "editMapSettings", "editCourseIcons", "listStructure"),
1920 "",
1921 "",
1922 $force_active
1923 );
1924 }
1925
1926 $is_participant = ilCourseParticipants::_isParticipant($this->ref_id, $this->user->getId());
1927 $mail = new ilMail($this->user->getId());
1928
1929 $membership_gui = new ilCourseMembershipGUI($this, $this->object);
1930 $membership_gui->addMemberTab($this->tabs_gui, $is_participant);
1931
1932 // badges
1933 if ($this->access->checkAccess('write', '', $this->ref_id)) {
1934 if (ilBadgeHandler::getInstance()->isObjectActive($this->object->getId())) {
1935 $this->tabs_gui->addTarget(
1936 "obj_tool_setting_badges",
1937 $this->ctrl->getLinkTargetByClass("ilbadgemanagementgui", ""),
1938 "",
1939 "ilbadgemanagementgui"
1940 );
1941 }
1942 }
1943
1944 // skills
1945 if (ilContSkillPresentationGUI::isAccessible($this->ref_id)) {
1946 $this->tabs_gui->addTarget(
1947 "obj_tool_setting_skills",
1948 $this->ctrl->getLinkTargetByClass(array("ilcontainerskillgui", "ilcontskillpresentationgui"), ""),
1949 "",
1950 array("ilcontainerskillgui", "ilcontskillpresentationgui", "ilcontskilladmingui")
1951 );
1952 }
1953
1954 // booking
1955 if ($this->access->checkAccess('write', '', $this->ref_id) && ilContainer::_lookupContainerSetting(
1956 $this->object->getId(),
1958 '0'
1959 )) {
1960 $this->tabs_gui->addTarget(
1961 "obj_tool_setting_booking",
1962 $this->ctrl->getLinkTargetByClass(array("ilbookinggatewaygui"), "")
1963 );
1964 }
1965
1966 // learning progress
1967 if (ilLearningProgressAccess::checkAccess($this->object->getRefId(), $is_participant)) {
1968 $this->tabs_gui->addTarget(
1969 'learning_progress',
1970 $this->ctrl->getLinkTargetByClass(array('ilobjcoursegui', 'illearningprogressgui'), ''),
1971 '',
1972 array('illplistofobjectsgui', 'illplistofsettingsgui', 'illearningprogressgui', 'illplistofprogressgui')
1973 );
1974 }
1975
1976 // meta data
1977 if ($this->access->checkAccess('write', '', $this->ref_id)) {
1978 $mdgui = new ilObjectMetaDataGUI($this->object);
1979 $mdtab = $mdgui->getTab();
1980 if ($mdtab) {
1981 $this->tabs_gui->addTarget(
1982 "meta_data",
1983 $mdtab,
1984 "",
1985 "ilobjectmetadatagui"
1986 );
1987 }
1988 }
1989
1990 if ($this->access->checkAccess('write', '', $this->object->getRefId())) {
1991 $this->tabs_gui->addTarget(
1992 'export',
1993 $this->ctrl->getLinkTargetByClass('ilexportgui', ''),
1994 'export',
1995 'ilexportgui'
1996 );
1997 }
1998
1999 if ($this->access->checkAccess('edit_permission', '', $this->ref_id)) {
2000 $this->tabs_gui->addTarget(
2001 "perm_settings",
2002 $this->ctrl->getLinkTargetByClass(array(get_class($this), 'ilpermissiongui'), "perm"),
2003 array("perm", "info", "owner"),
2004 'ilpermissiongui'
2005 );
2006 }
2007
2008 // Join/Leave
2009 if ($this->access->checkAccess('join', '', $this->ref_id) && !$this->object->getMemberObject()->isAssigned()) {
2010 if (ilCourseWaitingList::_isOnList($this->user->getId(), $this->object->getId())) {
2011 $this->tabs_gui->addTab(
2012 'leave',
2013 $this->lng->txt('membership_leave'),
2014 $this->ctrl->getLinkTargetByClass('ilcourseregistrationgui', 'show', '')
2015 );
2016 } else {
2017 $this->tabs_gui->addTarget(
2018 "join",
2019 $this->ctrl->getLinkTargetByClass('ilcourseregistrationgui', "show"),
2020 'show',
2021 ""
2022 );
2023 }
2024 }
2025 if ($this->access->checkAccess('leave', '', $this->object->getRefId()) && $this->object->getMemberObject()->isMember()) {
2026 $this->tabs_gui->addTarget(
2027 "crs_unsubscribe",
2028 $this->ctrl->getLinkTarget($this, "unsubscribe"),
2029 'leave',
2030 ""
2031 );
2032 }
2033 }
static _lookupContainerSetting(int $a_id, string $a_keyword, ?string $a_default_value=null)
static _getCountObjectives(int $a_obj_id, bool $a_activated_only=false)
static checkAccess(int $a_ref_id, bool $a_allow_only_read=true)
check access to learning progress
static _isOnList(int $a_usr_id, int $a_obj_id)

References ilCourseObjective\_getCountObjectives(), ilWaitingList\_isOnList(), ilParticipants\_isParticipant(), ilContainer\_lookupContainerSetting(), ILIAS\Repository\access(), addContentTab(), ilObjectServiceSettingsGUI\BOOKING, ilLearningProgressAccess\checkAccess(), ILIAS\Repository\ctrl(), ilBadgeHandler\getInstance(), ILIAS\Repository\help(), ILIAS\FileDelivery\http(), ilCourseConstants\IL_CRS_VIEW_OBJECTIVE, ilCourseConstants\IL_CRS_VIEW_TIMING, ilContSkillPresentationGUI\isAccessible(), ILIAS\Repository\lng(), ILIAS\Repository\object(), ILIAS\Repository\tabs(), and ILIAS\Repository\user().

+ Here is the call graph for this function:

◆ hasAdminPermission()

ilObjCourseGUI::hasAdminPermission ( )
protected

Definition at line 3118 of file class.ilObjCourseGUI.php.

3118 : bool
3119 {
3120 return
3121 ilCourseParticipant::_getInstanceByObjId($this->object->getId(), $this->user->getId())->isAdmin() ||
3122 $this->checkPermissionBool('edit_permission');
3123 }
static _getInstanceByObjId(int $a_obj_id, int $a_usr_id)

References ilCourseParticipant\_getInstanceByObjId(), and ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ infoScreen()

ilObjCourseGUI::infoScreen ( )

Definition at line 183 of file class.ilObjCourseGUI.php.

183 : void
184 {
185 if (!$this->checkPermissionBool('read')) {
186 $this->checkPermission('visible');
187 }
188
189 $this->tabs_gui->setTabActive('info_short');
190 $files = ilCourseFile::_readFilesByCourse($this->object->getId());
191
192 $info = new ilInfoScreenGUI($this);
193 $info->enablePrivateNotes();
194 $info->enableFeedback();
195 $info->enableNews();
196 $info->enableBookingInfo(true);
197 if ($this->access->checkAccess("write", "", $this->ref_id)) {
198 $info->enableNewsEditing();
199 }
200
201 if (
202 strlen($this->object->getImportantInformation()) ||
203 strlen($this->object->getSyllabus()) ||
204 strlen((string) $this->object->getTargetGroup()) ||
205 count($files)) {
206 $info->addSection($this->lng->txt('crs_general_informations'));
207 }
208
209 if (strlen($this->object->getImportantInformation())) {
210 $info->addProperty(
211 $this->lng->txt('crs_important_info'),
212 "<strong>" . nl2br(
213 ilUtil::makeClickable($this->object->getImportantInformation(), true) . "</strong>"
214 )
215 );
216 }
217 if (strlen($this->object->getSyllabus())) {
218 $info->addProperty($this->lng->txt('crs_syllabus'), nl2br(
219 ilUtil::makeClickable($this->object->getSyllabus(), true)
220 ));
221 }
222 if (strlen((string) $this->object->getTargetGroup())) {
223 $info->addProperty(
224 $this->lng->txt('crs_target_group'),
225 nl2br(
226 \ilUtil::makeClickable($this->object->getTargetGroup(), true)
227 )
228 );
229 }
230 // files
231 if ($files !== []) {
232 $tpl = new ilTemplate('tpl.event_info_file.html', true, true, 'components/ILIAS/Course');
233
234 foreach ($files as $file) {
235 $tpl->setCurrentBlock("files");
236 $this->ctrl->setParameter($this, 'file_id', $file->getFileId());
237 $tpl->setVariable("DOWN_LINK", $this->ctrl->getLinkTarget($this, 'sendfile'));
238 $tpl->setVariable("DOWN_NAME", $file->getFileName());
239 $tpl->setVariable("DOWN_INFO_TXT", $this->lng->txt('crs_file_size_info'));
240 $tpl->setVariable("DOWN_SIZE", $file->getFileSize());
241 $tpl->setVariable("TXT_BYTES", $this->lng->txt('bytes'));
243 }
244 $info->addProperty(
245 $this->lng->txt('crs_file_download'),
246 $tpl->get()
247 );
248 }
249
253
254 // meta data
255 $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
256
257 // contact
258 if ($this->object->hasContactData()) {
259 $info->addSection($this->lng->txt("crs_contact"));
260 }
261 if (strlen($this->object->getContactName())) {
262 $info->addProperty(
263 $this->lng->txt("crs_contact_name"),
264 $this->object->getContactName()
265 );
266 }
267 if (strlen($this->object->getContactResponsibility())) {
268 $info->addProperty(
269 $this->lng->txt("crs_contact_responsibility"),
270 $this->object->getContactResponsibility()
271 );
272 }
273 if (strlen($this->object->getContactPhone())) {
274 $info->addProperty(
275 $this->lng->txt("crs_contact_phone"),
276 $this->object->getContactPhone()
277 );
278 }
279 if ($this->object->getContactEmail()) {
280 /* needs to be rbacsystem, does not work with ilAccess */
281 $has_mail_access = $this->rbacsystem->checkAccessOfUser(
282 $this->user->getId(),
283 'internal_mail',
285 );
286 $emails = explode(",", $this->object->getContactEmail());
287 $mailString = '';
288 foreach ($emails as $email) {
289 $email = trim($email);
290 if (!$has_mail_access) {
291 $mailString .= $email . "<br />";
292 continue;
293 }
294 $etpl = new ilTemplate("tpl.crs_contact_email.html", true, true, 'components/ILIAS/Course');
295 $etpl->setVariable(
296 "EMAIL_LINK",
298 $info,
299 'showSummary',
300 array(),
301 array(
302 'type' => 'new',
303 'rcp_to' => $email,
304 'sig' => $this->createMailSignature()
305 ),
306 array(
308 'ref_id' => $this->object->getRefId(),
309 'ts' => time()
310 )
311 )
312 );
313 $etpl->setVariable("CONTACT_EMAIL", $email);
314 $mailString .= $etpl->get() . "<br />";
315 }
316 $info->addProperty($this->lng->txt("crs_contact_email"), $mailString);
317 }
318 if (strlen($this->object->getContactConsultation())) {
319 $info->addProperty(
320 $this->lng->txt("crs_contact_consultation"),
321 nl2br($this->object->getContactConsultation())
322 );
323 }
324 // support contacts
326 $conts = $parts->getContacts();
327 if ($conts !== []) {
328 $info->addSection($this->lng->txt("crs_mem_contacts"));
329 foreach ($conts as $c) {
330 $pgui = new PublicProfileGUI($c);
331 $pgui->setBackUrl($this->ctrl->getLinkTargetByClass("ilinfoscreengui"));
332 $pgui->setEmbedded(true);
333 $info->addProperty("", $pgui->getHTML());
334 }
335 }
336
337 // #10360
338 $info->enableAvailability(false);
339 $this->lng->loadLanguageModule("rep");
340 $info->addSection($this->lng->txt("rep_activation_availability"));
341 $info->showLDAPRoleGroupMappingInfo();
342
343 // activation
344 $info->addAccessPeriodProperty();
345
346 $txt = '';
347 switch ($this->object->getSubscriptionLimitationType()) {
349 $txt = $this->lng->txt("crs_info_reg_deactivated");
350 break;
351
352 default:
353 switch ($this->object->getSubscriptionType()) {
355 $txt = $this->lng->txt("crs_info_reg_confirmation");
356 break;
358 $txt = $this->lng->txt("crs_info_reg_direct");
359 break;
361 $txt = $this->lng->txt("crs_info_reg_password");
362 break;
363 }
364 }
365
366 // subscription
367 $info->addProperty($this->lng->txt("crs_info_reg"), $txt);
368 if ($this->object->getSubscriptionLimitationType() != ilCourseConstants::IL_CRS_SUBSCRIPTION_DEACTIVATED) {
369 if ($this->object->getSubscriptionUnlimitedStatus()) {
370 $info->addProperty(
371 $this->lng->txt("crs_reg_until"),
372 $this->lng->txt('crs_unlimited')
373 );
374 } elseif ($this->object->getSubscriptionStart() < time()) {
375 $info->addProperty(
376 $this->lng->txt("crs_reg_until"),
377 $this->lng->txt('crs_to') . ' ' .
378 ilDatePresentation::formatDate(new ilDateTime($this->object->getSubscriptionEnd(), IL_CAL_UNIX))
379 );
380 } elseif ($this->object->getSubscriptionStart() > time()) {
381 $info->addProperty(
382 $this->lng->txt("crs_reg_until"),
383 $this->lng->txt('crs_from') . ' ' .
384 ilDatePresentation::formatDate(new ilDateTime($this->object->getSubscriptionStart(), IL_CAL_UNIX))
385 );
386 }
387 if ($this->object->isSubscriptionMembershipLimited()) {
388 if ($this->object->getSubscriptionMinMembers()) {
389 $info->addProperty(
390 $this->lng->txt("mem_min_users"),
391 $this->object->getSubscriptionMinMembers()
392 );
393 }
394 if ($this->object->getSubscriptionMaxMembers()) {
395 $reg_info = ilObjCourseAccess::lookupRegistrationInfo($this->object->getId());
396 $info->addProperty(
397 $this->lng->txt('mem_free_places'),
398 (string) ($reg_info['reg_info_free_places'] ?? '0')
399 );
400 }
401 }
402 }
403
404 if ($this->object->getCancellationEnd()) {
405 $info->addProperty(
406 $this->lng->txt('crs_cancellation_end'),
407 ilDatePresentation::formatDate($this->object->getCancellationEnd())
408 );
409 }
410
411 if (
412 $this->object->getCourseStart() instanceof ilDateTime &&
413 !$this->object->getCourseStart()->isNull()
414 ) {
415 $info->addProperty(
416 $this->lng->txt('crs_period'),
418 $this->object->getCourseStart(),
419 $this->object->getCourseEnd()
420 )
421 );
422 }
423
424 // Confirmation
426
427 if ($privacy->courseConfirmationRequired() || ilCourseDefinedFieldDefinition::_getFields($this->object->getId()) || $privacy->enabledCourseExport()) {
428 $field_info = ilExportFieldsInfo::_getInstanceByType($this->object->getType());
429
430 $this->lng->loadLanguageModule('ps');
431 $info->addSection($this->lng->txt('crs_user_agreement_info'));
432 $info->addProperty($this->lng->txt('ps_export_data'), $field_info->exportableFieldsToInfoString());
433
434 if ($fields = ilCourseDefinedFieldDefinition::_fieldsToInfoString($this->object->getId())) {
435 $info->addProperty($this->lng->txt('ps_crs_user_fields'), $fields);
436 }
437 }
438 $info->enableLearningProgress(true);
439
440 // forward the command
441 $this->ctrl->forwardCommand($info);
442 }
const IL_CAL_UNIX
setInfoObject(ilInfoScreenGUI $info)
get info sections
static _getFields(int $a_container_id, $a_sort=self::IL_CDF_SORT_NAME)
Get all fields of a container.
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false, ?ilObjUser $user=null,)
static formatPeriod(ilDateTime $start, ilDateTime $end, bool $a_skip_starting_day=false, ?ilObjUser $user=null)
Format a period of two dates Shows: 14.
@classDescription Date and time handling
isNull()
Check if a date is null (Datetime == '0000-00-00 00:00:00', unixtime == 0,...)
static _getInstanceByType(string $a_type)
Get Singleton Instance.
Class ilInfoScreenGUI.
static getLinkTarget( $gui, string $cmd, array $gui_params=[], array $mail_params=[], array $context_params=[])
final const string CONTEXT_KEY
static lookupRegistrationInfo(int $a_obj_id)
createMailSignature()
Create a course mail signature.
ilAdvancedMDRecordGUI $record_gui
ilGlobalTemplateInterface $tpl
static getInstanceByObjId(int $a_obj_id)
Get instance by obj type.
special template class to simplify handling of ITX/PEAR
static makeClickable(string $a_text, bool $detectGotoLinks=false, ?string $ilias_http_path=null)
$c
Definition: deliver.php:25
$info
Definition: entry_point.php:21
$txt
Definition: error.php:31
setVariable(string $variable, $value='')
Sets the given variable to the given value.
parseCurrentBlock(string $block_name=self::DEFAULT_BLOCK)
Parses the given block.
setCurrentBlock(string $part=self::DEFAULT_BLOCK)
Sets the template to the given block.
get(string $part=self::DEFAULT_BLOCK)
Renders the given block and returns the html string.
if($clientAssertionType !='urn:ietf:params:oauth:client-assertion-type:jwt-bearer'|| $grantType !='client_credentials') $parts
Definition: ltitoken.php:61

References $c, $info, $parts, $record_gui, ilObjectGUI\$tpl, $txt, ilCourseDefinedFieldDefinition\_fieldsToInfoString(), ilCourseDefinedFieldDefinition\_getFields(), ilExportFieldsInfo\_getInstanceByType(), ilCourseFile\_readFilesByCourse(), ILIAS\Repository\access(), ilObjectGUI\checkPermission(), ilObjectGUI\checkPermissionBool(), ilMailFormCall\CONTEXT_KEY, createMailSignature(), ILIAS\Repository\ctrl(), ilDatePresentation\formatDate(), ilDatePresentation\formatPeriod(), ILIAS\UICore\GlobalTemplate\get(), ilPrivacySettings\getInstance(), ilParticipants\getInstanceByObjId(), ilMailFormCall\getLinkTarget(), ilMailGlobalServices\getMailObjectRefId(), ilCourseMailTemplateMemberContext\ID, IL_CAL_UNIX, ilCourseConstants\IL_CRS_SUBSCRIPTION_CONFIRMATION, ilCourseConstants\IL_CRS_SUBSCRIPTION_DEACTIVATED, ilCourseConstants\IL_CRS_SUBSCRIPTION_DIRECT, ilCourseConstants\IL_CRS_SUBSCRIPTION_PASSWORD, ilDateTime\isNull(), ILIAS\Repository\lng(), ilObjCourseAccess\lookupRegistrationInfo(), ilUtil\makeClickable(), ilAdvancedMDRecordGUI\MODE_INFO, ILIAS\Repository\object(), ilAdvancedMDRecordGUI\parse(), ILIAS\UICore\GlobalTemplate\parseCurrentBlock(), ILIAS\UICore\GlobalTemplate\setCurrentBlock(), ilAdvancedMDRecordGUI\setInfoObject(), ILIAS\UICore\GlobalTemplate\setVariable(), and ILIAS\Repository\user().

Referenced by executeCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ infoScreenObject()

ilObjCourseGUI::infoScreenObject ( )

this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually, if everything works through ilCtrl in the future this may be changed

Todo:

Definition at line 175 of file class.ilObjCourseGUI.php.

175 : void
176 {
177 $this->ctrl->redirectByClass([
178 static::class,
179 ilInfoScreenGUI::class
180 ]);
181 }

References ILIAS\Repository\ctrl().

Referenced by executeCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initEditForm()

ilObjCourseGUI::initEditForm ( )
protected

Reimplemented from ilContainerGUI.

Definition at line 1009 of file class.ilObjCourseGUI.php.

1010 {
1011 $obj_service = $this->getObjectService();
1012 $setting = $this->settings;
1013
1014 $form = new ilPropertyFormGUI();
1015 $form->setTitle($this->lng->txt('crs_edit'));
1016
1017 $form->addCommandButton('update', $this->lng->txt('save'));
1018 $form->addCommandButton('cancel', $this->lng->txt('cancel'));
1019
1020 $form->setFormAction($this->ctrl->getFormAction($this, 'update'));
1021
1022 // title and description
1023 $this->initFormTitleDescription($form);
1024
1025 // Show didactic template type
1027
1028 // period
1029 $cdur = new ilDateDurationInputGUI($this->lng->txt('crs_period'), 'period');
1030 $this->lng->loadLanguageModule('mem');
1031 $cdur->enableToggleFullTime(
1032 $this->lng->txt('mem_period_without_time'),
1033 !$this->object->getCourseStartTimeIndication()
1034 );
1035 $cdur->setShowTime(true);
1036 $cdur->setInfo($this->lng->txt('crs_period_info'));
1037 $cdur->setStart($this->object->getCourseStart());
1038 $cdur->setEnd($this->object->getCourseEnd());
1039 $form->addItem($cdur);
1040
1041 // activation/availability
1042
1043 $this->lng->loadLanguageModule('rep');
1044
1045 $section = new ilFormSectionHeaderGUI();
1046 $section->setTitle($this->lng->txt('rep_activation_availability'));
1047 $form->addItem($section);
1048
1049 $online = new ilCheckboxInputGUI($this->lng->txt('rep_activation_online'), 'activation_online');
1050 $online->setChecked(!$this->object->getOfflineStatus());
1051 $online->setInfo($this->lng->txt('crs_activation_online_info'));
1052 $form->addItem($online);
1053
1054 $dur = new ilDateDurationInputGUI($this->lng->txt('rep_time_period'), "access_period");
1055 $dur->setShowTime(true);
1056 $dur->setStart(new ilDateTime($this->object->getActivationStart(), IL_CAL_UNIX));
1057 $dur->setEnd(new ilDateTime($this->object->getActivationEnd(), IL_CAL_UNIX));
1058 $form->addItem($dur);
1059
1060 $visible = new ilCheckboxInputGUI(
1061 $this->lng->txt('rep_activation_limited_visibility'),
1062 'activation_visibility'
1063 );
1064 $visible->setInfo($this->lng->txt('crs_activation_limited_visibility_info'));
1065 $visible->setChecked((bool) $this->object->getActivationVisibility());
1066 $dur->addSubItem($visible);
1067
1068 $section = new ilFormSectionHeaderGUI();
1069 $section->setTitle($this->lng->txt('crs_reg'));
1070 $form->addItem($section);
1071
1072 // time limit
1073 $sdur = new ilDateDurationInputGUI($this->lng->txt('crs_registration_limited'), "subscription_period");
1074 $sdur->setShowTime(true);
1075 if ($this->object->getSubscriptionStart()) {
1076 $sdur->setStart(new ilDateTime($this->object->getSubscriptionStart(), IL_CAL_UNIX));
1077 }
1078 if ($this->object->getSubscriptionEnd()) {
1079 $sdur->setEnd(new ilDateTime($this->object->getSubscriptionEnd(), IL_CAL_UNIX));
1080 }
1081
1082 $reg_proc = new ilRadioGroupInputGUI('', 'subscription_type');
1083 $reg_proc->setValue(
1084 ($this->object->getSubscriptionLimitationType() != ilCourseConstants::IL_CRS_SUBSCRIPTION_DEACTIVATED)
1085 ? (string) $this->object->getSubscriptionType()
1087 );
1088
1089 $opt = new ilRadioOption(
1090 $this->lng->txt('crs_subscription_options_direct'),
1091 (string) ilCourseConstants::IL_CRS_SUBSCRIPTION_DIRECT
1092 );
1093 $reg_proc->addOption($opt);
1094
1095 $opt = new ilRadioOption(
1096 $this->lng->txt('crs_subscription_options_password'),
1098 );
1099
1100 $pass = new ilTextInputGUI($this->lng->txt("password"), 'subscription_password');
1101 $pass->setRequired(true);
1102 $pass->setInfo($this->lng->txt('crs_reg_password_info'));
1103 $pass->setSubmitFormOnEnter(true);
1104 $pass->setSize(32);
1105 $pass->setMaxLength(32);
1106 $pass->setValue($this->object->getSubscriptionPassword());
1107
1108 $opt->addSubItem($pass);
1109 $reg_proc->addOption($opt);
1110
1111 $opt = new ilRadioOption(
1112 $this->lng->txt('crs_subscription_options_confirmation'),
1114 );
1115 $opt->setInfo($this->lng->txt('crs_registration_confirmation_info'));
1116 $reg_proc->addOption($opt);
1117
1118 $opt_self_enrollment_enabled = new ilRadioOption(
1119 $this->lng->txt('crs_reg_selfreg'),
1121 );
1122 $opt_self_enrollment_enabled->addSubItem($reg_proc);
1123 $opt_self_enrollment_enabled->addSubItem($sdur);
1124 $opt_self_enrollment_disabled = new ilRadioOption(
1125 $this->lng->txt('crs_reg_no_selfreg'),
1127 );
1128 $opt_self_enrollment_disabled->setInfo($this->lng->txt('crs_registration_deactivated'));
1129 $reg_proc_subscription_reg_type = new ilRadioGroupInputGUI(
1130 $this->lng->txt('crs_registration_type'),
1131 'subscription_limitation_type'
1132 );
1133 $reg_proc_subscription_reg_type->setValue(
1134 $this->object->getSubscriptionLimitationType() !== ilCourseConstants::IL_CRS_SUBSCRIPTION_DEACTIVATED
1137 );
1138 $reg_proc_subscription_reg_type->addOption($opt_self_enrollment_enabled);
1139 $reg_proc_subscription_reg_type->addOption($opt_self_enrollment_disabled);
1140 $form->addItem($reg_proc_subscription_reg_type);
1141
1142 // Registration codes
1143 $reg_code = new ilCheckboxInputGUI($this->lng->txt('crs_reg_code'), 'reg_code_enabled');
1144 $reg_code->setChecked($this->object->isRegistrationAccessCodeEnabled());
1145 $reg_code->setValue('1');
1146 $reg_code->setInfo($this->lng->txt('crs_reg_code_enabled_info'));
1147
1148 // Create default access code
1149 if (!$this->object->getRegistrationAccessCode()) {
1150 $this->object->setRegistrationAccessCode(ilMembershipRegistrationCodeUtils::generateCode());
1151 }
1152 $reg_link = new ilHiddenInputGUI('reg_code');
1153 $reg_link->setValue($this->object->getRegistrationAccessCode());
1154 $form->addItem($reg_link);
1155
1156 $link = new ilCustomInputGUI($this->lng->txt('crs_reg_code_link'));
1157 $val = ilLink::_getLink(
1158 $this->object->getRefId(),
1159 $this->object->getType(),
1160 array(),
1161 'rcode' . $this->object->getRegistrationAccessCode()
1162 );
1163 $link->setHtml('<span class="small">' . $val . '</span>');
1164 $reg_code->addSubItem($link);
1165
1166 $form->addItem($reg_code);
1167
1168 // cancellation limit
1169 $cancel = new ilDateTimeInputGUI($this->lng->txt('crs_cancellation_end'), 'cancel_end');
1170 $cancel->setInfo($this->lng->txt('crs_cancellation_end_info'));
1171 $cancel_end = $this->object->getCancellationEnd();
1172 if ($cancel_end) {
1173 $cancel->setDate($cancel_end);
1174 }
1175 $form->addItem($cancel);
1176
1177 // Max members
1178 $lim = new ilCheckboxInputGUI(
1179 $this->lng->txt('crs_subscription_max_members_short'),
1180 'subscription_membership_limitation'
1181 );
1182 $lim->setInfo($this->lng->txt('crs_subscription_max_members_short_info'));
1183 $lim->setValue((string) 1);
1184 $lim->setChecked($this->object->isSubscriptionMembershipLimited());
1185
1186 $min = new ilTextInputGUI('', 'subscription_min');
1187 $min->setSubmitFormOnEnter(true);
1188 $min->setSize(4);
1189 $min->setMaxLength(4);
1190 $min->setValue($this->object->getSubscriptionMinMembers() ?: '');
1191 $min->setTitle($this->lng->txt('crs_subscription_min_members'));
1192 $min->setInfo($this->lng->txt('crs_subscription_min_members_info'));
1193 $lim->addSubItem($min);
1194
1195 $max = new ilTextInputGUI('', 'subscription_max');
1196 $max->setSubmitFormOnEnter(true);
1197 $max->setSize(4);
1198 $max->setMaxLength(4);
1199 $max->setValue($this->object->getSubscriptionMaxMembers() ?: '');
1200 $max->setTitle($this->lng->txt('crs_subscription_max_members'));
1201 $max->setInfo($this->lng->txt('crs_reg_max_info'));
1202
1203 $lim->addSubItem($max);
1204
1205 $wait = new ilRadioGroupInputGUI($this->lng->txt('crs_waiting_list'), 'waiting_list');
1206 $option = new ilRadioOption($this->lng->txt('none'), '0');
1207 $wait->addOption($option);
1208
1209 $option = new ilRadioOption($this->lng->txt('crs_waiting_list_no_autofill'), '1');
1210 $option->setInfo($this->lng->txt('crs_wait_info'));
1211 $wait->addOption($option);
1212
1213 $option = new ilRadioOption($this->lng->txt('crs_waiting_list_autofill'), '2');
1214 $option->setInfo($this->lng->txt('crs_waiting_list_autofill_info'));
1215 $wait->addOption($option);
1216
1217 if ($this->object->hasWaitingListAutoFill()) {
1218 $wait->setValue('2');
1219 } elseif ($this->object->enabledWaitingList()) {
1220 $wait->setValue('1');
1221 } else {
1222 $wait->setValue('0');
1223 }
1224 $lim->addSubItem($wait);
1225 $form->addItem($lim);
1226 $pres = new ilFormSectionHeaderGUI();
1227 $pres->setTitle($this->lng->txt('crs_view_mode'));
1228
1229 $form->addItem($pres);
1230
1231 // title and icon visibility
1232 $form = $obj_service->commonSettings()->legacyForm($form, $this->object)->addTitleIconVisibility();
1233
1234 // top actions visibility
1235 $form = $obj_service->commonSettings()->legacyForm($form, $this->object)->addTopActionsVisibility();
1236
1237 // breadcrumbs
1238 if ($setting->get("rep_breadcr_crs") && $setting->get("rep_breadcr_crs_overwrite")) {
1239 $add = $setting->get("rep_breadcr_crs_default")
1240 ? " (" . $this->lng->txt("crs_breadcrumb_crs_only") . ")"
1241 : " (" . $this->lng->txt("crs_breadcrumb_full_path") . ")";
1242 $options = array(
1243 self::BREADCRUMB_DEFAULT => $this->lng->txt("crs_sys_default") . $add,
1244 self::BREADCRUMB_CRS_ONLY => $this->lng->txt("crs_breadcrumb_crs_only"),
1245 self::BREADCRUMB_FULL_PATH => $this->lng->txt("crs_breadcrumb_full_path")
1246 );
1247 $si = new ilSelectInputGUI($this->lng->txt("crs_shorten_breadcrumb"), "rep_breacrumb");
1248 $si->setValue((int) ilContainer::_lookupContainerSetting($this->object->getId(), "rep_breacrumb"));
1249 $si->setOptions($options);
1250 $form->addItem($si);
1251 }
1252
1253 // custom icon
1254 $form = $obj_service->commonSettings()->legacyForm($form, $this->object)->addIcon();
1255
1256 // tile image
1257 $form = $obj_service->commonSettings()->legacyForm($form, $this->object)->addTileImage();
1258
1259 // list presentation
1261
1262 // presentation type
1263 $view_type = new ilRadioGroupInputGUI($this->lng->txt('crs_presentation_type'), 'view_mode');
1264 $view_type->setValue($this->object->getViewMode());
1265
1266 $opts = new ilRadioOption(
1267 $this->lng->txt('cntr_view_sessions'),
1269 );
1270 $opts->setInfo($this->lng->txt('cntr_view_info_sessions'));
1271 $view_type->addOption($opts);
1272
1273 // Limited sessions
1274 $sess = new ilCheckboxInputGUI($this->lng->txt('sess_limit'), 'sl');
1275 $sess->setValue('1');
1276 $sess->setChecked($this->object->isSessionLimitEnabled());
1277 $sess->setInfo($this->lng->txt('sess_limit_info'));
1278
1279 $prev = new ilNumberInputGUI($this->lng->txt('sess_num_prev'), 'sp');
1280 #$prev->setSubmitFormOnEnter(true);
1281 $prev->setMinValue(0);
1282 $prev->setValue(
1283 $this->object->getNumberOfPreviousSessions() == -1 ?
1284 '' :
1285 $this->object->getNumberOfPreviousSessions()
1286 );
1287 $prev->setSize(2);
1288 $prev->setMaxLength(3);
1289 $sess->addSubItem($prev);
1290
1291 $next = new ilNumberInputGUI($this->lng->txt('sess_num_next'), 'sn');
1292 #$next->setSubmitFormOnEnter(true);
1293 $next->setMinValue(0);
1294 $next->setValue(
1295 $this->object->getNumberOfNextSessions() == -1 ?
1296 '' :
1297 $this->object->getNumberOfnextSessions()
1298 );
1299 $next->setSize(2);
1300 $next->setMaxLength(3);
1301 $sess->addSubItem($next);
1302
1303 $opts->addSubItem($sess);
1304
1305 $optsi = new ilRadioOption($this->lng->txt('cntr_view_simple'), (string) ilCourseConstants::IL_CRS_VIEW_SIMPLE);
1306 $optsi->setInfo($this->lng->txt('cntr_view_info_simple'));
1307 $view_type->addOption($optsi);
1308
1309 $optbt = new ilRadioOption(
1310 $this->lng->txt('cntr_view_by_type'),
1312 );
1313 $optbt->setInfo($this->lng->txt('cntr_view_info_by_type'));
1314 $view_type->addOption($optbt);
1315
1316 $opto = new ilRadioOption(
1317 $this->lng->txt('crs_view_objective'),
1319 );
1320 $opto->setInfo($this->lng->txt('crs_view_info_objective'));
1321 $view_type->addOption($opto);
1322
1323 $optt = new ilRadioOption($this->lng->txt('crs_view_timing'), (string) ilCourseConstants::IL_CRS_VIEW_TIMING);
1324 $optt->setInfo($this->lng->txt('crs_view_info_timing'));
1325
1326 // cognos-blu-patch: begin
1327 $timing = new ilRadioGroupInputGUI($this->lng->txt('crs_view_timings'), "timing_mode");
1328 $timing->setValue($this->object->getTimingMode());
1329
1330 $absolute = new ilRadioOption(
1331 $this->lng->txt('crs_view_timing_absolute'),
1333 );
1334 $absolute->setInfo($this->lng->txt('crs_view_info_timing_absolute'));
1335 $timing->addOption($absolute);
1336
1337 $relative = new ilRadioOption(
1338 $this->lng->txt('crs_view_timing_relative'),
1340 );
1341 $relative->setInfo($this->lng->txt('crs_view_info_timing_relative'));
1342 $timing->addOption($relative);
1343
1344 $optt->addSubItem($timing);
1345 // cognos-blu-patch: end
1346
1347 $view_type->addOption($optt);
1348
1349 $form->addItem($view_type);
1350
1351 $this->initSortingForm(
1352 $form,
1353 array(
1358 )
1359 );
1360
1361 $tutorial_support_panel_checkbox = new ilCheckboxInputGUI(
1362 $this->lng->txt('tutorial_support_block_setting_title'),
1363 'tutorial_support_block_checkbox'
1364 );
1365 //$tutorial_support_panel_checkbox->setValue($this->object->getTutorialSupportBlockSettingValue());
1366 $tutorial_support_panel_checkbox->setChecked((bool) $this->object->getTutorialSupportBlockSettingValue());
1367 $tutorial_support_panel_checkbox->setInfo($this->lng->txt('tutorial_support_block_byline'));
1368 $form->addItem($tutorial_support_panel_checkbox);
1369
1370 // lp vs. course status
1372 $olp = ilObjectLP::getInstance($this->object->getId());
1373 if ($olp->getCurrentMode()) {
1374 $lp_status = new ilFormSectionHeaderGUI();
1375 $lp_status->setTitle($this->lng->txt('crs_course_status_of_users'));
1376 $form->addItem($lp_status);
1377
1378 $lp_status_options = new ilRadioGroupInputGUI($this->lng->txt('crs_status_determination'), "status_dt");
1379 // $lp_status_options->setRequired(true);
1380 $lp_status_options->setValue($this->object->getStatusDetermination());
1381
1382 $lp_option = new ilRadioOption(
1383 $this->lng->txt('crs_status_determination_lp'),
1385 $this->lng->txt('crs_status_determination_lp_info')
1386 );
1387 $lp_status_options->addOption($lp_option);
1388 $lp_status_options->addOption(new ilRadioOption(
1389 $this->lng->txt('crs_status_determination_manual'),
1391 ));
1392
1393 $form->addItem($lp_status_options);
1394 }
1395 }
1396
1397 // additional features
1398 $feat = new ilFormSectionHeaderGUI();
1399 $feat->setTitle($this->lng->txt('obj_features'));
1400 $form->addItem($feat);
1401
1403 $this->object->getId(),
1404 $form,
1405 $this->getSubServices()
1406 );
1407
1408 $mem = new ilCheckboxInputGUI($this->lng->txt('crs_show_members'), 'show_members');
1409 $mem->setChecked($this->object->getShowMembers());
1410 $mem->setInfo($this->lng->txt('crs_show_members_info'));
1411 $form->addItem($mem);
1412
1413 // check privacy
1414 if (\ilPrivacySettings::getInstance()->participantsListInCoursesEnabled()) {
1415 $part_list = new ilCheckboxInputGUI($this->lng->txt('crs_show_member_export'), 'show_members_export');
1416 $part_list->setChecked($this->object->getShowMembersExport());
1417 $part_list->setInfo($this->lng->txt('crs_show_member_export_info'));
1418 $mem->addSubItem($part_list);
1419 }
1420
1421 // Show members type
1422 $mail_type = new ilRadioGroupInputGUI($this->lng->txt('crs_mail_type'), 'mail_type');
1423 $mail_type->setValue($this->object->getMailToMembersType());
1424
1425 $mail_tutors = new ilRadioOption(
1426 $this->lng->txt('crs_mail_tutors_only'),
1428 $this->lng->txt('crs_mail_tutors_only_info')
1429 );
1430 $mail_type->addOption($mail_tutors);
1431
1432 $mail_all = new ilRadioOption(
1433 $this->lng->txt('crs_mail_all'),
1435 $this->lng->txt('crs_mail_all_info')
1436 );
1437 $mail_type->addOption($mail_all);
1438 $form->addItem($mail_type);
1439
1440 // Notification Settings
1441 /*$notification = new ilFormSectionHeaderGUI();
1442 $notification->setTitle($this->lng->txt('crs_notification'));
1443 $form->addItem($notification);*/
1444
1445 // Self notification
1446 $not = new ilCheckboxInputGUI($this->lng->txt('crs_auto_notification'), 'auto_notification');
1447 $not->setValue('1');
1448 $not->setInfo($this->lng->txt('crs_auto_notification_info'));
1449 $not->setChecked($this->object->getAutoNotification());
1450 $form->addItem($not);
1451
1452 $desk = new ilCheckboxInputGUI($this->lng->txt('crs_add_remove_from_desktop'), 'abo');
1453 $desk->setChecked($this->object->getAboStatus());
1454 $desk->setInfo($this->lng->txt('crs_add_remove_from_desktop_info'));
1455 $form->addItem($desk);
1456
1457 // Edit ecs export settings
1458 $ecs = new ilECSCourseSettings($this->object);
1459 $ecs->addSettingsToForm($form, 'crs');
1460 return $form;
1461 }
initSortingForm(ilPropertyFormGUI $form, array $a_sorting_settings)
Append sorting settings to property form.
initListPresentationForm(ilPropertyFormGUI $form)
Add list presentation settings to form.
This class represents a custom property in a property form.
input GUI for a time span (start and end date)
This class represents a date/time property in a property form.
Class ilECSCourseSettings.
This class represents a section header in a property form.
This class represents a hidden form property in a property form.
static generateCode()
Generate new registration key.
This class represents a number property in a property form.
const int STATUS_DETERMINATION_MANUAL
const int STATUS_DETERMINATION_LP
initDidacticTemplate(ilPropertyFormGUI $form)
ilSetting $settings
static getInstance(int $obj_id)
static initServiceSettingsForm(int $obj_id, ilPropertyFormGUI $form, array $services)
This class represents a property in a property form.
This class represents an option in a radio group.
This class represents a selection list property in a property form.
This class represents a text property in a property form.

References ilContainerGUI\$form, ilObjectGUI\$settings, ilObjUserTracking\_enabledLearningProgress(), ilContainer\_lookupContainerSetting(), ilPropertyFormGUI\addCommandButton(), ilPropertyFormGUI\addItem(), ILIAS\Repository\ctrl(), ilMembershipRegistrationCodeUtils\generateCode(), ilPrivacySettings\getInstance(), ilObjectLP\getInstance(), ilObjectGUI\getObjectService(), IL_CAL_UNIX, ilCourseConstants\IL_CRS_SUBSCRIPTION_CONFIRMATION, ilCourseConstants\IL_CRS_SUBSCRIPTION_DEACTIVATED, ilCourseConstants\IL_CRS_SUBSCRIPTION_DIRECT, ilCourseConstants\IL_CRS_SUBSCRIPTION_PASSWORD, ilCourseConstants\IL_CRS_SUBSCRIPTION_UNLIMITED, ilCourseConstants\IL_CRS_VIEW_BY_TYPE, ilCourseConstants\IL_CRS_VIEW_OBJECTIVE, ilCourseConstants\IL_CRS_VIEW_SESSIONS, ilCourseConstants\IL_CRS_VIEW_SIMPLE, ilCourseConstants\IL_CRS_VIEW_TIMING, ilCourseConstants\IL_CRS_VIEW_TIMING_ABSOLUTE, ilCourseConstants\IL_CRS_VIEW_TIMING_RELATIVE, ilObjectGUI\initDidacticTemplate(), ilContainerGUI\initListPresentationForm(), ilObjectServiceSettingsGUI\initServiceSettingsForm(), ilContainerGUI\initSortingForm(), ILIAS\Repository\lng(), ilCourseConstants\MAIL_ALLOWED_ALL, ilCourseConstants\MAIL_ALLOWED_TUTORS, ILIAS\Repository\object(), ilFormGUI\setFormAction(), ilPropertyFormGUI\setTitle(), ilContainer\SORT_ACTIVATION, ilContainer\SORT_CREATION, ilContainer\SORT_MANUAL, ilContainer\SORT_TITLE, ilObjCourse\STATUS_DETERMINATION_LP, and ilObjCourse\STATUS_DETERMINATION_MANUAL.

Referenced by updateObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initHeaderAction()

ilObjCourseGUI::initHeaderAction ( ?string  $sub_type = null,
?int  $sub_id = null 
)
protected

Add header action menu.

Reimplemented from ilObjectGUI.

Definition at line 2855 of file class.ilObjCourseGUI.php.

2856 {
2857 $lg = parent::initHeaderAction($sub_type, $sub_id);
2858
2859 if ($lg && $this->ref_id && ilCourseParticipants::_isParticipant($this->ref_id, $this->user->getId())) {
2860 // certificate
2861
2862 $validator = new ilCertificateDownloadValidator();
2863 if ($validator->isCertificateDownloadable($this->user->getId(), $this->object->getId())) {
2864 $cert_url = $this->ctrl->getLinkTarget($this, "deliverCertificate");
2865
2866 $this->lng->loadLanguageModule("certificate");
2867 $lg->addCustomCommand($cert_url, "download_certificate");
2868
2869 $lg->addHeaderIcon(
2870 "cert_icon",
2871 ilUtil::getImagePath("standard/icon_cert.svg"),
2872 $this->lng->txt("download_certificate"),
2873 null,
2874 null,
2875 $cert_url
2876 );
2877 }
2878
2879 // notification
2881 $noti = new ilMembershipNotifications($this->ref_id);
2882 if (!$noti->isCurrentUserActive()) {
2883 $lg->addHeaderIcon(
2884 "not_icon",
2885 ilUtil::getImagePath("object/notification_off.svg"),
2886 $this->lng->txt("crs_notification_deactivated")
2887 );
2888
2889 $this->ctrl->setParameter($this, "crs_ntf", 1);
2890 $caption = "crs_activate_notification";
2891 } else {
2892 $lg->addHeaderIcon(
2893 "not_icon",
2894 ilUtil::getImagePath("object/notification_on.svg"),
2895 $this->lng->txt("crs_notification_activated")
2896 );
2897
2898 $this->ctrl->setParameter($this, "crs_ntf", 0);
2899 $caption = "crs_deactivate_notification";
2900 }
2901
2902 if ($noti->canCurrentUserEdit()) {
2903 $lg->addCustomCommand(
2904 $this->ctrl->getLinkTarget($this, "saveNotification"),
2905 $caption
2906 );
2907 }
2908
2909 $this->ctrl->setParameter($this, "crs_ntf", "");
2910 }
2911 }
2912
2913 return $lg;
2914 }
Membership notification settings.
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)

References ilParticipants\_isParticipant(), ILIAS\Repository\ctrl(), ilUtil\getImagePath(), ilMembershipNotifications\isActiveForRefId(), ILIAS\Repository\lng(), and ILIAS\Repository\user().

+ Here is the call graph for this function:

◆ initInfoEditor()

ilObjCourseGUI::initInfoEditor ( )

Definition at line 564 of file class.ilObjCourseGUI.php.

565 {
566 $form = new ilPropertyFormGUI();
567 $form->setFormAction($this->ctrl->getFormAction($this, 'updateInfo'));
568 $form->setMultipart(true);
569 $form->setTitle($this->lng->txt('crs_general_info'));
570 $form->addCommandButton('updateInfo', $this->lng->txt('save'));
571 $form->addCommandButton('cancel', $this->lng->txt('cancel'));
572
573 $area = new ilTextAreaInputGUI($this->lng->txt('crs_important_info'), 'important');
574 $area->setValue($this->object->getImportantInformation());
575 $area->setRows(6);
576 $area->setCols(80);
577 $form->addItem($area);
578
579 $area = new ilTextAreaInputGUI($this->lng->txt('crs_syllabus'), 'syllabus');
580 $area->setValue($this->object->getSyllabus());
581 $area->setRows(6);
582 $area->setCols(80);
583 $form->addItem($area);
584
585 $tg = new \ilTextAreaInputGUI($this->lng->txt('crs_target_group'), 'target_group');
586 $tg->setValue($this->object->getTargetGroup() ?? "");
587 $tg->setRows(6);
588 $form->addItem($tg);
589
590 $section = new ilFormSectionHeaderGUI();
591 $section->setTitle($this->lng->txt('crs_info_download'));
592 $form->addItem($section);
593
594 $file = new ilFileInputGUI($this->lng->txt('crs_file'), 'file');
595 $file->enableFileNameSelection('file_name');
596 $form->addItem($file);
597
598 $section = new ilFormSectionHeaderGUI();
599 $section->setTitle($this->lng->txt('crs_contact'));
600 $form->addItem($section);
601
602 $text = new ilTextInputGUI($this->lng->txt('crs_contact_name'), 'contact_name');
603 $text->setValue($this->object->getContactName());
604 $text->setSize(40);
605 $text->setMaxLength(70);
606 $form->addItem($text);
607
608 $text = new ilTextInputGUI($this->lng->txt('crs_contact_responsibility'), 'contact_responsibility');
609 $text->setValue($this->object->getContactResponsibility());
610 $text->setSize(40);
611 $text->setMaxLength(70);
612 $form->addItem($text);
613
614 $text = new ilTextInputGUI($this->lng->txt('crs_contact_phone'), 'contact_phone');
615 $text->setValue($this->object->getContactPhone());
616 $text->setSize(40);
617 $text->setMaxLength(40);
618 $form->addItem($text);
619
620 $text = new ilTextInputGUI($this->lng->txt('crs_contact_email'), 'contact_email');
621 $text->setValue($this->object->getContactEmail());
622 $text->setInfo($this->lng->txt('crs_contact_email_info'));
623 $text->setSize(40);
624 $text->setMaxLength(255);
625 $form->addItem($text);
626
627 $area = new ilTextAreaInputGUI($this->lng->txt('crs_contact_consultation'), 'contact_consultation');
628 $area->setValue($this->object->getContactConsultation());
629 $area->setRows(6);
630 $area->setCols(80);
631 $form->addItem($area);
632
633 $this->record_gui = new ilAdvancedMDRecordGUI(
635 'crs',
636 $this->object->getId()
637 );
638 $this->record_gui->setPropertyForm($form);
639 $this->record_gui->parse();
640 return $form;
641 }
This class represents a file property in a property form.
setMultipart(bool $a_multipart)
This class represents a text area property in a property form.

References ilContainerGUI\$form, ilPropertyFormGUI\addCommandButton(), ilPropertyFormGUI\addItem(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ilAdvancedMDRecordGUI\MODE_EDITOR, ILIAS\Repository\object(), ilFormGUI\setFormAction(), ilFormGUI\setMultipart(), and ilPropertyFormGUI\setTitle().

Referenced by editInfoObject(), executeCommand(), and updateInfoObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ jump2UsersGalleryObject()

ilObjCourseGUI::jump2UsersGalleryObject ( )
protected

Definition at line 3125 of file class.ilObjCourseGUI.php.

3125 : void
3126 {
3127 $this->ctrl->redirectByClass(ilUsersGalleryGUI::class);
3128 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ leaveObject()

ilObjCourseGUI::leaveObject ( )

Definition at line 1766 of file class.ilObjCourseGUI.php.

1766 : void
1767 {
1768 $this->checkPermission('leave');
1769
1770 if ($this->object->getMembersObject()->isLastAdmin($this->user->getId())) {
1771 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('crs_min_one_admin'));
1772 $this->viewObject();
1773 return;
1774 }
1775
1776 $this->tabs_gui->setTabActive('crs_unsubscribe');
1777 $cgui = new ilConfirmationGUI();
1778 $cgui->setHeaderText($this->lng->txt('crs_unsubscribe_sure'));
1779 $cgui->setFormAction($this->ctrl->getFormAction($this));
1780 $cgui->setCancel($this->lng->txt("cancel"), "cancel");
1781 $cgui->setConfirm($this->lng->txt("crs_unsubscribe"), "performUnsubscribe");
1782 $this->tpl->setContent($cgui->getHTML());
1783 }

References ilObjectGUI\checkPermission(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ILIAS\Repository\object(), and ilObjectGUI\viewObject().

Referenced by unsubscribeObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ membersObject()

ilObjCourseGUI::membersObject ( )
protected

Definition at line 2550 of file class.ilObjCourseGUI.php.

2550 : void
2551 {
2552 $this->ctrl->redirectByClass('ilcoursemembershipgui');
2553 }

References ILIAS\Repository\ctrl().

Referenced by autoFillObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ modifyItemGUI()

ilObjCourseGUI::modifyItemGUI ( ilObjectListGUI  $a_item_list_gui,
array  $a_item_data 
)

@inheritDoc

Reimplemented from ilContainerGUI.

Definition at line 2704 of file class.ilObjCourseGUI.php.

2704 : void
2705 {
2707 $a_item_list_gui,
2708 'ilcoursecontentgui',
2709 $a_item_data,
2710 $this->object->getAboStatus(),
2711 $this->object->getRefId(),
2712 $this->object->getId()
2713 );
2714 }
static _modifyItemGUI(ilObjectListGUI $a_item_list_gui, string $a_cmd_class, array $a_item_data, bool $a_abo_status, int $a_course_ref_id, int $a_course_obj_id, int $a_parent_ref_id=0)

References _modifyItemGUI(), and ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ performUnsubscribeObject()

ilObjCourseGUI::performUnsubscribeObject ( )

Definition at line 1790 of file class.ilObjCourseGUI.php.

1791 {
1792 $this->checkPermission('leave');
1793 $this->getObject()->getMembersObject()->delete($this->user->getId());
1794 $this->getObject()->getMembersObject()->sendUnsubscribeNotificationToAdmins($this->user->getId());
1795 $this->getObject()->getMembersObject()->sendNotification(
1797 $this->user->getId()
1798 );
1799 $this->tpl->setOnScreenMessage('success', $this->lng->txt('crs_unsubscribed_from_crs'), true);
1800
1801 $this->ctrl->setParameterByClass("ilrepositorygui", "ref_id", $this->tree->getParentId($this->ref_id));
1802 $this->ctrl->redirectByClass("ilrepositorygui", "");
1803 }

References ilObjectGUI\checkPermission(), ILIAS\Repository\ctrl(), ilObjectGUI\getObject(), ILIAS\Repository\lng(), ilCourseMembershipMailNotification\TYPE_UNSUBSCRIBE_MEMBER, and ILIAS\Repository\user().

+ Here is the call graph for this function:

◆ readMemberData()

ilObjCourseGUI::readMemberData ( array  $ids,
?array  $selected_columns = null,
bool  $skip_names = false 
)

When building the members table in a course, user names are already read out via ilUserQuery::getUserListData (#31394). Adding skip_name as a parameter here is not super elegant, but seems like the only practical way avoid unnecessarily reading out the names again.

Definition at line 1629 of file class.ilObjCourseGUI.php.

1629 : array
1630 {
1631 $show_tracking =
1632 (
1635 );
1636 if ($show_tracking) {
1637 $olp = ilObjectLP::getInstance($this->object->getId());
1638 $show_tracking = $olp->isActive();
1639 }
1640
1641 if ($show_tracking) {
1642 $completed = ilLPStatusWrapper::_lookupCompletedForObject($this->object->getId());
1643 $in_progress = ilLPStatusWrapper::_lookupInProgressForObject($this->object->getId());
1644 $failed = ilLPStatusWrapper::_lookupFailedForObject($this->object->getId());
1645 }
1646 $privacy = ilPrivacySettings::getInstance();
1647
1648 if ($privacy->enabledCourseAccessTimes()) {
1649 $progress = ilLearningProgress::_lookupProgressByObjId($this->object->getId());
1650 }
1651
1652 $do_prtf = (is_array($selected_columns) &&
1653 in_array('prtf', $selected_columns) &&
1654 is_array($ids));
1655 if ($do_prtf) {
1657 $ids,
1658 $this->ctrl->getLinkTarget($this, "members")
1659 );
1660 }
1661
1662 $members = [];
1663 foreach ($ids as $usr_id) {
1671 if (!$skip_names) {
1672 $name = ilObjUser::_lookupName($usr_id);
1673 $tmp_data['firstname'] = $name['firstname'];
1674 $tmp_data['lastname'] = $name['lastname'];
1675 $tmp_data['login'] = $name['login'];
1676 }
1677 $tmp_data['passed'] = $this->object->getMembersObject()->hasPassed($usr_id) ? 1 : 0;
1678 if ($this->object->getStatusDetermination() == ilObjCourse::STATUS_DETERMINATION_LP) {
1679 $tmp_data['passed_info'] = $this->object->getMembersObject()->getPassedInfo($usr_id);
1680 }
1681 $tmp_data['notification'] = $this->object->getMembersObject()->isNotificationEnabled($usr_id) ? 1 : 0;
1682 $tmp_data['blocked'] = $this->object->getMembersObject()->isBlocked($usr_id) ? 1 : 0;
1683 $tmp_data['contact'] = $this->object->getMembersObject()->isContact($usr_id) ? 1 : 0;
1684
1685 $tmp_data['usr_id'] = $usr_id;
1686
1687 if ($show_tracking) {
1688 if (in_array($usr_id, $completed)) {
1689 $tmp_data['progress'] = ilLPStatus::LP_STATUS_COMPLETED;
1690 } elseif (in_array($usr_id, $in_progress)) {
1691 $tmp_data['progress'] = ilLPStatus::LP_STATUS_IN_PROGRESS;
1692 } elseif (in_array($usr_id, $failed)) {
1693 $tmp_data['progress'] = ilLPStatus::LP_STATUS_FAILED;
1694 } else {
1695 $tmp_data['progress'] = ilLPStatus::LP_STATUS_NOT_ATTEMPTED;
1696 }
1697 }
1698
1699 if ($privacy->enabledCourseAccessTimes()) {
1700 if (isset($progress[$usr_id]['ts']) && $progress[$usr_id]['ts']) {
1701 $tmp_data['access_ut'] = $progress[$usr_id]['ts'];
1702 $tmp_data['access_time'] = ilDatePresentation::formatDate(new ilDateTime(
1703 $progress[$usr_id]['ts'],
1705 ));
1706 } else {
1707 $tmp_data['access_ut'] = 0;
1708 $tmp_data['access_time'] = $this->lng->txt('no_date');
1709 }
1710 }
1711
1712 if ($do_prtf) {
1713 $tmp_data['prtf'] = $all_prtf[$usr_id] ?? null;
1714 }
1715
1716 $members[$usr_id] = $tmp_data;
1717 }
1718 return $members;
1719 }
static _lookupCompletedForObject(int $a_obj_id, ?array $a_user_ids=null)
static _lookupFailedForObject(int $a_obj_id, ?array $a_user_ids=null)
static _lookupInProgressForObject(int $a_obj_id, ?array $a_user_ids=null)
const LP_STATUS_COMPLETED
const LP_STATUS_FAILED
const LP_STATUS_NOT_ATTEMPTED
const LP_STATUS_IN_PROGRESS
static _lookupProgressByObjId(int $a_obj_id)
lookup progress for a specific object
static getAvailablePortfolioLinksForUserIds(array $a_owner_ids, ?string $a_back_url=null)
static _lookupName(int $a_user_id)

References ilObjUserTracking\_enabledLearningProgress(), ilObjUserTracking\_enabledUserRelatedData(), ilLPStatusWrapper\_lookupCompletedForObject(), ilLPStatusWrapper\_lookupFailedForObject(), ilLPStatusWrapper\_lookupInProgressForObject(), ilObjUser\_lookupName(), ilLearningProgress\_lookupProgressByObjId(), ILIAS\Repository\ctrl(), ilDatePresentation\formatDate(), ilObjPortfolio\getAvailablePortfolioLinksForUserIds(), ilPrivacySettings\getInstance(), ilObjectLP\getInstance(), IL_CAL_UNIX, ILIAS\Repository\lng(), ilLPStatus\LP_STATUS_COMPLETED, ilLPStatus\LP_STATUS_FAILED, ilLPStatus\LP_STATUS_IN_PROGRESS, ilLPStatus\LP_STATUS_NOT_ATTEMPTED, ILIAS\Repository\object(), and ilObjCourse\STATUS_DETERMINATION_LP.

+ Here is the call graph for this function:

◆ redirectLocToTestConfirmation()

ilObjCourseGUI::redirectLocToTestConfirmation ( int  $a_objective_id,
int  $a_test_id 
)
protected

Show confirmation whether user wants to start a new run or resume a previous run.

Definition at line 3061 of file class.ilObjCourseGUI.php.

3061 : void
3062 {
3063 $confirm = new ilConfirmationGUI();
3064 $confirm->setFormAction($GLOBALS['DIC']['ilCtrl']->getFormAction($this));
3065
3066 if ($a_objective_id) {
3067 $question = $this->lng->txt('crs_loc_objective_passed_confirmation');
3068 } else {
3069 $question = $this->lng->txt('crs_loc_objectives_passed_confirmation');
3070 }
3071
3072 $confirm->setHeaderText($question);
3073 $confirm->addHiddenItem('objective_id', (string) $a_objective_id);
3074 $confirm->addHiddenItem('tid', (string) $a_test_id);
3075 $confirm->setConfirm($this->lng->txt('crs_loc_tst_start'), 'redirectLocToTestConfirmed');
3076 $confirm->setCancel($this->lng->txt('cancel'), 'view');
3077
3078 //$this->tpl->setOnScreenMessage('question', $question);
3079 $this->tpl->setContent($confirm->getHTML());
3080 }
getFormAction(string $cmd, string $default_form_action="")
Get form action for command (command is method name without "Object", e.g.

References $GLOBALS, and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ redirectLocToTestConfirmedObject()

ilObjCourseGUI::redirectLocToTestConfirmedObject ( )
protected

Definition at line 2993 of file class.ilObjCourseGUI.php.

2993 : void
2994 {
2995 $tid = 0;
2996 if ($this->http->wrapper()->query()->has('tid')) {
2997 $tid = $this->http->wrapper()->query()->retrieve(
2998 'tid',
2999 $this->refinery->kindlyTo()->int()
3000 );
3001 } elseif ($this->http->wrapper()->post()->has('tid')) {
3002 $tid = $this->http->wrapper()->post()->retrieve(
3003 'tid',
3004 $this->refinery->kindlyTo()->int()
3005 );
3006 }
3007 ilUtil::redirect(ilLink::_getLink($tid));
3008 }

References ILIAS\FileDelivery\http(), ilUtil\redirect(), and ILIAS\Repository\refinery().

+ Here is the call graph for this function:

◆ redirectLocToTestObject()

ilObjCourseGUI::redirectLocToTestObject (   $a_force_new_run = null)
protected

Definition at line 3010 of file class.ilObjCourseGUI.php.

3010 : void
3011 {
3012 $tid = 0;
3013 if ($this->http->wrapper()->query()->has('tid')) {
3014 $tid = $this->http->wrapper()->query()->retrieve(
3015 'tid',
3016 $this->refinery->kindlyTo()->int()
3017 );
3018 }
3019 $objective_id = 0;
3020 if ($this->http->wrapper()->query()->has('objective_id')) {
3021 $objective_id = $this->http->wrapper()->query()->retrieve(
3022 'objective_id',
3023 $this->refinery->kindlyTo()->int()
3024 );
3025 }
3026
3027 $res = new ilLOUserResults(
3028 $this->object->getId(),
3029 $this->user->getId()
3030 );
3031 $passed = $res->getCompletedObjectiveIds();
3032
3033 $has_completed = false;
3034 if ($objective_id) {
3035 $objective_ids = array($objective_id);
3036 if (in_array($objective_id, $passed)) {
3037 $has_completed = true;
3038 $passed = array();
3039 }
3040 } else {
3041 $objective_ids = ilCourseObjective::_getObjectiveIds($this->object->getId(), true);
3042
3043 // do not disable objective question if all are passed
3044 if (count($objective_ids) === count($passed)) {
3045 $has_completed = true;
3046 $passed = array();
3047 }
3048 }
3049
3050 if ($has_completed) {
3051 // show confirmation
3052 $this->redirectLocToTestConfirmation($objective_id, $tid);
3053 return;
3054 }
3055 ilUtil::redirect(ilLink::_getLink($tid));
3056 }
static _getObjectiveIds(int $course_id, bool $a_activated_only=false)
redirectLocToTestConfirmation(int $a_objective_id, int $a_test_id)
Show confirmation whether user wants to start a new run or resume a previous run.
$res
Definition: ltiservices.php:69

References $res, ilCourseObjective\_getObjectiveIds(), ILIAS\FileDelivery\http(), ILIAS\Repository\object(), ilUtil\redirect(), and ILIAS\Repository\refinery().

+ Here is the call graph for this function:

◆ renderAddNewItem()

ilObjCourseGUI::renderAddNewItem ( string ...  $disabled_object_types)

Definition at line 1590 of file class.ilObjCourseGUI.php.

1590 : void
1591 {
1592 $createble_object_types = $this->getCreatableObjectTypes();
1593
1594 foreach ($disabled_object_types as $type) {
1595 unset($createble_object_types[$type]);
1596 }
1597
1599 $this->buildAddNewItemElements($createble_object_types)
1600 );
1601 $gui->render();
1602 }
Render add new item selector.
buildAddNewItemElements(array $subtypes, string $create_target_class=ilRepositoryGUI::class, ?int $redirect_target_ref_id=null,)

References ilContainerGUI\$gui, ilObjectGUI\$type, ilObjectGUI\buildAddNewItemElements(), and ilObjectGUI\getCreatableObjectTypes().

Referenced by showPossibleSubObjects().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ renderContainer()

ilObjCourseGUI::renderContainer ( )

Definition at line 164 of file class.ilObjCourseGUI.php.

164 : void
165 {
166 parent::renderObject();
167 }

◆ renderObject()

ilObjCourseGUI::renderObject ( )

Reimplemented from ilContainerGUI.

Definition at line 100 of file class.ilObjCourseGUI.php.

100 : void
101 {
102 $this->viewObject();
103 }

References ilObjectGUI\viewObject().

+ Here is the call graph for this function:

◆ resetObject()

ilObjCourseGUI::resetObject ( )

Definition at line 2809 of file class.ilObjCourseGUI.php.

2809 : void
2810 {
2811 $usr_results = new ilLOUserResults($this->object->getId(), $GLOBALS['DIC']['ilUser']->getId());
2812 $usr_results->delete();
2814 $this->object->getId(),
2815 $GLOBALS['DIC']['ilUser']->getId()
2816 );
2817
2818 $tmp_obj_res = new ilCourseObjectiveResult($this->user->getId());
2819 $tmp_obj_res->reset($this->object->getId());
2820
2821 $this->user->deletePref('crs_objectives_force_details_' . $this->object->getId());
2822 $this->tpl->setOnScreenMessage('success', $this->lng->txt('crs_objectives_reseted'));
2823 $this->viewObject();
2824 }
static deleteRuns(int $a_container_id, int $a_user_id)

References $GLOBALS, ilLOTestRun\deleteRuns(), ILIAS\Repository\lng(), ILIAS\Repository\object(), and ILIAS\Repository\user().

+ Here is the call graph for this function:

◆ saveMapSettingsObject()

ilObjCourseGUI::saveMapSettingsObject ( )
Todo:
centralize for course, group, others

Definition at line 2674 of file class.ilObjCourseGUI.php.

2674 : void
2675 {
2676 $location = [];
2677 if ($this->http->wrapper()->post()->has('location')) {
2678 $custom_transformer = $this->refinery->custom()->transformation(
2679 fn($array) => $array
2680 );
2681 $location = $this->http->wrapper()->post()->retrieve(
2682 'location',
2683 $custom_transformer
2684 );
2685 }
2686 $enable_map = false;
2687 if ($this->http->wrapper()->post()->has('enable_map')) {
2688 $enable_map = $this->http->wrapper()->post()->retrieve(
2689 'enable_map',
2690 $this->refinery->kindlyTo()->bool()
2691 );
2692 }
2693 $this->object->setLatitude($location['latitude']);
2694 $this->object->setLongitude($location['longitude']);
2695 $this->object->setLocationZoom($location['zoom']);
2696 $this->object->setEnableCourseMap($enable_map);
2697 $this->object->update();
2698 $this->ctrl->redirect($this, "editMapSettings");
2699 }
$location
Definition: buildRTE.php:22

References $location, ILIAS\Repository\ctrl(), ILIAS\FileDelivery\http(), and ILIAS\Repository\refinery().

+ Here is the call graph for this function:

◆ saveNotificationObject()

ilObjCourseGUI::saveNotificationObject ( )

Definition at line 444 of file class.ilObjCourseGUI.php.

444 : void
445 {
446 $noti = new ilMembershipNotifications($this->ref_id);
447 if ($noti->canCurrentUserEdit()) {
448 $crs_ntf = false;
449 if ($this->http->wrapper()->query()->has('crs_ntf')) {
450 $crs_ntf = $this->http->wrapper()->query()->retrieve(
451 'crs_ntf',
452 $this->refinery->kindlyTo()->bool()
453 );
454 }
455 if ($crs_ntf) {
456 $noti->activateUser();
457 } else {
458 $noti->deactivateUser();
459 }
460 }
461 $this->tpl->setOnScreenMessage('success', $this->lng->txt("settings_saved"), true);
462 $this->ctrl->redirect($this, "");
463 }

References ILIAS\Repository\ctrl(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), and ILIAS\Repository\refinery().

+ Here is the call graph for this function:

◆ saveSortingObject()

ilObjCourseGUI::saveSortingObject ( )

Reimplemented from ilContainerGUI.

Definition at line 2961 of file class.ilObjCourseGUI.php.

2961 : void
2962 {
2963 $post_position = (array) ($this->http->request()->getParsedBody()['position'] ?? []);
2964 if (isset($post_position['lobj'])) {
2965 $lobj = $post_position['lobj'];
2966 $objective_order = array();
2967 foreach ($lobj as $objective_id => $materials) {
2968 $objective_order[$objective_id] = $materials[0];
2969 unset($lobj[$objective_id][0]);
2970 }
2971 // objective order
2972 asort($objective_order);
2973 $pos = 0;
2974 foreach (array_keys($objective_order) as $objective_id) {
2975 $obj = new ilCourseObjective($this->object, $objective_id);
2976 $obj->writePosition(++$pos);
2977 }
2978
2979 // material order
2980 foreach ($lobj as $objective_id => $materials) {
2981 $objmat = new ilCourseObjectiveMaterials($objective_id);
2982
2983 asort($materials);
2984 $pos = 0;
2985 foreach (array_keys($materials) as $ass_id) {
2986 $objmat->writePosition($ass_id, ++$pos);
2987 }
2988 }
2989 }
2990 parent::saveSortingObject();
2991 }
class ilCourseObjectiveMaterials
class ilcourseobjective

References $ass_id, and ILIAS\FileDelivery\http().

+ Here is the call graph for this function:

◆ sendFileObject()

ilObjCourseGUI::sendFileObject ( )

Definition at line 1463 of file class.ilObjCourseGUI.php.

1463 : void
1464 {
1465 $file_id = 0;
1466 if ($this->http->wrapper()->query()->has('file_id')) {
1467 $file_id = $this->http->wrapper()->query()->retrieve(
1468 'file_id',
1469 $this->refinery->kindlyTo()->int()
1470 );
1471 }
1472 $file = new ilCourseFile($file_id);
1473 ilFileDelivery::deliverFileLegacy($file->getAbsolutePath(), $file->getFileName(), $file->getFileType());
1474 }
static deliverFileLegacy(string $a_file, ?string $a_filename=null, ?string $a_mime=null, ?bool $isInline=false, ?bool $removeAfterDelivery=false, ?bool $a_exit_after=true)

References ilFileDelivery\deliverFileLegacy(), ILIAS\FileDelivery\http(), and ILIAS\Repository\refinery().

+ Here is the call graph for this function:

◆ setContentSubTabs()

ilObjCourseGUI::setContentSubTabs ( )

@inheritDoc

Reimplemented from ilContainerGUI.

Definition at line 2753 of file class.ilObjCourseGUI.php.

2753 : void
2754 {
2755 global $DIC;
2756
2757 $ilAccess = $DIC['ilAccess'];
2758 $lng = $DIC['lng'];
2759 $ilCtrl = $DIC['ilCtrl'];
2760
2761 if ($this->object->getType() != 'crs') {
2762 return;
2763 }
2764 if (!$this->access->checkAccess(
2765 'write',
2766 '',
2767 $this->object->getRefId(),
2768 'crs',
2769 $this->object->getId()
2770 )) {
2771 $is_tutor = false;
2772 // No further tabs if objective view or archives
2773 if ($this->object->enabledObjectiveView()) {
2774 return;
2775 }
2776 } else {
2777 $is_tutor = true;
2778 }
2779
2780 if (!$this->isActiveAdministrationPanel()) {
2781 $this->tabs_gui->addSubTab(
2782 "view_content",
2783 $lng->txt("view"),
2784 $this->ctrl->getLinkTargetByClass("ilobjcoursegui", "view")
2785 );
2786 } else {
2787 $this->tabs_gui->addSubTab(
2788 "view_content",
2789 $lng->txt("view"),
2790 $this->ctrl->getLinkTargetByClass("ilobjcoursegui", "disableAdministrationPanel")
2791 );
2792 }
2793 //}
2794
2795 $this->addStandardContainerSubTabs(false);
2796 }
addStandardContainerSubTabs(bool $a_include_view=true)
Add standard container subtabs for view, manage, oderdering and text/media editor link.

References $DIC, $lng, ILIAS\Repository\access(), and ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ setLPSyncObject()

ilObjCourseGUI::setLPSyncObject ( )
protected

Definition at line 979 of file class.ilObjCourseGUI.php.

979 : void
980 {
981 $this->object->setStatusDetermination(ilObjCourse::STATUS_DETERMINATION_LP);
982 $this->object->update();
983 $this->object->syncMembersStatusWithLP();
984 $this->tpl->setOnScreenMessage('success', $this->lng->txt("settings_saved"), true);
985 $this->ctrl->redirect($this, "edit");
986 }

References ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), and ilObjCourse\STATUS_DETERMINATION_LP.

+ Here is the call graph for this function:

◆ setSideColumnReturn()

ilObjCourseGUI::setSideColumnReturn ( )

@inheritDoc

Reimplemented from ilContainerGUI.

Definition at line 3133 of file class.ilObjCourseGUI.php.

3133 : void
3134 {
3135 $this->ctrl->setReturn($this, "view");
3136 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ setSubTabs()

ilObjCourseGUI::setSubTabs ( string  $a_tab)

Definition at line 1476 of file class.ilObjCourseGUI.php.

1476 : void
1477 {
1478 switch ($a_tab) {
1479 case "properties":
1480 $this->tabs_gui->addSubTabTarget(
1481 "crs_settings",
1482 $this->ctrl->getLinkTarget($this, 'edit'),
1483 "edit",
1484 get_class($this)
1485 );
1486
1487 $this->tabs_gui->addSubTabTarget(
1488 "crs_info_settings",
1489 $this->ctrl->getLinkTarget($this, 'editInfo'),
1490 "editInfo",
1491 get_class($this)
1492 );
1493
1494 $this->tabs_gui->addSubTabTarget(
1495 "preconditions",
1496 $this->ctrl->getLinkTargetByClass('ilConditionHandlerGUI', 'listConditions'),
1497 "",
1498 "ilConditionHandlerGUI"
1499 );
1500
1501 $this->tabs_gui->addSubTabTarget(
1502 "crs_start_objects",
1503 $this->ctrl->getLinkTargetByClass('ilContainerStartObjectsGUI', 'listStructure'),
1504 "listStructure",
1505 get_class($this)
1506 );
1507
1508 $this->tabs_gui->addSubTabTarget(
1509 'groupings',
1510 $this->ctrl->getLinkTargetByClass('ilobjcoursegroupinggui', 'listGroupings'),
1511 'listGroupings',
1512 get_class($this)
1513 );
1514 $lti_settings = new ilLTIProviderObjectSettingGUI($this->object->getRefId());
1515 if ($lti_settings->hasSettingsAccess()) {
1516 $this->tabs_gui->addSubTabTarget(
1517 'lti_provider',
1518 $this->ctrl->getLinkTargetByClass(ilLTIProviderObjectSettingGUI::class)
1519 );
1520 }
1521
1522 // map settings
1523 if (ilMapUtil::isActivated()) {
1524 $this->tabs_gui->addSubTabTarget(
1525 "crs_map_settings",
1526 $this->ctrl->getLinkTarget($this, 'editMapSettings'),
1527 "editMapSettings",
1528 get_class($this)
1529 );
1530 }
1531
1532 // only show if export permission is granted
1533 if (ilPrivacySettings::getInstance()->checkExportAccess($this->object->getRefId()) || ilCourseDefinedFieldDefinition::_hasFields($this->object->getId())) {
1534 $this->tabs_gui->addSubTabTarget(
1535 'crs_custom_user_fields',
1536 $this->ctrl->getLinkTargetByClass('ilobjectcustomuserfieldsgui'),
1537 '',
1538 'ilobjectcustomuserfieldsgui'
1539 );
1540 }
1541
1542 // certificates
1543 $validator = new ilCertificateActiveValidator();
1544 if (true === $validator->validate()) {
1545 $this->tabs_gui->addSubTabTarget(
1546 "certificate",
1547 $this->ctrl->getLinkTargetByClass("ilcertificategui", "certificateeditor"),
1548 "",
1549 "ilcertificategui"
1550 );
1551 }
1552 // news settings
1553 if ($this->object->getUseNews()) {
1554 $this->tabs_gui->addSubTab(
1555 'obj_news_settings',
1556 $this->lng->txt("cont_news_settings"),
1557 $this->ctrl->getLinkTargetByClass('ilcontainernewssettingsgui')
1558 );
1559 }
1560 if ($this->object->getShowMembersExport()) {
1561 $this->tabs_gui->addSubTab(
1562 'export_members',
1563 $this->lng->txt('crs_show_member_export_settings'),
1564 $this->ctrl->getLinkTargetByClass('ilmemberexportsettingsgui', '')
1565 );
1566 }
1567 $this->tabs_gui->addSubTabTarget(
1568 "obj_multilinguality",
1569 $this->ctrl->getLinkTargetByClass(TranslationGUI::class, ""),
1570 "",
1571 TranslationGUI::class
1572 );
1573 break;
1574 }
1575 }

References ilCourseDefinedFieldDefinition\_hasFields(), ILIAS\Repository\ctrl(), ilPrivacySettings\getInstance(), ilMapUtil\isActivated(), ILIAS\Repository\lng(), and ILIAS\Repository\object().

Referenced by confirmDeleteInfoFilesObject(), editInfoObject(), editMapSettingsObject(), editObject(), and executeCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showPossibleSubObjects()

ilObjCourseGUI::showPossibleSubObjects ( )
protected

@inheritDoc

Reimplemented from ilContainerGUI.

Definition at line 1580 of file class.ilObjCourseGUI.php.

1580 : void
1581 {
1582 if (
1583 $this->object->getViewMode() == ilContainer::VIEW_OBJECTIVE &&
1584 !$this->isActiveAdministrationPanel()) {
1585 return;
1586 }
1587 $this->renderAddNewItem();
1588 }
renderAddNewItem(string ... $disabled_object_types)

References ILIAS\Repository\object(), renderAddNewItem(), and ilContainer\VIEW_OBJECTIVE.

+ Here is the call graph for this function:

◆ unsubscribeObject()

ilObjCourseGUI::unsubscribeObject ( )

Definition at line 1785 of file class.ilObjCourseGUI.php.

1785 : void
1786 {
1787 $this->leaveObject();
1788 }

References leaveObject().

+ Here is the call graph for this function:

◆ updateInfoObject()

ilObjCourseGUI::updateInfoObject ( )
Todo:
switch to form

Definition at line 646 of file class.ilObjCourseGUI.php.

646 : void
647 {
648 $this->checkPermission('write');
649
650 $form = $this->initInfoEditor();
651 if ($form->checkInput()) {
652 $this->object->setImportantInformation((string) $form->getInput('important'));
653 $this->object->setSyllabus((string) $form->getInput('syllabus'));
654 $this->object->setTargetGroup((string) $form->getInput('target_group'));
655 $this->object->setContactName((string) $form->getInput('contact_name'));
656 $this->object->setContactResponsibility((string) $form->getInput('contact_responsibility'));
657 $this->object->setContactPhone((string) $form->getInput('contact_phone'));
658 $this->object->setContactEmail((string) $form->getInput('contact_email'));
659 $this->object->setContactConsultation((string) $form->getInput('contact_consultation'));
660
661 $file_info = $form->getInput('file');
662 $file_name = $form->getItemByPostVar('file')->getFilename();
663 $file_name = ilFileUtils::getValidFilename($file_name);
664
665 $file_obj = new ilCourseFile();
666 $file_obj->setCourseId($this->object->getId());
667 $file_obj->setFileName((string) $file_name);
668 $file_obj->setFileSize((int) $file_info['size']);
669 $file_obj->setFileType((string) $file_info['type']);
670 $file_obj->setTemporaryName((string) $file_info['tmp_name']);
671 $file_obj->setErrorCode((int) $file_info['error']);
672
673 $error = false;
674 $this->error->setMessage('');
675 $file_obj->validate();
676 $this->object->validateInfoSettings();
677 if (strlen($this->error->getMessage())) {
678 $error = $this->error->getMessage();
679 }
680 if (!$this->record_gui->importEditFormPostValues()) {
681 $error = true;
682 }
683 if ($error) {
684 if ($error !== true) {
685 $this->tpl->setOnScreenMessage('failure', $this->error->getMessage());
686 }
688 $this->editInfoObject($form);
689 return;
690 }
691 $this->object->update();
692 $file_obj->create();
693 $this->record_gui->writeEditForm();
694
695 // Update ecs content
696 $ecs = new ilECSCourseSettings($this->object);
697 $ecs->handleContentUpdate();
698
699 $this->tpl->setOnScreenMessage('success', $this->lng->txt("crs_settings_saved"));
700 $this->editInfoObject();
701 } else {
702 $this->tpl->setOnScreenMessage(
704 $this->lng->txt('settings_saved')
705 );
706 }
707 }
static getValidFilename(string $a_filename)
getInput(string $a_post_var, bool $ensureValidation=true)
Returns the input of an item, if item provides getInput method and as fallback the value of the HTTP-...
getItemByPostVar(string $a_post_var)

References ilContainerGUI\$error, ilContainerGUI\$form, ilPropertyFormGUI\checkInput(), ilObjectGUI\checkPermission(), editInfoObject(), error(), ilPropertyFormGUI\getInput(), ilPropertyFormGUI\getItemByPostVar(), ilFileUtils\getValidFilename(), initInfoEditor(), ILIAS\Repository\lng(), ILIAS\UICore\GlobalTemplate\MESSAGE_TYPE_SUCCESS, ILIAS\Repository\object(), and ilPropertyFormGUI\setValuesByPost().

+ Here is the call graph for this function:

◆ updateLPFromStatus()

ilObjCourseGUI::updateLPFromStatus ( int  $a_member_id,
bool  $a_has_passed 
)

sync course status and lp status

Definition at line 1724 of file class.ilObjCourseGUI.php.

1724 : void
1725 {
1727 $this->object->getStatusDetermination() == ilObjCourse::STATUS_DETERMINATION_LP) {
1728 $olp = ilObjectLP::getInstance($this->object->getId());
1729 if ($olp->getCurrentMode() == ilLPObjSettings::LP_MODE_MANUAL_BY_TUTOR) {
1730 $marks = new ilLPMarks($this->object->getId(), $a_member_id);
1731
1732 // only if status has changed
1733 if ($marks->getCompleted() !== $a_has_passed) {
1734 $marks->setCompleted($a_has_passed);
1735 $marks->update();
1736
1737 // as course is origin of LP status change, block syncing
1739 ilLPStatusWrapper::_updateStatus($this->object->getId(), $a_member_id);
1740 }
1741 }
1742 }
1743 }
static setBlockedForLP(bool $a_status)
Toggle LP blocking property status.
static _updateStatus(int $a_obj_id, int $a_usr_id, ?object $a_obj=null, bool $a_percentage=false, bool $a_force_raise=false)

References ilObjUserTracking\_enabledLearningProgress(), ilLPStatusWrapper\_updateStatus(), ilObjectLP\getInstance(), ilLPObjSettings\LP_MODE_MANUAL_BY_TUTOR, ILIAS\Repository\object(), ilCourseAppEventListener\setBlockedForLP(), and ilObjCourse\STATUS_DETERMINATION_LP.

+ Here is the call graph for this function:

◆ updateObject()

ilObjCourseGUI::updateObject ( )

updates object entry in object_data

Reimplemented from ilObjectGUI.

Definition at line 709 of file class.ilObjCourseGUI.php.

709 : void
710 {
711 $obj_service = $this->getObjectService();
712 $setting = $this->settings;
713
714 $form = $this->initEditForm();
715
716 if (!$form->checkInput()) {
718 $this->tpl->setOnScreenMessage('failure', $GLOBALS['DIC']->language()->txt('err_check_input'));
719 $this->editObject($form);
720 return;
721 }
722
723 // Additional checks: subsription min/max
724 if (
725 $form->getInput('subscription_max') &&
726 $form->getInput('subscription_min') &&
727 ($form->getInput('subscription_max') < $form->getInput('subscription_min'))
728 ) {
729 $min = $form->getItemByPostVar('subscription_min');
730 $min->setAlert($this->lng->txt('crs_subscription_min_members_err'));
731 $this->tpl->setOnScreenMessage('failure', $GLOBALS['DIC']->language()->txt('err_check_input'));
732 $this->editObject($form);
733 return;
734 }
735
736 // Additional checks: both tile and objective view activated (not supported)
737 if (
738 $form->getInput('list_presentation') == "tile" &&
740 $this->tpl->setOnScreenMessage(
741 'failure',
742 $GLOBALS['DIC']->language()->txt('crs_tile_and_objective_view_not_supported')
743 );
744 $this->editObject($form);
745 return;
746 }
747
748 // Additional checks: both tile and session limitation activated (not supported)
749 if ($form->getInput('sl') == "1" &&
750 $form->getInput('list_presentation') == "tile") {
751 $this->tpl->setOnScreenMessage(
752 'failure',
753 $GLOBALS['DIC']->language()->txt('crs_tile_and_session_limit_not_supported')
754 );
755 $this->editObject($form);
756 return;
757 }
758
759 // check successful
760 // title/desc
761 $this->object->setTitle($form->getInput('title'));
762 $this->object->setDescription($form->getInput('desc'));
763
764 // period
765 $crs_period = $form->getItemByPostVar("period");
766
767 $this->object->setCoursePeriod(
768 $crs_period->getStart(),
769 $crs_period->getEnd()
770 );
771
772 // activation period
773 $period = $form->getItemByPostVar("access_period");
774 if ($period->getStart() && $period->getEnd()) {
775 $this->object->setActivationStart($period->getStart()->get(IL_CAL_UNIX));
776 $this->object->setActivationEnd($period->getEnd()->get(IL_CAL_UNIX));
777 $this->object->setActivationVisibility((int) $form->getInput('activation_visibility'));
778 } else {
779 $this->object->setActivationStart(0);
780 $this->object->setActivationEnd(0);
781 }
782
783 // subscription settings
784 $this->object->setSubscriptionPassword($form->getInput('subscription_password'));
785 $this->object->setSubscriptionStart(0);
786 $this->object->setSubscriptionEnd(0);
787
788 $sub_type = (int) $form->getInput('subscription_type');
789 $sub_reg_type = (int) $form->getInput('subscription_limitation_type');
790 $sub_period = $form->getItemByPostVar('subscription_period');
791
792 $this->object->setSubscriptionType(
794 ? $sub_type
796 );
798 if ($sub_period->getStart() && $sub_period->getEnd()) {
799 $this->object->setSubscriptionLimitationType(ilCourseConstants::IL_CRS_SUBSCRIPTION_LIMITED);
800 $this->object->setSubscriptionStart($sub_period->getStart()->get(IL_CAL_UNIX));
801 $this->object->setSubscriptionEnd($sub_period->getEnd()->get(IL_CAL_UNIX));
802 } else {
803 $this->object->setSubscriptionLimitationType(ilCourseConstants::IL_CRS_SUBSCRIPTION_UNLIMITED);
804 }
805 } else {
806 $this->object->setSubscriptionType(ilCourseConstants::IL_CRS_SUBSCRIPTION_DIRECT);
807 $this->object->setSubscriptionLimitationType(ilCourseConstants::IL_CRS_SUBSCRIPTION_DEACTIVATED);
808 }
809
810 // registration code
811 $this->object->enableRegistrationAccessCode((bool) $form->getInput('reg_code_enabled'));
812 $this->object->setRegistrationAccessCode($form->getInput('reg_code'));
813
814 // cancellation end
815 $this->object->setCancellationEnd($form->getItemByPostVar("cancel_end")->getDate());
816
817 // waiting list
818 $this->object->enableSubscriptionMembershipLimitation((bool) $form->getInput('subscription_membership_limitation'));
819 $this->object->setSubscriptionMaxMembers((int) $form->getInput('subscription_max'));
820 $this->object->setSubscriptionMinMembers((int) $form->getInput('subscription_min'));
821 switch ((int) $form->getInput('waiting_list')) {
822 case 2:
823 $this->object->enableWaitingList(true);
824 $this->object->setWaitingListAutoFill(true);
825 break;
826
827 case 1:
828 $this->object->enableWaitingList(true);
829 $this->object->setWaitingListAutoFill(false);
830 break;
831
832 default:
833 $this->object->enableWaitingList(false);
834 $this->object->setWaitingListAutoFill(false);
835 break;
836 }
837 $this->object->handleAutoFill();
838
839 $property_online = $this->object->getObjectProperties()->getPropertyIsOnline();
840 $online = $form->getInput('activation_online') ? $property_online->withOnline() : $property_online->withOffline();
841 $this->object->getObjectProperties()->storePropertyIsOnline($online);
842
843 $obj_service->commonSettings()->legacyForm($form, $this->object)->saveTitleIconVisibility();
844 $obj_service->commonSettings()->legacyForm($form, $this->object)->saveTopActionsVisibility();
845 ilContainer::_writeContainerSetting($this->object->getId(), "rep_breacrumb", $form->getInput('rep_breacrumb'));
846 $obj_service->commonSettings()->legacyForm($form, $this->object)->saveIcon();
847 $obj_service->commonSettings()->legacyForm($form, $this->object)->saveTileImage();
849
850 $this->object->setViewMode((int) $form->getInput('view_mode'));
851 if ($this->object->getViewMode() == ilCourseConstants::IL_CRS_VIEW_TIMING) {
852 $this->object->setOrderType(ilContainer::SORT_ACTIVATION);
853 $this->object->setTimingMode((int) $form->getInput('timing_mode'));
854 }
855 $this->object->setTimingMode((int) $form->getInput('timing_mode'));
856 $this->object->setOrderType((int) $form->getInput('sorting'));
858
859 $this->log->debug(
860 "\n\n\nValue: " . (int) $form->getInput('tutorial_support_block_checkbox') . "\n\n\n"
861 );
862 $this->object->setTutorialSupportBlockSettingValue(
863 (int) $form->getInput('tutorial_support_block_checkbox')
864 );
865
866 $this->object->setAboStatus((bool) $form->getInput('abo'));
867 $this->object->setShowMembers((bool) $form->getInput('show_members'));
868
869 if (\ilPrivacySettings::getInstance()->participantsListInCoursesEnabled()) {
870 $this->object->setShowMembersExport((bool) $form->getInput('show_members_export'));
871 }
872 $this->object->setMailToMembersType((int) $form->getInput('mail_type'));
873
874 $this->object->enableSessionLimit((int) $form->getInput('sl'));
875
876 $session_sp = $form->getInput('sp');
877 $this->object->setNumberOfPreviousSessions(is_numeric($session_sp) ? (int) $session_sp : -1);
878 $session_sn = $form->getInput('sn');
879 $this->object->setNumberOfnextSessions(is_numeric($session_sn) ? (int) $session_sn : -1);
880 $this->object->setAutoNotification($form->getInput('auto_notification') == 1 ? true : false);
881
882 // lp sync
883 $show_lp_sync_confirmation = false;
884
885 // could be hidden in form
886 if ($this->http->wrapper()->post()->has('status_dt')) {
887 $status_dt = $this->http->wrapper()->post()->retrieve(
888 'status_dt',
889 $this->refinery->kindlyTo()->int()
890 );
891 if (
892 $this->object->getStatusDetermination() != ilObjCourse::STATUS_DETERMINATION_LP &&
894 ) {
895 $show_lp_sync_confirmation = true;
896 } else {
897 $this->object->setStatusDetermination($status_dt);
898 }
899 }
900
901 $this->object->update();
902
904 $this->object->getId(),
905 $form,
906 $this->getSubServices()
907 );
908
909 ilChangeEvent::_recordWriteEvent($this->object->getId(), $this->user->getId(), 'update');
910 ilChangeEvent::_catchupWriteEvents($this->object->getId(), $this->user->getId());
911
912 // lp sync confirmation required
913 if ($show_lp_sync_confirmation) {
914 $this->confirmLPSync();
915 return;
916 }
917
918 // Update ecs export settings
919 $ecs = new ilECSCourseSettings($this->object);
920 if (!$ecs->handleSettingsUpdate($form)) {
922 $this->tpl->setOnScreenMessage('failure', $GLOBALS['DIC']->language()->txt('err_check_input'));
923 $this->editObject($form);
924 return;
925 }
926
927 // 29589
928 if (
930 (
931 !is_null($sub_period->getStart()) ||
932 !is_null($sub_period->getEnd())
933 )
934 ) {
935 $this->tpl->setOnScreenMessage(
936 'failure',
937 $this->lng->txt('crs_msg_no_self_registration_period_if_self_enrolment_disabled'),
938 true
939 );
941 $this->tpl->setOnScreenMessage('failure', $GLOBALS['DIC']->language()->txt('err_check_input'));
942 $this->editObject($form);
943 return;
944 }
945
946 $this->afterUpdate();
947 }
static _catchupWriteEvents(int $obj_id, int $usr_id, ?string $timestamp=null)
Catches up with all write events which occured before the specified timestamp.
afterUpdate()
Post (successful) object update hook.
saveListPresentation(ilPropertyFormGUI $form)
saveSortingSettings(ilPropertyFormGUI $form)
static _writeContainerSetting(int $a_id, string $a_keyword, string $a_value)
static updateServiceSettingsForm(int $obj_id, ilPropertyFormGUI $form, array $services)

References ilContainerGUI\$form, $GLOBALS, ilObjectGUI\$settings, ilChangeEvent\_catchupWriteEvents(), ilChangeEvent\_recordWriteEvent(), ilContainer\_writeContainerSetting(), ilContainerGUI\afterUpdate(), ilPropertyFormGUI\checkInput(), confirmLPSync(), ilObjectGUI\editObject(), ilPropertyFormGUI\getInput(), ilPrivacySettings\getInstance(), ilPropertyFormGUI\getItemByPostVar(), ilObjectGUI\getObjectService(), ILIAS\FileDelivery\http(), IL_CAL_UNIX, ilCourseConstants\IL_CRS_SUBSCRIPTION_DEACTIVATED, ilCourseConstants\IL_CRS_SUBSCRIPTION_DIRECT, ilCourseConstants\IL_CRS_SUBSCRIPTION_LIMITED, ilCourseConstants\IL_CRS_SUBSCRIPTION_UNLIMITED, ilCourseConstants\IL_CRS_VIEW_OBJECTIVE, ilCourseConstants\IL_CRS_VIEW_TIMING, initEditForm(), ILIAS\Repository\int(), ILIAS\UI\examples\Symbol\Glyph\Language\language(), ILIAS\Repository\lng(), ILIAS\Repository\object(), ILIAS\Repository\refinery(), ilContainerGUI\saveListPresentation(), ilContainerGUI\saveSortingSettings(), ilPropertyFormGUI\setValuesByPost(), ilContainer\SORT_ACTIVATION, ilObjCourse\STATUS_DETERMINATION_LP, and ilObjectServiceSettingsGUI\updateServiceSettingsForm().

+ Here is the call graph for this function:

Field Documentation

◆ $help

ilHelpGUI ilObjCourseGUI::$help
protected

Definition at line 59 of file class.ilObjCourseGUI.php.

◆ $logger

ilLogger ilObjCourseGUI::$logger
private

Definition at line 57 of file class.ilObjCourseGUI.php.

◆ $navigation_history

ilNavigationHistory ilObjCourseGUI::$navigation_history
protected

Definition at line 60 of file class.ilObjCourseGUI.php.

◆ $news

News ilObjCourseGUI::$news
protected

Definition at line 52 of file class.ilObjCourseGUI.php.

◆ $record_gui

ilAdvancedMDRecordGUI ilObjCourseGUI::$record_gui = null
private

Definition at line 54 of file class.ilObjCourseGUI.php.

Referenced by infoScreen().

◆ $refinery

Factory ilObjCourseGUI::$refinery
protected

Definition at line 58 of file class.ilObjCourseGUI.php.

Referenced by _goto().

◆ $start_obj

ilContainerStartObjects ilObjCourseGUI::$start_obj = null
private

Definition at line 55 of file class.ilObjCourseGUI.php.

◆ BREADCRUMB_CRS_ONLY

const ilObjCourseGUI::BREADCRUMB_CRS_ONLY = 1

Definition at line 50 of file class.ilObjCourseGUI.php.

◆ BREADCRUMB_DEFAULT

const ilObjCourseGUI::BREADCRUMB_DEFAULT = 0

Definition at line 49 of file class.ilObjCourseGUI.php.

Referenced by ilLocatorGUI\addRepositoryItems().

◆ BREADCRUMB_FULL_PATH

const ilObjCourseGUI::BREADCRUMB_FULL_PATH = 2

Definition at line 51 of file class.ilObjCourseGUI.php.

Referenced by ilLocatorGUI\addRepositoryItems().


The documentation for this class was generated from the following file: