Skip to content

feat(gradebook): export-canvas template overlay for clean Canvas re-import - #25

Merged
agiacalone merged 1 commit into
mainfrom
feat/export-canvas-template-overlay
Jun 29, 2026
Merged

feat(gradebook): export-canvas template overlay for clean Canvas re-import#25
agiacalone merged 1 commit into
mainfrom
feat/export-canvas-template-overlay

Conversation

@agiacalone

Copy link
Copy Markdown
Owner

What

reg-gradebook export-canvas --template <canvas-export.csv> [--only lab2] overlays vault scores onto a Canvas gradebook export, preserving its exact structure (identity columns, Name (assignment_id) headers, posting row) so the file re-imports into the existing assignment rather than creating a duplicate. This makes pushing one lab or exam's grades to Canvas a normal grading product.

  • Assignment match by id-suffixed header → schema canvas_titleshort_name; --only restricts to specific components.
  • Student match by zero-padded SIS User ID; students in the export but not the gradebook (Canvas Test Student, late adds) pass through untouched.
  • Minimal diff — a cell is rewritten only when its value actually changed, so the import touches just the moved grades. Extra credit is folded in via the component score (base 96 + ACE 14 → 110; Canvas accepts >points-possible).
  • Read-only columns (Current Score, Final Grade, Override…) ride along unchanged — Canvas ignores them on import.
  • Bare mode (no --template) is unchanged.

Aligns with Canvas's import rules: https://community.instructure.com/en/kb/articles/660862-how-do-i-import-grades-in-the-gradebook.

Validation

Run against the real CECS 378 Su26 §01 Lab 2 Canvas export — output identical to the export except the six ACE cells (82→91, 91→106, 92→97, 96→110, 92→104, 71→75).

Tests & docs

11 new tests (overlay targeting, id-suffix match, unknown-student passthrough, no-match error, minimal-diff formatting, CLI). Full suite 405 passed. New docs/canvas-grades-workflow.md; README reg-gradebook row + docs index updated.

🤖 Generated with Claude Code

https://claude.ai/code/session_015cY2osrcunEXb5a8xtTy2V

…mport

`reg-gradebook export-canvas --template <canvas-export.csv> [--only lab2]`
overlays vault scores onto a Canvas gradebook EXPORT, preserving its exact
structure (identity columns, `Name (assignment_id)` headers, posting row) so the
result re-imports into the existing assignment instead of creating a duplicate.

- assignment match by id-suffixed header → schema canvas_title → short_name
- `--only` restricts the overlay to specific components (push one lab/exam)
- student match by zero-padded SIS User ID; unknown students passed through
- minimal diff: a cell is rewritten only when its value actually changed, so the
  import touches just the moved grades (extra credit folded in via the component
  score, e.g. base 96 + ACE 14 → 110)
- read-only/computed Canvas columns ride along untouched (Canvas ignores them)

Bare mode (no --template) is unchanged. Validated against a real CECS 378 Lab 2
export (only the six ACE cells changed). 11 new tests; full suite 405 passed.
Docs: docs/canvas-grades-workflow.md + README/reg-gradebook row.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015cY2osrcunEXb5a8xtTy2V
@agiacalone
agiacalone merged commit d6eb118 into main Jun 29, 2026
4 checks passed
@agiacalone
agiacalone deleted the feat/export-canvas-template-overlay branch June 29, 2026 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant