ILIAS  release_4-4 Revision
All Data Structures Namespaces Files Functions Variables Modules Pages
ilMemberExport Class Reference

Class for generation of member export files. More...

+ Collaboration diagram for ilMemberExport:

Public Member Functions

 __construct ($a_ref_id, $a_type=self::EXPORT_CSV)
 Constructor. More...
 
 setFilename ($a_file)
 set filename More...
 
 getFilename ()
 get filename More...
 
 getRefId ()
 get ref_id More...
 
 getType ()
 get obj type More...
 
 getExportType ()
 get current export type More...
 
 getObjId ()
 Get obj id. More...
 
 create ()
 Create Export File. More...
 
 getCSVString ()
 toString method More...
 
 createExcel ()
 
 createCSV ()
 Create CSV File. More...
 

Data Fields

const EXPORT_CSV = 1
 
const EXPORT_EXCEL = 2
 

Protected Member Functions

 addCol ($a_value, $a_row, $a_col)
 Write on column. More...
 
 addRow ()
 Add row. More...
 
 getOrderedExportableFields ()
 Get ordered enabled fields. More...
 
 write ()
 Write data. More...
 
 initMembers ()
 Init member object. More...
 

Private Member Functions

 fetchUsers ()
 Fetch all users that will be exported. More...
 
 readCourseData ($a_user_ids, $a_status='member')
 Read All User related course data. More...
 
 readCourseSpecificFieldsData ()
 Read course specific fields data. More...
 
 addCourseField ($a_usr_id, $a_field, $row, $col)
 fill course specific fields More...
 
 addUserDefinedField ($udf_data, $a_field, $row, $col)
 Add user defined fields. More...
 

Private Attributes

 $ref_id
 
 $obj_id
 
 $type
 
 $members
 
 $lng
 
 $settings
 
 $export_type = null
 
 $filename = null
 
 $user_ids = array()
 
 $user_course_data = array()
 
 $user_course_fields = array()
 
 $user_profile_data = array()
 
 $privacy
 

Detailed Description

Class for generation of member export files.

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

/

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

Constructor & Destructor Documentation

◆ __construct()

ilMemberExport::__construct (   $a_ref_id,
  $a_type = self::EXPORT_CSV 
)

Constructor.

public

Definition at line 72 of file class.ilMemberExport.php.

References $lng, ilPrivacySettings\_getInstance(), ilObject\_lookupType(), ilMemberAgreement\_readByObjId(), and initMembers().

73  {
74  global $ilObjDataCache,$lng;
75 
76  $this->lng = $lng;
77 
78  $this->export_type = $a_type;
79 
80  $this->ref_id = $a_ref_id;
81  $this->obj_id = $ilObjDataCache->lookupObjId($this->ref_id);
82  $this->type = ilObject::_lookupType($this->obj_id);
83 
84  $this->initMembers();
85 
86  $this->agreement = ilMemberAgreement::_readByObjId($this->obj_id);
87  $this->settings = new ilUserFormSettings('memexp');
88  $this->privacy = ilPrivacySettings::_getInstance();
89  }
static _readByObjId($a_obj_id)
Read user data by object id.
static _lookupType($a_id, $a_reference=false)
lookup object type
initMembers()
Init member object.
static _getInstance()
Get instance of ilPrivacySettings.
+ Here is the call graph for this function:

Member Function Documentation

◆ addCol()

ilMemberExport::addCol (   $a_value,
  $a_row,
  $a_col 
)
protected

Write on column.

Parameters
object$a_value
object$a_row
object$a_col
Returns

Definition at line 220 of file class.ilMemberExport.php.

References getExportType().

Referenced by addCourseField(), addUserDefinedField(), and write().

221  {
222  switch($this->getExportType())
223  {
224  case self::EXPORT_CSV:
225  $this->csv->addColumn($a_value);
226  break;
227 
228  case self::EXPORT_EXCEL:
229  $this->worksheet->write($a_row,$a_col,$a_value);
230  break;
231  }
232  }
getExportType()
get current export type
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addCourseField()

