Repository navigation
Add instructor reports API and cohort summary - #8
Merged
Merged
Conversation
Implements api.md section 5: progress matrix, attention lists, per-student detail, module and concept gain with mastery, worksheet review queue, formula-safe CSV export with audit entries, and the admin cohort summary. Shared loaders and summaries live in the layer so the read API can reuse them.
|
👋 Quick PR hygiene check (nothing is blocked):
Small PRs with short, clear descriptions are what judges and recruiters read. See |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Implements api.md section 5 (
reports-apiLambda):GET /classes/{id}/progress,/students/{id}/progress,/attention(not started and stuck, with reasons),/modules/{id}/gain,/concepts(gain plus mastery),/review-queue,PUT .../submissions/{id}/review,/export(CSV), andGET /admin/cohorts/{id}/summary(admin only).classdata(loaders),summaries(class and cohort rollups, reused by the read API),audit,csvutil, and a raw-body reply type inhttp.ReportsApiconstruct on the Cognito JWT authorizer; read-only on content and core, write on progress (reviews) and events (audit).Why
Instructors need to see who is stuck, and funders need learning gain by concept and class.
How to test
cd backend && npm test && npm run test:pyFor the roster and class endpoints (section 4)
These reports read: class META with
name,cohortId,gsi2pk=COH#<id>,gsi2sk=CLS#<id>; roster items withrosterNumber,displayName,status,createdAt, optionalstartModuleId; assignments withmoduleVersionandcreatedAt;OVR#items withstudentIdandmoduleId.Stacked on #7. Merge in order: #5, #6, #7, this.