Skip to content

Assignments & AI Grading

A multi-type assessment platform with AI-assisted grading. Trainers create assignments, learners attempt and submit, parents get a read-only view. It supports 8 question types, rubric-based evaluation, handwritten physical-exam OCR, code challenges, and proctoring, covering K-12 homework through university exam evaluation.

How it works

Create (trainer)

/assignments/new is a 3-step wizard:

  1. Info: title, type, due date, time limit, total/passing marks, settings (late submission, shuffle, auto-grade).
  2. Questions: add questions per type with content (rich text), options (MCQ), correct answers, marks, code starter/test cases.
  3. Settings: late penalty %, attempts allowed, show correct answers, proctoring toggle.

Targeting is Standalone, Course-based, or Direct (class, section, or learner selection). After create, a toast with a "View Assignment" link confirms.

List (/assignments)

A table on md+, cards on small screens. Row click opens a quick-look modal: title, type, due, status, target groups, and submission stats (trainer) or submission status + grade (learner). Footer buttons deep-link to the full detail and submissions pages. Sorting is client-side. The learner "Upcoming" tab stays card-grouped (Today / Tomorrow / Overdue / Upcoming).

/homework and /homework/new are legacy redirects to /assignments and /assignments/new.

Attempt (learner)

From the list, the learner opens the detail page (instructions, marks, time limit), starts the attempt with a question-navigator sidebar, and answers per type (radio / checkbox / textarea / code editor / file upload). Draft answers auto-save to localStorage with a beforeunload warning on unsaved changes. Submit posts to /submissions/{id}/submit, then results show marks per question, feedback, and pass/fail. Code runs client-side via Pyodide.

Grade (trainer)

The submissions page filters by status (submitted / graded / pending / late). Per submission, the trainer sees question-by-question answers, AI evaluation results, and proctoring flags, then grades with per-question marks + feedback and overall feedback.

AI grading evaluates a submission against the rubric and model answer, returning per-question marks, a confidence score (0-100%), feedback, and strengths/improvements. The trainer reviews in the accept-grade modal, adjusts, and accepts. Confidence bands: green 80%+, yellow 60-79%, red below 60%. Rubrics weight criteria (for example Content 40%, Clarity 30%, Engagement 30%) with scored levels (Excellent / Good / Fair / Poor).

Physical exam

1. Create exam → upload question paper PDF
2. Extract questions (OCR + LLM) → review & confirm
3. Upload answer sheets (PDF per learner)
4. OCR → learner mapping → batch AI evaluation
5. Review: 3-panel layout (questions | question paper | answer sheet)
6. Finalize marks per sheet
7. Marks register: summary stats, per-learner table, CSV export

Routes under /physical-exams: /physical-exams, /physical-exams/create, /:id/upload, /:id/review/:sheetId, /:id/marks-register.

Question types

Type Grading Description
MCQ Auto Single correct answer
MCQ Multi-Select Auto Multiple correct answers
True/False Auto Binary choice
Short Answer Auto/AI 1-2 sentence response
Fill in the Blank Auto Complete the sentence
Code Challenge Auto + AI Python/JS with test cases
Long Answer/Essay AI/Manual Detailed written response
File Upload Manual Documents, images

Assignment types

  • K-12: Homework, Quiz, Worksheet, Classwork, Test, Competition
  • Higher Ed: Case Study, Seminar, Research Paper, Coding Competition, Assessment
  • Corporate: Knowledge Check, Compliance Training, 360 Feedback, Practical Exercise
  • Physical: Physical Exam (handwritten answer sheets via OCR)

Endpoints

AI evaluation (/evaluations):

Method Endpoint Purpose
POST /evaluations/submissions/{id}/evaluate Trigger AI eval
GET /evaluations/submissions/{id} Get results
POST /evaluations/submissions/{id}/accept Accept AI grade
POST /evaluations/batch Batch evaluate
GET/POST/PATCH/DELETE /evaluations/rubrics, /evaluations/rubrics/{id} Rubric CRUD
POST /evaluations/ocr/extract OCR extract

Physical exams (/physical-exams):

Method Endpoint Purpose
POST /physical-exams Create exam
POST /physical-exams/{id}/upload-question-paper Upload question paper PDF
POST /physical-exams/{id}/extract-questions OCR extract questions
POST /physical-exams/{id}/confirm-questions Confirm extracted questions
POST /physical-exams/{id}/answer-sheets/upload Upload answer sheets
POST /physical-exams/{id}/evaluate-batch Batch evaluate
GET /physical-exams/{id}/review/{sheetId} Review data
POST /physical-exams/{id}/review/{sheetId}/finalize Finalize marks
GET /physical-exams/{id}/marks-register Marks summary
GET /physical-exams/{id}/marks-register/export CSV export

Where it lives

Routes: /assignments, /assignments/new, /assignments/:id, /physical-exams.

  • pages/teacher/CreateAssignmentPage/: 3-step wizard (InfoStep / QuestionsStep / SettingsStep)
  • pages/shared/HomeworkPage/: list surface (table + quick-look modal)
  • pages/shared/AssignmentDetailPage/: learner attempt + results
  • components/evaluation/: AcceptAIGradeModal