示例#1
0
 /**
  * Method to get the field options.
  *
  * @return	array	The field option objects.
  * @since	1.6
  */
 protected function getOptions()
 {
     $options = array();
     $fields = array('firstname', 'lastname', 'email', 'icq', 'skype', 'yahoo', 'aim', 'msn', 'phone1', 'phone2', 'institution', 'department', 'address', 'city', 'country', 'lang', 'timezone', 'idnumber', 'description');
     foreach ($fields as $field) {
         $option['value'] = $field;
         $option['text'] = $field;
         $options[] = $option;
     }
     $moodle_custom_fields = JoomdleHelperMappings::get_moodle_fields();
     foreach ($moodle_custom_fields as $mf) {
         $option['value'] = "cf_" . $mf['id'];
         $option['text'] = $mf['name'];
         $options[] = $option;
     }
     return $options;
 }