Print a Moodle grade sheet, ready to sign
Moodle exports grades to spreadsheets only. Our free gradeexport_gradesheet plugin prints a class grade sheet as a PDF: averages, highest and lowest marks, and signature boxes.
Short answer: Moodle’s gradebook exports to CSV, Excel, OpenDocument, plain text and XML, so a results sheet that has to be printed, signed and filed goes through Excel and a lot of formatting. The forum answer for years has been “export to a spreadsheet”. Our free plugin, gradeexport_gradesheet, adds Grade sheet (PDF) to the gradebook’s export menu: one click gives a class sheet ready for the exam board.
This is the thirtieth plugin in our series: one plugin for each Moodle plugin type, each one teaching DevLMS Studio, our AI plugin builder, how that type works. The plugins directory has a PDF grade export, but its last version is for Moodle 2.4.
What is on the sheet
- In the gradebook, choose Export > Grade sheet (PDF).
- Tick the grade items, pick points, percentages or letters, set the title and who signs, and press Download.
- One row per student in last-name order, with ID numbers when students have them.
- Each column says what it is out of. The course total can be a column too.
- Under the table: the average, highest and lowest mark, and how many students were graded. A missing mark prints as a dash and does not count.
- A box for each person who signs (Teacher, Head of department, Exam board chair…), with lines for name, signature and date. The plugin keeps them on the page with the marks when they fit.
- “Page 1 of 2” on every page, and the header row repeats when a class runs over a page.
- Wide sheets turn landscape. In Arabic the whole sheet runs right to left, and Arabic names print correctly on any site.
It supports Moodle 4.5 LTS to 5.3, in English, French and Arabic. The code is on GitHub.
How a Moodle grade export works
From Moodle 5.3’s gradebook code (the same in 4.5):
- An export plugin is a class that extends
grade_export, plus an index page with Moodle’s export form and an export page that sends the file. Moodle lists it under Export by its folder name. No other registration is needed. - Core’s export form already handles the grade items, display types, decimals and suspended students. We extended it with a section for the title and the signers, and removed the feedback option, since feedback text does not fit a printed grid.
- The gradebook menu checks a
publishcapability for every export format, even one that never publishes. Without it, every gradebook page shows a developer warning. Our browser tests caught that on the first run. - Moodle’s PDF library includes a FreeSans font with no Arabic letters. Arabic text in it extracts fine but prints as empty boxes, so a text check alone passes. We render every sheet to an image to look at it, and switch to FreeSerif for any Arabic text.
Unit tests check the rows, the summary maths (missing marks excluded), letters with no averages, groups, suspended students, the course total and escaping. Browser tests open the export page as a teacher and check it meets accessibility standards.
Need a plugin like this for your own Moodle?
Describe it in DevLMS Studio and watch it built and tested in a real Moodle, or ask our team for a fixed price.
Open DevLMS Studio