ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
ilCourseMembershipGUI Class Reference

Member-tab content. More...

+ Inheritance diagram for ilCourseMembershipGUI:
+ Collaboration diagram for ilCourseMembershipGUI:

Public Member Functions

 filterUserIdsByRbacOrPositionOfCurrentUser (array $a_user_ids)
 Filter user ids by access. More...
 
 assignMembers (array $a_usr_ids, string $a_type)
 callback from repository search gui More...
 
 getLocalTypeRole (bool $a_translation=false)
 
 readMemberData (array $usr_ids, array $columns, bool $skip_names=false)
 
 getAttendanceListUserData (int $user_id, array $filters=[])
 
- Public Member Functions inherited from ilMembershipGUI
 __construct (ilObjectGUI $repository_gui, ilObject $repository_obj)
 
 getParentGUI ()
 
 getParentObject ()
 
 getMembersObject ()
 
 filterUserIdsByRbacOrPositionOfCurrentUser (array $a_user_ids)
 Filter user ids by access. More...
 
 executeCommand ()
 
 getAttendanceListUserData (int $user_id, array $filters=[])
 
 updateParticipants ()
 update members More...
 
 createMailSignature ()
 Create Mail signature. More...
 
 addMemberTab (ilTabsGUI $tabs, bool $a_is_participant=false)
 
 readMemberData (array $usr_ids, array $columns)
 Required for member table guis. More...
 
 getLocalRoles ()
 
 confirmAssignSubscribers ()
 Show subscription confirmation. More...
 
 confirmRefuseSubscribers ()
 Refuse subscriber confirmation. More...
 
 assignSubscribers ()
 Do assignment of subscription request. More...
 
 confirmAssignFromWaitingList ()
 Assign from waiting list (confirmatoin) More...
 
 assignFromWaitingList ()
 Assign from waiting list. More...
 
 confirmRefuseFromList ()
 Refuse from waiting list (confirmation) More...
 

Protected Member Functions

 getMailMemberRoles ()
 
 getMailContextOptions ()
 
 showDeleteParticipantsConfirmationWithLinkedCourses (array $participants)
 Show deletion confirmation with linked courses. More...
 
 deleteParticipantsWithLinkedCourses ()
 
 initParticipantStatusFromPostFor (string $item_key)
 
 updateParticipantsStatus ()
 
 initParticipantTableGUI ()
 
 initEditParticipantTableGUI (array $participants)
 
 initParticipantTemplate ()
 
 updateLPFromStatus (int $a_member_id, bool $a_passed)
 
 initWaitingList ()
 
 getDefaultRole ()
 
 deliverCertificate ()
 
 getPrintMemberData (array $a_members)
 
