ILIAS  trunk Revision v12.0_alpha-377-g3641b37b9db
ilObjSessionGUI Class Reference
+ Inheritance diagram for ilObjSessionGUI:
+ Collaboration diagram for ilObjSessionGUI:

Public Member Functions

 __construct ($a_data, $a_id, $a_call_by_reference, $a_prepare_output=true)
 
 executeCommand ()
 
 prepareOutput (bool $show_sub_objects=true)
 
 registerObject ()
 
 joinObject ()
 
 unregisterObject (bool $a_refuse_participation=false)
 
 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...
 
 modifyItemGUI (ilObjectListGUI $a_item_list_gui, array $a_item_data, bool $a_show_path)
 
 showJoinRequestButtonInCalendar (ilToolbarGUI $a_ilToolbar)
 show join request This method is only needed to keep showJoinRequestButton method protected. More...
 
 saveObject (bool $a_redirect_on_success=true)
 
 handleFileUpload ()
 
 editObject ()
 
 updateObject ()
 updates object entry in object_data More...
 
 updateSessionTypeObject ()
 change session type More...
 
 materialsObject ()
 
 getCreatableObjectTypes ()
 
 applyFilter ()
 
 resetFilter ()
 
 removeMaterialsObject ()
 
 saveMaterialsObject ()
 
 postUpdateMaterials ()
 redirect to list of materials without offset/page. More...
 
 attendanceListObject ()
 
 getAttendanceListUserData (int $a_user_id, array $a_filters)
 
 eventsListObject ()
 
 afterSaveCallback (ilObject $a_obj)
 Custom callback after object is created (in parent container) More...
 
 readMemberData (array $a_usr_ids)
 Used for waiting list. More...
 
 getContainerRefId ()
 
 getDefaultMemberRole ()
 
 getLocalRoles ()
 
 createMailSignature ()
 
- 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 _goto (string $a_target)
 
- 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

ilLanguage $lng
 
ilCtrl $ctrl
 
ilGlobalTemplateInterface $tpl
 
ilTree $tree
 
ilObjectDefinition $objDefinition
 
- 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

 membersObject ()
 
 refuseParticipationObject ()
 
 showJoinRequestButton (?ilToolbarGUI $ilToolbar=null)
 
 initCreateForm ($new_type)
 
 saveAndAssignMaterialsObject ()
 
 createRecurringSessions (bool $a_activate_lp=true)
 
 initContainer (bool $a_init_participants=false)
 
 initAttendanceList ()
 
 printAttendanceListObject ()
 
 __showButton (string $cmd, string $text, string $target='')
 
 initForm (string $a_mode)
 
 load ()
 
 loadRecurrenceSettings ()
 
 __toUnix (array $date, array $time)
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 redirectToParentContentPageObject ()
 
 getTabs ()
 @abstract overwrite in derived GUI class of your object type More...
 
 cancelEditObject ()
 
- 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

ILIAS DI UIServices $ui
 
ilAppEventHandler $event
 
ILIAS FileUpload FileUpload $upload
 
ilHelpGUI $help
 
ILIAS Refinery Factory $refinery
 
ilObjUser $user
 
ilAccessHandler $access
 
ilToolbarGUI $toolbar
 
ilErrorHandling $ilErr
 
ilObjectService $object_service
 
ilTabsGUI $tabs_gui
 
ilLocatorGUI $locator
 
ilRbacReview $rbacreview
 
int $container_ref_id = 0
 
int $container_obj_id = 0
 
ilPropertyFormGUI $form = null
 
ilAdvancedMDRecordGUI $record_gui = null
 
ilEventRecurrence $rec = null
 
ilEventItems $event_items = null
 
ilEventParticipants $event_part = null
 
int $requested_ref_id = 0
 
int $requested_user_id = 0
 
int $requested_file_id = 0
 
int $requested_offset = 0
 
string $requested_sort_by = ""
 
string $requested_sort_order = ""
 
array $requested_items = []
 
- 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 = ""
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjSessionGUI::__construct (   $a_data,
  $a_id,
  $a_call_by_reference,
  $a_prepare_output = true 
)

Definition at line 71 of file class.ilObjSessionGUI.php.

72 {
73 global $DIC;
74
75 $this->ctrl = $DIC->ctrl();
76 $this->lng = $DIC->language();
77 $this->tpl = $DIC->ui()->mainTemplate();
78 $this->user = $DIC->user();
79 $this->tree = $DIC->repositoryTree();
80 $this->access = $DIC->access();
81 $this->toolbar = $DIC->toolbar();
82 $this->ilErr = $DIC["ilErr"];
83 $this->object_service = $DIC->object();
84 $this->objDefinition = $DIC['objDefinition'];
85 $this->tabs_gui = $DIC->tabs();
86 $this->locator = $DIC["ilLocator"];
87 $this->rbacreview = $DIC->rbac()->review();
88 $this->event = $DIC->event();
89 $this->upload = $DIC->upload();
90 $this->help = $DIC->help();
91 $this->refinery = $DIC->refinery();
92
93 $this->type = "sess";
94 parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
95
96 $this->lng->loadLanguageModule("event");
97 $this->lng->loadLanguageModule('crs');
98 $this->lng->loadLanguageModule('trac');
99 $this->lng->loadLanguageModule('sess');
100
101 if ($this->http->wrapper()->query()->has('ref_id')) {
102 $this->requested_ref_id = $this->http->wrapper()->query()->retrieve(
103 'ref_id',
104 $this->refinery->kindlyTo()->int()
105 );
106 }
107
108 if ($this->http->wrapper()->query()->has('user_id')) {
109 $this->requested_user_id = $this->http->wrapper()->query()->retrieve(
110 'user_id',
111 $this->refinery->kindlyTo()->int()
112 );
113 }
114
115 if ($this->http->wrapper()->post()->has('file_id')) {
116 $this->requested_file_id = $this->http->wrapper()->post()->retrieve(
117 'file_id',
118 $this->refinery->kindlyTo()->int()
119 );
120 } elseif ($this->http->wrapper()->query()->has('file_id')) {
121 $this->requested_file_id = $this->http->wrapper()->query()->retrieve(
122 'file_id',
123 $this->refinery->kindlyTo()->int()
124 );
125 }
126
127 if ($this->http->wrapper()->query()->has('offset')) {
128 $this->requested_offset = $this->http->wrapper()->query()->retrieve(
129 'offset',
130 $this->refinery->kindlyTo()->int()
131 );
132 }
133
134 if ($this->http->wrapper()->query()->has('sort_by')) {
135 $this->requested_sort_by = $this->http->wrapper()->query()->retrieve(
136 'sort_by',
137 $this->refinery->kindlyTo()->string()
138 );
139 }
140
141 if ($this->http->wrapper()->query()->has('sort_order')) {
142 $this->requested_sort_order = $this->http->wrapper()->query()->retrieve(
143 'sort_order',
144 $this->refinery->kindlyTo()->string()
145 );
146 }
147
148 if ($this->http->wrapper()->post()->has('items')) {
149 $this->requested_items = $this->http->wrapper()->post()->retrieve(
150 'items',
151 $this->refinery->kindlyTo()->listOf(
152 $this->refinery->kindlyTo()->int()
153 )
154 );
155 }
156 $this->ui = $DIC->ui();
157 }
static http()
Fetches the global http state from ILIAS.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), ILIAS\Repository\access(), ILIAS\Repository\ctrl(), ILIAS\Repository\help(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), ILIAS\Repository\locator(), ILIAS\Repository\refinery(), ILIAS\Repository\toolbar(), ILIAS\Repository\ui(), ILIAS\Repository\upload(), and ILIAS\Repository\user().

+ Here is the call graph for this function:

Member Function Documentation

◆ __showButton()

ilObjSessionGUI::__showButton ( string  $cmd,
string  $text,
string  $target = '' 
)
protected

Definition at line 1399 of file class.ilObjSessionGUI.php.

1399 : void
1400 {
1401 $this->toolbar->addButton($text, $this->ctrl->getLinkTarget($this, $cmd), $target);
1402 }
$text
Definition: xapiexit.php:21

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

Referenced by eventsListObject().

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

◆ __toUnix()

ilObjSessionGUI::__toUnix ( array  $date,
array  $time 
)
protected

Definition at line 1774 of file class.ilObjSessionGUI.php.

1774 : int
1775 {
1776 return mktime($time['h'], $time['m'], 0, $date['m'], $date['d'], $date['y']);
1777 }

◆ _goto()

static ilObjSessionGUI::_goto ( string  $a_target)
static

Definition at line 452 of file class.ilObjSessionGUI.php.

452 : void
453 {
454 global $DIC;
455 $main_tpl = $DIC->ui()->mainTemplate();
456
457 $ilAccess = $DIC->access();
458 $lng = $DIC->language();
459
460 $ilCtrl = $DIC->ctrl();
461 $parts = explode('_', $a_target);
462 $a_target = (int) $parts[0];
463
464 if ($ilAccess->checkAccess('write', '', $a_target)) {
465 if (isset($parts[1]) && 'part' === $parts[1]) {
466 $ilCtrl->setTargetScript('ilias.php');
467 $ilCtrl->setParameterByClass('ilSessionMembershipGUI', 'ref_id', $a_target);
468 $ilCtrl->setTargetScript('ilias.php');
469 $ilCtrl->redirectByClass(array('ilRepositoryGUI', __CLASS__, 'ilSessionMembershipGUI'));
470 }
471 }
472
473 if ($ilAccess->checkAccess('visible', "", $a_target)) {
474 ilObjectGUI::_gotoRepositoryNode($a_target, "infoScreen");
475 } elseif ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
476 $main_tpl->setOnScreenMessage('failure', sprintf(
477 $lng->txt("msg_no_perm_read_item"),
479 ), true);
481 }
482 }
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 _gotoRepositoryRoot(bool $raise_error=false)
Goto repository root.
static _gotoRepositoryNode(int $ref_id, string $cmd="")
static _lookupObjId(int $ref_id)
static _lookupTitle(int $obj_id)
const ROOT_FOLDER_ID
Definition: constants.php:32
if($clientAssertionType !='urn:ietf:params:oauth:client-assertion-type:jwt-bearer'|| $grantType !='client_credentials') $parts
Definition: ltitoken.php:61

References $DIC, $lng, $parts, ilObjectGUI\_gotoRepositoryNode(), ilObjectGUI\_gotoRepositoryRoot(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), ILIAS\Repository\int(), ROOT_FOLDER_ID, and ilLanguage\txt().

+ Here is the call graph for this function:

◆ addLocatorItems()

ilObjSessionGUI::addLocatorItems ( )
protected

should be overwritten to add object specific items (repository items are preloaded)

Reimplemented from ilObjectGUI.

Definition at line 1779 of file class.ilObjSessionGUI.php.

1779 : void
1780 {
1781 $ilLocator = $this->locator;
1782
1783 if (!$this->getCreationMode()) {
1784 // see prepareOutput()
1785 $title = strlen($this->object->getTitle()) ? (': ' . $this->object->getTitle()) : '';
1786 $title = $this->object->getFirstAppointment()->appointmentToString() . $title;
1787
1788 $ilLocator->addItem($title, $this->ctrl->getLinkTarget($this, "infoScreen"), "", $this->requested_ref_id);
1789 }
1790 }

References $locator, $requested_ref_id, ILIAS\Repository\ctrl(), ilObjectGUI\getCreationMode(), and ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ afterSaveCallback()

ilObjSessionGUI::afterSaveCallback ( ilObject  $a_obj)

Custom callback after object is created (in parent container)

Definition at line 1917 of file class.ilObjSessionGUI.php.

1917 : void
1918 {
1919 // add new object to materials
1920 $event_items = new ilEventItems($this->object->getId());
1921 $event_items->addItem($a_obj->getRefId());
1923 }
class ilEventItems
addItem(int $a_item_ref_id)

References $event_items, ilEventItems\addItem(), ilObject\getRefId(), ILIAS\Repository\object(), and ilEventItems\update().

+ Here is the call graph for this function:

◆ applyFilter()

ilObjSessionGUI::applyFilter ( )

Definition at line 1157 of file class.ilObjSessionGUI.php.

