Notice board
How staff write and publish a notice, who is told, and which board opens.
Staff write notices for guardians and students. A background sweep publishes them and sends in-app and email notifications.
Who is told, and when
The sweep (PublishNoticesSweep) picks up notices that are scheduled and due, or published but not yet notified, and not expired. Recipients:
| Notice | Reaches |
|---|---|
| Audience | Active students, and/or verified guardians of active students |
| With a campus | Only that campus |
| With targets | Only those levels, classes or streams |
| No targets | The whole campus, or the whole school when there's no campus |
Nobody matching means a reach of zero and nothing sent. A failed send lets a later run try again. A notice is only ever notified once: unpublishing and republishing doesn't send it again.
Which board a notice opens
Students read /student/notice-board; guardians /guardian/notice-board (opening it clears the unread badge). A notification click takes a student to the student board and everyone else, including staff, to the guardian board. See Where a notification opens.
Writing a notice
The staff screen is /staff-hub/school/notice-board (needs list on notice_board), with tabs All, Drafts, Scheduled, Published and Expired. There is no campus notice board.
Write. A title and body. Optionally pin it to the top (Featured).
Audience. One campus (the default) or the whole school (only for those who can create without a campus). Guardians, students or both, optionally narrowed to O-Level or A-Level, then classes, then streams. A live line shows "Reaches N guardians and N students". Scope and campus can't change once saved.
Publish. An optional event date, an optional expiry (defaults to the event day, otherwise never), then Now, Schedule (default 08:00) or Save as draft.
Publish now on a new notice creates it, then publishes. If the publish fails, it's left as a draft ("Draft saved, not published"); use Publish now on its row.
Each row shows who it's for, when it publishes, or how many it Reached. The row menu has Edit, Publish now, Unpublish (update) and Delete (delete).
Notice board routes
Paths are under /api/v1/notice-board.
| Route | Operation id | Who | Does |
|---|---|---|---|
POST / | createNotice | Staff, create | A future publishAt stores scheduled, none stores draft. Sends nothing |
GET / | listNotices | Staff, list | Every status; filter by status and campus, search the title |
GET /feed | listMyNotices | Guardians and students | Published notices addressed to them |
POST /reach | previewNoticeReach | Staff with create or update for that campus | Counts only |
GET /:id | getNotice | read | Families only see it once published and addressed to them |
PATCH /:id | updateNotice | Staff, update | Targets replace the set. A published notice can still change its expiry, not publishAt. Doesn't resend |
POST /:id/publish | publishNotice | Staff, update | Sets scheduled for now and queues the sweep |
POST /:id/unpublish | unpublishNotice | Staff, update | Published or expired back to draft |
DELETE /:id | deleteNotice | Staff, delete | Soft delete |
When expiresAt is omitted and eventAt is set, the notice expires at the end of the event's day in UTC. In Kampala that is just before 03:00 on the next day.