- Protected Member Functions inherited from ilMembershipGUI
 initParticipantsFromPost ()
 
 initMemberIdFromGet ()
 
 initSubscribersFromPost ()
 
 initWaitingListIdsFromPost ()
 
 getLanguage ()
 
 getCtrl ()
 
 getLogger ()
 
 getMailMemberRoles ()
 
 checkPermissionBool (string $a_permission, string $a_cmd='', string $a_type='', int $a_ref_id=0)
 
 checkRbacOrPositionAccessBool (string $a_rbac_perm, string $a_pos_perm, int $a_ref_id=0)
 
 checkPermission (string $a_permission, string $a_cmd="")
 Check permission If not granted redirect to parent gui. More...
 
 checkRbacOrPermissionAccess (string $a_rbac_perm, string $a_pos_perm)
 check rbac or position access More...
 
 canAddOrSearchUsers ()
 Check if current user is allowed to add / search users. More...
 
 participants ()
 Show participant table, subscriber table, wating list table;. More...
 
 getParticipantTableTitle ()
 
 participantsApplyFilter ()
 Apply filter for participant table. More...
 
 participantsResetFilter ()
 reset participants filter More...
 
 editMember ()
 Edit one participant. More...
 
 editParticipants (array $post_participants=array())
 Edit participants. More...
 
 updateLPFromStatus (int $usr_id, bool $has_passed)
 
 confirmDeleteParticipants ()
 Show confirmation screen for participants deletion. More...
 
 deleteParticipants ()
 
 sendMailToSelectedUsers ()
 
 getMailContextOptions ()
 
 membersMap ()
 Members map. More...
 
 mailMembersBtn ()
 
 showParticipantsToolbar ()
 Show participants toolbar. More...
 
 showMemberExportToolbarButton (ilToolbarGUI $toolbar, ?string $a_back_cmd=null, bool $a_separator=false)
 
 showMailToMemberToolbarButton (ilToolbarGUI $toolbar, ?string $a_back_cmd=null, bool $a_separator=false)
 Show mail to member toolbar button. More...
 
 getMailButtonLabel ()
 
 getDefaultCommand ()
 
 getMemberTabName ()
 
 setSubTabs (ilTabsGUI $tabs)
 Set sub tabs. More...
 
 parseSubscriberTable ()
 Parse table of subscription request. More...
 
 initSubscriberTable ()
 
 refuseSubscribers ()
 
 parseWaitingListTable ()
 Parse table of subscription request. More...
 
 refuseFromList ()
 refuse from waiting list More...
 
 addToClipboard ()
 Add selected users to user clipboard. More...
 
 getDefaultRole ()
 
 activateSubTab (string $a_sub_tab)
 
 printMembers ()
 
 printMembersOutput ()
 print members output More...
 
 printForMembersOutput ()
 print members output More...
 
 jump2UsersGallery ()
 
 initAttendanceList (bool $a_for_members=false)
 

Additional Inherited Members

- Protected Attributes inherited from ilMembershipGUI
GlobalHttpState $http
 
Factory $refinery
 
ilLanguage $lng
 
ilCtrlInterface $ctrl
 
ilLogger $logger
 
ilGlobalTemplateInterface $tpl
 
ilAccessHandler $access
 
ilParticipants $participants = null
 
ilObjUser $user
 
ilErrorHandling $error
 
ilTabsGUI $tabs
 
ilToolbarGUI $toolbar
 
ilRbacSystem $rbacsystem
 
ilRbacReview $rbacreview
 
ilTree $tree
 
Profile $profile
 
array $member_data = []
 

Detailed Description

Member Function Documentation

◆ assignMembers()

ilCourseMembershipGUI::assignMembers ( array  $a_usr_ids,
string  $a_type 
)

callback from repository search gui

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

