Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

04 — Information Architecture (Results Module)

IA derives from route structure (result.controller.ts:9-37, examination.controller.ts:23-56) and the report card contract (result.service.ts:8-26). Navigation labels are client-side; the API shape constrains what each screen can show.


1. IA map

Results (tab / section)
├── Student Results List            ← GET /api/v1/results/student/:studentId
│     └── Exam result row (per examination_results row)
│           └── Report Card View    ← GET /api/v1/results/report-card/:studentId/:examId
│                 ├── Subject rows  (marksObtained, maximumMarks, grade, remarks)
│                 ├── Totals        (totalMarksObtained, totalMaximumMarks)
│                 ├── Percentage    (2 decimals)
│                 └── Overall grade (A+…F)

Examinations (tab / section)
├── Exam List                        ← GET /api/v1/examinations (paginated)
│     └── Exam Detail                ← GET /api/v1/examinations/:id
│           ├── Subject list         ← GET /api/v1/examinations/:id/subjects
│           │     └── Exam-Subject Detail
│           │           ├── Results grid  ← GET /api/v1/results/exam-subject/:examSubjectId
│           │           └── Marks entry form → POST /api/v1/results/exam-subject/:examSubjectId/marks
│           └── Publish action        → POST /api/v1/examinations/:id/publish
│                 └── (async) in-app notification → results-published job

2. Information units (from contracts)

UnitFieldsSource
ExaminationacademicYearId, name, type, startDate, endDate, status (draft/active/completed/published), gradingSchemeId?examination.schema.ts:8-36
ExaminationSubjectexaminationId, subjectId, classId, date, startTime, endTime, maximumMarks, passingMarksexamination-subject.schema.ts:8-31
ExaminationResultstudentId, examinationSubjectId, marksObtained?, grade?, remarks?, publishedAt? + tenantId/timestampsexamination-result.schema.ts:8-25, base.schema.ts
ReportCardstudentId, examinationId, subjects[] (subjectId, subjectName*, marksObtained, maximumMarks, grade?, remarks?), totalMarksObtained, totalMaximumMarks, percentage, overallGrade, generatedAtresult.service.ts:8-26
Marks entry inputstudentId, marksObtained, grade?, remarks?examination-subject.dto.ts:47-65

* subjectName currently equals the subject ID (result.service.ts:75) — see gaps.

3. Navigation rules

  • Marks entry lives under Examinations, not Results: the write endpoint is proxied from result.controller.ts:26-31 into the Exams service, and subjects are exam-owned. Results tab = read-only (student lists + report cards).
  • Publish is exam-scoped (examinations/:id/publish), not result-scoped; UI must place it on exam detail, not on a single result row.
  • Report card requires both studentId and examId path params (result.controller.ts:32-37) — navigation must always carry the pair.

4. State flags driving IA

FlagDerivationUI effect
Exam statusexamination.schema.ts:28-33published → mark entry read-only*; else editable
Result publishedpublishedAt on row (examination-result.schema.ts:24-25)badge "Published" on result rows/list items
Entry existsrow present for (student, subject)grid cell shows marks vs. empty

* Server does not enforce read-only after publish (examination.service.ts:139-195 has no published check) — UI-only for now, flagged (planned).

5. Empty & error placements

  • Zero subjects for exam → report card 404 (result.service.ts:51-52) → screen-level empty state (see 06_Screen_Specifications.md).
  • No results rows for a student → findByStudent returns [] (repository returns array, examination-result.repository.ts:26-28) → empty state, no error.
  • Marks > max → 404 at examination.service.ts:145-146 → inline field error (client normalises code).