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(
'login');
148 $fields[
'login'][
'default'] = 1;
151 $fields[$field][
'txt'] = $lng->txt($field);
152 $fields[$field][
'default'] = 0;
157 include_once
'./Services/User/classes/class.ilUserDefinedFields.php';
160 foreach($udf as $field_id => $field)
162 $fields[
'udf_'.$field_id][
'txt'] = $field[
'field_name'];
163 $fields[
'udf_'.$field_id][
'default'] = 0;
166 include_once
'./Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php';
168 foreach($cdf as $def)
170 $fields[
'odf_'.$def->getId()][
'txt'] = $def->getName();
171 $fields[
'odf_'.$def->getId()][
'default'] = 0;
188 $fields[] = $this->lng->txt($field);
190 return implode(
'<br />',$fields);
201 include_once
'./Services/User/classes/class.ilUserProfile.php';
204 $profile->skipGroup(
'settings');
206 foreach($profile->getStandardFields() as $key =>
$data)
210 if(!
$data[
'course_export_hide'])
212 if(isset(
$data[
'course_export_fix_value']) and
$data[
'course_export_fix_value'])
214 $this->possible_fields[$key] =
$data[
'course_export_fix_value'];
218 $this->possible_fields[$key] = 0;
222 elseif($this->
getType() ==
'grp')
224 if(!
$data[
'group_export_hide'])
226 if(isset(
$data[
'group_export_fix_value']) and
$data[
'group_export_fix_value'])
228 $this->possible_fields[$key] = $data[
'group_export_fix_value'];
232 $this->possible_fields[$key] = 0;
237 $settings_all = $this->settings->getAll();
242 $field_prefix =
'usr_settings_course_export_';
246 $field_prefix =
'usr_settings_group_export_';
250 foreach($settings_all as $key => $value)
252 if(stristr($key,$field_prefix) and $value)
254 $field_parts = explode(
'_',$key);
255 $field = $field_parts[count($field_parts) - 1];
256 if(array_key_exists($field,$this->possible_fields))
258 $this->possible_fields[$field] = 1;