Intelligent Media Lab.
日本語

SOFTWARE

pygrader

Python (Web UI / CLI)

A tool that automatically evaluates and grades Python programs submitted to Moodle assignments and outputs feedback in a format that can be imported directly into Moodle. To cope with irregular assignments during a semester, assignments, model answers and rubrics are registered through a web UI, and the Claude API can propose drafts of model answers, rubrics and test cases.

Features

  • Grading method — test case execution (objective grading) combined with rubric evaluation and Japanese feedback generation by the Claude API. Without an API key it automatically falls back to test-only grading
  • Input — the “Download all submissions” zip and the “grading worksheet” CSV from Moodle
  • Output — a grading worksheet CSV with grades and feedback comments filled in (bulk-uploadable to Moodle), a zip of per-student feedback files (Moodle’s bulk feedback file format), and a grading report for instructors (statistics, submissions needing review, detection of similar submissions)
  • Web UI — registering and editing assignments, proposing model answers, rubrics and test cases, running grading and downloading results, all in the browser. The same processing is available from the CLI (python -m pygrader grade)

How grading works

Grading is organized around a rubric. Criteria linked to test cases (such as correctness) are computed automatically from the weights of passed tests; criteria not linked to tests (such as readability and structure) are graded per criterion by Claude, which refers to the assignment description, the model answer and the actual test results. Submissions that fail to run because of syntax errors, or whose input/output does not match the problem statement, receive feedback saying so instead of a rubric score. LLM evaluations are cached to reduce API calls when regrading.

Python 3.11 or later is recommended. See the GitHub repository for details.

← Back to list