19 declare(strict_types=1);
45 protected ILIAS\
UI\Factory $ui_factory
58 if ($may_manage_members) {
69 $back_cmd =
'participants';
71 $back_cmd =
'jump2UsersGallery';
75 $ilTabs = $DIC[
'ilTabs'];
76 $ilTabs->clearTargets();
77 $ilTabs->setBackTarget(
78 $this->
lng->txt(
'back'),
79 $this->
ctrl->getLinkTarget($this, $back_cmd)
83 $form = $list->initForm(
'printMembersOutput');
84 $this->tpl->setContent($form->getHTML());
90 return $this->request_wrapper->retrieve(
"back_cmd",
$r->byTrying([
$r->kindlyTo()->string(),
$r->always(
"members")]));
100 return $this->
access->filterUserIdsByRbacOrPositionOfCurrentUser(
116 if (count($user_ids) == 0) {
117 $this->
lng->loadLanguageModule(
'search');
118 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'search_err_user_not_exist'),
true);
123 foreach ($user_ids as $new_member) {
124 $new_member = (
int) $new_member;
126 if ($members->isAssigned($new_member)) {
131 case $object->getDefaultAdminRole():
133 $members->sendNotification(
139 case $object->getDefaultMemberRole():
141 $members->sendNotification(
148 if (in_array($type, $object->getLocalLearningSequenceRoles(
true))) {
150 $members->updateRoleAssignments($new_member, array($type));
153 'Can not find role with id .' . $type .
' to assign users.' 155 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"lso_cannot_find_role"),
true);
159 $members->sendNotification(
169 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"lso_msg_member_assigned"),
true);
171 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'lso_users_already_assigned'),
true);
174 $this->
ctrl->redirect($this,
'participants');
186 "visible_member_ids",
188 $this->refinery->kindlyTo()->listOf($this->
refinery->kindlyTo()->int()),
197 if ($this->post_wrapper->has(
'notification')) {
198 $notification = $this->post_wrapper->retrieve(
205 if ($members->isAdmin($participant)) {
209 $members->updateNotification($participant,
false);
212 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'settings_saved'),
true);
213 $this->
ctrl->redirect($this,
'participants');
221 $this->obj_user_tracking,
222 $this->privacy_settings,
232 $obj = parent::getParentObject();
234 throw new Exception(
'Invalid class type ' . get_class($obj) .
". Expected ilObjLearningSequence.");
245 $this->privacy_settings
248 $table->setTitle($this->
lng->txt($this->getParentObject()->getType() .
'_header_edit_members'));
259 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.lso_edit_members.html',
'components/ILIAS/LearningSequence');
267 return $this->
getParentObject()->getLocalLearningSequenceRoles($translation);
310 if (array_key_exists(
'access_time',
$data)) {
335 $this->
ctrl->getLinkTarget($this,
'participants'),
342 $this->
ctrl->getLinkTargetByClass(array(get_class($this),
'ilUsersGalleryGUI')),
349 $this->
ctrl->getLinkTargetByClass(array(get_class($this),
'ilUsersGalleryGUI')),
359 'auto_complete_name' => $this->
lng->txt(
'user'),
362 'submit_name' => $this->
lng->txt(
'add'),
366 $search_params = [
'crs',
'grp'];
367 $parent_container = $this->obj->getParentObjectInfo(
368 $this->obj->getRefId(),
371 if (!is_null($parent_container)) {
372 $container_id = $parent_container[
'ref_id'];
373 $toolbar_entries[
'add_from_container'] = $container_id;
382 $this->
toolbar->addSeparator();
385 $this->ui_factory->button()->standard(
386 $this->
lng->txt($this->getParentObject()->getType() .
"_print_list"),
387 $this->
ctrl->getLinkTarget($this,
'printMembers')
updateNotification(int $a_usr_id, bool $a_notification)
Update notification status.
getPrintMemberData(array $members)
Base class for member tab content.
static getLogger(string $a_component_id)
Get component logger.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Interface Observer Contains several chained tasks and infos about them.
checkPermission(string $a_permission, string $a_cmd="")
Check permission If not granted redirect to parent gui.
ilObjectGUI $repository_gui
initEditParticipantTableGUI(array $participants)
addSubTabTarget(string $a_text, string $a_link, $a_cmd="", $a_cmdClass="", string $a_frame="", bool $a_activate=false, bool $a_dir_text=false)
getAttendanceListUserData(int $user_id, array $filters=[])
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
const TYPE_ADMISSION_MEMBER
Singleton class that stores all privacy settings.
Class ilObjectGUI Basic methods of all Output classes.
updateParticipantsStatus()
save in participants table
initParticipantTemplate()
Init participant view template.
initAttendanceList(bool $a_for_members=false)
ilParticipants $participants
showMailToMemberToolbarButton(ilToolbarGUI $toolbar, ?string $a_back_cmd=null, bool $a_separator=false)
Show mail to member toolbar button.
__construct(ilObjectGUI $repository_gui, protected ilObject $obj, protected ilObjUserTracking $obj_user_tracking, protected ilPrivacySettings $privacy_settings, protected ilRbacReview $rbac_review, protected ilSetting $settings, protected ilToolbarGUI $toolbar, protected ILIAS\HTTP\Wrapper\RequestWrapper $request_wrapper, protected ArrayBasedRequestWrapper $post_wrapper, protected ILIAS\Refinery\Factory $refinery, protected ILIAS\UI\Factory $ui_factory)
showParticipantsToolbar()
filterUserIdsByRbacOrPositionOfCurrentUser(array $a_user_ids)
Filter user ids by access.
getLocalTypeRole(bool $translation=false)
readMemberData(array $usr_ids, ?array $columns=null)
static fillAutoCompleteToolbar(object $parent_object, ?ilToolbarGUI $toolbar=null, array $a_options=[], bool $a_sticky=false)
array( auto_complete_name = $lng->txt('user'), auto_complete_size = 15, user_type = array(ilCoursePar...
__construct(Container $dic, ilPlugin $plugin)
participants()
Show participant table, subscriber table, wating list table;.
assignMembers(array $user_ids, string $type)
checkRbacOrPositionAccessBool(string $a_rbac_perm, string $a_pos_perm, int $a_ref_id=0)
setSubTabs(ilTabsGUI $tabs)
Class ilAbstractMailMemberRoles.
GUI class for learning sequence membership features.
initParticipantTableGUI()
Class ArrayBasedRequestWrapper.