function course_cck_kv_fields in Course 6
Get an array of field options that can be used as course enrollment types.
1 call to course_cck_kv_fields()
- course_user_type_settings_form in includes/
course.settings.inc - Form for configuring user types.
File
- includes/
course.settings.inc, line 195 - Administrative settings for Course module.
Code
function course_cck_kv_fields() {
$field_options = array();
$field_options[] = '- none -';
if (module_exists('content')) {
foreach (content_fields() as $key => $field) {
// If field isn't a profile field with allowed values, do not allow it to be selectable. It wouldn't work anyways.
if (optionwidgets_options($field)) {
$field_options[$key] = $field['widget']['label'];
}
}
}
return $field_options;
}