CH 12Basic

Examination, Assessment & Report Cards

The academic evaluation pipeline: ExamSchedule → StudentMark → ReportCard. Covers exam scheduling, marks entry with automatic grading, weighted report card generation (including a live-rendered PDF and a pull of Chapter 10 attendance data), exam analytics, and a promotion / re-evaluation workflow that is fully built on the backend today.

Exam Data Flow

ExamScheduleStudentMarkReportCard (per term)Promotion Decision

Basic Tier Features

Basic

Exam Scheduling

Basic
  • ExamSchedule model: title, course, examType (unit_test/mid_term/final/practical/oral/project), term, academicYear, scheduledDate
  • maxMarks defaults to 100, passMarks defaults to 35, weightage defaults to 100 — all overridable per exam
  • Configurable gradeThresholds (A+/A/B/C/D boundaries) drive automatic grade computation
  • Editing or deleting a schedule is blocked once any marks have been entered against it
  • isPublished gate controls student/parent visibility of the schedule
  • Admin UI: /dashboard/admin/grades/exams, /dashboard/admin/grades/exams/create

Marks Entry

Basic
  • StudentMark model, unique per (examSchedule, student) — upserted, never duplicated
  • Bulk entry endpoint accepts an array of { studentId, marksObtained, isAbsent, remarks } in one request
  • Absent students get marksObtained: null, grade: "AB", isPassing: false
  • Grade computed against the parent exam's gradeThresholds at entry time and on every update
  • Teacher UI: /dashboard/teacher/grades, /dashboard/teacher/grades/[examId] — marks entry grid

Report Card Generation

Basic
  • Aggregates every StudentMark for a term/academicYear per student, grouped by subject (course)
  • Applies each exam's weightage to compute per-subject percentage, final grade, and pass/fail
  • Pulls the student's attendance percentage for the term's date range from Chapter 10's DailyAttendance data
  • Class is dense-ranked by overallPercentage within the same generation batch (rank + classSize stored on each card)
  • Admin can add principalRemarks and per-subject teacherRemarks before publishing
  • Legacy term cards are generated through the queue (POST /api/grades/report-cards/generate). Current grade cards use the CCE flow below, and their PDF is rendered from the current marks on each download (services/reportCardBooklet)
  • Admin UI: /dashboard/admin/grades/report-cards · Student UI: /dashboard/student/grades/report-card/[id]

Exam & Report Card Analytics

Basic
  • Subject-wise, class-wise, and school-wide performance analytics
  • Individual student performance trend across exams
  • Class/section/school ranking tables
  • Admin UI: /dashboard/admin/grades/analytics — 4-panel dashboard (subject, class, school, ranking)

Promotion Management

Basic
  • Evaluates every student against their published annual report card: any failed subject, or attendance % below a configurable minimum (default 75%), flags them
  • Admin records a promote or detain decision per student; promotion delegates to the Chapter 6 Student Lifecycle promotion recorder (class/section/academic-year change)
  • Every decision is written to AuditLog and surfaced via a promotion report endpoint
  • Student/parent read-only endpoint for own promotion history
  • API-only today — no dedicated web/mobile promotion UI has been built yet

Re-evaluation Requests

Basic
  • Student or linked parent requests re-evaluation of a specific StudentMark with a reason; one request per mark (unique constraint)
  • Admin reviews and approves or rejects
  • Once approved, a different teacher re-enters the mark via the normal marks-update endpoint, then the request is marked completed with before/after marks recorded
  • Every completion is audit-logged
  • API-only today — no dedicated web/mobile re-evaluation UI has been built yet

Result Publication

Basic
  • Exam schedules and report cards each carry their own isPublished / publishedAt gate
  • Students only ever see published exam schedules and their own published report cards
  • Parents see a published report card only for a linked child
  • Parent UI: /dashboard/parent/exams

CCE Grade Cards (FA-1 … SA-2) — New

