- Go to [Administration ► Site administration ► Users ► Accounts ► User profile fields].
- Create a new 'text input field'.
- Set the shortname to: Capitalised (ensure first letter is capitalsied)
- Set name to 'Capitalised'
- Leave all other settings as default
- Go to [Administration ► Site administration ► Grades ► General settings].
- in 'grade_export_customprofilefields' put 'Capitalised,'
- Go to a course with some students enrolled
- Go to [Administration ► Grade administration ► Export ► Plain text file] and export the gradebook.
Note that you'll get an error about the field:
Note that if you use the uncapitalised version in the gradebook settings the field will not be exported.
So the only way to resolve this problem is to remove capitalisation from shortname.