This program executes GitHub Classroom repositories and outputs usable CSV for Canvas/SIS grade imports.
Usage comes to three steps:
- Set up a database of student identifiers mapping to Canvas identifiers
- Clone classroom (helper provided)
- Run grader
- Import result file
The database used throughout this project is Charm KV. You should self-host your own Charm server: Charm Self Hosting. In addition, you may want Skate to inspect your database.
Requirements:
- Linux/MacOS shell (with
/bin/sh) - GitHub CLI
ghutility - Authenticate with
gh auth login - CLI Classroom extension
- Install with
gh extension install github/gh-classroom
- Install with
- Canvas student export
- GitHub classroom student export
Run with cmd/web. This is an unauthenticated service automatically running unverified student code. Be careful.
Requirements:
- GitHub Classroom roster (download from the students tab of a classroom)
- Canvas grade export
- A build version of
cmd/mkclassroom
Flags:
course: The key in the database for this course, anything you wantcanvaspath: The path to your Canvas CSV export (CSV)ghpath: The path to your GitHub Classroom export (CSV)
Example:
mkclassroom -course=cowboytest -debug -canvaspath=CowboyTest_canvas.csv -ghpath=classroom_roster.csv
Requirements:
- GitHub CLI
ghutility- Authenticate with
gh auth login
- Authenticate with
- CLI Classroom extension
- Install with
gh extension install github/gh-classroom
- Install with
You may use scripts/clone.sh to automatically attempt to match course names and assignment names.
scripts/clone.sh --dest ./student-repositories -v MyCourseName Assignment1
Requirements:
- Cloned student repositories
- An assignment ID from Canvas
- This ID will be the trailing number in the assignment's URL
- The ID will be used to match the column for importing grades
Flags:
dir: The directory of student repositoriescourse: The database identifier for your course/student rosterassignment: The assignment name for Canvas import- Include your ID in this in parens, e.g. "Assignment 1 (ID HERE)"
type: Language we are grading- Supports .NET, Java, and Go
Example:
-dir=./student-repositories/assignment1-submissions -course=cowboytest -assignment="Assignment 1 (123)" -type=net
Generates templates.
go generate
Build the webserver.
requires: Generate
go build -o server cmd/web/main.go
Run the webserver.
requires: Web
./server -addr="0.0.0.0:8080"
Build the classroom import tool.
go build -o mkclassroom cmd/mkclassroom/main.go
Imports example classroom assuming example files exist.
requires: MkClassroom
./mkclassroom -canvaspath=example/CowboyTest_canvas.csv -ghpath=example/classroom_roster.csv -assignments=example/cowboytest_assign.json -course=cowboytest
Builds all objects.
requires: MkClassroom, Web
I think it's sufficient.