1157 : void
1158 {
1159 $tbl = new ilSessionMaterialsTableGUI($this, "materials");
1160 $tbl->writeFilterToSession(); // writes filter to session
1161 $tbl->resetOffset(); // sets record offest to 0 (first page)
1162 $this->ctrl->redirect($this, "materials");
1163 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ attendanceListObject()

ilObjSessionGUI::attendanceListObject ( )

Definition at line 1212 of file class.ilObjSessionGUI.php.

1212 : void
1213 {
1214 $tpl = $this->tpl;
1215 $ilTabs = $this->tabs_gui;
1216
1217 $this->checkPermission('manage_members');
1218 $ilTabs->setTabActive('event_edit_members');
1219
1220 $list = $this->initAttendanceList();
1221 $form = $list->initForm('printAttendanceList');
1223 }
ilGlobalTemplateInterface $tpl
ilPropertyFormGUI $form
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
setContent(string $a_html)
Sets content for standard template.

References $form, $tabs_gui, $tpl, ilObjectGUI\checkPermission(), ilPropertyFormGUI\getHTML(), initAttendanceList(), and ILIAS\UICore\GlobalTemplate\setContent().

+ Here is the call graph for this function:

◆ cancelEditObject()

ilObjSessionGUI::cancelEditObject ( )
protected

Definition at line 1945 of file class.ilObjSessionGUI.php.

1945 : void
1946 {
1947 $ilCtrl = $this->ctrl;
1949
1950 $parent_id = $tree->getParentId($this->requested_ref_id);
1951
1952 $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $parent_id);
1953
1954 $ilCtrl->redirectByClass("ilrepositorygui", "");
1955 }
getParentId(int $a_node_id)
get parent id of given node

References $ctrl, $tree, and ilTree\getParentId().

+ Here is the call graph for this function:

◆ createMailSignature()

ilObjSessionGUI::createMailSignature ( )

Definition at line 1982 of file class.ilObjSessionGUI.php.

1982 : string
1983 {
1984 $link = chr(13) . chr(10) . chr(13) . chr(10);
1985 $link .= $this->lng->txt('sess_mail_permanent_link');
1986 $link .= chr(13) . chr(10) . chr(13) . chr(10);
1987 $link .= ilLink::_getLink($this->object->getRefId());
1988 return rawurlencode(base64_encode($link));
1989 }

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

+ Here is the call graph for this function:

◆ createRecurringSessions()

ilObjSessionGUI::createRecurringSessions ( bool  $a_activate_lp = true)
protected

Definition at line 884 of file class.ilObjSessionGUI.php.

884 : bool
885 {
887
888 if (!$this->rec->getFrequenceType()) {
889 return true;
890 }
891 $calc = new ilCalendarRecurrenceCalculator($this->object->getFirstAppointment(), $this->rec);
892
893 $period_start = clone $this->object->getFirstAppointment()->getStart();
894
895
896 $period_end = clone $this->object->getFirstAppointment()->getStart();
897 $period_end->increment(IL_CAL_YEAR, 5);
898 $date_list = $calc->calculateDateList($period_start, $period_end);
899
900 $period_diff = $this->object->getFirstAppointment()->getEnd()->get(IL_CAL_UNIX) -
901 $this->object->getFirstAppointment()->getStart()->get(IL_CAL_UNIX);
902 $parent_id = $tree->getParentId($this->object->getRefId());
903
904 $evi = new ilEventItems($this->object->getId());
905 $eitems = $evi->getItems();
906
907 $counter = 0;
908 foreach ($date_list->get() as $date) {
909 if (!$counter++) {
910 continue;
911 }
912
913 $new_obj = $this->object->cloneObject($parent_id);
914
915 // apply didactic template?
916 $dtpl = $this->getDidacticTemplateVar("dtpl");
917 if ($dtpl) {
918 $new_obj->applyDidacticTemplate($dtpl);
919 }
920
921 $new_obj->read();
922 $new_obj->getFirstAppointment()->setStartingTime($date->get(IL_CAL_UNIX));
923 $new_obj->getFirstAppointment()->setEndingTime($date->get(IL_CAL_UNIX) + $period_diff);
924 $new_obj->getFirstAppointment()->update();
925 $new_obj->update();
926
927 // #14547 - active is default
928 if (!$a_activate_lp) {
929 $lp_obj_settings = new ilLPObjSettings($new_obj->getId());
930 $lp_obj_settings->setMode(ilLPObjSettings::LP_MODE_DEACTIVATED);
931 $lp_obj_settings->update(false);
932 }
933
934 $new_evi = new ilEventItems($new_obj->getId());
935 $new_evi->setItems($eitems);
936 $new_evi->update();
937 }
938
939 return true;
940 }
const IL_CAL_UNIX
const IL_CAL_YEAR
Calculates an ilDateList for a given calendar entry and recurrence rule.
getDidacticTemplateVar(string $type)
Get didactic template setting from creation screen.
$counter

References $counter, $tree, ilObjectGUI\getDidacticTemplateVar(), ilTree\getParentId(), IL_CAL_UNIX, IL_CAL_YEAR, ilLPObjSettings\LP_MODE_DEACTIVATED, and ILIAS\Repository\object().

Referenced by saveObject().

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

◆ editObject()

ilObjSessionGUI::editObject ( )

Reimplemented from ilObjectGUI.

Definition at line 942 of file class.ilObjSessionGUI.php.

942 : void
943 {
944 $this->tabs_gui->setTabActive('settings');
945
946 $this->initForm('edit');
947 $this->tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.sess_edit.html', 'components/ILIAS/Session');
948 $this->tpl->setVariable('EVENT_EDIT_TABLE', $this->form->getHTML());
949 }
initForm(string $a_mode)
form(?array $class_path, string $cmd, string $submit_caption="")

References ILIAS\Repository\form(), and initForm().

Referenced by updateObject().

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

◆ eventsListObject()

ilObjSessionGUI::eventsListObject ( )

Definition at line 1286 of file class.ilObjSessionGUI.php.

