You can use the gradebook’s export feature to download a copy of your course grades at the end of the semester.
Download the Moodle gradebook
From the course home page, click on Grades>Export
Select a file format from the expanded list (If you click on Checklist, it will take you to an error that says “No suitable checklists found. You can then choose from the same list above, i.e. OpenDocument, Plain, etc. We recommend that you use Excel to export the gradebook.)
Add checkmarks beside the grade items you want included in the exported file. To choose all grade items, click the Select all link. Also, if groups or sections are set up, select individual groups if desired. (click on image to enlarge)
Save file to your computer.