ilMemberExport::addCourseField (   $a_usr_id,
  $a_field,
  $row,
  $col 
)
private

fill course specific fields

private

Parameters
intusr_id
stringfield
Returns
bool

Definition at line 596 of file class.ilMemberExport.php.

References $row, ilCourseDefinedFieldDefinition\_getFields(), and addCol().

Referenced by write().

597  {
598  if(substr($a_field,0,4) != 'cdf_')
599  {
600  return false;
601  }
602  if((!$this->privacy->courseConfirmationRequired() and ilCourseDefinedFieldDefinition::_getFields($this->obj_id))
603  or $this->agreement[$a_usr_id]['accepted'])
604  {
605  $field_info = explode('_',$a_field);
606  $field_id = $field_info[1];
607  $value = $this->user_course_fields[$a_usr_id][$field_id];
608  #$this->csv->addColumn($value);
609  $this->addCol($value, $row, $col);
610  return true;
611  }
612  #$this->csv->addColumn('');
613  $this->addCol('', $row, $col);
614  return true;
615 
616  }
addCol($a_value, $a_row, $a_col)
Write on column.
static _getFields($a_container_id, $a_sort=IL_CDF_SORT_NAME)
Get all fields of a container.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addRow()

ilMemberExport::addRow ( )
protected

Add row.

Returns

Definition at line 238 of file class.ilMemberExport.php.

References getExportType().

Referenced by write().

239  {
240  switch($this->getExportType())
241  {
242  case self::EXPORT_CSV:
243  $this->csv->addRow();
244  break;
245 
246  case self::EXPORT_EXCEL:
247  break;
248  }
249  }
getExportType()
get current export type
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addUserDefinedField()

ilMemberExport::addUserDefinedField (   $udf_data,
  $a_field,
  $row,
  $col 
)
private

Add user defined fields.

private

Parameters
objectuser defined data object
intfield

Definition at line 626 of file class.ilMemberExport.php.

References $row, and addCol().

Referenced by write().

627  {
628  if(substr($a_field,0,4) != 'udf_')
629  {
630  return false;
631  }
632  if(!$this->privacy->courseConfirmationRequired() or $this->agreement[$udf_data->getUserId()]['accepted'])
633  {
634  $field_info = explode('_',$a_field);
635  $field_id = $field_info[1];
636  $value = $udf_data->get('f_'.$field_id);
637  #$this->csv->addColumn($value);
638  $this->addCol($value, $row, $col);
639  return true;
640  }
641  #$this->csv->addColumn('');
642  $this->addCol('', $row, $col);
643  }
addCol($a_value, $a_row, $a_col)
Write on column.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ create()

ilMemberExport::create ( )

Create Export File.

public

Definition at line 152 of file class.ilMemberExport.php.

References createCSV(), createExcel(), fetchUsers(), and getExportType().

153  {
154  $this->fetchUsers();
155 
156  // DONE: Switch different export types
157  switch($this->getExportType())
158  {
159  case self::EXPORT_CSV:
160  $this->createCSV();
161  break;
162 
163  case self::EXPORT_EXCEL:
164  $this->createExcel();
165  break;
166  }
167  }
createCSV()
Create CSV File.
getExportType()
get current export type
fetchUsers()
Fetch all users that will be exported.
+ Here is the call graph for this function:

◆ createCSV()

ilMemberExport::createCSV ( )

Create CSV File.

public

Definition at line 203 of file class.ilMemberExport.php.

References write().

Referenced by create().

204  {
205  include_once('Services/Utilities/classes/class.ilCSVWriter.php');
206  $this->csv = new ilCSVWriter();
207 
208  $this->write();
209  }
Helper class to generate CSV files.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ createExcel()

ilMemberExport::createExcel ( )
Returns

Definition at line 186 of file class.ilMemberExport.php.

References getFilename(), and write().

Referenced by create().

187  {
188  include_once "./Services/Excel/classes/class.ilExcelUtils.php";
189  include_once "./Services/Excel/classes/class.ilExcelWriterAdapter.php";
190  $adapter = new ilExcelWriterAdapter($this->getFilename(), false);
191  $workbook = $adapter->getWorkbook();
192  $this->worksheet = $workbook->addWorksheet();
193  $this->write();
194  $workbook->close();
195  }
Class ilExcelWriterAdapter.
getFilename()
get filename
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fetchUsers()

ilMemberExport::fetchUsers ( )
private

Fetch all users that will be exported.

private

Definition at line 506 of file class.ilMemberExport.php.

References $user_ids, ilObjUser\_readUsersProfileData(), ilUtil\_sortIds(), readCourseData(), and readCourseSpecificFieldsData().

Referenced by create().

507  {
509 
510  if($this->settings->enabled('admin'))
511  {
512  $this->user_ids = $tmp_ids = $this->members->getAdmins();
513  $this->readCourseData($tmp_ids);
514  }
515  if($this->settings->enabled('tutor'))
516  {
517  $this->user_ids = array_merge($tmp_ids = $this->members->getTutors(),$this->user_ids);
518  $this->readCourseData($tmp_ids);
519  }
520  if($this->settings->enabled('member'))
521  {
522  $this->user_ids = array_merge($tmp_ids = $this->members->getMembers(),$this->user_ids);
523  $this->readCourseData($tmp_ids);
524  }
525  if($this->settings->enabled('subscribers'))
526  {
527  $this->user_ids = array_merge($tmp_ids = $this->members->getSubscribers(),$this->user_ids);
528  $this->readCourseData($tmp_ids,'subscriber');
529  }
530  if($this->settings->enabled('waiting_list'))
531  {
532  include_once('Modules/Course/classes/class.ilCourseWaitingList.php');
533  $waiting_list = new ilCourseWaitingList($this->obj_id);
534  $this->user_ids = array_merge($waiting_list->getUserIds(),$this->user_ids);
535 
536  }
537  // Sort by lastname
538  $this->user_ids = ilUtil::_sortIds($this->user_ids,'usr_data','lastname','usr_id');
539 
540  // Finally read user profile data
541  $this->user_profile_data = ilObjUser::_readUsersProfileData($this->user_ids);
542  }
readCourseData($a_user_ids, $a_status='member')
Read All User related course data.
readCourseSpecificFieldsData()
Read course specific fields data.
static _readUsersProfileData($a_user_ids)
STATIC METHOD get user data of selected users.
static _sortIds($a_ids, $a_table, $a_field, $a_id_name)
Function that sorts ids by a given table field using WHERE IN E.g: __sort(array(6,7),'usr_data','lastname','usr_id') => sorts by lastname.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCSVString()

ilMemberExport::getCSVString ( )

toString method

public

Parameters

Definition at line 176 of file class.ilMemberExport.php.

177  {
178  return $this->csv->getCSVString();
179  }

◆ getExportType()

ilMemberExport::getExportType ( )

get current export type

Returns

Definition at line 132 of file class.ilMemberExport.php.

References $export_type.

Referenced by addCol(), addRow(), and create().

133  {
134  return $this->export_type;
135  }
+ Here is the caller graph for this function:

◆ getFilename()

ilMemberExport::getFilename ( )

get filename

Returns

Definition at line 105 of file class.ilMemberExport.php.

References $filename.

Referenced by createExcel().

106  {
107  return $this->filename;
108  }
+ Here is the caller graph for this function:

◆ getObjId()

ilMemberExport::getObjId ( )

Get obj id.

Returns

Definition at line 141 of file class.ilMemberExport.php.

References $obj_id.

Referenced by initMembers().

142  {
143  return $this->obj_id;
144  }
+ Here is the caller graph for this function:

◆ getOrderedExportableFields()

ilMemberExport::getOrderedExportableFields ( )
protected

Get ordered enabled fields.

public

Parameters

Definition at line 258 of file class.ilMemberExport.php.