1286 : void
1287 {
1288 $ilAccess = $this->access;
1289 $ilUser = $this->user;
1291
1292 if (!$ilAccess->checkAccess('manage_members', '', $this->object->getRefId())) {
1293 $this->ilErr->raiseError($this->lng->txt('msg_no_perm_read'), $this->ilErr->MESSAGE);
1294 }
1295
1296 $this->tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.sess_list.html', 'components/ILIAS/Session');
1297 $this->__showButton($this->ctrl->getLinkTarget($this, 'exportCSV'), $this->lng->txt('event_csv_export'));
1298
1299 $this->tpl->addBlockFile("EVENTS_TABLE", "events_table", "tpl.table.html");
1300 $this->tpl->addBlockFile('TBL_CONTENT', 'tbl_content', 'tpl.sess_list_row.html', 'components/ILIAS/Session');
1301
1302 $members_obj = $this->initContainer(true);
1303 $members = $members_obj->getParticipants();
1304 $members = ilUtil::_sortIds($members, 'usr_data', 'lastname', 'usr_id');
1305
1306 // Table
1307 $tbl = new ilTableGUI();
1308 $tbl->setTitle(
1309 $this->lng->txt("event_overview"),
1310 'standard/icon_usr.svg',
1311 $this->lng->txt('obj_usr')
1312 );
1313 $this->ctrl->setParameter($this, 'offset', $this->requested_offset);
1314
1315 $course_ref_id = $tree->checkForParentType($this->object->getRefId(), 'crs');
1316 $events = [];
1317 foreach ($tree->getSubTree($tree->getNodeData($course_ref_id), false, ['sess']) as $event_id) {
1318 $tmp_event = ilObjectFactory::getInstanceByRefId($event_id, false);
1319 if (!is_object($tmp_event) || $tmp_event->getType() != 'sess') {
1320 continue;
1321 }
1322 $events[] = $tmp_event;
1323 }
1324
1325 $headerNames = [];
1326 $headerVars = [];
1327 $colWidth = [];
1328
1329 $headerNames[] = $this->lng->txt('name');
1330 $headerVars[] = "name";
1331 $colWidth[] = '20%';
1332
1333 for ($i = 1; $i <= count($events); $i++) {
1334 $headerNames[] = $i;
1335 $headerVars[] = "event_" . $i;
1336 $colWidth[] = 80 / count($events) . "%";
1337 }
1338
1339 $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
1340 $tbl->setHeaderNames($headerNames);
1341 $tbl->setHeaderVars($headerVars, $this->ctrl->getParameterArray($this));
1342 $tbl->setColumnWidth($colWidth);
1343
1344 $tbl->setOrderColumn($this->requested_sort_by);
1345 $tbl->setOrderDirection($this->requested_sort_order);
1346 $tbl->setOffset($this->requested_offset);
1347 $tbl->setMaxCount(count($members));
1348 $tbl->setFooter("tblfooter", $this->lng->txt("previous"), $this->lng->txt("next"));
1349
1350 $sliced_users = array_slice($members, $this->requested_offset, ilSession::get("tbl_limit"));
1351 $tbl->disable('sort');
1352 $tbl->render();
1353
1354 $counter = 0;
1355 foreach ($sliced_users as $user_id) {
1356 foreach ($events as $event_obj) {
1357 $this->tpl->setCurrentBlock("eventcols");
1358
1359 $event_part = new ilEventParticipants($this->object->getId());
1360
1361 {
1362 $this->tpl->setVariable("IMAGE_PARTICIPATED", $event_part->hasParticipated($user_id) ?
1363 ilUtil::getImagePath('standard/icon_ok.svg') :
1364 ilUtil::getImagePath('standard/icon_not_ok.svg'));
1365
1366 $this->tpl->setVariable("PARTICIPATED", $event_part->hasParticipated($user_id) ?
1367 $this->lng->txt('event_participated') :
1368 $this->lng->txt('event_not_participated'));
1369 }
1370
1371 $this->tpl->parseCurrentBlock();
1372 }
1373
1374 $this->tpl->setCurrentBlock("tbl_content");
1376 $this->tpl->setVariable("LASTNAME", $name['lastname']);
1377 $this->tpl->setVariable("FIRSTNAME", $name['firstname']);
1378 $this->tpl->setVariable("LOGIN", ilObjUser::_lookupLogin($user_id));
1379 $this->tpl->parseCurrentBlock();
1380 }
1381
1382 $this->tpl->setVariable("HEAD_TXT_LEGEND", $this->lng->txt("legend"));
1383 $this->tpl->setVariable("HEAD_TXT_DIGIT", $this->lng->txt("event_digit"));
1384 $this->tpl->setVariable("HEAD_TXT_EVENT", $this->lng->txt("event"));
1385 $this->tpl->setVariable("HEAD_TXT_LOCATION", $this->lng->txt("event_location"));
1386 $this->tpl->setVariable("HEAD_TXT_DATE_TIME", $this->lng->txt("event_date_time"));
1387 $i = 1;
1388 foreach ($events as $event_obj) {
1389 $this->tpl->setCurrentBlock("legend_loop");
1390 $this->tpl->setVariable("LEGEND_DIGIT", $i++);
1391 $this->tpl->setVariable("LEGEND_EVENT_TITLE", $event_obj->getTitle());
1392 $this->tpl->setVariable("LEGEND_EVENT_DESCRIPTION", $event_obj->getDescription());
1393 $this->tpl->setVariable("LEGEND_EVENT_LOCATION", $event_obj->getLocation());
1394 $this->tpl->setVariable("LEGEND_EVENT_APPOINTMENT", $event_obj->getFirstAppointment()->appointmentToString());
1395 $this->tpl->parseCurrentBlock();
1396 }
1397 }
class ilEventParticipants
initContainer(bool $a_init_participants=false)
__showButton(string $cmd, string $text, string $target='')
ilEventParticipants $event_part
ilAccessHandler $access
static _lookupName(int $a_user_id)
static _lookupLogin(int $a_user_id)
static getInstanceByRefId(int $ref_id, bool $stop_on_error=true)
get an instance of an Ilias object by reference id
static get(string $a_var)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getNodeData(int $a_node_id, ?int $a_tree_pk=null)
get all information of a node.
getSubTree(array $a_node, bool $a_with_data=true, array $a_type=[])
get all nodes in the subtree under specified node
checkForParentType(int $a_ref_id, string $a_type, bool $a_exclude_source_check=false)
Check for parent type e.g check if a folder (ref_id 3) is in a parent course obj => checkForParentTyp...
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
static _sortIds(array $a_ids, string $a_table, string $a_field, string $a_id_name)
Function that sorts ids by a given table field using WHERE IN E.g: __sort(array(6,...

References $access, $counter, $event_part, $tree, $user, $user_id, __showButton(), ilObjUser\_lookupLogin(), ilObjUser\_lookupName(), ilUtil\_sortIds(), ilTree\checkForParentType(), ILIAS\Repository\ctrl(), ilSession\get(), ilUtil\getImagePath(), ilObjectFactory\getInstanceByRefId(), ilTree\getNodeData(), ilTree\getSubTree(), ilEventParticipants\hasParticipated(), initContainer(), ILIAS\Repository\lng(), and ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ executeCommand()

ilObjSessionGUI::executeCommand ( )

Reimplemented from ilObjectGUI.

Definition at line 159 of file class.ilObjSessionGUI.php.

159 : void
160 {
161 $ilUser = $this->user;
162 $ilCtrl = $this->ctrl;
163 $ilAccess = $this->access;
164
165 $next_class = $this->ctrl->getNextClass($this);
166 $cmd = $this->ctrl->getCmd();
167
168 if (
169 !$this->getCreationMode() &&
170 $ilAccess->checkAccess('read', '', $this->requested_ref_id)
171 ) {
172 $GLOBALS['DIC']['ilNavigationHistory']->addItem(
173 $this->requested_ref_id,
174 ilLink::_getLink($this->requested_ref_id, 'sess'),
175 'sess',
176 $this->object->getPresentationTitle()
177 );
178 }
179
180 $this->prepareOutput();
181 switch ($next_class) {
182 case 'ilsessionmembershipgui':
183 $this->tabs_gui->activateTab('members');
184 $mem_gui = new ilSessionMembershipGUI($this, $this->object);
185 $this->ctrl->forwardCommand($mem_gui);
186 break;
187
188 case "ilinfoscreengui":
189 $this->checkPermission("visible");
190 $this->infoScreen(); // forwards command
191 break;
192
193 case 'ilobjectmetadatagui':
194 $this->checkPermission('edit_metadata');
195 $this->tabs_gui->activateTab('metadata');
196 $md_gui = new ilObjectMetaDataGUI($this->object);
197 $this->ctrl->forwardCommand($md_gui);
198 break;
199
200 case 'ilpermissiongui':
201 $this->tabs_gui->setTabActive('perm_settings');
202 $perm_gui = new ilPermissionGUI($this);
203 $ret = $this->ctrl->forwardCommand($perm_gui);
204 break;
205
206 case 'ilobjectcopygui':
207 $cp = new ilObjectCopyGUI($this);
208 $cp->setType('sess');
209 $this->ctrl->forwardCommand($cp);
210 break;
211
212 case "ilexportgui":
213 $this->tabs_gui->setTabActive("export");
214 $exp_gui = new ilExportGUI($this);
215 $exp_gui->addFormat("xml");
216 $ret = $this->ctrl->forwardCommand($exp_gui);
217 break;
218
219 case "ilcommonactiondispatchergui":
221 $this->ctrl->forwardCommand($gui);
222 break;
223
224 case 'ilmembershipgui':
225 $this->ctrl->setReturn($this, 'members');
226 $mem = new ilMembershipMailGUI($this);
227 $this->ctrl->forwardCommand($mem);
228 break;
229
230 case "illearningprogressgui":
231 $new_gui = new ilLearningProgressGUI(
233 $this->object->getRefId(),
234 $this->requested_user_id ?: $ilUser->getId()
235 );
236 $this->ctrl->forwardCommand($new_gui);
237 $this->tabs_gui->setTabActive('learning_progress');
238 break;
239
240 case "ilpropertyformgui":
241 // only case is currently adv metadata internal link in info settings, see #24497
242 if (!is_object($this->object)) {
243 $form = $this->initCreateForm("sess");
244 } else {
245 $form = $this->initForm("edit");
246 if ($form === true) {
248 }
249 }
250 $ilCtrl->forwardCommand($form);
251 break;
252
253 case "ilbookinggatewaygui":
255 $parent_id = $tree->getParentId($this->requested_ref_id);
256
257 $this->tabs_gui->activateTab('obj_tool_setting_booking');
258 $gui = new ilBookingGatewayGUI($this, $parent_id);
259 $this->ctrl->forwardCommand($gui);
260 break;
261
262 default:
263 if ($cmd == "applyFilter") {
264 $this->$cmd();
265 } elseif ($cmd == "resetFilter") {
266 $this->$cmd();
267 }
268 if (!$cmd) {
269 $cmd = "infoScreen";
270 }
271 $cmd .= "Object";
272 $this->$cmd();
273
274 break;
275 }
276
277 $this->addHeaderAction();
278 }
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
Export User Interface Class.
Class ilObjUserTrackingGUI.
prepareOutput(bool $show_sub_objects=true)
GUI class for the workflow of copying objects.
addHeaderAction()
Add header action menu.
Class ilObjectMetaDataGUI.
GUI class for membership features.
$GLOBALS["DIC"]
Definition: wac.php:54

References $access, $ctrl, $form, $GLOBALS, $tree, $user, ilObjectGUI\addHeaderAction(), ilObjectGUI\checkPermission(), ILIAS\Repository\ctrl(), ilObjectGUI\getCreationMode(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), ilTree\getParentId(), initCreateForm(), initForm(), ilLearningProgressBaseGUI\LP_CONTEXT_REPOSITORY, ILIAS\Repository\object(), and prepareOutput().

+ Here is the call graph for this function:

◆ getAttendanceListUserData()

ilObjSessionGUI::getAttendanceListUserData ( int  $a_user_id,
array  $a_filters 
)

Definition at line 1268 of file class.ilObjSessionGUI.php.

1268 : ?array
1269 {
1270 $data = $this->event_part->getUser($a_user_id);
1271
1272 if ($a_filters && $a_filters["registered"] && !$data["registered"]) {
1273 return null;
1274 }
1275
1276 $data['registered'] = $data['registered'] ?
1277 $this->lng->txt('yes') :
1278 $this->lng->txt('no');
1279 $data['participated'] = $data['participated'] ?
1280 $this->lng->txt('yes') :
1281 $this->lng->txt('no');
1282
1283 return $data;
1284 }

References ilObjectGUI\$data, and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ getContainerRefId()

ilObjSessionGUI::getContainerRefId ( )

Definition at line 1937 of file class.ilObjSessionGUI.php.

1937 : int
1938 {
1939 if (!$this->container_ref_id) {
1940 $this->initContainer();
1941 }
1943 }

References $container_ref_id, and initContainer().

Referenced by materialsObject().

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

◆ getCreatableObjectTypes()

ilObjSessionGUI::getCreatableObjectTypes ( )

Reimplemented from ilObjectGUI.

Definition at line 1144 of file class.ilObjSessionGUI.php.

1144 : array
1145 {
1146 $parent_ref_id = $this->tree->getParentId($this->object->getRefId());
1147 $parent_type = ilObject::_lookupType($parent_ref_id, true);
1148 $parent_gui_class = 'ilObj' . $this->obj_definition->getClassName($parent_type) . 'GUI';
1149 $parent_gui = new $parent_gui_class('', $parent_ref_id, true, false);
1150 $types = $parent_gui->getCreatableObjectTypes();
1151 foreach (array_merge(['itgr', 'sess' ], $this->objDefinition->getSideBlockTypes()) as $type_to_remove) {
1152 unset($types[$type_to_remove]);
1153 }
1154 return $types;
1155 }
static _lookupType(int $id, bool $reference=false)

References ilObject\_lookupType(), and ILIAS\Repository\object().

Referenced by materialsObject().

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

◆ getDefaultMemberRole()

ilObjSessionGUI::getDefaultMemberRole ( )

Definition at line 1957 of file class.ilObjSessionGUI.php.

1957 : int
1958 {
1960
1961 $local_roles = $rbac_review->getRolesOfRoleFolder($this->object->getRefId(), false);
1962
1963 foreach ($local_roles as $role_id) {
1964 $title = ilObject::_lookupTitle($role_id);
1965 if (substr($title, 0, 19) == 'il_sess_participant') {
1966 return $role_id;
1967 }
1968 }
1969 return 0;
1970 }
ilRbacReview $rbac_review
getRolesOfRoleFolder(int $a_ref_id, bool $a_nonassignable=true)
get all roles of a role folder including linked local roles that are created due to stopped inheritan...

References ilObjectGUI\$rbac_review, $rbacreview, ilObject\_lookupTitle(), ilRbacReview\getRolesOfRoleFolder(), and ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ getLocalRoles()

ilObjSessionGUI::getLocalRoles ( )
Returns
int[]

Definition at line 1975 of file class.ilObjSessionGUI.php.

1975 : array
1976 {
1978
1979 return $this->rbacreview->getRolesOfRoleFolder($this->object->getRefId(), false);
1980 }

References ilObjectGUI\$rbac_review, $rbacreview, ilRbacReview\getRolesOfRoleFolder(), and ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ getTabs()

ilObjSessionGUI::getTabs ( )
protected

@abstract overwrite in derived GUI class of your object type

Reimplemented from ilObjectGUI.

Definition at line 1810 of file class.ilObjSessionGUI.php.

1810 : void
1811 {
1812 $ilAccess = $this->access;
1813 $ilTabs = $this->tabs_gui;
1815 $ilCtrl = $this->ctrl;
1816 $ilHelp = $this->help;
1817 $ilUser = $this->user;
1818
1819 $ilHelp->setScreenIdComponent("sess");
1820
1821 $parent_id = $tree->getParentId($this->object->getRefId());
1822
1823 // #11650
1824 $parent_type = ilObject::_lookupType($parent_id, true);
1825
1826 $this->tabs_gui->setBackTarget(
1827 $this->lng->txt('back_to_' . $parent_type . '_content'),
1828 $ilCtrl->getLinkTarget($this, "redirectToParentContentPage")
1829 );
1830
1831 $this->tabs_gui->addTarget(
1832 'info_short',
1833 $this->ctrl->getLinkTarget($this, 'infoScreen')
1834 );
1835
1836 if ($ilAccess->checkAccess('write', '', $this->object->getRefId())) {
1837 $this->tabs_gui->addTarget(
1838 'settings',
1839 $this->ctrl->getLinkTarget($this, 'edit')
1840 );
1841 }
1842 if ($ilAccess->checkAccess('manage_materials', '', $this->object->getRefId())) {
1843 $this->tabs_gui->addTab(
1844 'materials',
1845 $this->lng->txt('crs_materials'),
1846 $this->ctrl->getLinkTarget($this, 'materials')
1847 );
1848 }
1849
1850 // booking
1851 $parent_id = $tree->getParentId($this->requested_ref_id);
1852
1853 if ($ilAccess->checkAccess('write', '', $this->ref_id) && ilContainer::_lookupContainerSetting(
1854 ilObject::_lookupObjId($parent_id),
1856 )) {
1857 $this->tabs_gui->addTarget(
1858 "obj_tool_setting_booking",
1859 $this->ctrl->getLinkTargetByClass(array("ilbookinggatewaygui"), "")
1860 );
1861 }
1862
1863 // member tab
1864 $is_participant = $this->object->getMembersObject()->isAssigned($ilUser->getId());
1865 $membership_gui = new ilSessionMembershipGUI($this, $this->object);
1866 $membership_gui->addMemberTab($this->tabs_gui, $is_participant);
1867
1868
1869 // learning progress
1870 if (ilLearningProgressAccess::checkAccess($this->object->getRefId())) {
1871 $this->tabs_gui->addTarget(
1872 'learning_progress',
1873 $this->ctrl->getLinkTargetByClass(array('ilobjsessiongui','illearningprogressgui'), ''),
1874 '',
1875 array('illplistofobjectsgui','illplistofsettingsgui','illearningprogressgui','illplistofprogressgui')
1876 );
1877 }
1878
1879 // meta data
1880 if ($ilAccess->checkAccess('edit_metadata', '', $this->ref_id)) {
1881 $mdgui = new ilObjectMetaDataGUI($this->object);
1882 $mdtab = $mdgui->getTab();
1883 if ($mdtab) {
1884 $this->tabs_gui->addTab(
1885 "metadata",
1886 $this->lng->txt('meta_data'),
1887 $mdtab
1888 );
1889 }
1890 }
1891
1892 // export
1893 if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
1894 $this->tabs_gui->addTarget(
1895 "export",
1896 $this->ctrl->getLinkTargetByClass("ilexportgui", ""),
1897 "",
1898 "ilexportgui"
1899 );
1900 }
1901
1902
1903 // edit permissions
1904 if ($ilAccess->checkAccess('edit_permission', "", $this->object->getRefId())) {
1905 $this->tabs_gui->addTarget(
1906 "perm_settings",
1907 $this->ctrl->getLinkTargetByClass("ilpermissiongui", "perm"),
1908 array("perm","info","owner"),
1909 'ilpermissiongui'
1910 );
1911 }
1912 }
static _lookupContainerSetting(int $a_id, string $a_keyword, ?string $a_default_value=null)
static checkAccess(int $a_ref_id, bool $a_allow_only_read=true)
check access to learning progress

References $access, $ctrl, $help, $tabs_gui, $tree, $user, ilContainer\_lookupContainerSetting(), ilObject\_lookupObjId(), ilObject\_lookupType(), ilObjectServiceSettingsGUI\BOOKING, ilLearningProgressAccess\checkAccess(), ILIAS\Repository\ctrl(), ilTree\getParentId(), ILIAS\Repository\lng(), and ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ handleFileUpload()

ilObjSessionGUI::handleFileUpload ( )

Definition at line 841 of file class.ilObjSessionGUI.php.

841 : void
842 {
844
845 $ev = new ilEventItems($this->object->getId());
846 $items = $ev->getItems();
847
848 $counter = 0;
849 while (true) {
850 if (!isset($_FILES['files']['name'][$counter])) {
851 break;
852 }
853 if (!strlen($_FILES['files']['name'][$counter])) {
854 $counter++;
855 continue;
856 }
857
858 $file = new ilObjFile();
859 $file->setTitle(ilUtil::stripSlashes($_FILES['files']['name'][$counter]));
860 $file->setDescription('');
861 $file->setFileName(ilUtil::stripSlashes($_FILES['files']['name'][$counter]));
862 $file->create();
863 $new_ref_id = $file->createReference();
864 $file->putInTree($tree->getParentId($this->object->getRefId()));
865 $file->setPermissions($tree->getParentId($this->object->getRefId()));
866
868 if (!$upload->hasBeenProcessed()) {
869 $upload->process();
870 }
871 $file->getUploadFile(
872 $_FILES['files']['tmp_name'][$counter],
873 $_FILES['files']['name'][$counter]
874 );
875
876 $items[] = $new_ref_id;
877 $counter++;
878 }
879
880 $ev->setItems($items);
881 $ev->update();
882 }
Class ilObjFile.
ILIAS FileUpload FileUpload $upload
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")

References $counter, $tree, $upload, ilTree\getParentId(), ILIAS\Repository\object(), and ilUtil\stripSlashes().

Referenced by saveObject(), and updateObject().

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

◆ infoScreenObject()

ilObjSessionGUI::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

Definition at line 489 of file class.ilObjSessionGUI.php.

489 : void
490 {
491 $this->ctrl->redirectByClass(
492 [self::class, ilInfoScreenGUI::class],
493 'showSummary'
494 );
495 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ initAttendanceList()

ilObjSessionGUI::initAttendanceList ( )
protected

Definition at line 1225 of file class.ilObjSessionGUI.php.

1226 {
1227 $members_obj = $this->initContainer(true);
1228
1229 $list = new ilAttendanceList(
1230 $this,
1231 $this->object,
1232 $members_obj
1233 );
1234 $list->setId('sessattlst');
1235
1236 $event_app = $this->object->getFirstAppointment();
1238 $desc = ilDatePresentation::formatPeriod($event_app->getStart(), $event_app->getEnd());
1240 $desc .= " " . $this->object->getTitle();
1241 $list->setTitle($this->lng->txt('sess_attendance_list'), $desc);
1242
1243 $list->addPreset('mark', $this->lng->txt('trac_mark'), true);
1244 $list->addPreset('comment', $this->lng->txt('trac_comment'), true);
1245 if ($this->object->enabledRegistration()) {
1246 $list->addPreset('registered', $this->lng->txt('event_tbl_registered'), true);
1247 }
1248 $list->addPreset('participated', $this->lng->txt('event_tbl_participated'), true);
1249 $list->addBlank($this->lng->txt('sess_signature'));
1250
1251 $list->addUserFilter('registered', $this->lng->txt('event_list_registered_only'));
1252
1253 return $list;
1254 }
Base class for attendance lists.
static setUseRelativeDates(bool $a_status)
set use relative dates
static formatPeriod(ilDateTime $start, ilDateTime $end, bool $a_skip_starting_day=false, ?ilObjUser $user=null)
Format a period of two dates Shows: 14.

References ilDatePresentation\formatPeriod(), initContainer(), ILIAS\Repository\lng(), ILIAS\Repository\object(), and ilDatePresentation\setUseRelativeDates().

Referenced by attendanceListObject(), and printAttendanceListObject().

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

◆ initContainer()

ilObjSessionGUI::initContainer ( bool  $a_init_participants = false)
protected
Returns
bool|ilParticipants

Definition at line 1072 of file class.ilObjSessionGUI.php.

1073 {
1075
1076 $is_course = $is_group = false;
1077
1078 // #13178
1079 $this->container_ref_id = $tree->checkForParentType($this->object->getRefId(), 'grp');
1080 if ($this->container_ref_id) {
1081 $is_group = true;
1082 }
1083 if (!$this->container_ref_id) {
1084 $this->container_ref_id = $tree->checkForParentType($this->object->getRefId(), 'crs');
1085 if ($this->container_ref_id) {
1086 $is_course = true;
1087 }
1088 }
1089 if (!$this->container_ref_id) {
1090 $this->tpl->setOnScreenMessage('failure', 'No container object found. Aborting');
1091 return true;
1092 }
1093 $this->container_obj_id = ilObject::_lookupObjId($this->container_ref_id);
1094
1095 if ($a_init_participants && $this->container_obj_id) {
1096 if ($is_course) {
1097 return ilCourseParticipants::_getInstanceByObjId($this->container_obj_id);
1098 } elseif ($is_group) {
1099 return ilGroupParticipants::_getInstanceByObjId($this->container_obj_id);
1100 }
1101 }
1102
1103 return false;
1104 }
static _getInstanceByObjId(int $a_obj_id)
static _getInstanceByObjId(int $a_obj_id)
Get singleton instance.

References $tree, ilCourseParticipants\_getInstanceByObjId(), ilGroupParticipants\_getInstanceByObjId(), ilObject\_lookupObjId(), ilTree\checkForParentType(), and ILIAS\Repository\object().

Referenced by eventsListObject(), getContainerRefId(), and initAttendanceList().

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

◆ initCreateForm()

ilObjSessionGUI::initCreateForm (   $new_type)
protected

Definition at line 737 of file class.ilObjSessionGUI.php.

738 {
739 if (!is_object($this->object)) {
740 $this->object = new ilObjSession();
741 }
742 if (!$this->form instanceof ilPropertyFormGUI) {
743 $this->initForm('create');
744 }
745 return $this->form;
746 }
This class represents a property form user interface.

References $form, ILIAS\Repository\form(), and initForm().

Referenced by executeCommand().

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

◆ initForm()

ilObjSessionGUI::initForm ( string  $a_mode)
protected

Definition at line 1404 of file class.ilObjSessionGUI.php.

1404 : bool
1405 {
1406 if ($this->form instanceof ilPropertyFormGUI) {
1407 return true;
1408 }
1409 $ilUser = $this->user;
1411 $this->lng->loadLanguageModule('dateplaner');
1412
1413 $this->form = new ilPropertyFormGUI();
1414 $this->form->setMultipart(true);
1415 $this->form->setTableWidth('600px');
1416 $this->form->setFormAction($this->ctrl->getFormAction($this));
1417 $this->form->setMultipart(true);
1418
1419 $this->form = $this->initDidacticTemplate($this->form);
1420
1421 $this->lng->loadLanguageModule('dateplaner');
1422 $dur = new ilDateDurationInputGUI($this->lng->txt('cal_fullday'), 'event');
1423 $dur->setRequired(true);
1424 $dur->enableToggleFullTime(
1425 $this->lng->txt('event_fulltime_info'),
1426 $this->object->getFirstAppointment()->enabledFulltime()
1427 );
1428 $dur->setShowTime(true);
1429 $dur->setStart($this->object->getFirstAppointment()->getStart());
1430 $dur->setEnd($this->object->getFirstAppointment()->getEnd());
1431
1432 $this->form->addItem($dur);
1433
1434
1435 // Recurrence
1436 if ($a_mode == 'create') {
1437 if (!is_object($this->rec)) {
1438 $this->rec = new ilEventRecurrence();
1439 }
1440 $rec = new ilRecurrenceInputGUI($this->lng->txt('cal_recurrences'), 'frequence');
1441 $rec->allowUnlimitedRecurrences(false);
1442 $rec->setRecurrence($this->rec);
1443 $this->form->addItem($rec);
1444
1445 // #14547
1446 $lp = new ilCheckboxInputGUI($this->lng->txt("sess_lp_preset"), "lp_preset");
1447 $lp->setInfo($this->lng->txt("sess_lp_preset_info"));
1448 $lp->setChecked(true);
1449 $this->form->addItem($lp);
1450 }
1451
1452 $section = new ilFormSectionHeaderGUI();
1453 $section->setTitle($this->lng->txt('event_section_information'));
1454 $this->form->addItem($section);
1455
1456 // title
1457 $title = new ilTextInputGUI($this->lng->txt('event_title'), 'title');
1458 $title->setRequired(true);
1459 $title->setValue($this->object->getTitle());
1460 $title->setSize(50);
1461 $title->setMaxLength(70);
1462 $this->form->addItem($title);
1463
1464 // desc
1465 $desc = new ilTextAreaInputGUI($this->lng->txt('event_desc'), 'desc');
1466 $desc->setValue($this->object->getLongDescription());
1467 $desc->setRows(4);
1468 $desc->setCols(50);
1469 $this->form->addItem($desc);
1470
1471 // location
1472 $desc = new ilTextAreaInputGUI($this->lng->txt('event_location'), 'location');
1473 $desc->setValue($this->object->getLocation());
1474 $desc->setRows(4);
1475 $desc->setCols(50);
1476 $this->form->addItem($desc);
1477
1478 // workflow
1479 $details = new ilTextAreaInputGUI($this->lng->txt('event_details_workflow'), 'details');
1480 $details->setValue($this->object->getDetails());
1481 $details->setCols(50);
1482 $details->setRows(4);
1483 $this->form->addItem($details);
1484
1485 if ($a_mode == 'create') {
1486 $this->record_gui = new ilAdvancedMDRecordGUI(
1488 'sess'
1489 );
1490 $this->record_gui->setRefId($this->requested_ref_id);
1491 $this->record_gui->setPropertyForm($this->form);
1492 $this->record_gui->parse();
1493 } elseif ($this->checkPermissionBool('edit_metadata')) {
1494 $this->record_gui = new ilAdvancedMDRecordGUI(
1496 'sess',
1497 $this->object->getId()
1498 );
1499 $this->record_gui->setPropertyForm($this->form);
1500 $this->record_gui->parse();
1501 }
1502
1503
1504 // section
1505 $section = new ilFormSectionHeaderGUI();
1506 $section->setTitle($this->lng->txt('event_tutor_data'));
1507 $this->form->addItem($section);
1508
1509 // name
1510 $tutor_name = new ilTextInputGUI($this->lng->txt('tutor_name'), 'tutor_name');
1511 $tutor_name->setValue($this->object->getName());
1512 $tutor_name->setSize(20);
1513 $tutor_name->setMaxLength(70);
1514 $this->form->addItem($tutor_name);
1515
1516 // email
1517 $tutor_email = new ilTextInputGUI($this->lng->txt('tutor_email'), 'tutor_email');
1518 $tutor_email->setValue($this->object->getEmail());
1519 $tutor_email->setSize(20);
1520 $tutor_email->setMaxLength(70);
1521 $this->form->addItem($tutor_email);
1522
1523 // phone
1524 $tutor_phone = new ilTextInputGUI($this->lng->txt('tutor_phone'), 'tutor_phone');
1525 $tutor_phone->setValue($this->object->getPhone());
1526 $tutor_phone->setSize(20);
1527 $tutor_phone->setMaxLength(70);
1528 $this->form->addItem($tutor_phone);
1529
1530 $section = new ilFormSectionHeaderGUI();
1531 $section->setTitle($this->lng->txt('sess_section_reg'));
1532 $this->form->addItem($section);
1533
1535 $this,
1536 $this->object,
1537 array(
1543 )
1544 );
1545 $reg_settings->addMembershipFormElements($this->form, '');
1546
1547
1548 $section = new ilFormSectionHeaderGUI();
1549 $section->setTitle($this->lng->txt('event_assign_files'));
1550 $this->form->addItem($section);
1551
1552 $files = new ilFileWizardInputGUI($this->lng->txt('objs_file'), 'files');
1553 $files->setFilenames(array(0 => ''));
1554 $this->form->addItem($files);
1555
1556 $section = new ilFormSectionHeaderGUI();
1557 $section->setTitle($this->lng->txt('sess_setting_header_presentation'));
1558 $this->form->addItem($section);
1559
1560 $object_service->commonSettings()->legacyForm($this->form, $this->object)->addTileImage();
1561
1562 $features = new ilFormSectionHeaderGUI();
1563 $features->setTitle($this->lng->txt('obj_features'));
1564 $this->form->addItem($features);
1566 $this->object->getId(),
1567 $this->form,
1568 array(
1570 )
1571 );
1572
1573 $gallery = new ilCheckboxInputGUI($this->lng->txt('sess_show_members'), 'show_members');
1574 $gallery->setChecked($this->object->getShowMembers());
1575 $gallery->setInfo($this->lng->txt('sess_show_participants_info'));
1576 $this->form->addItem($gallery);
1577
1578
1579 // Show mail to members type
1580 $mail_type = new ilRadioGroupInputGUI($this->lng->txt('sess_mail_type'), 'mail_type');
1581 $mail_type->setValue((string) $this->object->getMailToMembersType());
1582
1583 $mail_tutors = new ilRadioOption(
1584 $this->lng->txt('sess_mail_admins_only'),
1586 $this->lng->txt('sess_mail_admins_only_info')
1587 );
1588 $mail_type->addOption($mail_tutors);
1589
1590 $mail_all = new ilRadioOption(
1591 $this->lng->txt('sess_mail_all'),
1593 $this->lng->txt('sess_mail_all_info')
1594 );
1595 $mail_type->addOption($mail_all);
1596 $this->form->addItem($mail_type);
1597
1598
1599
1600 switch ($a_mode) {
1601 case 'create':
1602 $this->form->setTitle($this->lng->txt('event_table_create'));
1603
1604 $this->form->addCommandButton('save', $this->lng->txt('event_btn_add'));
1605 $this->form->addCommandButton('saveAndAssignMaterials', $this->lng->txt('event_btn_add_edit'));
1606 $this->form->addCommandButton('cancel', $this->lng->txt('cancel'));
1607
1608 return true;
1609
1610 case 'edit':
1611 $this->form->setTitle($this->lng->txt('event_table_update'));
1612
1613 $this->form->addCommandButton('update', $this->lng->txt('save'));
1614 $this->form->addCommandButton('cancelEdit', $this->lng->txt('cancel'));
1615
1616 return true;
1617 }
1618 return true;
1619 }
setRecurrence(int $a_type)
set type of recurrence @access public
This class represents a checkbox property in a property form.
input GUI for a time span (start and end date)
This class represents a file wizard property in a property form.
This class represents a section header in a property form.
ilObjectService $object_service
ilEventRecurrence $rec
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
initDidacticTemplate(ilPropertyFormGUI $form)
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 an input GUI for recurring events/appointments (course events or calendar appoi...
This class represents a text area property in a property form.
This class represents a text property in a property form.

References $object_service, $rec, $user, ilObjectGUI\checkPermissionBool(), ilObjectService\commonSettings(), ILIAS\Repository\ctrl(), ilObjectServiceSettingsGUI\CUSTOM_METADATA, ILIAS\Repository\form(), ilObjectGUI\initDidacticTemplate(), ilObjectServiceSettingsGUI\initServiceSettingsForm(), ILIAS\Repository\lng(), ilObjSession\MAIL_ALLOWED_ADMIN, ilObjSession\MAIL_ALLOWED_ALL, ilAdvancedMDRecordGUI\MODE_EDITOR, ILIAS\Repository\object(), ilMembershipRegistrationSettings\REGISTRATION_LIMITED_USERS, ilCalendarRecurrence\setRecurrence(), ilMembershipRegistrationSettings\TYPE_DIRECT, ilMembershipRegistrationSettings\TYPE_NONE, ilMembershipRegistrationSettings\TYPE_REQUEST, and ilMembershipRegistrationSettings\TYPE_TUTOR.

Referenced by editObject(), executeCommand(), initCreateForm(), saveObject(), and updateObject().

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

◆ joinObject()

ilObjSessionGUI::joinObject ( )

Definition at line 377 of file class.ilObjSessionGUI.php.

377 : void
378 {
379 $ilUser = $this->user;
380
381 $this->checkPermission('read');
382
383 if ($ilUser->isAnonymous()) {
384 $this->ctrl->redirect($this, 'infoScreen');
385 }
386
387 if (ilEventParticipants::_isRegistered($ilUser->getId(), $this->object->getId())) {
388 ilSession::set("sess_hide_info", true);
389 ilEventParticipants::_unregister($ilUser->getId(), $this->object->getId());
390 $this->tpl->setOnScreenMessage('success', $this->lng->txt('event_unregistered'), true);
391 } else {
392 ilEventParticipants::_register($ilUser->getId(), $this->object->getId());
393 $this->tpl->setOnScreenMessage('success', $this->lng->txt('event_registered'), true);
394 }
395
396 $this->ctrl->redirect($this, 'infoScreen');
397 }
static _isRegistered(int $a_usr_id, int $a_event_id)
static _unregister(int $a_usr_id, int $a_event_id)
static _register(int $a_usr_id, int $a_event_id)
static set(string $a_var, $a_val)
Set a value.

References $user, ilEventParticipants\_isRegistered(), ilEventParticipants\_register(), ilEventParticipants\_unregister(), ilObjectGUI\checkPermission(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), and ilSession\set().

+ Here is the call graph for this function:

◆ load()

ilObjSessionGUI::load ( )
protected

Definition at line 1621 of file class.ilObjSessionGUI.php.

1621 : void
1622 {
1623 $event = $this->form->getItemByPostVar('event');
1624 if ($event->getStart() && $event->getEnd()) {
1625 $this->object->getFirstAppointment()->setStartingTime($event->getStart()->get(IL_CAL_UNIX));
1626 $this->object->getFirstAppointment()->setEndingTime($event->getStart()->get(IL_CAL_UNIX));
1627 $this->object->getFirstAppointment()->setStart($event->getStart());
1628 $this->object->getFirstAppointment()->setEnd($event->getEnd());
1629 $this->object->getFirstAppointment()->toggleFulltime($event->getStart() instanceof ilDate);
1630 }
1631
1632 $this->object->setTitle($this->form->getInput('title'));
1633 $this->object->setDescription($this->form->getInput('desc'));
1634 $this->object->setLocation($this->form->getInput('location'));
1635 $this->object->setName($this->form->getInput('tutor_name'));
1636 $this->object->setPhone($this->form->getInput('tutor_phone'));
1637 $this->object->setEmail($this->form->getInput('tutor_email'));
1638 $this->object->setDetails($this->form->getInput('details'));
1639
1640 $this->object->setRegistrationNotificationEnabled((bool) $this->form->getInput('registration_notification'));
1641 $this->object->setRegistrationNotificationOption($this->form->getInput('notification_option'));
1642
1643 $this->object->setRegistrationType((int) $this->form->getInput('registration_type'));
1644
1645 switch ($this->object->getRegistrationType()) {
1647 $this->object->enableCannotParticipateOption((bool) $this->form->getInput('show_cannot_participate_direct'));
1648 break;
1650 $this->object->enableCannotParticipateOption((bool) $this->form->getInput('show_cannot_participate_request'));
1651 break;
1652 default:
1653 $this->object->enableCannotParticipateOption(false);
1654 break;
1655 }
1656
1657 // $this->object->setRegistrationMinUsers((int) $this->form->getInput('registration_min_members'));
1658 $this->object->setRegistrationMaxUsers((int) $this->form->getInput('registration_max_members'));
1659 $this->object->enableRegistrationUserLimit((int) $this->form->getInput('registration_membership_limited'));
1660 $this->object->setShowMembers((bool) $this->form->getInput('show_members'));
1661 $this->object->setMailToMembersType((int) $this->form->getInput('mail_type'));
1662
1663 switch ((int) $this->form->getInput('waiting_list')) {
1664 case 2:
1665 $this->object->enableRegistrationWaitingList(true);
1666 $this->object->setWaitingListAutoFill(true);
1667 break;
1668
1669 case 1:
1670 $this->object->enableRegistrationWaitingList(true);
1671 $this->object->setWaitingListAutoFill(false);
1672 break;
1673
1674 default:
1675 $this->object->enableRegistrationWaitingList(false);
1676 $this->object->setWaitingListAutoFill(false);
1677 break;
1678 }
1679 }
Class for single dates.
ilAppEventHandler $event

References $event, ILIAS\Repository\form(), IL_CAL_UNIX, ILIAS\Repository\object(), ilMembershipRegistrationSettings\TYPE_DIRECT, and ilMembershipRegistrationSettings\TYPE_REQUEST.

Referenced by saveObject(), and updateObject().

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

◆ loadRecurrenceSettings()

ilObjSessionGUI::loadRecurrenceSettings ( )
protected

Definition at line 1681 of file class.ilObjSessionGUI.php.

1681 : void
1682 {
1683 $this->rec = new ilEventRecurrence();
1684
1685 switch ($this->form->getInput('frequence')) {
1687 $this->rec->setFrequenceType($this->form->getInput('frequence'));
1688 $this->rec->setInterval((int) $this->form->getInput('count_DAILY'));
1689 break;
1690
1692 $this->rec->setFrequenceType($this->form->getInput('frequence'));
1693 $this->rec->setInterval((int) $this->form->getInput('count_WEEKLY'));
1694 if (is_array($this->form->getInput('byday_WEEKLY'))) {
1695 $this->rec->setBYDAY(ilUtil::stripSlashes(implode(',', $this->form->getInput('byday_WEEKLY'))));
1696 }
1697 break;
1698
1700 $this->rec->setFrequenceType($this->form->getInput('frequence'));
1701 $this->rec->setInterval((int) $this->form->getInput('count_MONTHLY'));
1702 switch ((int) $this->form->getInput('subtype_MONTHLY')) {
1703 case 0:
1704 // nothing to do;
1705 break;
1706
1707 case 1:
1708 switch ((int) $this->form->getInput('monthly_byday_day')) {
1709 case 8:
1710 // Weekday
1711 $this->rec->setBYSETPOS($this->form->getInput('monthly_byday_num'));
1712 $this->rec->setBYDAY('MO,TU,WE,TH,FR');
1713 break;
1714
1715 case 9:
1716 // Day of month
1717 $this->rec->setBYMONTHDAY($this->form->getInput('monthly_byday_num'));
1718 break;
1719
1720 default:
1721 $this->rec->setBYDAY(($this->form->getInput('monthly_byday_num') . $this->form->getInput('monthly_byday_day')));
1722 break;
1723 }
1724 break;
1725
1726 case 2:
1727 $this->rec->setBYMONTHDAY($this->form->getInput('monthly_bymonthday'));
1728 break;
1729 }
1730 break;
1731
1733 $this->rec->setFrequenceType($this->form->getInput('frequence'));
1734 $this->rec->setInterval((int) $this->form->getInput('count_YEARLY'));
1735 switch ((int) $this->form->getInput('subtype_YEARLY')) {
1736 case 0:
1737 // nothing to do;
1738 break;
1739
1740 case 1:
1741 $this->rec->setBYMONTH($this->form->getInput('yearly_bymonth_byday'));
1742 $this->rec->setBYDAY(($this->form->getInput('yearly_byday_num') . $this->form->getInput('yearly_byday')));
1743 break;
1744
1745 case 2:
1746 $this->rec->setBYMONTH($this->form->getInput('yearly_bymonth_by_monthday'));
1747 $this->rec->setBYMONTHDAY($this->form->getInput('yearly_bymonthday'));
1748 break;
1749 }
1750 break;
1751 }
1752
1753 // UNTIL
1754 switch ((int) $this->form->getInput('until_type')) {
1755 case 1:
1756 $this->rec->setFrequenceUntilDate(null);
1757 // nothing to do
1758 break;
1759
1760 case 2:
1761 $this->rec->setFrequenceUntilDate(null);
1762 $this->rec->setFrequenceUntilCount((int) $this->form->getInput('count'));
1763 break;
1764
1765 case 3:
1766 $frequence = $this->form->getItemByPostVar('frequence');
1767 $end = $frequence->getRecurrence()->getFrequenceUntilDate();
1768 $this->rec->setFrequenceUntilCount(0);
1769 $this->rec->setFrequenceUntilDate($end);
1770 break;
1771 }
1772 }

References ILIAS\Repository\form(), ilCalendarRecurrence\FREQ_DAILY, ilCalendarRecurrence\FREQ_MONTHLY, ilCalendarRecurrence\FREQ_WEEKLY, ilCalendarRecurrence\FREQ_YEARLY, and ilUtil\stripSlashes().

Referenced by saveObject().

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

◆ materialsObject()

ilObjSessionGUI::materialsObject ( )

Definition at line 1106 of file class.ilObjSessionGUI.php.

1106 : void
1107 {
1108 $this->tabs_gui->activateTab('materials');
1109
1110 $parent_ref_id = $this->tree->getParentId($this->object->getRefId());
1111 $parent_type = ilObject::_lookupType($parent_ref_id, true);
1112 $parent_gui_class = 'ilObj' . $this->obj_definition->getClassName($parent_type) . 'GUI';
1113 $this->ctrl->setParameterByClass($parent_gui_class, 'ref_id', $parent_ref_id);
1116 $this->getCreatableObjectTypes(),
1117 $parent_gui_class,
1118 $this->object->getRefId()
1119 )
1120 );
1121 $gui->render();
1122 $this->ctrl->clearParameterByClass($parent_gui_class, 'ref_id');
1123
1124 $this->event_items = new ilEventItems($this->object->getId());
1125
1126 $tbl = new ilSessionMaterialsTableGUI($this, "materials");
1127
1128 $tbl->setDisableFilterHiding(true);
1129
1130 $tbl->addMultiCommand('saveMaterials', $this->lng->txt('sess_assign'));
1131 $tbl->addMultiCommand("removeMaterials", $this->lng->txt("remove"));
1132
1133 $tbl->setTitle($this->lng->txt("event_assign_materials_table"));
1134 $tbl->setDescription($this->lng->txt('event_assign_materials_info'));
1135
1136 $tbl->setMaterialItems($this->event_items->getItems());
1137 $tbl->setContainerRefId($this->getContainerRefId());
1138 $data = $tbl->getDataFromDb();
1139 $tbl->setMaterials($data);
1140
1141 $this->tpl->setContent($tbl->getHTML());
1142 }
Render add new item selector.
buildAddNewItemElements(array $subtypes, string $create_target_class=ilRepositoryGUI::class, ?int $redirect_target_ref_id=null,)

