Skip to content

feat(gradebook): external assessment foundation - model, serialization, and inline grade entry#8462

Open
LWS49 wants to merge 2 commits into
lws49/feat-gradebook-exportfrom
lws49/feat-ext-assessments-pr1-foundation
Open

feat(gradebook): external assessment foundation - model, serialization, and inline grade entry#8462
LWS49 wants to merge 2 commits into
lws49/feat-gradebook-exportfrom
lws49/feat-ext-assessments-pr1-foundation

Conversation

@LWS49

@LWS49 LWS49 commented Jun 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds the foundation for external assessments, the only gradebook columns a professor can create, on top of the weighted gradebook view (#8436). This PR introduces the data model (external assessment + external grade), serializes externals into the gradebook payload so they render as columns in the "All assessments" view, and makes those cells inline-editable with an optimistic save. Grades store at decimal(5,2) so two-decimal imports (Canvas, SoftMark) round-trip without silent rounding, and each external carries optional floor/cap bound flags. The management panel and CSV import wizard are deferred to later PRs in this stack; this PR is model, read serialization, and single-cell write only. The grade-write endpoint (#grades) is also tightened from teaching assistant to manager.

Design decisions

  • External grade/max columns use decimal(5,2) while native grade columns stay decimal(4,1) - externals are fed by Canvas/SoftMark which emit two decimals, whereas native grading is Coursemology-native where one decimal is fine. Widening every grade column would be a larger, separate change.
  • Floor and cap flags are applied only at weighted-compute time (in effectiveGrade), never mutating the stored grade - the raw "All assessments" view always shows the true entered value, so toggling a flag re-interprets rather than rewrites data.
  • Inline cells use the spreadsheet model (commit on blur/Enter, cancel on Esc) with an optimistic update and rollback-plus-toast on failure - this matches the Excel/Sheets idiom for a grid; entry validation and richer save feedback arrive in the validation PR.

Regression prevention

Covers: the external assessment and external grade models (validations, bounds, two-decimal precision), the synthetic-category contribution integration, the gradebook serializer's external payload, inline grade entry (optimistic apply and rollback on failure), the setExternalGrade operation, and external assessment column-id building. Migrations (20260615 create external tables, 20260616 link externals to contributions, 20260622 bounds, 20260623 decimal(5,2) precision) are reversible. The #grades authorization change is asserted in the gradebook controller spec. No change to existing gradebook behavior when a course has no externals. Model and controller specs run on CI.

@LWS49 LWS49 force-pushed the lws49/feat-ext-assessments-pr1-foundation branch from d8f247f to 659f621 Compare June 29, 2026 04:43
@LWS49 LWS49 force-pushed the lws49/feat-gradebook-weighted-view branch 3 times, most recently from 7a4ad9f to fea40ba Compare June 29, 2026 08:12
Add weighted view built on top of gradebook:

- add tables course_gradebook_contributions and course_gradebook_assessment_contributions
- weighted table with equal/custom weight modes and per-assessment
  weight inputs, with a sum gate on custom weights
- points / percentage display toggle
- inline per-student assessment breakdown (row expand)
- projected-total hint
- gradebook_excluded column, serialization, and update-weights API echo
- per-assessment include/exclude in the configure-weights modal,
  seeding custom weights from included assessments only
- excluded assessments shown in the breakdown with no contribution
- add SegmentedSelect component for stylized selection that is not "on-off"
@LWS49 LWS49 force-pushed the lws49/feat-gradebook-weighted-view branch from fea40ba to 2fb3c20 Compare June 29, 2026 08:20
…ation, inline grade entry)

Foundation layer for external assessments: data model + migrations, gradebook read serialization, and inline grade entry (update_grade). Management UI (panel, add/edit/delete), weight integration, and CSV import are introduced in later PRs of the stack.
@LWS49 LWS49 force-pushed the lws49/feat-ext-assessments-pr1-foundation branch from 659f621 to 331c07c Compare June 29, 2026 08:32
@LWS49 LWS49 force-pushed the lws49/feat-gradebook-weighted-view branch from 2fb3c20 to a1a8b69 Compare June 29, 2026 08:46
@LWS49 LWS49 force-pushed the lws49/feat-gradebook-weighted-view branch 3 times, most recently from 6dd61fc to 91969ac Compare June 29, 2026 12:12
Base automatically changed from lws49/feat-gradebook-weighted-view to lws49/feat-gradebook-export June 29, 2026 12:12
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