References $privacy, ilCourseDefinedFieldDefinition\_getFields(), ilUserDefinedFields\_getInstance(), ilPrivacySettings\_getInstance(), ilExportFieldsInfo\_getInstanceByType(), ilCourseDefinedFieldDefinition\_hasFields(), and ilObject\_lookupType().

Referenced by write().

259  {
260  include_once('Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
261  include_once('Services/PrivacySecurity/classes/class.ilExportFieldsInfo.php');
262  include_once('Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
263  include_once('Services/User/classes/class.ilUserDefinedFields.php');
264 
266 
267  $fields[] = 'role';
268  // Append agreement info
270  if($privacy->courseConfirmationRequired() or ilCourseDefinedFieldDefinition::_hasFields($this->obj_id))
271  {
272  $fields[] = 'agreement';
273  }
274 
275  foreach($field_info->getExportableFields() as $field)
276  {
277  if($this->settings->enabled($field))
278  {
279  $fields[] = $field;
280  }
281  }
282 
284  foreach($udf->getCourseExportableFields() as $field_id => $udf_data)
285  {
286  if($this->settings->enabled('udf_'.$field_id))
287  {
288  $fields[] = 'udf_'.$field_id;
289  }
290  }
291 
292  // Add course specific fields
293  foreach(ilCourseDefinedFieldDefinition::_getFields($this->obj_id) as $field_obj)
294  {
295  if($this->settings->enabled('cdf_'.$field_obj->getId()))
296  {
297  $fields[] = 'cdf_'.$field_obj->getId();
298  }
299  }
300  return $fields ? $fields : array();
301  }
static _getInstance()
Get instance.
static _getInstanceByType($a_type)
Get Singleton Instance.
static _lookupType($a_id, $a_reference=false)
lookup object type
static _hasFields($a_container_id)
Check if there are any define fields.
static _getInstance()
Get instance of ilPrivacySettings.
static _getFields($a_container_id, $a_sort=IL_CDF_SORT_NAME)
Get all fields of a container.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getRefId()

ilMemberExport::getRefId ( )

get ref_id

Returns

Definition at line 114 of file class.ilMemberExport.php.

References $ref_id.

115  {
116  return $this->ref_id;
117  }

◆ getType()

ilMemberExport::getType ( )

get obj type

Returns

Definition at line 123 of file class.ilMemberExport.php.

References $type.

Referenced by initMembers(), and readCourseData().

124  {
125  return $this->type;
126  }
+ Here is the caller graph for this function:

◆ initMembers()

ilMemberExport::initMembers ( )
protected

Init member object.

Returns

Definition at line 649 of file class.ilMemberExport.php.

References ilGroupParticipants\_getInstanceByObjId(), ilCourseParticipants\_getInstanceByObjId(), getObjId(), and getType().

Referenced by __construct().

650  {
651  if($this->getType() == 'crs')
652  {
653  $this->members = ilCourseParticipants::_getInstanceByObjId($this->getObjId());
654  }
655  if($this->getType() == 'grp')
656  {
657  $this->members = ilGroupParticipants::_getInstanceByObjId($this->getObjId());
658  }
659  return true;
660  }
getObjId()
Get obj id.
static _getInstanceByObjId($a_obj_id)
Get singleton instance.
static _getInstanceByObjId($a_obj_id)
Get singleton instance.
getType()
get obj type
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ readCourseData()

ilMemberExport::readCourseData (   $a_user_ids,
  $a_status = 'member' 
)
private

Read All User related course data.

private

Definition at line 550 of file class.ilMemberExport.php.

References getType(), IL_CRS_ADMIN, IL_CRS_MEMBER, IL_CRS_TUTOR, IL_GRP_ADMIN, and IL_GRP_MEMBER.

Referenced by fetchUsers().

551  {
552  foreach($a_user_ids as $user_id)
553  {
554  // Read course related data
555  if($this->members->isAdmin($user_id))
556  {
557  $this->user_course_data[$user_id]['role'] = $this->getType() == 'crs' ? IL_CRS_ADMIN : IL_GRP_ADMIN;
558  }
559  elseif($this->members->isTutor($user_id))
560  {
561  $this->user_course_data[$user_id]['role'] = IL_CRS_TUTOR;
562  }
563  elseif($this->members->isMember($user_id))
564  {
565  $this->user_course_data[$user_id]['role'] = $this->getType() == 'crs' ? IL_CRS_MEMBER : IL_GRP_MEMBER;
566  }
567  else
568  {
569  $this->user_course_data[$user_id]['role'] = 'subscriber';
570  }
571  }
572  }
const IL_GRP_ADMIN
const IL_CRS_TUTOR
const IL_GRP_MEMBER
const IL_CRS_MEMBER
const IL_CRS_ADMIN
Base class for course and group participants.
getType()
get obj type
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ readCourseSpecificFieldsData()

ilMemberExport::readCourseSpecificFieldsData ( )
private

Read course specific fields data.

private

Parameters

Definition at line 581 of file class.ilMemberExport.php.

References ilCourseUserData\_getValuesByObjId().

Referenced by fetchUsers().

582  {
583  include_once('Modules/Course/classes/Export/class.ilCourseUserData.php');
584  $this->user_course_fields = ilCourseUserData::_getValuesByObjId($this->obj_id);
585  }
static _getValuesByObjId($a_obj_id)
Get values by obj_id (for all users)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setFilename()

ilMemberExport::setFilename (   $a_file)

set filename

Parameters
object$a_file
Returns

Definition at line 96 of file class.ilMemberExport.php.

97  {
98  $this->filename = $a_file;
99  }

◆ write()

ilMemberExport::write ( )
protected

Write data.

Returns

Definition at line 307 of file class.ilMemberExport.php.

References $GLOBALS, $row, $usr_id, ilCourseDefinedFieldDefinition\_getFields(), ilUserDefinedFields\_getInstance(), ilCourseDefinedFieldDefinition\_lookupName(), addCol(), addCourseField(), addRow(), addUserDefinedField(), ilDatePresentation\formatPeriod(), ilFormat\formatUnixTime(), getOrderedExportableFields(), IL_CAL_UNIX, IL_CRS_ADMIN, IL_CRS_MEMBER, IL_CRS_TUTOR, IL_GRP_ADMIN, IL_GRP_MEMBER, ilBookingEntry\lookupManagedBookingsForObject(), and ilDatePresentation\setUseRelativeDates().

Referenced by createCSV(), and createExcel().

308  {
309  // Add header line
310  $row = 0;
311  $col = 0;
312  foreach($all_fields = $this->getOrderedExportableFields() as $field)
313  {
314  switch($field)
315  {
316  case 'role':
317  #$this->csv->addColumn($this->lng->txt($this->getType().'_role_status'));
318  $this->addCol($this->lng->txt($this->getType().'_role_status'), $row, $col++);
319  break;
320  case 'agreement':
321  #$this->csv->addColumn($this->lng->txt('ps_agreement_accepted'));
322  $this->addCol($this->lng->txt('ps_agreement_accepted'), $row, $col++);
323  break;
324  case 'consultation_hour':
325  $this->lng->loadLanguageModule('dateplaner');
326  $this->addCol($this->lng->txt('cal_ch_field_ch'), $row, $col++);
327  break;
328 
329  default:
330  if(substr($field,0,4) == 'udf_')
331  {
332  $field_id = explode('_',$field);
333  include_once('Services/User/classes/class.ilUserDefinedFields.php');
335  $def = $udf->getDefinition($field_id[1]);
336  #$this->csv->addColumn($def['field_name']);
337  $this->addCol($def['field_name'], $row, $col++);
338  }
339  elseif(substr($field,0,4) == 'cdf_')
340  {
341  $field_id = explode('_',$field);
342  #$this->csv->addColumn(ilCourseDefinedFieldDefinition::_lookupName($field_id[1]));
343  $this->addCol(ilCourseDefinedFieldDefinition::_lookupName($field_id[1]),$row,$col++);
344  }
345  else
346  {
347  #$this->csv->addColumn($this->lng->txt($field));
348  $this->addCol($this->lng->txt($field), $row, $col++);
349  }
350  break;
351  }
352  }
353  #$this->csv->addRow();
354  $this->addRow();
355  // Add user data
356  foreach($this->user_ids as $usr_id)
357  {
358  $row++;
359  $col = 0;
360 
361  $udf_data = new ilUserDefinedData($usr_id);
362  foreach($all_fields as $field)
363  {
364  // Handle course defined fields
365  if($this->addUserDefinedField($udf_data,$field,$row,$col))
366  {
367  $col++;
368  continue;
369  }
370 
371  if($this->addCourseField($usr_id,$field,$row,$col))
372  {
373  $col++;
374  continue;
375  }
376 
377  switch($field)
378  {
379  case 'role':
380  switch($this->user_course_data[$usr_id]['role'])
381  {
382  case IL_CRS_ADMIN:
383  #$this->csv->addColumn($this->lng->txt('crs_admin'));
384  $this->addCol($this->lng->txt('crs_admin'), $row, $col++);
385  break;
386 
387  case IL_CRS_TUTOR:
388  #$this->csv->addColumn($this->lng->txt('crs_tutor'));
389  $this->addCol($this->lng->txt('crs_tutor'), $row, $col++);
390  break;
391 
392  case IL_CRS_MEMBER:
393  #$this->csv->addColumn($this->lng->txt('crs_member'));
394  $this->addCol($this->lng->txt('crs_member'), $row, $col++);
395  break;
396 
397  case IL_GRP_ADMIN:
398  #$this->csv->addColumn($this->lng->txt('il_grp_admin'));
399  $this->addCol($this->lng->txt('il_grp_admin'), $row, $col++);
400  break;
401 
402  case IL_GRP_MEMBER:
403  #$this->csv->addColumn($this->lng->txt('il_grp_member'));
404  $this->addCol($this->lng->txt('il_grp_member'), $row, $col++);
405  break;
406 
407  case 'subscriber':
408  #$this->csv->addColumn($this->lng->txt($this->getType().'_subscriber'));
409  $this->addCol($this->lng->txt($this->getType().'_subscriber'), $row, $col++);
410  break;
411 
412  default:
413  #$this->csv->addColumn($this->lng->txt('crs_waiting_list'));
414  $this->addCol($this->lng->txt('crs_waiting_list'), $row, $col++);
415  break;
416 
417  }
418  break;
419 
420  case 'agreement':
421  if(isset($this->agreement[$usr_id]))
422  {
423  if($this->agreement[$usr_id]['accepted'])
424  {
425  #$this->csv->addColumn(ilFormat::formatUnixTime($this->agreement[$usr_id]['acceptance_time'],true));
426  $this->addCol(ilFormat::formatUnixTime($this->agreement[$usr_id]['acceptance_time'],true),$row,$col++);
427  }
428  else
429  {
430  #$this->csv->addColumn($this->lng->txt('ps_not_accepted'));
431  $this->addCol($this->lng->txt('ps_not_accepted'),$row,$col++);
432  }
433  }
434  else
435  {
436  #$this->csv->addColumn($this->lng->txt('ps_not_accepted'));
437  $this->addCol($this->lng->txt('ps_not_accepted'),$row,$col++);
438  }
439  break;
440 
441  // These fields are always enabled
442  case 'username':
443  #$this->csv->addColumn($this->user_profile_data[$usr_id]['login']);
444  $this->addCol($this->user_profile_data[$usr_id]['login'],$row,$col++);
445  break;
446 
447  case 'firstname':
448  case 'lastname':
449  #$this->csv->addColumn($this->user_profile_data[$usr_id][$field]);
450  $this->addCol($this->user_profile_data[$usr_id][$field],$row,$col++);
451  break;
452 
453  case 'consultation_hour':
454  include_once './Services/Booking/classes/class.ilBookingEntry.php';
455  $bookings = ilBookingEntry::lookupManagedBookingsForObject($this->obj_id, $GLOBALS['ilUser']->getId());
456 
457  $uts = array();
458  foreach((array) $bookings[$usr_id] as $ut)
459  {
462  new ilDateTime($ut['dt'],IL_CAL_UNIX),
463  new ilDateTime($ut['dtend'],IL_CAL_UNIX)
464  );
465  if(strlen($ut['explanation']))
466  {
467  $tmp .= ' '.$ut['explanation'];
468  }
469  $uts[] = $tmp;
470  }
471  $uts_str = implode(',',$uts);
472  $this->addCol($uts_str, $row, $col++);
473  break;
474 
475  default:
476  // Check aggreement
477  if((!$this->privacy->courseConfirmationRequired() and !ilCourseDefinedFieldDefinition::_getFields($this->obj_id))
478  or $this->agreement[$usr_id]['accepted'])
479  {
480  #$this->csv->addColumn($this->user_profile_data[$usr_id][$field]);
481  $this->addCol($this->user_profile_data[$usr_id][$field],$row,$col++);
482  }
483  else
484  {
485  #$this->csv->addColumn('');
486  $this->addCol('', $row, $col++);
487  }
488  break;
489 
490  }
491  }
492  #$this->csv->addRow();
493  $this->addRow();
494  }
495 
496  }
static _getInstance()
Get instance.
Class ilUserDefinedData.
getOrderedExportableFields()
Get ordered enabled fields.
const IL_GRP_ADMIN
static lookupManagedBookingsForObject($a_obj_id, $a_usr_id)
Lookup bookings for own and managed consultation hours of an object.
addUserDefinedField($udf_data, $a_field, $row, $col)
Add user defined fields.
static formatPeriod(ilDateTime $start, ilDateTime $end)
Format a period of two date Shows: 14.
static setUseRelativeDates($a_status)
set use relative dates
const IL_CRS_TUTOR
const IL_CAL_UNIX
const IL_GRP_MEMBER
const IL_CRS_MEMBER
$GLOBALS['ct_recipient']
addCol($a_value, $a_row, $a_col)
Write on column.
formatUnixTime($ut, $with_time=false)
Date and time handling
const IL_CRS_ADMIN
Base class for course and group participants.
addCourseField($a_usr_id, $a_field, $row, $col)
fill course specific fields
static _lookupName($a_field_id)
Lookup field name.
static _getFields($a_container_id, $a_sort=IL_CDF_SORT_NAME)
Get all fields of a container.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $export_type

ilMemberExport::$export_type = null
private

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

Referenced by getExportType().

◆ $filename

ilMemberExport::$filename = null
private

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

Referenced by getFilename().

◆ $lng

ilMemberExport::$lng
private

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

Referenced by __construct().

◆ $members

ilMemberExport::$members
private

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

◆ $obj_id

ilMemberExport::$obj_id
private

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

Referenced by getObjId().

◆ $privacy

ilMemberExport::$privacy
private

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

Referenced by getOrderedExportableFields().

◆ $ref_id

ilMemberExport::$ref_id
private

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

Referenced by getRefId().

◆ $settings

ilMemberExport::$settings
private

Definition at line 55 of file class.ilMemberExport.php.

◆ $type

ilMemberExport::$type
private

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

Referenced by getType().

◆ $user_course_data

ilMemberExport::$user_course_data = array()
private

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

◆ $user_course_fields

ilMemberExport::$user_course_fields = array()
private

Definition at line 62 of file class.ilMemberExport.php.

◆ $user_ids

ilMemberExport::$user_ids = array()
private

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

Referenced by fetchUsers().

◆ $user_profile_data

ilMemberExport::$user_profile_data = array()
private

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

◆ EXPORT_CSV

const ilMemberExport::EXPORT_CSV = 1

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

◆ EXPORT_EXCEL

const ilMemberExport::EXPORT_EXCEL = 2

Definition at line 45 of file class.ilMemberExport.php.

Referenced by ilMemberExportGUI\exportExcel().


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