Skip to content

Conversation

@pritamps
Copy link
Contributor

@pritamps pritamps commented Jan 23, 2026

Summary

  • Adds support for the new student_quiz_reports_v2 DynamoDB table with updated schema (session_id + user_id keys)
  • Implements fallback logic: tries v2 table first, falls back to v1 if not found
  • Adds two new Jinja2 templates for v2 reports:
    • Display version (student_quiz_report_v2.html): Colorful, Tailwind-based template for web viewing
    • Print version (student_quiz_report_v2_print.html): Clean, PDF-optimized template with smaller fonts (9pt base, 8pt tables)
  • Template selection: ?print=true or ?format=pdf uses print template, otherwise display template
  • Fixes dev server command in README/CLAUDE.md (cd app && uv run uvicorn main:app)

Test plan

  • Test v2 report display: /reports/student_quiz_report/{session_id}/{user_id}
  • Test v2 print view: ?print=true
  • Test PDF generation: ?format=pdf
  • Test fallback to v1 for sessions not in v2 table

🤖 Generated with Claude Code

pritamps and others added 3 commits January 21, 2026 22:22
Add new endpoint /reports/student_quiz_report/v2/{session_id}/{user_id}
that queries the student_quiz_reports_v2 DynamoDB table and returns
raw JSON data. The v2 table uses a different schema with session_id
as partition key and user_id as sort key.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Update uvicorn command to run from app directory to match
the import structure in main.py.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add student_quiz_report_v2.html (display version with Tailwind, colors)
- Add student_quiz_report_v2_print.html (print-optimized, 9pt base font, 8pt tables)
- Update endpoint to use display by default, print for ?print=true or ?format=pdf
- Template reads directly from v2 DynamoDB data format

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.

2 participants