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/User/classes/class.ilUserDefinedFields.php';
162 elseif($this->
getType() ==
'grp')
168 foreach($udf as $field_id => $field)
170 $fields[
'udf_'.$field_id][
'txt'] = $field[
'field_name'];
171 $fields[
'udf_'.$field_id][
'default'] = 0;
175 include_once
'./Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php';
177 foreach($cdf as $def)
179 $fields[
'odf_'.$def->getId()][
'txt'] = $def->getName();
180 $fields[
'odf_'.$def->getId()][
'default'] = 0;
197 $fields[] = $this->lng->txt($field);
199 return implode(
'<br />',$fields);
210 include_once
'./Services/User/classes/class.ilUserProfile.php';
213 $profile->skipGroup(
'settings');
215 foreach($profile->getStandardFields() as $key =>
$data)
219 if(!
$data[
'course_export_hide'])
221 if(isset(
$data[
'course_export_fix_value']) and
$data[
'course_export_fix_value'])
223 $this->possible_fields[$key] =
$data[
'course_export_fix_value'];
227 $this->possible_fields[$key] = 0;
231 elseif($this->
getType() ==
'grp')
233 if(!
$data[
'group_export_hide'])
235 if(isset(
$data[
'group_export_fix_value']) and
$data[
'group_export_fix_value'])
237 $this->possible_fields[$key] = $data[
'group_export_fix_value'];
241 $this->possible_fields[$key] = 0;
246 $settings_all = $this->settings->getAll();
248 $field_part_limit = 5;
252 $field_prefix =
'usr_settings_course_export_';
253 $field_part_limit = 5;
257 $field_prefix =
'usr_settings_group_export_';
258 $field_part_limit = 5;
262 foreach($settings_all as $key => $value)
264 if(stristr($key,$field_prefix) and $value)
267 $field_parts = explode(
'_',$key,$field_part_limit);
268 $field = $field_parts[count($field_parts) - 1];
269 if(array_key_exists($field,$this->possible_fields))
271 $this->possible_fields[$field] = 1;