158 : bool
159 {
160 $a_type = (int) $a_type;
161 if (!$this->checkRbacOrPositionAccessBool('manage_members', 'manage_members')) {
162 $this->error->raiseError($this->lng->txt("msg_no_perm_read"), $this->error->FATAL);
163 }
164
165 $a_usr_ids = array_diff($a_usr_ids, [ANONYMOUS_USER_ID]);
166 if ($a_usr_ids === []) {
167 $this->tpl->setOnScreenMessage('failure', $this->lng->txt("crs_no_users_selected"), true);
168 return false;
169 }
170 $a_usr_ids = $this->filterUserIdsByRbacOrPositionOfCurrentUser($a_usr_ids);
171
172 $added_users = 0;
173 foreach ($a_usr_ids as $user_id) {
174 if (!$tmp_obj = ilObjectFactory::getInstanceByObjId($user_id, false)) {
175 continue;
176 }
177 if ($this->getMembersObject()->isAssigned($user_id)) {
178 continue;
179 }
180 switch ($a_type) {
181 case $this->getParentObject()->getDefaultMemberRole():
182 $this->getMembersObject()->add($user_id, ilParticipants::IL_CRS_MEMBER);
183 break;
184 case $this->getParentObject()->getDefaultTutorRole():
185 $this->getMembersObject()->add($user_id, ilParticipants::IL_CRS_TUTOR);
186 break;
187 case $this->getParentObject()->getDefaultAdminRole():
188 $this->getMembersObject()->add($user_id, ilParticipants::IL_CRS_ADMIN);
189 break;
190 default:
191 if (in_array($a_type, $this->getParentObject()->getLocalCourseRoles(true))) {
192 $this->getMembersObject()->add($user_id, ilParticipants::IL_CRS_MEMBER);
193 $this->getMembersObject()->updateRoleAssignments($user_id, (array) $a_type);
194 } else {
195 ilLoggerFactory::getLogger('crs')->notice('Can\'t find role with id .' . $a_type . ' to assign users.');
196 $this->tpl->setOnScreenMessage('failure', $this->lng->txt("crs_cannot_find_role"), true);
197 return false;
198 }
199 break;
200 }
202
203 $this->getParentObject()->checkLPStatusSync($user_id);
204
205 ++$added_users;
206 }
207 if ($added_users) {
208 $this->tpl->setOnScreenMessage('success', $this->lng->txt("crs_users_added"), true);
209 $this->ctrl->redirect($this, 'participants');
210 }
211 $this->tpl->setOnScreenMessage('info', $this->lng->txt("crs_users_already_assigned"), true);
212 return false;
213 }
filterUserIdsByRbacOrPositionOfCurrentUser(array $a_user_ids)
Filter user ids by access.
static getLogger(string $a_component_id)
Get component logger.
checkRbacOrPositionAccessBool(string $a_rbac_perm, string $a_pos_perm, int $a_ref_id=0)
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id
const ANONYMOUS_USER_ID
Definition: constants.php:27

References $user_id, ANONYMOUS_USER_ID, ilMembershipGUI\checkRbacOrPositionAccessBool(), ILIAS\Repository\ctrl(), filterUserIdsByRbacOrPositionOfCurrentUser(), ilObjectFactory\getInstanceByObjId(), ilLoggerFactory\getLogger(), ilMembershipGUI\getMembersObject(), ilMembershipGUI\getParentObject(), ilParticipants\IL_CRS_ADMIN, ilParticipants\IL_CRS_MEMBER, ilParticipants\IL_CRS_TUTOR, ILIAS\Repository\int(), ILIAS\Repository\lng(), and ilCourseMembershipMailNotification\TYPE_ADMISSION_MEMBER.

+ Here is the call graph for this function:

◆ deleteParticipantsWithLinkedCourses()

ilCourseMembershipGUI::deleteParticipantsWithLinkedCourses ( )
protected

Definition at line 90 of file class.ilCourseMembershipGUI.php.

90 : void
91 {
93
94 if (!is_array($participants) || $participants === []) {
95 $this->tpl->setOnScreenMessage('failure', $this->lng->txt("no_checkbox"), true);
96 $this->ctrl->redirect($this, 'participants');
97 }
98
99 // If the user doesn't have the edit_permission and is not administrator, he may not remove
100 // members who have the course administrator role
101 if (
102 !$this->access->checkAccess('edit_permission', '', $this->getParentObject()->getRefId()) &&
103 !$this->getMembersObject()->isAdmin($this->user->getId())
104 ) {
105 foreach ($participants as $part) {
106 if ($this->getMembersObject()->isAdmin($part)) {
107 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('msg_no_perm_perm'), true);
108 $this->ctrl->redirect($this, 'participants');
109 }
110 }
111 }
112
114 $this->tpl->setOnScreenMessage('failure', 'Error deleting participants.', true);
115 $this->ctrl->redirect($this, 'participants');
116 } else {
117 foreach ($this->initParticipantsFromPost() as $usr_id) {
118 $mail_type = 0;
119 switch ($this->getParentObject()->getType()) {
120 case 'crs':
122 break;
123 }
124 $this->getMembersObject()->sendNotification($mail_type, $usr_id);
125 }
126 }
127
128 $refs = [];
129 if ($this->http->wrapper()->post()->has('refs')) {
130 $refs = $this->http->wrapper()->post()->retrieve(
131 'refs',
132 $this->refinery->kindlyTo()->dictOf(
133 $this->refinery->kindlyTo()->dictOf(
134 $this->refinery->kindlyTo()->int()
135 )
136 )
137 );
138 }
139
140 // Delete course reference assignments
141 foreach ($refs as $usr_id => $usr_info) {
142 foreach ((array) $usr_info as $course_ref_id => $tmp) {
143 $part = ilParticipants::getInstance($course_ref_id);
144 $part->delete($usr_id);
145 }
146 }
147 $this->tpl->setOnScreenMessage(
148 'success',
149 $this->lng->txt($this->getParentObject()->getType() . "_members_deleted"),
150 true
151 );
152 $this->ctrl->redirect($this, "participants");
153 }
ilParticipants $participants
static getInstance(int $a_ref_id)
static http()
Fetches the global http state from ILIAS.