References ilObjectGUI\$data, ilObject\_lookupType(), ilObjectGUI\buildAddNewItemElements(), ILIAS\Repository\ctrl(), getContainerRefId(), getCreatableObjectTypes(), ILIAS\Repository\lng(), and ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ membersObject()

ilObjSessionGUI::membersObject ( )
protected

Definition at line 280 of file class.ilObjSessionGUI.php.

280 : void
281 {
282 $this->ctrl->redirectByClass('ilSessionMembershipGUI', 'participants');
283 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ modifyItemGUI()

ilObjSessionGUI::modifyItemGUI ( ilObjectListGUI  $a_item_list_gui,
array  $a_item_data,
bool  $a_show_path 
)

Definition at line 497 of file class.ilObjSessionGUI.php.

497 : void
498 {
500
501 // if folder is in a course, modify item list gui according to course requirements
502 if ($course_ref_id = $tree->checkForParentType($this->object->getRefId(), 'crs')) {
503 // #10611
504 ilObjectActivation::addListGUIActivationProperty($a_item_list_gui, $a_item_data);
505
506 $course_obj_id = ilObject::_lookupObjId($course_ref_id);
508 $a_item_list_gui,
509 get_class($this),
510 $a_item_data,
511 $a_show_path,
512 $course_ref_id,
513 $course_obj_id,
514 $this->object->getRefId()
515 );
516 }
517 }
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 addListGUIActivationProperty(ilObjectListGUI $list_gui, array &$item)
Get timing details for list gui.

