Skip to content

Refresh student_quiz_report_v2 UI#76

Merged
suryabulusu merged 7 commits into
mainfrom
student_quiz_report_v2_ui_refresh
May 20, 2026
Merged

Refresh student_quiz_report_v2 UI#76
suryabulusu merged 7 commits into
mainfrom
student_quiz_report_v2_ui_refresh

Conversation

@pritamps

@pritamps pritamps commented Apr 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Redesigns the student_quiz_report_v2.html template around a mobile-first, card-based layout with responsive breakpoints at md (768px) and lg (1024px), so it reads well on both phones and desktop.
  • Chapter-wise section now uses tabs (Physics / Chemistry / Mathematics — or Biology for NEET) with a single table and icon column headers.
  • Subject-wise cards use a compact responsive grid (Marks/Skipped, Wrong/Correct, Percentage/Accuracy) with a colored left border.
  • Overall score always renders above the recommendation card.
  • Removes the in-page "Print/Save" button. The separate student_quiz_report_v2_print.html is untouched, so PDF output is unaffected.
  • Adds ui/ to .gitignore (local Next.js mockup scratch dir used during design).

Follow-up updates by @suryabulusu

  • Merged the latest main into this branch.
  • Updated the overall score and Total Marks summary to show marks scored out of max marks possible, e.g. 100 / 180.
  • Fixed mobile overflow in subject-wise performance cards.
  • Added conditional Review Quiz support for v2 reports when a launch-token-backed quiz review link can be generated.

Test plan

  • Open a v2 session report on mobile width — container narrows, summary tiles go 2-col, subject cards stack without horizontal overflow.
  • Open the same report on desktop — summary renders as 6 tiles in one row, subject cards lay out in 3 columns.
  • Click Physics / Chemistry / Mathematics tabs in the Chapter-wise section — only the selected subject's chapters are visible.
  • Confirm NEET reports show Biology instead of Mathematics in both the subject cards and chapter tabs.
  • Confirm the Overall Score and Total Marks summary show marks_scored / max_marks_possible.
  • Confirm tokenized report launches show the Review Quiz button when a quiz id is available.
  • ?format=pdf still renders using the untouched print template.

🤖 Generated with Claude Code

Redesigns the v2 report template around a mobile-first card layout, with
responsive breakpoints at md (768px) and lg (1024px) so it also reads well
on desktop. No backend or data-contract changes — the router still passes
the same `report` context.

Key changes:
- Container: centered card that grows from max-w-md to max-w-5xl.
- Header: solid blue bar; student/test fields stack on mobile, single row on md+.
- Overall Score: standalone card (always above Recommendation).
- Overall Performance Summary: 2-col on mobile, 6-col on md+ (6 metric tiles:
  Total Marks, Correct, Percentage, Skipped, Wrong, Accuracy).
- Subject-wise Performance: stacked on mobile, 3-col on md+; each card has a
  colored left border and a 4-cell pair-table (Marks/Skipped, Wrong/Correct,
  Percentage/Accuracy).
- Chapter-wise Performance: tabbed single-table view (Physics/Chemistry/
  Mathematics or Biology for NEET) with icon headers for Correct/Wrong/Skipped.
- Removed the in-page Print/Save button.
- Print template (student_quiz_report_v2_print.html) left untouched.

Also adds `ui/` to .gitignore (local Next.js mockup scratch dir).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Zero-attempt v2 records store `accuracy` (overall and per-subject) as
null, since correct / (correct + wrong) is 0/0. The new template formats
every summary and subject-card number, so null reaches `%.2f` and raises
TypeError during render.

Fall back to 0 for marks_scored, num_correct/wrong/skipped, percentage
and accuracy so a "student skipped everything" session renders as 0/0.00%
instead of crashing.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

@suryabulusu suryabulusu left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good with some comments on discord

Comment thread app/templates/student_quiz_report_v2.html Outdated
@suryabulusu suryabulusu merged commit cb29805 into main May 20, 2026
1 check passed
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