References ilMembershipGUI\$participants, ILIAS\Repository\access(), ILIAS\Repository\ctrl(), ilMembershipGUI\deleteParticipants(), ilParticipants\getInstance(), ilMembershipGUI\getMembersObject(), ilMembershipGUI\getParentObject(), ILIAS\FileDelivery\http(), ilMembershipGUI\initParticipantsFromPost(), ILIAS\Repository\lng(), ILIAS\Repository\refinery(), and ilCourseMembershipMailNotification\TYPE_DISMISS_MEMBER.

+ Here is the call graph for this function:

◆ deliverCertificate()

ilCourseMembershipGUI::deliverCertificate ( )
protected

Definition at line 345 of file class.ilCourseMembershipGUI.php.

345 : void
346 {
347 $this->getParentGUI()->deliverCertificateObject();
348 }

References ilMembershipGUI\getParentGUI().

+ Here is the call graph for this function:

◆ filterUserIdsByRbacOrPositionOfCurrentUser()

ilCourseMembershipGUI::filterUserIdsByRbacOrPositionOfCurrentUser ( array  $a_user_ids)

Filter user ids by access.

Parameters
int[]$a_user_ids
Returns
int[]

Reimplemented from ilMembershipGUI.

Definition at line 43 of file class.ilCourseMembershipGUI.php.

43 : array
44 {
45 return $GLOBALS['DIC']->access()->filterUserIdsByRbacOrPositionOfCurrentUser(
46 'manage_members',
47 'manage_members',
48 $this->getParentObject()->getRefId(),
49 $a_user_ids
50 );
51 }
$GLOBALS["DIC"]
Definition: wac.php:66

References $GLOBALS, and ilMembershipGUI\getParentObject().

Referenced by assignMembers().

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

◆ getAttendanceListUserData()

ilCourseMembershipGUI::getAttendanceListUserData ( int  $user_id,
array  $filters = [] 
)

Reimplemented from ilMembershipGUI.

Definition at line 454 of file class.ilCourseMembershipGUI.php.

454 : array
455 {
456 if (is_array($this->member_data) && array_key_exists($user_id, $this->member_data)) {
457 return $this->member_data[$user_id];
458 }
459 return [];
460 }

References $user_id.

◆ getDefaultRole()

ilCourseMembershipGUI::getDefaultRole ( )
protected

Reimplemented from ilMembershipGUI.

Definition at line 340 of file class.ilCourseMembershipGUI.php.

340 : ?int
341 {
342 return $this->getParentGUI()->getObject()->getDefaultMemberRole();
343 }

References ilMembershipGUI\getParentGUI().

+ Here is the call graph for this function:

◆ getLocalTypeRole()

ilCourseMembershipGUI::getLocalTypeRole ( bool  $a_translation = false)
Todo:
refactor delete

Definition at line 320 of file class.ilCourseMembershipGUI.php.

320 : array
321 {
322 return $this->getParentObject()->getLocalCourseRoles($a_translation);
323 }

