Lewati ke isi

T4-W05 State Machine

Product semantics (as implemented)

Core W05 does not expose a separate complete/correct API.

(no sheet)
  → faculty/admin save
  → sheet.state = draft (create) then immediately state = done
  → lines upserted

(sheet exists, including state=done)
  → faculty/admin save again
  → lines upserted
  → state remains / rewritten done
Transition Actor Notes
create+complete teacher (owned session), admin Save ≡ complete
reopen/edit same actors T4.1 path A: allowed without cutoff/approval; reason required; before/after audit
formal correction workflow N/A Distinct draft/complete/correct API remains NOT_IMPLEMENTED until DEC-006
cancel/close API N/A OpenEduCat model methods exist; Core JSON API does not expose them

Status vocabulary (per-lesson)

Storage API/UI labels
present Hadir
late Telat / Terlambat
excused + leave_type=sakit or remark contains sakit Sakit
excused otherwise Izin
absent Alpa

Unknown free-text alone → Tidak Diketahui on read when flags empty.

Certification stance

Documented as Product current plus T4.1 path A (mandatory reason on reopen). Formal draft→complete→correct-with-reason remains a residual product enhancement (NOT_IMPLEMENTED as a separate workflow) until DEC-006/007. Do not invent cutoff/approval in tests.