Capabilities/mod/coursework:canexportfinalgrades
From MoodleDocs
This permission allows the user to have a button to download a spreadsheet with all grades for all students which have been graded.
They can download this at any time, it is not reliant on the grades being released to the Moodle Gradebook.