Skip to content

feat: Student Exam Center with submission review and instructor submission drill-down - #173

Merged
kristofer merged 4 commits into
mainfrom
copilot/student-exam-submissions
Jul 22, 2026
Merged

kristofer merged 4 commits into
mainfrom
copilot/student-exam-submissions

Conversation

Copilot AI commented Jul 22, 2026 •

Copy link
Copy Markdown

Students had no way to view exams they had already submitted. Instructors could see aggregate scores but couldn't drill into a student's individual answers.

New API endpoint

GET /exam/submission?attempt_id={id}&user_id={id} — returns full submission detail: each question, all answer choices, the student's selection, and per-question correctness. Authorization: students can only access their own attempts; admins can access any.

// ExamStudentResult and ExamInfo now carry AttemptID so the frontend
// can link directly to the review page without a secondary lookup.
type ExamStudentResult struct {
    ...
    AttemptID *int `json:"attempt_id,omitempty"`
}

Both GetExamStatus and GetAssignedExamsForUser SQL queries updated to select att.id; InMemoryDB implementations updated to match.

New pages

  • /exam-center.html — dedicated student Exam Center (replaces the inline dashboard panel). Two sections: pending exams (Start button) and submitted exams (View Submission + Retake).
  • /exam-review.html — per-attempt review showing each question with the student's answer highlighted (✅ correct / ❌ wrong / ✓ correct-not-selected). Works for both students and instructors (admins see any attempt).

Changes to existing pages

  • Dashboard — "Assigned Exams" inline button replaced by an "Exam Center" link with a pending-count badge.
  • admin-exams.html scoring table — "View Submission" link added to each completed row (uses the instructor's own user_id as the requesting user, satisfying the admin auth check on the new endpoint).

Copilot AI linked an issue Jul 22, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Add functionality for students to view submitted exams feat: Student Exam Center with submission review and instructor submission drill-down Jul 22, 2026
Copilot AI requested a review from kristofer July 22, 2026 13:32
@kristofer
kristofer marked this pull request as ready for review July 22, 2026 13:45
@kristofer
kristofer merged commit bcff68b into main Jul 22, 2026
2 checks passed
@kristofer
kristofer deleted the copilot/student-exam-submissions branch July 22, 2026 13:45
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.

Students need to see submitted exams

2 participants