59 $this->obj_type = $a_type;
72 if(is_object(self::$instance[$a_type]))
74 return self::$instance[$a_type];
98 return array_key_exists($a_field_name,$this->possible_fields);
119 foreach($this->possible_fields as $field => $exportable)
126 return $fields ? $fields : array();
147 $fields[
'login'][
'txt'] = $lng->txt(
'username');
148 $fields[
'login'][
'default'] = 1;
151 $fields[$field][
'txt'] = $lng->txt($field);
152 $fields[$field][
'default'] = 0;
157 include_once
'./Services/Booking/classes/class.ilBookingEntry.php';
160 $GLOBALS[
'lng']->loadLanguageModule(
'dateplaner');
161 $fields[
'consultation_hour'][
'txt'] =
$GLOBALS[
'lng']->txt(
'cal_ch_field_ch');
162 $fields[
'consultation_hour'][
'default'] = 0;
165 include_once
'./Services/User/classes/class.ilUserDefinedFields.php';
170 elseif($this->
getType() ==
'grp')
176 foreach($udf as $field_id => $field)
178 $fields[
'udf_'.$field_id][
'txt'] = $field[
'field_name'];
179 $fields[
'udf_'.$field_id][
'default'] = 0;
183 include_once
'./Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php';
185 foreach($cdf as $def)
187 $fields[
'odf_'.$def->getId()][
'txt'] = $def->getName();
188 $fields[
'odf_'.$def->getId()][
'default'] = 0;
205 $fields[] = $this->lng->txt($field);
207 return implode(
'<br />',$fields);
218 include_once
'./Services/User/classes/class.ilUserProfile.php';
221 $profile->skipGroup(
'settings');
223 foreach($profile->getStandardFields() as $key =>
$data)
227 if(!
$data[
'course_export_hide'])
229 if(isset(
$data[
'course_export_fix_value']) and
$data[
'course_export_fix_value'])
231 $this->possible_fields[$key] =
$data[
'course_export_fix_value'];
235 $this->possible_fields[$key] = 0;
239 elseif($this->
getType() ==
'grp')
241 if(!
$data[
'group_export_hide'])
243 if(isset(
$data[
'group_export_fix_value']) and
$data[
'group_export_fix_value'])
245 $this->possible_fields[$key] = $data[
'group_export_fix_value'];
249 $this->possible_fields[$key] = 0;
254 $settings_all = $this->settings->getAll();
256 $field_part_limit = 5;
260 $field_prefix =
'usr_settings_course_export_';
261 $field_part_limit = 5;
265 $field_prefix =
'usr_settings_group_export_';
266 $field_part_limit = 5;
270 foreach($settings_all as $key => $value)
272 if(stristr($key,$field_prefix) and $value)
275 $field_parts = explode(
'_',$key,$field_part_limit);
276 $field = $field_parts[count($field_parts) - 1];
277 if(array_key_exists($field,$this->possible_fields))
279 $this->possible_fields[$field] = 1;
static hasObjectBookingEntries($a_obj_id, $a_usr_id)
Check if object has assigned consultation hour appointments.
static _getInstance()
Get instance.
getType()
Get object type.
exportableFieldsToInfoString()
Get exportable fields as info string.
getFieldsInfo()
Get informations (exportable) about user data profile fields.
getSelectableFieldsInfo($a_obj_id)
Get selectable fields.
isExportable($a_field_name)
Check if field is exportable.
static _getInstanceByType($a_type)
Get Singleton Instance.
while($lm_rec=$ilDB->fetchAssoc($lm_set)) $data
__construct($a_type)
Private Singleton Constructor.
getExportableFields()
Get Exportable Fields.
read()
Read info about exportable fields.
static _getFields($a_container_id, $a_sort=IL_CDF_SORT_NAME)
Get all fields of a container.