Note: You are currently viewing documentation for Moodle 2.4. Up-to-date documentation for the latest stable version of Moodle may be available here: Grade export.
Grades can be exported to Excel spreadsheet, OpenDocument spreadsheet, plain text file or XML file.
Grade export is NOT intended for students.
How to export grades
- Choose an export format from the gradebook dropdown menu.
- Set options as required.
- If the course uses groups, select whether to export grades for all participants or for a particular group.
- Select the grade items to be included. Note that ID numbers are required for all activities for XML file export. An ID number field can be found in the common module settings for each activity.
- Click the submit button.
- After previewing the data on the following page, click the download button.
XML file export
To export grades to XML file, you need to ensure that:
- Users have ID numbers (an optional field in the user profile)
- Activities have ID numbers (an optional field in the common module settings)
Default grade export settings
The grade export display type and grade export decimal points site-wide defaults may be set by an administrator in Site administration > Grades > General settings.
User profile fields export
in Moodle 2.4! In Moodle 2.4 onwards, an administrator can specify user profile fields and custom profile fields to be included in the grade export in Site administration > Grades > General settings.
Grade publishing is a way of importing and exporting grades via a URL without being logged in to Moodle. Grade publishing is intended for administrators only, due to the security implications.
Grade publishing is disabled by default. It can be enabled by an administrator by checking the gradepublishing box in Settings > Site administration > Grades > General settings. Users with grade publishing capabilities (normally administrators only) are then provided with grade export publishing settings.
To determine the URL for exporting grades, follow an export format link e.g. XML file, select a user key or 'Create a new key' to generate a new one, select other options as required, then click the Submit button. A download URL e.g.
will then be provided.
Grade export capabilities
- Publish ODS grade export
- Use OpenDocument grade export
- Publish text file grade export
- Use text file grade export
- Publish XLS grade export
- Use Excel grade export
- Publish XML grade export
- Use XML grade export
Tips and tricks
- Export grades in a spreadsheet format. Then copy and paste that information into another file that has worksheet ("raw grades"). Create other worksheets which are custom reports which take their data from "raw grades". This works if graded activities are not moved around to different positions in the course. This allows you to create a standard printed report(s). For example a compact landscape report of all students and all grades for each activity, a report of just quizes, another of lessons, another of assignments. A pivot table of students by scores, generated from a report worksheet, which gets its data from the raw data.
- Mailmerge exported grades into custom documents. For example, a document that is given to a department to file as a proof of training, with scores for every subject quiz.