References ilMembershipGUI\getParentObject().

+ Here is the call graph for this function:

◆ getMailContextOptions()

ilCourseMembershipGUI::getMailContextOptions ( )
protected

◆ getMailMemberRoles()

ilCourseMembershipGUI::getMailMemberRoles ( )
protected

Reimplemented from ilMembershipGUI.

Definition at line 33 of file class.ilCourseMembershipGUI.php.

34 {
35 return new ilMailMemberCourseRoles();
36 }
Class ilAbstractMailMemberRoles.
Class ilMailMemberCourseRoles.

◆ getPrintMemberData()

ilCourseMembershipGUI::getPrintMemberData ( array  $a_members)
protected

Definition at line 350 of file class.ilCourseMembershipGUI.php.

350 : array
351 {
352 $this->lng->loadLanguageModule('trac');
353
354 $is_admin = true;
356
357 if ($privacy->enabledCourseAccessTimes()) {
359 }
360
361 $show_tracking =
363 if ($show_tracking) {
365 $show_tracking = $olp->isActive();
366 }
367
368 if ($show_tracking) {
372 }
373
374 $profile_data = ilObjUser::_readUsersProfileData($a_members);
375
376 // course defined fields
378
379 $udf_data = $this->profile->getAllUserDefinedFields();
380 $print_member = [];
381 foreach ($a_members as $member_id) {
382 // GET USER OBJ
383 if ($tmp_obj = ilObjectFactory::getInstanceByObjId($member_id, false)) {
384 foreach ($udf_data as $field) {
385 $print_member[$member_id]['udf_' . $field->getIdentifier()] = (string) $field->retrieveValueFromUser($tmp_obj);
386 }
387
388 foreach ((array) ($cdfs[$member_id] ?? []) as $cdf_field => $cdf_value) {
389 $print_member[$member_id]['cdf_' . $cdf_field] = (string) $cdf_value;
390 }
391
392 foreach ((array) $profile_data[$member_id] as $field => $value) {
393 $print_member[$member_id][$field] = $value;
394 }
395
396 $print_member[$member_id]['login'] = $tmp_obj->getLogin();
397 $print_member[$member_id]['name'] = $tmp_obj->getLastname() . ', ' . $tmp_obj->getFirstname();
398
399 if ($this->getMembersObject()->isAdmin($member_id)) {
400 $print_member[$member_id]['role'] = $this->lng->txt("il_crs_admin");
401 } elseif ($this->getMembersObject()->isTutor($member_id)) {
402 $print_member[$member_id]['role'] = $this->lng->txt("il_crs_tutor");
403 } elseif ($this->getMembersObject()->isMember($member_id)) {
404 $print_member[$member_id]['role'] = $this->lng->txt("il_crs_member");
405 }
406 if ($this->getMembersObject()->isAdmin($member_id) || $this->getMembersObject()->isTutor($member_id)) {
407 if ($this->getMembersObject()->isNotificationEnabled($member_id)) {
408 $print_member[$member_id]['status'] = $this->lng->txt("crs_notify");
409 } else {
410 $print_member[$member_id]['status'] = $this->lng->txt("crs_no_notify");
411 }
412 } else {
413 if ($this->getMembersObject()->isBlocked($member_id)) {
414 $print_member[$member_id]['status'] = $this->lng->txt("crs_blocked");
415 } else {
416 $print_member[$member_id]['status'] = $this->lng->txt("crs_unblocked");
417 }
418 }
419
420 if ($is_admin) {
421 $print_member[$member_id]['passed'] = $this->getMembersObject()->hasPassed($member_id) ?
422 $this->lng->txt('crs_member_passed') :
423 $this->lng->txt('crs_member_not_passed');
424 }
425 if ($privacy->enabledCourseAccessTimes()) {
426 if (isset($progress[$member_id]['ts']) && $progress[$member_id]['ts']) {
428 $print_member[$member_id]['access'] = ilDatePresentation::formatDate(new ilDateTime(
429 $progress[$member_id]['ts'],
431 ));
433 } else {
434 $print_member[$member_id]['access'] = $this->lng->txt('no_date');
435 }
436 }
437 if ($show_tracking) {
438 if (in_array($member_id, $completed)) {
439 $print_member[$member_id]['progress'] = $this->lng->txt(ilLPStatus::LP_STATUS_COMPLETED);
440 } elseif (in_array($member_id, $in_progress)) {
441 $print_member[$member_id]['progress'] = $this->lng->txt(ilLPStatus::LP_STATUS_IN_PROGRESS);
442 } elseif (in_array($member_id, $failed)) {
443 $print_member[$member_id]['progress'] = $this->lng->txt(ilLPStatus::LP_STATUS_FAILED);
444 } else {
445 $print_member[$member_id]['progress'] = $this->lng->txt(ilLPStatus::LP_STATUS_NOT_ATTEMPTED);
446 }
447 }
448 }
449 }
450 $print_order = (string) (ilSession::get('crs_print_order') ?? '');
451 return ilArrayUtil::sortArray($print_member, 'name', $print_order, false, true);
452 }
const IL_CAL_UNIX
static sortArray(array $array, string $a_array_sortby_key, string $a_array_sortorder="asc", bool $a_numeric=false, bool $a_keep_keys=false)
static _getValuesByObjId(int $a_obj_id)
static setUseRelativeDates(bool $a_status)
set use relative dates
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false, ?ilObjUser $user=null,)
@classDescription Date and time handling
static _lookupCompletedForObject(int $a_obj_id, ?array $a_user_ids=null)
static _lookupFailedForObject(int $a_obj_id, ?array $a_user_ids=null)
static _lookupInProgressForObject(int $a_obj_id, ?array $a_user_ids=null)
const string LP_STATUS_COMPLETED
const string LP_STATUS_IN_PROGRESS
const string LP_STATUS_NOT_ATTEMPTED
const string LP_STATUS_FAILED
static _lookupProgressByObjId(int $a_obj_id)
lookup progress for a specific object
static _readUsersProfileData(array $a_user_ids)
static getInstance(int $obj_id)
static get(string $a_var)