References $tree, ilObject\_lookupObjId(), ilObjCourseGUI\_modifyItemGUI(), ilObjectActivation\addListGUIActivationProperty(), ilTree\checkForParentType(), and ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ postUpdateMaterials()

ilObjSessionGUI::postUpdateMaterials ( )

redirect to list of materials without offset/page.

Definition at line 1202 of file class.ilObjSessionGUI.php.

1202 : void
1203 {
1204 $tbl = new ilSessionMaterialsTableGUI($this, "materials");
1205 $tbl->setOffset(0);
1206 $tbl->storeNavParameter();//remove offset and go to page 1
1207
1208 $this->tpl->setOnScreenMessage('success', $this->lng->txt('settings_saved'), true);
1209 $this->ctrl->redirect($this, 'materials');
1210 }

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

Referenced by removeMaterialsObject(), and saveMaterialsObject().

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

◆ prepareOutput()

ilObjSessionGUI::prepareOutput ( bool  $show_sub_objects = true)

Reimplemented from ilObjectGUI.

Definition at line 295 of file class.ilObjSessionGUI.php.

295 : bool
296 {
297 parent::prepareOutput($show_sub_objects);
298
299 if (!$this->getCreationMode()) {
300 $title = strlen($this->object->getTitle()) ? (': ' . $this->object->getTitle()) : '';
301
302 $this->tpl->setTitle(
303 $this->object->getFirstAppointment()->appointmentToString() . $title
304 );
305 }
306 return true;
307 }

References ilObjectGUI\getCreationMode(), and ILIAS\Repository\object().

Referenced by executeCommand().

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

◆ printAttendanceListObject()

ilObjSessionGUI::printAttendanceListObject ( )
protected

Definition at line 1256 of file class.ilObjSessionGUI.php.

1256 : void
1257 {
1258 $this->checkPermission('manage_members');
1259
1260 $list = $this->initAttendanceList();
1261 $list->initFromForm();
1262 $list->setCallback(array($this, 'getAttendanceListUserData'));
1263
1264 $this->event_part = new ilEventParticipants($this->object->getId());
1265 $list->getFullscreenHTML();
1266 }

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

+ Here is the call graph for this function:

◆ readMemberData()

ilObjSessionGUI::readMemberData ( array  $a_usr_ids)

Used for waiting list.

Definition at line 1928 of file class.ilObjSessionGUI.php.

1928 : array
1929 {
1930 $tmp_data = [];
1931 foreach ($a_usr_ids as $usr_id) {
1932 $tmp_data[$usr_id] = [];
1933 }
1934 return $tmp_data;
1935 }

◆ redirectToParentContentPageObject()

ilObjSessionGUI::redirectToParentContentPageObject ( )
protected

Definition at line 1792 of file class.ilObjSessionGUI.php.

1792 : void
1793 {
1797
1798 $parent_id = $tree->getParentId($this->object->getRefId());
1799
1800 // #11650
1801 $parent_type = ilObject::_lookupType($parent_id, true);
1802
1803 $parent_class = $objDefinition->getClassName($parent_type);
1804 $parent_class = 'ilObj' . $parent_class . 'GUI';
1805
1806 $ctrl->setParameterByClass($parent_class, "ref_id", $parent_id);
1807 $ctrl->redirectByClass($parent_class, "view");
1808 }
redirectByClass( $a_class, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false)
@inheritDoc
setParameterByClass(string $a_class, string $a_parameter, $a_value)
@inheritDoc
ilObjectDefinition $objDefinition
getClassName(string $obj_name)

References $ctrl, $objDefinition, $tree, ilObject\_lookupType(), ilObjectDefinition\getClassName(), ilTree\getParentId(), ILIAS\Repository\object(), ilCtrl\redirectByClass(), and ilCtrl\setParameterByClass().

+ Here is the call graph for this function:

◆ refuseParticipationObject()

ilObjSessionGUI::refuseParticipationObject ( )
protected

Definition at line 528 of file class.ilObjSessionGUI.php.

528 : void
529 {
530 $this->unregisterObject(true);
531 }
unregisterObject(bool $a_refuse_participation=false)

References unregisterObject().

+ Here is the call graph for this function:

◆ registerObject()

ilObjSessionGUI::registerObject ( )

Definition at line 309 of file class.ilObjSessionGUI.php.

309 : void
310 {
311 $ilUser = $this->user;
312 $ilAppEventHandler = $this->event;
313
314 $this->checkPermission('visible');
315
316 $part = ilParticipants::getInstance($this->getCurrentObject()->getRefId());
317
318 $event_part = new ilEventParticipants($this->getCurrentObject()->getId());
319 $event_part->updateExcusedForUser($ilUser->getId(), false);
320
321 if (
322 $this->getCurrentObject()->isRegistrationUserLimitEnabled() &&
323 $this->getCurrentObject()->getRegistrationMaxUsers() &&
324 (count($event_part->getRegisteredParticipants()) >= $this->getCurrentObject()->getRegistrationMaxUsers())
325 ) {
326 if (!$this->getCurrentObject()->isRegistrationWaitingListEnabled()) {
327 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('sess_reg_max_users_exceeded'), true);
328 $this->ctrl->redirect($this, 'infoScreen');
329 }
330 $wait = new ilSessionWaitingList($this->getCurrentObject()->getId());
331 $wait->addToList($ilUser->getId());
332 $this->ctrl->redirect($this, 'infoScreen');
333 }
334
335
336 switch ($this->getCurrentObject()->getRegistrationType()) {
338 $this->ctrl->redirect($this, 'info');
339 break;
340
342 $part->register($ilUser->getId());
343 $this->tpl->setOnScreenMessage('success', $this->lng->txt('event_registered'), true);
344
345 $ilAppEventHandler->raise(
346 "components/ILIAS/Session",
347 'enter',
348 array(
349 'obj_id' => $this->getCurrentObject()->getId(),
350 'ref_id' => $this->getCurrentObject()->getRefId(),
351 'usr_id' => $ilUser->getId()
352 )
353 );
354
355 $this->ctrl->redirect($this, 'infoScreen');
356 break;
357
359 $this->tpl->setOnScreenMessage('success', $this->lng->txt('sess_registered_confirm'), true);
360 $part->addSubscriber($ilUser->getId());
361
362 $ilAppEventHandler->raise(
363 "components/ILIAS/Session",
364 'register',
365 array(
366 'obj_id' => $this->getCurrentObject()->getId(),
367 'ref_id' => $this->getCurrentObject()->getRefId(),
368 'usr_id' => $ilUser->getId()
369 )
370 );
371
372 $this->ctrl->redirect($this, 'infoScreen');
373 break;
374 }
375 }
updateExcusedForUser(int $a_usr_id, bool $a_status)
static getInstance(int $a_ref_id)