Basic
  • Grade cards follow the printed CCE booklet: FA-1, FA-2, SA-1, FA-3, FA-4, SA-2 (utils/cceGrading). One ReportCard per student, exam, academic year and class, so a promotion starts a fresh set and old cards stay as history
  • Formative (FA) subject total is out of 50: participation 10 + written work 10 + project work 10 + slip test 20
  • Summative (SA) marks are out of 50 plus the average of the FA totals that feed it (SA-1 uses FA-1 and FA-2, SA-2 uses FA-1 to FA-4), giving a subject total out of 100. Saving an FA recomputes the F.A. column of that year's SA cards
  • Grade scale: A1 ≥91, A2 ≥81, B1 ≥71, B2 ≥61, C1 ≥51, C2 ≥41, D ≥35, E below 35. Pass mark 35%
  • Subjects on a card are exactly the subjects created for the student's class (utils/classSubjects), with no fixed list
  • Also stored: four co-curricular marks out of 50, attendance by month (months left blank are filled from daily attendance), the year-end result (passed, promoted, detained) and principal remarks
  • Admin only: teachers cannot open or edit a card. Parents and students see a card only after the admin publishes it
  • Publishing notifies the child's parents (REPORT_CARD_PUBLISHED) and schedules the PDF pre-build. PDFs render from the current marks on every download in the CCE booklet layout (services/reportCardBooklet), nothing is stored, so a card never goes stale
  • Excel export of a class and exam: GET /api/grades/report-cards/export/excel

Teacher Marks Submission & Admin Approval — New

Basic
  • The teachers of a subject enter its marks for the class and send them to the admin; the admin approves and the marks land on every student's card
  • GradeCardSubmission model: student, class, section, academicYear, term, course, teacher, kind (formative or summative), components or saMarks, remarks, status (draft, pending, approved, rejected), reviewedBy, rejectionReason. Unique per (student, term, academicYear, course)
  • One sheet is shared by every teacher of the subject (the main teacher and the co-teachers, Chapter 11); each row records its last editor. Nobody else may fill it. Admins view and review but cannot save one. Entries are capped to each field's maximum and every student must belong to the subject's class and section (max 500 per request)
  • Each student has their own state: no row, draft, pending, approved or rejected. Pending and approved rows are locked for every teacher; all the others stay editable. So one teacher sending some students for approval never blocks another teacher working on different students
  • Approve writes each pending row onto the student's ReportCard with the same CCE maths as the admin editor, replaces that subject's row if it exists, recomputes the overall percentage and grade, and refreshes SA averages. If the card was already published it is updated in place and the response says how many
  • Reject requires a reason. Notifications: grade_card_submitted to admins, grade_card_approved and grade_card_rejected to every teacher of the subject
  • Clashes are detected, not overwritten: every row is sent back with the version (updatedAt) the teacher loaded, and a save is applied only if nobody changed or sent that row since (compare-and-set). Otherwise the student comes back in conflicts[] with the other teacher's name and the screen reloads. A student already with the admin comes back in locked[]. Sending only sends the teacher's own students (changed or drafted by them), so another teacher's draft is not sent by accident. Publishing a card to parents stays an admin action. Removing a teacher from a subject (Chapter 11) hands unfinished rows they last edited to the main teacher
  • Exam-schedule marks follow the same rule: a teacher may open, enter or edit marks only for exams of subjects they teach (403 otherwise)

Planned — Not Yet Implemented

Not Yet Implemented

Basic
  • Excel/CSV bulk import of marks — current bulk endpoint accepts a JSON array from the marks-entry grid, not a spreadsheet upload
  • WhatsApp and email notifications on result publication — publishing a grade card today notifies parents in the app only
  • GPA scale computation (4/5/10-point) — grade computation currently only supports letter grades (A+ through F) via configurable percentage thresholds
  • Merit lists / top-performer certificates generation
  • Dedicated admin/teacher UI for reviewing promotion decisions and re-evaluation requests (both workflows are API-complete but UI-less)

API Reference — Chapter 12

Exam Schedules & Marks

POST/api/grades/exams

Create an exam schedule (admin)

GET/api/grades/exams

List exam schedules — teachers see only their own courses' exams

GET/api/grades/exams/:id

Get a single exam schedule

PATCH/api/grades/exams/:id

Update a schedule — blocked once marks exist

DELETE/api/grades/exams/:id

Delete a schedule — blocked once marks exist

PATCH/api/grades/exams/:id/publish

Publish the exam schedule to students

POST/api/grades/exams/:id/marks

Bulk enter/update marks for an exam

GET/api/grades/exams/:id/marks

List all marks for an exam

PATCH/api/grades/exams/:id/marks/:sid

Update a single student's mark

Student & Parent Marks View

GET/api/grades/my-marks

Student's own marks — published exams only

GET/api/grades/student/:studentId/marks

Parent/admin view of a student's marks

Report Cards

POST/api/grades/report-cards/generate

Generate/refresh report cards for a term + academicYear

GET/api/grades/report-cards

List report cards (admin)