References ilObjUserTracking\_enabledLearningProgress(), ilObjUserTracking\_enabledUserRelatedData(), ilCourseUserData\_getValuesByObjId(), ilLPStatusWrapper\_lookupCompletedForObject(), ilLPStatusWrapper\_lookupFailedForObject(), ilLPStatusWrapper\_lookupInProgressForObject(), ilLearningProgress\_lookupProgressByObjId(), ilObjUser\_readUsersProfileData(), ilDatePresentation\formatDate(), ilSession\get(), ILIAS\Survey\Mode\getId(), ilPrivacySettings\getInstance(), ilObjectLP\getInstance(), ilObjectFactory\getInstanceByObjId(), ilMembershipGUI\getMembersObject(), ilMembershipGUI\getParentObject(), IL_CAL_UNIX, ILIAS\Repository\lng(), ilLPStatus\LP_STATUS_COMPLETED, ilLPStatus\LP_STATUS_FAILED, ilLPStatus\LP_STATUS_IN_PROGRESS, ilLPStatus\LP_STATUS_NOT_ATTEMPTED, ILIAS\Repository\profile(), ilDatePresentation\setUseRelativeDates(), and ilArrayUtil\sortArray().

+ Here is the call graph for this function:

◆ initEditParticipantTableGUI()

ilCourseMembershipGUI::initEditParticipantTableGUI ( array  $participants)
protected

@noinspection PhpParamsInspection

Definition at line 302 of file class.ilCourseMembershipGUI.php.

303 {
305 $table = new ilCourseEditParticipantsTableGUI($this, $this->getParentObject());
306 $table->setTitle($this->lng->txt($this->getParentObject()->getType() . '_header_edit_members'));
307 $table->setData($this->getParentGUI()->readMemberData($participants));
308
309 return $table;
310 }
readMemberData(array $usr_ids, array $columns, bool $skip_names=false)