References $event, $event_part, $user, ilObjectGUI\checkPermission(), ILIAS\Repository\ctrl(), ILIAS\Survey\Mode\getId(), ilParticipants\getInstance(), ilObjectGUI\getRefId(), ilEventParticipants\getRegisteredParticipants(), ILIAS\Repository\lng(), ilMembershipRegistrationSettings\TYPE_DIRECT, ilMembershipRegistrationSettings\TYPE_NONE, ilMembershipRegistrationSettings\TYPE_REQUEST, and ilEventParticipants\updateExcusedForUser().

+ Here is the call graph for this function:

◆ removeMaterialsObject()

ilObjSessionGUI::removeMaterialsObject ( )

Definition at line 1173 of file class.ilObjSessionGUI.php.

1173 : void
1174 {
1175 $items_checked = $this->requested_items;
1176
1177 $this->event_items = new ilEventItems($this->object->getId());
1178 $this->event_items->removeItems($items_checked);
1179
1180 $this->postUpdateMaterials();
1181 }
postUpdateMaterials()
redirect to list of materials without offset/page.

References $requested_items, ILIAS\Repository\object(), and postUpdateMaterials().

+ Here is the call graph for this function:

◆ resetFilter()

ilObjSessionGUI::resetFilter ( )

Definition at line 1165 of file class.ilObjSessionGUI.php.

1165 : void
1166 {
1167 $tbl = new ilSessionMaterialsTableGUI($this, "materials");
1168 $tbl->resetOffset(); // sets record offest to 0 (first page)
1169 $tbl->resetFilter(); // clears filter
1170 $this->ctrl->redirect($this, "materials");
1171 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ saveAndAssignMaterialsObject()

ilObjSessionGUI::saveAndAssignMaterialsObject ( )
protected

Definition at line 748 of file class.ilObjSessionGUI.php.

748 : void
749 {
750 $this->saveObject(false);
751
752 $this->ctrl->setParameter($this, 'ref_id', $this->object->getRefId());
753 $this->ctrl->setParameter($this, 'new_type', '');
754 $this->ctrl->redirect($this, 'materials');
755 }

References ILIAS\Repository\ctrl(), ILIAS\Repository\object(), and ilObjectGUI\saveObject().

+ Here is the call graph for this function:

◆ saveMaterialsObject()

ilObjSessionGUI::saveMaterialsObject ( )

Definition at line 1183 of file class.ilObjSessionGUI.php.

1183 : void
1184 {
1185 $this->event_items = new ilEventItems($this->object->getId());
1186 $db_items = $this->event_items->getItems();
1187
1188 $list_items_checked = $this->requested_items;
1189 $list_items_checked = array_map('intval', $list_items_checked);
1190
1191 $items_to_save = array_merge($db_items, $list_items_checked);
1192 $items_to_save = array_unique($items_to_save);
1193
1194 $this->event_items->setItems($items_to_save);
1195 $this->event_items->update();
1196 $this->postUpdateMaterials();
1197 }

References $requested_items, ILIAS\Repository\object(), and postUpdateMaterials().

+ Here is the call graph for this function:

◆ saveObject()

ilObjSessionGUI::saveObject ( bool  $a_redirect_on_success = true)

Definition at line 757 of file class.ilObjSessionGUI.php.

757 : void
758 {
759 $ilUser = $this->user;
761
762 $this->object = new ilObjSession();
763
764 $this->ctrl->saveParameter($this, "new_type");
765
766 $this->initForm('create');
767 $this->ilErr->setMessage('');
768 if (!$this->form->checkInput()) {
769 $this->tpl->setOnScreenMessage(
771 $this->lng->txt('err_check_input')
772 );
773 $this->form->setValuesByPost();
774 $this->createObject();
775 return;
776 }
777
778 if ($this->record_gui instanceof \ilAdvancedMDRecordGUI && !$this->record_gui->importEditFormPostValues()
779 ) {
780 $this->ilErr->setMessage($this->lng->txt('err_check_input'));
781 }
782
783 $this->load();
784 $this->loadRecurrenceSettings();
785
786 $this->object->validate();
787 $this->object->getFirstAppointment()->validate();
788
789 if (strlen($this->ilErr->getMessage())) {
790 $this->tpl->setOnScreenMessage('failure', $this->ilErr->getMessage());
791 $this->form->setValuesByPost();
792 $this->createObject();
793 }
794 // Create session
795 $this->object->create();
796 $this->object->createReference();
797 $this->object->putInTree($this->requested_ref_id);
798 $this->object->setPermissions($this->requested_ref_id);
799
801 $this->object->getId(),
802 $this->form,
803 array(
805 )
806 );
807 if ($this->record_gui instanceof \ilAdvancedMDRecordGUI) {
808 $this->record_gui->writeEditForm($this->object->getId());
809 }
810
811
812 // apply didactic template?
813 $dtpl = $this->getDidacticTemplateVar("dtpl");
814 if ($dtpl) {
815 $this->object->applyDidacticTemplate($dtpl);
816 }
817
818 // #14547 - active is default
819 if (!$this->form->getInput("lp_preset")) {
820 $lp_obj_settings = new ilLPObjSettings($this->object->getId());
821 $lp_obj_settings->setMode(ilLPObjSettings::LP_MODE_DEACTIVATED);
822 $lp_obj_settings->update(false);
823 }
824
825 // create appointment
826 $this->object->getFirstAppointment()->setSessionId($this->object->getId());
827 $this->object->getFirstAppointment()->create();
828
829 $this->handleFileUpload();
830
831 $object_service->commonSettings()->legacyForm($this->form, $this->object)->saveTileImage();
832
833 $this->createRecurringSessions((bool) $this->form->getInput("lp_preset"));
834
835 if ($a_redirect_on_success) {
836 $this->tpl->setOnScreenMessage('info', $this->lng->txt('event_add_new_event'), true);
837 $this->ctrl->returnToParent($this);
838 }
839 }
importEditFormPostValues()
Load edit form values from post.
createRecurringSessions(bool $a_activate_lp=true)
createObject()
create new object form
static updateServiceSettingsForm(int $obj_id, ilPropertyFormGUI $form, array $services)

References $object_service, $user, ilObjectService\commonSettings(), ilObjectGUI\createObject(), createRecurringSessions(), ILIAS\Repository\ctrl(), ilObjectServiceSettingsGUI\CUSTOM_METADATA, ILIAS\Repository\form(), ilObjectGUI\getDidacticTemplateVar(), handleFileUpload(), ilAdvancedMDRecordGUI\importEditFormPostValues(), initForm(), ILIAS\Repository\lng(), load(), loadRecurrenceSettings(), ilLPObjSettings\LP_MODE_DEACTIVATED, ILIAS\UICore\GlobalTemplate\MESSAGE_TYPE_FAILURE, ILIAS\Repository\object(), and ilObjectServiceSettingsGUI\updateServiceSettingsForm().

+ Here is the call graph for this function:

◆ showJoinRequestButton()

ilObjSessionGUI::showJoinRequestButton ( ?ilToolbarGUI  $ilToolbar = null)
protected

Definition at line 533 of file class.ilObjSessionGUI.php.

533 : bool
534 {
535 $ilUser = $this->user;
536
537 if (!$ilToolbar) {
538 $ilToolbar = $this->toolbar;
539 }
540
541 if (!$this->getCurrentObject()->enabledRegistrationForUsers() || $ilUser->isAnonymous()) {
542 return false;
543 }
544
545 $part = ilParticipants::getInstance($this->getCurrentObject()->getRefId());
546
547 $this->ctrl->setParameter($this, "ref_id", $this->getCurrentObject()->getRefId());
548
549 $btn_excused = null;
550 if ($this->object->isCannotParticipateOptionEnabled()) {
551 $btn_excused = $this->ui->factory()->button()->standard(
552 $this->lng->txt('sess_bt_refuse'),
553 $this->ctrl->getLinkTarget($this, 'refuseParticipation')
554 );
555 }
556
557
558 if (ilEventParticipants::_isRegistered($ilUser->getId(), $this->getCurrentObject()->getId())) {
559 if (!is_null($btn_excused)) {
560 $ilToolbar->addComponent($btn_excused);
561 }
562 return true;
563 } elseif ($part->isSubscriber($ilUser->getId())) {
564 if (!is_null($btn_excused)) {
565 $ilToolbar->addComponent($btn_excused);
566 }
567 return true;
568 } elseif (ilSessionWaitingList::_isOnList($ilUser->getId(), $this->getCurrentObject()->getId())) {
569 if (!is_null($btn_excused)) {
570 $ilToolbar->addComponent($btn_excused);
571 }
572 return true;
573 }
574
575 $event_part = new ilEventParticipants($this->getCurrentObject()->getId());
576
577 if (
578 $this->getCurrentObject()->isRegistrationUserLimitEnabled() &&
579 $this->getCurrentObject()->getRegistrationMaxUsers() &&
580 (count($event_part->getRegisteredParticipants()) >= $this->getCurrentObject()->getRegistrationMaxUsers())
581 ) {
582 if ($this->getCurrentObject()->isRegistrationWaitingListEnabled()) {
583 $this->tpl->setOnScreenMessage('info', $this->lng->txt('sess_reg_max_users_exceeded_wl'));
584 $btn_attend = $this->ui->factory()->button()->primary(
585 $this->lng->txt("mem_add_to_wl"),
586 $this->ctrl->getLinkTargetByClass(array("ilRepositoryGUI", "ilObjSessionGUI"), "register")
587 );
588 $ilToolbar->addComponent($btn_attend);
589 if (!$event_part->isExcused($ilUser->getId()) && !is_null($btn_excused)) {
590 $ilToolbar->addComponent($btn_excused);
591 }
592 } else {
593 $this->tpl->setOnScreenMessage('info', $this->lng->txt('sess_reg_max_users_exceeded'));
594 }
595 return true;
596 } elseif (is_null(ilSession::get("sess_hide_info"))) {
597 $this->tpl->setOnScreenMessage('info', $this->lng->txt('sess_join_info'));
598 $btn_attend = $this->ui->factory()->button()->primary(
599 $this->lng->txt("join_session"),
600 $this->ctrl->getLinkTargetByClass(array("ilRepositoryGUI", "ilObjSessionGUI"), "register")
601 );
602 $ilToolbar->addComponent($btn_attend);
603 if (!$event_part->isExcused($ilUser->getId()) && !is_null($btn_excused)) {
604 $ilToolbar->addComponent($btn_excused);
605 }
606 return true;
607 }
608 return false;
609 }
static _isOnList(int $a_usr_id, int $a_obj_id)

References $event_part, $toolbar, $user, ilWaitingList\_isOnList(), ilEventParticipants\_isRegistered(), ILIAS\Repository\ctrl(), ilSession\get(), ILIAS\Survey\Mode\getId(), ilParticipants\getInstance(), ilObjectGUI\getRefId(), ilEventParticipants\getRegisteredParticipants(), ilEventParticipants\isExcused(), ILIAS\Repository\lng(), ILIAS\Repository\object(), and ILIAS\Repository\ui().

Referenced by showJoinRequestButtonInCalendar().

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

◆ showJoinRequestButtonInCalendar()

ilObjSessionGUI::showJoinRequestButtonInCalendar ( ilToolbarGUI  $a_ilToolbar)

show join request This method is only needed to keep showJoinRequestButton method protected.

Definition at line 523 of file class.ilObjSessionGUI.php.

523 : bool
524 {
525 return $this->showJoinRequestButton($a_ilToolbar);
526 }
showJoinRequestButton(?ilToolbarGUI $ilToolbar=null)

References showJoinRequestButton().

+ Here is the call graph for this function:

◆ unregisterObject()

ilObjSessionGUI::unregisterObject ( bool  $a_refuse_participation = false)

Definition at line 399 of file class.ilObjSessionGUI.php.