GET/api/grades/report-cards/my

Student's own published report cards

GET/api/grades/report-cards/student/:sid

Parent/admin view of a student's report cards

GET/api/grades/report-cards/:id

Get a single report card

PATCH/api/grades/report-cards/:id/remarks

Admin adds remarks (admin only)

PATCH/api/grades/report-cards/:id/publish

Publish a report card

GET/api/grades/report-cards/:id/download

Stream the report card as a PDF (pdfkit)

Analytics

GET/api/analytics/exam/subject

Subject-wise performance analytics

GET/api/analytics/exam/class

Class-level analytics (avg, pass rate, distribution)

GET/api/analytics/exam/school

School-wide result analytics

GET/api/analytics/exam/student/:id

Individual student performance trend

GET/api/analytics/exam/ranking

Class, section, school ranking tables

Promotion

GET/api/promotions/evaluate

Evaluate promotion eligibility for a class/section/year

POST/api/promotions/approve

Record promote/detain decisions in bulk

GET/api/promotions/report

Promotion decision audit report

GET/api/promotions/my/:studentId

Student/parent read-only promotion history

Re-evaluation

POST/api/re-evaluation

Student/parent requests re-evaluation of a mark

GET/api/re-evaluation

Admin review queue

GET/api/re-evaluation/my

Requester's own re-evaluation requests

PATCH/api/re-evaluation/:id/review

Approve or reject a request

PATCH/api/re-evaluation/:id/complete

Mark a request completed after the mark is re-entered

CCE Grade Cards (Admin)

POST/api/grades/report-cards/save

Save a card as draft or publish it (admin, super_admin)

GET/api/grades/report-cards/class-subjects/:studentId

Subjects created for the student class - the card lists exactly these

GET/api/grades/report-cards/attendance/:studentId

Attendance already recorded for the months of an exam

GET/api/grades/report-cards/booklet/:studentId

CCE booklet PDF for a student and academic year

GET/api/grades/report-cards/export/excel

Excel export of the cards of a class and exam

Grade Card Marks - Teacher Submissions (New)

GET/api/grades/card-submissions/my-subjects

Teacher: the subjects they teach, plus the exam list

GET/api/grades/card-submissions/sheet

Teacher or admin: one subject, exam and year with every student, status and any rejection reason

PUT/api/grades/card-submissions/sheet

Teacher: save a draft or submit the sheet for approval

GET/api/grades/card-submissions

Admin: sheets by status (default pending), one row per subject and exam

POST/api/grades/card-submissions/approve

Admin: approve a sheet and write the marks onto the cards

POST/api/grades/card-submissions/reject

Admin: send a sheet back with a required reason

Frontend Pages

PathRoleDescriptionTier
/dashboard/admin/grades/examsAdminExam schedule listBasic
/dashboard/admin/grades/exams/createAdminCreate an exam scheduleBasic
/dashboard/admin/grades/report-cardsAdminGenerate, review, and publish report cardsBasic
/dashboard/admin/grades/analyticsAdminSubject / class / school analytics + rankingBasic
/dashboard/teacher/gradesTeacherExams assigned to the teacher's coursesBasic
/dashboard/teacher/grades/[examId]TeacherMarks entry grid for an examBasic
/dashboard/student/gradesStudentPublished marks across examsBasic
/dashboard/student/grades/report-card/[id]StudentIndividual published report card viewBasic
/dashboard/parent/examsParentChild's exam schedules and published resultsBasic
/dashboard/admin/grade-cardsAdminEnter, edit and publish grade cardsBasic
/dashboard/admin/grade-card-approvalsAdminReview and approve or send back teachers marks (New)Basic
/dashboard/teacher/grade-card-marksTeacherEnter marks for own subjects and send for approval (New)Basic

Mobile Screens

(student)/exams.tsx
Exam timetable and published results
Basic
(student)/report-card.tsx
Report card view
Basic
(parent)/exams.tsx
Child's exam schedule and results
Basic
(parent)/report-card.tsx
Child's report card view
Basic
(parent)/reports.tsx
Combined academic/attendance report summary
Basic
(admin)/grade-cards.tsx
Enter, edit, publish and export grade cards
Basic
(admin)/grade-card-approvals.tsx
Approve or send back teachers marks (New)
Basic
(teacher)/grade-card-marks.tsx
Enter marks for own subjects and send for approval (New)
Basic

No teacher-facing mobile screen exists yet for marks entry — teachers enter marks via the web marks-entry grid only.