References ilMembershipGUI\getParentGUI(), ilMembershipGUI\getParentObject(), ILIAS\Repository\lng(), and readMemberData().

+ Here is the call graph for this function:

◆ initParticipantStatusFromPostFor()

ilCourseMembershipGUI::initParticipantStatusFromPostFor ( string  $item_key)
protected

Definition at line 215 of file class.ilCourseMembershipGUI.php.

215 : array
216 {
217 if ($this->http->wrapper()->post()->has($item_key)) {
218 return $this->http->wrapper()->post()->retrieve(
219 $item_key,
220 $this->refinery->kindlyTo()->listOf(
221 $this->refinery->kindlyTo()->int()
222 )
223 );
224 }
225 return [];
226 }

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

Referenced by updateParticipantsStatus().

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

◆ initParticipantTableGUI()

ilCourseMembershipGUI::initParticipantTableGUI ( )
protected

Definition at line 281 of file class.ilCourseMembershipGUI.php.

282 {
283 $show_tracking =
285 if ($show_tracking) {
287 $show_tracking = $olp->isActive();
288 }
289
290 $timings_enabled =
291 (ilObjectActivation::hasTimings($this->getParentObject()->getRefId()) && ($this->getParentObject()->getViewMode() == ilCourseConstants::IL_CRS_VIEW_TIMING));
292
294 $this,
295 $this->getParentObject(),
296 $show_tracking,
297 $timings_enabled,
298 $this->getParentObject()->getStatusDetermination() == ilObjCourse::STATUS_DETERMINATION_LP
299 );
300 }
const int STATUS_DETERMINATION_LP
static hasTimings(int $ref_id)
Check if there is any active timing (in subtree)

References ilObjUserTracking\_enabledLearningProgress(), ilObjUserTracking\_enabledUserRelatedData(), ILIAS\Survey\Mode\getId(), ilObjectLP\getInstance(), ilMembershipGUI\getParentObject(), ilObjectActivation\hasTimings(), ilCourseConstants\IL_CRS_VIEW_TIMING, and ilObjCourse\STATUS_DETERMINATION_LP.

+ Here is the call graph for this function:

◆ initParticipantTemplate()

ilCourseMembershipGUI::initParticipantTemplate ( )
protected

Definition at line 312 of file class.ilCourseMembershipGUI.php.

312 : void
313 {
314 $this->tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.crs_edit_members.html', 'components/ILIAS/Course');
315 }

◆ initWaitingList()

ilCourseMembershipGUI::initWaitingList ( )
protected

Definition at line 335 of file class.ilCourseMembershipGUI.php.

336 {
337 return new ilCourseWaitingList($this->getParentObject()->getId());
338 }

References ILIAS\Survey\Mode\getId(), and ilMembershipGUI\getParentObject().

+ Here is the call graph for this function:

◆ readMemberData()

ilCourseMembershipGUI::readMemberData ( array  $usr_ids,
array  $columns,
bool  $skip_names = false 
)

Definition at line 325 of file class.ilCourseMembershipGUI.php.

325 : array
326 {
327 return $this->getParentGUI()->readMemberData($usr_ids, $columns, $skip_names);
328 }

References ilMembershipGUI\getParentGUI().

Referenced by initEditParticipantTableGUI().

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

◆ showDeleteParticipantsConfirmationWithLinkedCourses()

ilCourseMembershipGUI::showDeleteParticipantsConfirmationWithLinkedCourses ( array  $participants)
protected

Show deletion confirmation with linked courses.

Parameters
int[]participants

Definition at line 74 of file class.ilCourseMembershipGUI.php.

