4 include_once(
'./Services/Table/classes/class.ilTable2GUI.php');
34 $a_parent_obj,$a_type =
'admin',
45 $this->lng->loadLanguageModule(
'grp');
46 $this->lng->loadLanguageModule(
'trac');
49 $this->type = $a_type;
50 $this->role = $a_role_id;
52 include_once(
'./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
55 $this->
setId(
'grp_'.$a_type.
'_'.$this->getRole().
'_'.$a_parent_obj->object->getId());
63 $this->
addColumn($this->lng->txt(
'name'),
'lastname',
'20%');
68 $this->
addColumn($all_cols[$col][
'txt'],$col);
71 if($this->show_learning_progress)
73 $this->
addColumn($this->lng->txt(
'learning_progress'),
'progress');
76 if($this->privacy->enabledGroupAccessTimes())
78 $this->
addColumn($this->lng->txt(
'last_access'),
'access_time_unix');
80 if($this->type ==
'admin')
84 $this->
addColumn($this->lng->txt(
'grp_notification'),
'notification');
87 elseif($this->type ==
'member')
97 $this->
addColumn($this->lng->txt(
''),
'optional');
100 $this->
setRowTemplate(
"tpl.show_participants_row.html",
"Modules/Group");
107 $this->
enable(
'select_all');
134 if(self::$all_columns)
139 include_once
'./Services/PrivacySecurity/classes/class.ilExportFieldsInfo.php';
141 self::$all_columns = $ef->getSelectableFieldsInfo($this->
getParentObject()->object->getId());
155 global $ilUser,$ilAccess;
157 $this->tpl->setVariable(
'VAL_ID',$a_set[
'usr_id']);
158 $this->tpl->setVariable(
'VAL_NAME',$a_set[
'lastname'].
', '.$a_set[
'firstname']);
159 if(!$ilAccess->checkAccessOfUser($a_set[
'usr_id'],
'read',
'',$this->getParentObject()->object->getRefId()) and
160 is_array($info = $ilAccess->getInfo()))
162 $this->tpl->setCurrentBlock(
'access_warning');
163 $this->tpl->setVariable(
'PARENT_ACCESS',$info[0][
'text']);
164 $this->tpl->parseCurrentBlock();
169 $this->tpl->setCurrentBlock(
'access_warning');
170 $this->tpl->setVariable(
'PARENT_ACCESS',$this->lng->txt(
'usr_account_inactive'));
171 $this->tpl->parseCurrentBlock();
180 $a_set[
'gender'] = $a_set[
'gender'] ? $this->lng->txt(
'gender_'.$a_set[
'gender']) :
'';
181 $this->tpl->setCurrentBlock(
'custom_fields');
182 $this->tpl->setVariable(
'VAL_CUST',$a_set[$field]);
183 $this->tpl->parseCurrentBlock();
188 $this->tpl->setCurrentBlock(
'custom_fields');
189 $this->tpl->setVariable(
'VAL_CUST',$a_set[$field]);
190 $this->tpl->parseCurrentBlock();
194 $this->tpl->setCurrentBlock(
'custom_fields');
195 $this->tpl->setVariable(
'VAL_CUST',isset($a_set[$field]) ? (
string) $a_set[$field] :
'');
196 $this->tpl->parseCurrentBlock();
201 if($this->privacy->enabledGroupAccessTimes())
203 $this->tpl->setVariable(
'VAL_ACCESS',$a_set[
'access_time']);
206 if($this->show_learning_progress)
208 $this->tpl->setCurrentBlock(
'lp');
209 switch($a_set[
'progress'])
212 $this->tpl->setVariable(
'LP_STATUS_ALT',$this->lng->txt($a_set[
'progress']));
217 $this->tpl->setVariable(
'LP_STATUS_ALT',$this->lng->txt($a_set[
'progress']));
222 $this->tpl->setVariable(
'LP_STATUS_ALT',$this->lng->txt($a_set[
'progress']));
227 $this->tpl->setVariable(
'LP_STATUS_ALT',$this->lng->txt($a_set[
'progress']));
232 $this->tpl->parseCurrentBlock();
236 if($this->type ==
'admin')
238 $this->tpl->setVariable(
'VAL_POSTNAME',
'admins');
239 $this->tpl->setVariable(
'VAL_NOTIFICATION_ID',$a_set[
'usr_id']);
240 $this->tpl->setVariable(
'VAL_NOTIFICATION_CHECKED',$a_set[
'notification'] ?
'checked="checked"' :
'');
242 elseif($this->type ==
'member')
244 $this->tpl->setVariable(
'VAL_POSTNAME',
'members');
248 $this->tpl->setVariable(
'VAL_POSTNAME',
'roles');
251 $this->ctrl->setParameter($this->parent_obj,
'member_id',$a_set[
'usr_id']);
252 $this->tpl->setVariable(
'LINK_NAME',$this->ctrl->getLinkTarget($this->parent_obj,
'editMember'));
253 $this->tpl->setVariable(
'LINK_TXT',$this->lng->txt(
'edit'));
254 $this->ctrl->clearParameters($this->parent_obj);
256 $this->tpl->setVariable(
'VAL_LOGIN',$a_set[
'login']);
266 include_once
'./Services/User/classes/class.ilUserQuery.php';
269 unset($additional_fields[
"firstname"]);
270 unset($additional_fields[
"lastname"]);
271 unset($additional_fields[
"last_login"]);
272 unset($additional_fields[
"access_until"]);
287 $udf_ids = $usr_data_fields = $odf_ids = array();
288 foreach($additional_fields as $field)
290 if(substr($field,0,3) ==
'udf')
292 $udf_ids[] = substr($field,4);
295 if(substr($field,0,3) ==
'odf')
297 $odf_ids[] = substr($field,4);
301 $usr_data_fields[] = $field;
323 include_once
'./Services/User/classes/class.ilUserDefinedData.php';
332 foreach($fields as $field_id => $value)
334 $a_user_data[
$usr_id][
'udf_'.$field_id] = $value;
341 include_once
'./Modules/Course/classes/Export/class.ilCourseUserData.php';
350 foreach($fields as $field_id => $value)
354 $a_user_data[
$usr_id][
'odf_'.$field_id] = $value;
360 foreach($usr_data[
'set'] as $user)
368 foreach($usr_data_fields as $field)
370 $a_user_data[$user[
'usr_id']][$field] = $user[$field] ? $user[$field] :
'';
373 return $this->
setData($a_user_data);
383 if(!self::$confirmation_required)
387 if(!self::$export_allowed)
391 return in_array($a_usr_id,self::$accepted_ids);
401 if(self::$accepted_ids !== NULL)
409 include_once
'Services/Membership/classes/class.ilMemberAgreement.php';