Subject marks
The same header/child shape as attendance, for scores: one sheet per (class, subject, mark type), one row per student who was marked.
| Table | Columns (keys) | Notes |
|---|---|---|
subject_marks |
id PK · class_id FK · subject_id FK · mark_type · max_grade (default 100) · created_by · created_at |
the class and subject must be linked in grade_subjects; max_grade defaults from that link's max_mark |
subject_mark_students |
id PK · mark_id FK (ON DELETE CASCADE) · student_id FK · mark (default 0) · UNIQUE(mark_id, student_id) |
one score per student per sheet; deleting the sheet cascades its scores |
Relationships
classes 1 —< subject_marks >— subjects; subject_marks 1 —< subject_mark_students >— students.
Access
Note subject_marks carries no read gate in the
catalogue: reading marks rides on classes read (the
class details page embeds them), while entry/edit/delete are gated
subject_marks write/delete. A teacher at scope assigned touches only their
own classes' sheets; a parent at scope own reads only their children's
scores. The report card and marks-sheet reports aggregate these tables.
Rendered from simple-lms/data-model/marks.md · OKF bundle · regenerate with npm run render