Skip to content

Implement Frontend: Student Submission Detail Page #77

@Rajaykumar12

Description

@Rajaykumar12

Description

The backend API GET /api/admin/tests/:contestId/submissions/:userId is ready and returns detailed submission data. The frontend page at /admin/tests/[id]/submissions/[userId]/page.tsx currently uses hardcoded mock data and needs to be wired up to the real API.

What Needs To Be Done

Replace the mock useEffect + getTestById/getQuestionById calls in page.tsx with a server component that uses db.findOne from @/lib/db:

const submission = await db.findOne("submissions", {
    contest: contestId,
    user: userId,
}, { populate: ["user", "submissions.question"] });

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions