5 include_once
'./Services/Membership/classes/class.ilMembershipGUI.php';
35 return $GLOBALS[
'DIC']->access()->filterUserIdsByRbacOrPositionOfCurrentUser(
48 $context_options = [];
56 return $context_options;
71 $rbacsystem = $DIC[
'rbacsystem'];
75 $ilErr->raiseError($this->lng->txt(
"msg_no_perm_read"),
$ilErr->FATAL);
78 if (!count($a_usr_ids)) {
86 foreach ($a_usr_ids as $user_id) {
121 ilUtil::sendSuccess($this->lng->txt(
"crs_users_added"),
true);
122 $this->ctrl->redirect($this,
'participants');
135 $ilAccess = $DIC[
'ilAccess'];
138 $rbacadmin = $DIC[
'rbacadmin'];
140 $visible_members = (array)
$_POST[
'visible_member_ids'];
141 $passed = (array)
$_POST[
'passed'];
142 $blocked = (array)
$_POST[
'blocked'];
143 $contact = (array)
$_POST[
'contact'];
144 $notification = (array)
$_POST[
'notification'];
146 foreach ($visible_members as $member_id) {
147 if ($ilAccess->checkAccess(
"grade",
"", $this->getParentObject()->getRefId())) {
148 $this->
getMembersObject()->updatePassed($member_id, in_array($member_id, $passed),
true);
155 $this->
getMembersObject()->updateNotification($member_id, in_array($member_id, $notification));
156 $this->
getMembersObject()->updateContact($member_id, in_array($member_id, $contact));
159 if ($this->
getMembersObject()->isBlocked($member_id) && !in_array($member_id, $blocked)) {
163 if (!$this->
getMembersObject()->isBlocked($member_id) && in_array($member_id, $blocked)) {
170 $this->
getMembersObject()->updateBlocked($member_id, in_array($member_id, $blocked));
175 ilUtil::sendSuccess($this->lng->txt(
'settings_saved'),
true);
176 $this->ctrl->redirect($this,
'participants');
185 include_once
'./Services/Tracking/classes/class.ilObjUserTracking.php';
189 if ($show_tracking) {
190 include_once(
'./Services/Object/classes/class.ilObjectLP.php');
192 $show_tracking = $olp->isActive();
195 include_once(
'./Services/Object/classes/class.ilObjectActivation.php');
201 include_once
'./Modules/Course/classes/class.ilCourseParticipantsTableGUI.php';
218 include_once
'./Modules/Course/classes/class.ilCourseEditParticipantsTableGUI.php';
220 $table->setTitle($this->lng->txt($this->getParentObject()->getType() .
'_header_edit_members'));
231 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.crs_edit_members.html',
'Modules/Course');
247 return $this->
getParentGUI()->updateLPFromStatus($a_member_id, $a_passed);
256 include_once
'./Modules/Course/classes/class.ilCourseWaitingList.php';
266 return $this->
getParentGUI()->object->getDefaultMemberRole();
275 return $this->
getParentGUI()->deliverCertificateObject();
286 $ilAccess = $DIC[
'ilAccess'];
289 $lng->loadLanguageModule(
'trac');
292 include_once(
'./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
295 if ($privacy->enabledCourseAccessTimes()) {
296 include_once(
'./Services/Tracking/classes/class.ilLearningProgress.php');
300 include_once
'./Services/Tracking/classes/class.ilObjUserTracking.php';
303 if ($show_tracking) {
304 include_once(
'./Services/Object/classes/class.ilObjectLP.php');
306 $show_tracking = $olp->isActive();
309 if ($show_tracking) {
310 include_once
'Services/Tracking/classes/class.ilLPStatusWrapper.php';
319 include_once(
'Modules/Course/classes/Export/class.ilCourseUserData.php');
322 foreach ($a_members as $member_id) {
326 include_once
'./Services/User/classes/class.ilUserDefinedData.php';
328 foreach ($udf_data->getAll() as $field => $value) {
329 list(
$f, $field_id) = explode(
'_', $field);
330 $print_member[$member_id][
'udf_' . $field_id] = (string) $value;
333 foreach ((array) $cdfs[$member_id] as $cdf_field => $cdf_value) {
334 $print_member[$member_id][
'cdf_' . $cdf_field] = (string) $cdf_value;
337 foreach ((array) $profile_data[$member_id] as $field => $value) {
338 $print_member[$member_id][$field] = $value;
341 $print_member[$member_id][
'login'] = $tmp_obj->getLogin();
342 $print_member[$member_id][
'name'] = $tmp_obj->getLastname() .
', ' . $tmp_obj->getFirstname();
345 $print_member[$member_id][
'role'] = $this->lng->txt(
"il_crs_admin");
347 $print_member[$member_id][
'role'] = $this->lng->txt(
"il_crs_tutor");
349 $print_member[$member_id][
'role'] = $this->lng->txt(
"il_crs_member");
353 $print_member[$member_id][
'status'] = $this->lng->txt(
"crs_notify");
355 $print_member[$member_id][
'status'] = $this->lng->txt(
"crs_no_notify");
359 $print_member[$member_id][
'status'] = $this->lng->txt(
"crs_blocked");
361 $print_member[$member_id][
'status'] = $this->lng->txt(
"crs_unblocked");
366 $print_member[$member_id][
'passed'] = $this->
getMembersObject()->hasPassed($member_id) ?
367 $this->lng->txt(
'crs_member_passed') :
368 $this->lng->txt(
'crs_member_not_passed');
370 if ($privacy->enabledCourseAccessTimes()) {
371 if (isset($progress[$member_id][
'ts'])
and $progress[$member_id][
'ts']) {
376 $print_member[$member_id][
'access'] = $this->lng->txt(
'no_date');
379 if ($show_tracking) {
380 if (in_array($member_id, $completed)) {
382 } elseif (in_array($member_id, $in_progress)) {
384 } elseif (in_array($member_id,
$failed)) {
401 if (is_array($this->member_data) && array_key_exists($a_user_id, $this->member_data)) {
402 return $this->member_data[$a_user_id];
static sortArray( $array, $a_array_sortby, $a_array_sortorder=0, $a_numeric=false, $a_keep_keys=false)
sortArray
readMemberData(array $usr_ids, array $columns)
Required for member table guis.
getLocalTypeRole($a_translation=false)
Base class for member tab content.
getMembersObject()
Get member object.
static hasTimings($a_ref_id)
Check if there is any active timing (in subtree)
static _getValuesByObjId($a_obj_id)
Get values by obj_id (for all users)
const LP_STATUS_NOT_ATTEMPTED
updateParticipantsStatus()
=> save button in member table
static _lookupFailedForObject($a_obj_id, $a_user_ids=null)
Get failed users for object.
static setUseRelativeDates($a_status)
set use relative dates
const STATUS_DETERMINATION_LP
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date public.
static _readUsersProfileData($a_user_ids)
STATIC METHOD get user data of selected users.
const LP_STATUS_IN_PROGRESS
initParticipantTableGUI()
deliverCertificate()
Deliver certificate for an user on the member list.
static _enabledUserRelatedData()
check wether user related tracking is enabled or not
static _enabledLearningProgress()
check wether learing progress is enabled or not
updateLPFromStatus($a_member_id, $a_passed)
Update lp from status.
Class ilMailMemberCourseRoles.
static _lookupProgressByObjId($a_obj_id)
lookup progress for a specific object
initParticipantTemplate()
Init participant view template.
const IL_CRS_ADMIN
Base class for course and group participants.
assignMembers(array $a_usr_ids, $a_type)
callback from repository search gui ilRbacSystem $rbacsystem
getParentGUI()
Get parent gui.
filterUserIdsByRbacOrPositionOfCurrentUser($a_user_ids)
Filter user ids by access.
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
initEditParticipantTableGUI(array $participants)
init edit participants table gui
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static _lookupInProgressForObject($a_obj_id, $a_user_ids=null)
Get in progress users for object.
getPrintMemberData($a_members)
Get print member data.
getAttendanceListUserData($a_user_id)
Callback from attendance list.
static getLogger($a_component_id)
Get component logger.
static _getInstance()
Get instance of ilPrivacySettings.
getParentObject()
Get parent object.
if(empty($password)) $table
static _lookupCompletedForObject($a_obj_id, $a_user_ids=null)
Get completed users for object.
const LP_STATUS_COMPLETED
static getInstance($a_obj_id)
initWaitingList()
init waiting list
checkRbacOrPositionAccessBool($a_rbac_perm, $a_pos_perm, $a_ref_id=0)
Check if rbac or position access is granted.
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.