74 : void
75 {
76 $this->tpl->setOnScreenMessage('question', $this->lng->txt('crs_ref_delete_confirmation_info'));
77
79 $this,
80 $this->getParentObject(),
81 'confirmDeleteParticipants'
82 );
83 $table->init();
84 $table->setParticipants($participants);
85 $table->parse();
86
87 $this->tpl->setContent($table->getHTML());
88 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References ilMembershipGUI\$participants, ilMembershipGUI\getParentObject(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ updateLPFromStatus()

ilCourseMembershipGUI::updateLPFromStatus ( int  $a_member_id,
bool  $a_passed 
)
protected

Reimplemented from ilMembershipGUI.

Definition at line 330 of file class.ilCourseMembershipGUI.php.

330 : void
331 {
332 $this->getParentGUI()->updateLPFromStatus($a_member_id, $a_passed);
333 }

References ilMembershipGUI\getParentGUI().

Referenced by updateParticipantsStatus().

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

◆ updateParticipantsStatus()

ilCourseMembershipGUI::updateParticipantsStatus ( )
protected

Definition at line 228 of file class.ilCourseMembershipGUI.php.

228 : void
229 {
230 $visible_members = [];
231 if ($this->http->wrapper()->post()->has('visible_member_ids')) {
232 $visible_members = $this->http->wrapper()->post()->retrieve(
233 'visible_member_ids',
234 $this->refinery->kindlyTo()->listOf(
235 $this->refinery->kindlyTo()->int()
236 )
237 );
238 }
239 $passed = $this->initParticipantStatusFromPostFor('passed');
240 $blocked = $this->initParticipantStatusFromPostFor('blocked');
241 $contact = $this->initParticipantStatusFromPostFor('contact');
242 $notification = $this->initParticipantStatusFromPostFor('notification');
243
244 foreach ($visible_members as $member_id) {
245 if ($this->access->checkAccess("grade", "", $this->getParentObject()->getRefId())) {
246 $this->getMembersObject()->updatePassed($member_id, in_array($member_id, $passed), true);
247 $this->updateLPFromStatus($member_id, in_array($member_id, $passed));
248 }
249
250 if ($this->getMembersObject()->isAdmin($member_id) || $this->getMembersObject()->isTutor($member_id)) {
251 // remove blocked
252 $this->getMembersObject()->updateBlocked($member_id, false);
253 $this->getMembersObject()->updateNotification($member_id, in_array($member_id, $notification));
254 $this->getMembersObject()->updateContact($member_id, in_array($member_id, $contact));
255 } else {
256 // send notifications => unblocked
257 if ($this->getMembersObject()->isBlocked($member_id) && !in_array($member_id, $blocked)) {
258 $this->getMembersObject()->sendNotification(
260 $member_id
261 );
262 }
263 // => blocked
264 if (!$this->getMembersObject()->isBlocked($member_id) && in_array($member_id, $blocked)) {
265 $this->getMembersObject()->sendNotification(
267 $member_id
268 );
269 }
270
271 // normal member => remove notification, contact
272 $this->getMembersObject()->updateNotification($member_id, false);
273 $this->getMembersObject()->updateContact($member_id, false);
274 $this->getMembersObject()->updateBlocked($member_id, in_array($member_id, $blocked));
275 }
276 }
277 $this->tpl->setOnScreenMessage('success', $this->lng->txt('settings_saved'), true);
278 $this->ctrl->redirect($this, 'participants');
279 }
updateLPFromStatus(int $a_member_id, bool $a_passed)
initParticipantStatusFromPostFor(string $item_key)

References ILIAS\Repository\access(), ILIAS\Repository\ctrl(), ilMembershipGUI\getMembersObject(), ILIAS\FileDelivery\http(), initParticipantStatusFromPostFor(), ILIAS\Repository\lng(), ILIAS\Repository\refinery(), ilCourseMembershipMailNotification\TYPE_BLOCKED_MEMBER, ilCourseMembershipMailNotification\TYPE_UNBLOCKED_MEMBER, and updateLPFromStatus().

+ Here is the call graph for this function:

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