Skip to content

fix(#244): pass classId when loading quiz creation subjects#421

Open
0xPyxis wants to merge 1 commit into
MRIARC-08:mainfrom
0xPyxis:fix-244-clean
Open

fix(#244): pass classId when loading quiz creation subjects#421
0xPyxis wants to merge 1 commit into
MRIARC-08:mainfrom
0xPyxis:fix-244-clean

Conversation

@0xPyxis

@0xPyxis 0xPyxis commented Jun 23, 2026

Copy link
Copy Markdown

Closes #244

The quiz creation flow was fetching subjects without providing the user's classId, causing subjects to fail loading correctly.

CHANGES

  • Updated fetchSubjects in src/lib/quiz.ts to accept a classId
  • Added the classId query parameter to the /api/ncert/subjects request
  • Updated QuizCreationForm to pass the user's class when fetching subjects

RESULT
Subjects are now loaded correctly based on the user's class during quiz creation.

@vercel

vercel Bot commented Jun 23, 2026

Copy link
Copy Markdown

@0xPyxis is attempting to deploy a commit to the Adarsh's projects Team on Vercel.

A member of the Team first needs to authorize it.

@MRIARC-08 MRIARC-08 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

@0xPyxis The actual bug fix is correctly scoped: fetchSubjects now receives the class id and calls /api/ncert/subjects?classId=....

Local checks:

  • pnpm exec tsc --noEmit passes.
  • pnpm test passes: 8 files / 35 tests.
  • pnpm exec eslint src/components/QuizCreationForm.tsx src/lib/quiz.ts fails with 5 Prettier formatting errors.

Please run the repo formatter on the touched files and push the result. Since this touches the quiz creation form UI, it will also need a manual visual/flow review before merge.

@MRIARC-08 MRIARC-08 added gssoc gssoc level:beginner GSSoC difficulty: beginner type:bug Bug fix contribution labels Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc gssoc level:beginner GSSoC difficulty: beginner type:bug Bug fix contribution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Quiz creation cannot load subjects because classId is omitted

2 participants