399 : void
400 {
401 $ilUser = $this->user;
402 $ilAppEventHandler = $this->event;
405
406 $part = ilSessionParticipants::getInstance($this->object->getRefId());
407 if ($part->isSubscriber($ilUser->getId())) {
408 $part->deleteSubscriber($ilUser->getId());
409 }
410
411 $part->unregister($ilUser->getId());
412
413 if ($a_refuse_participation) {
414 $event_part = new \ilEventParticipants($this->object->getId());
415 $event_part->updateExcusedForUser($ilUser->getId(), true);
416 }
417
418 ilSessionWaitingList::deleteUserEntry($ilUser->getId(), $this->getCurrentObject()->getId());
419
420 // check for visible permission of user
422 $access->clear();
423 $has_access = $access->checkAccessOfUser(
424 $ilUser->getId(),
425 'visible',
426 '',
427 $this->object->getRefId()
428 );
429 if (!$has_access) {
430 $parent = $tree->getParentId($this->object->getRefId());
431 $this->redirectToRefId($parent);
432 return;
433 }
434
435 $ilAppEventHandler->raise(
436 "components/ILIAS/Session",
437 'unregister',
438 array(
439 'obj_id' => $this->getCurrentObject()->getId(),
440 'ref_id' => $this->getCurrentObject()->getRefId(),
441 'usr_id' => $ilUser->getId()
442 )
443 );
444 if ($a_refuse_participation) {
445 $this->tpl->setOnScreenMessage('info', $this->lng->txt('sess_participation_refused_info'), true);
446 } else {
447 $this->tpl->setOnScreenMessage('success', $this->lng->txt('event_unregistered'), true);
448 }
449 $this->ctrl->returnToParent($this);
450 }
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 sav...
static resetCaches()
Reset internal caches.
static getInstance(int $a_ref_id)
static deleteUserEntry(int $a_usr_id, int $a_obj_id)
checkAccessOfUser(int $a_user_id, string $a_permission, string $a_cmd, int $a_ref_id, string $a_type="", ?int $a_obj_id=null, ?int $a_tree_id=null)
check access for an object (provide $a_type and $a_obj_id if available for better performance)

References $access, $event, $event_part, $tree, $user, ilRBACAccessHandler\checkAccessOfUser(), ilRBACAccessHandler\clear(), ILIAS\Repository\ctrl(), ilWaitingList\deleteUserEntry(), ILIAS\Survey\Mode\getId(), ilSessionParticipants\getInstance(), ilTree\getParentId(), ilObjectGUI\getRefId(), ILIAS\Repository\lng(), ILIAS\Repository\object(), ilObjectGUI\redirectToRefId(), ilRbacSystem\resetCaches(), and ilEventParticipants\updateExcusedForUser().

Referenced by refuseParticipationObject().

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

◆ updateObject()

ilObjSessionGUI::updateObject ( )

updates object entry in object_data

Reimplemented from ilObjectGUI.

Definition at line 951 of file class.ilObjSessionGUI.php.

951 : void
952 {
954
955 $old_autofill = $this->object->hasWaitingListAutoFill();
956
957 $this->initForm('edit');
958 $this->ilErr->setMessage('');
959 if (!$this->form->checkInput()) {
960 $this->tpl->setOnScreenMessage(
962 $this->lng->txt('err_check_input')
963 );
964 $this->form->setValuesByPost();
965 $this->editObject();
966 return;
967 }
968
969 //Mantis 21972: Choose didactic template on settings screen
970 $old_type = ilDidacticTemplateObjSettings::lookupTemplateId($this->object->getRefId());
971
972 $modified = false;
973 $new_type_info = $this->form->getInput('didactic_type');
974 if ($new_type_info) {
975 $new_type = explode('_', $this->form->getInput('didactic_type'));
976 $new_type = (int) $new_type[1];
977
978 $modified = ($new_type !== $old_type);
979 }
980
981 if (
982 $this->record_gui instanceof \ilAdvancedMDRecordGUI &&
983 !$this->record_gui->importEditFormPostValues()
984 ) {
985 $this->tpl->setOnScreenMessage(
987 $this->lng->txt('err_check_input')
988 );
989 $this->form->setValuesByPost();
990 $this->editObject();
991 }
992
993 $this->load();
994
995 $this->object->validate();
996 $this->object->getFirstAppointment()->validate();
997
998 if (strlen($this->ilErr->getMessage())) {
999 $this->tpl->setOnScreenMessage('failure', $this->ilErr->getMessage());
1000 $this->editObject();
1001 }
1002 // Update event
1003 $this->object->update();
1004 $this->object->getFirstAppointment()->update();
1005
1007 $this->object->getId(),
1008 $this->form,
1009 array(
1011 )
1012 );
1013 if ($this->record_gui instanceof \ilAdvancedMDRecordGUI) {
1014 $this->record_gui->writeEditForm();
1015 }
1016 $this->handleFileUpload();
1017
1018 $object_service->commonSettings()->legacyForm($this->form, $this->object)->saveTileImage();
1019
1020 // if autofill has been activated trigger process
1021 if (!$old_autofill &&
1022 $this->object->hasWaitingListAutoFill()) {
1023 $this->object->handleAutoFill();
1024 }
1025
1026 //Mantis 21972: Choose didactic template on settings screen
1027 if (!$modified) {
1028 $this->tpl->setOnScreenMessage('success', $this->lng->txt('event_updated'), true);
1029 $this->ctrl->redirect($this, 'edit');
1030 return;
1031 }
1032
1033 if ($new_type == 0) {
1034 $new_type_txt = $this->lng->txt('il_sess_status_open');
1035 } else {
1036 $dtpl = new ilDidacticTemplateSetting($new_type);
1037 $new_type_txt = $dtpl->getPresentationTitle($this->lng->getLangKey());
1038 }
1039 $this->tabs_gui->activateTab('settings');
1040
1041 $confirm = new ilConfirmationGUI();
1042 $confirm->setFormAction($this->ctrl->getFormAction($this));
1043 $confirm->setHeaderText($this->lng->txt('sess_warn_sess_type_changed'));
1044 $confirm->addItem(
1045 'sess_type',
1046 (string) $new_type,
1047 $this->lng->txt('sess_info_new_sess_type') . ': ' . $new_type_txt
1048 );
1049 $confirm->setConfirm($this->lng->txt('sess_change_type'), 'updateSessionType');
1050 $confirm->setCancel($this->lng->txt('cancel'), 'edit');
1051
1052 $this->tpl->setContent($confirm->getHTML());
1053 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References $object_service, ilObjectService\commonSettings(), ILIAS\Repository\ctrl(), ilObjectServiceSettingsGUI\CUSTOM_METADATA, editObject(), ILIAS\Repository\form(), handleFileUpload(), ilAdvancedMDRecordGUI\importEditFormPostValues(), initForm(), ILIAS\Repository\int(), ILIAS\Repository\lng(), load(), ilDidacticTemplateObjSettings\lookupTemplateId(), ILIAS\UICore\GlobalTemplate\MESSAGE_TYPE_FAILURE, ILIAS\Repository\object(), and ilObjectServiceSettingsGUI\updateServiceSettingsForm().

+ Here is the call graph for this function:

◆ updateSessionTypeObject()

ilObjSessionGUI::updateSessionTypeObject ( )

change session type

Definition at line 1058 of file class.ilObjSessionGUI.php.

1058 : void
1059 {
1061 $this->object->getRefId(),
1062 (int) $this->http->request()->getParsedBody()['sess_type']
1063 );
1064
1065 $this->tpl->setOnScreenMessage('success', $this->lng->txt('settings_saved'), true);
1066 $this->ctrl->redirect($this, 'edit');
1067 }
static switchTemplate(int $a_ref_id, int $a_new_tpl_id)

References ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ILIAS\Repository\object(), and ilDidacticTemplateUtils\switchTemplate().

+ Here is the call graph for this function:

Field Documentation

◆ $access

ilAccessHandler ilObjSessionGUI::$access
protected

◆ $container_obj_id

int ilObjSessionGUI::$container_obj_id = 0
protected

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

◆ $container_ref_id

int ilObjSessionGUI::$container_ref_id = 0
protected

Definition at line 56 of file class.ilObjSessionGUI.php.

Referenced by getContainerRefId().

◆ $ctrl

ilCtrl ilObjSessionGUI::$ctrl

◆ $event

ilAppEventHandler ilObjSessionGUI::$event
protected

Definition at line 37 of file class.ilObjSessionGUI.php.

Referenced by load(), registerObject(), and unregisterObject().

◆ $event_items

ilEventItems ilObjSessionGUI::$event_items = null
protected

Definition at line 61 of file class.ilObjSessionGUI.php.

Referenced by afterSaveCallback().

◆ $event_part

ilEventParticipants ilObjSessionGUI::$event_part = null
protected

◆ $form

ilPropertyFormGUI ilObjSessionGUI::$form = null
protected

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

Referenced by attendanceListObject(), executeCommand(), and initCreateForm().

◆ $help

ilHelpGUI ilObjSessionGUI::$help
protected

Definition at line 39 of file class.ilObjSessionGUI.php.

Referenced by getTabs().

◆ $ilErr

ilErrorHandling ilObjSessionGUI::$ilErr
protected

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

◆ $lng

ilLanguage ilObjSessionGUI::$lng

Definition at line 42 of file class.ilObjSessionGUI.php.

Referenced by _goto().

◆ $locator

ilLocatorGUI ilObjSessionGUI::$locator
protected

Definition at line 53 of file class.ilObjSessionGUI.php.

Referenced by addLocatorItems().

◆ $objDefinition

ilObjectDefinition ilObjSessionGUI::$objDefinition

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

Referenced by redirectToParentContentPageObject().

◆ $object_service

ilObjectService ilObjSessionGUI::$object_service
protected

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

Referenced by initForm(), saveObject(), and updateObject().

◆ $rbacreview

ilRbacReview ilObjSessionGUI::$rbacreview
protected

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

Referenced by getDefaultMemberRole(), and getLocalRoles().

◆ $rec

ilEventRecurrence ilObjSessionGUI::$rec = null
protected

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

Referenced by initForm().

◆ $record_gui

ilAdvancedMDRecordGUI ilObjSessionGUI::$record_gui = null
protected

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

◆ $refinery

ILIAS Refinery Factory ilObjSessionGUI::$refinery
protected

Definition at line 40 of file class.ilObjSessionGUI.php.

◆ $requested_file_id

int ilObjSessionGUI::$requested_file_id = 0
protected

Definition at line 65 of file class.ilObjSessionGUI.php.

◆ $requested_items

array ilObjSessionGUI::$requested_items = []
protected

Definition at line 69 of file class.ilObjSessionGUI.php.

Referenced by removeMaterialsObject(), and saveMaterialsObject().

◆ $requested_offset

int ilObjSessionGUI::$requested_offset = 0
protected

Definition at line 66 of file class.ilObjSessionGUI.php.

◆ $requested_ref_id

int ilObjSessionGUI::$requested_ref_id = 0
protected

Definition at line 63 of file class.ilObjSessionGUI.php.

Referenced by addLocatorItems().

◆ $requested_sort_by

string ilObjSessionGUI::$requested_sort_by = ""
protected

Definition at line 67 of file class.ilObjSessionGUI.php.

◆ $requested_sort_order

string ilObjSessionGUI::$requested_sort_order = ""
protected

Definition at line 68 of file class.ilObjSessionGUI.php.

◆ $requested_user_id

int ilObjSessionGUI::$requested_user_id = 0
protected

Definition at line 64 of file class.ilObjSessionGUI.php.

◆ $tabs_gui

ilTabsGUI ilObjSessionGUI::$tabs_gui
protected

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

Referenced by attendanceListObject(), and getTabs().

◆ $toolbar

ilToolbarGUI ilObjSessionGUI::$toolbar
protected

Definition at line 48 of file class.ilObjSessionGUI.php.

Referenced by showJoinRequestButton().

◆ $tpl

ilGlobalTemplateInterface ilObjSessionGUI::$tpl

Definition at line 44 of file class.ilObjSessionGUI.php.

Referenced by attendanceListObject().

◆ $tree

◆ $ui

ILIAS DI UIServices ilObjSessionGUI::$ui
protected

Definition at line 36 of file class.ilObjSessionGUI.php.

◆ $upload

ILIAS FileUpload FileUpload ilObjSessionGUI::$upload
protected

Definition at line 38 of file class.ilObjSessionGUI.php.

Referenced by handleFileUpload().

◆ $user


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