In order to export grades using XML format users and activities must have an ID number. However, if you don't select any activity, it will export grades because it is validating only if the user ID number is not empty.
It was discovered while testing
- Create a course, an activity and enrol few users.
- Edit these users and the activity and give then an ID number
- Give these users some grades.
- Go to Grades > Export > XML file and unselect all activities checkboxes and click Download.
You should not be able to see any grade, since you didn't select any activity.
The report ignores the checkboxes and exports few grades.
I also notice the report exports grades with closing tag without the opening tag. (see assignment)