Naalya Handbook
School features

Classes and streams

The class and stream routes, what the Hub panels add on top, what delete leaves behind, and how the next class is proposed.

A class is a year group on a campus (Senior 3); a stream is a section inside it (Senior 3 A). Both are structure, not tied to an academic year; enrolments tie a student to a class for a year. Staff steps are on Set up a class.

API rules

Class and stream routes both use the class permission (create, list, read, update, delete); there is no stream permission.

ClassStream
RequiredcampusId, non-empty name, non-empty gradeLevel, level (o-level or a-level)classId, non-empty name; optional description and integer capacity
CheckselectiveMin and electiveMax (optional, at least 0, null clears) only refused when min > max: electiveMin cannot be greater than electiveMax. Level isn't checked against them. No unique name check; no minimum on orderCapacity not compared with enrolled count
UpdatePartial of create, so a caller can send a new campusIdPartial of create, so a new classId moves the stream (no separate assign route)
DeleteSoft-deletes the class only; stream rows are left. Class deleted successfullySoft-delete. Stream deleted successfully
MissingClass not foundStream not found

Lists add the count of active enrolments in the campus's current year.

What the Hub adds

ScreenBehaviour
Classes pageNeeds list on class. Cards show grade level, name, stream count and current-year active students. Search filters loaded cards only. Empty: No O-Level classes / No A-Level classes; no match: No classes found
Create ClassWrapped in create on class. Resets Level to O Level when opened (even from the A-Level tab). Refuses a negative Progression Order and Minimum cannot exceed maximum. Switching to A Level clears the elective fields
Add StreamCapacity must be a positive whole number if given, so 0 won't submit
Class Settings tabNeeds update. Fields: Name, Grade Level, Level, Progression Order, Min and Max electives (O Level only), Description; no campus field. Name is required, Grade level is required. Toasts Class updated successfully / Failed to update class
Danger zoneNeeds delete. Type the class name to confirm. The dialog says streams are deleted too, but the API leaves them

Next class and the enrol wizard

getNextClass uses the student's latest enrolment:

Latest enrolmentResult
NoneNo next class, not graduating, no prior enrolment
Class has no orderNo next class, not graduating
Same-campus class with order + 1 existsThat class
No such classGraduating

The student page's enrol wizard offers the current campus year and later unlocked years, prefers the year being viewed, marks the proposed class Proposed, defaults status to Active, and sends the date as ISO. Enroll is hidden while the student has any active or pending enrolment, though the API would accept one in another year. API rules are on Enrollment.

The Class setup summary and Set up classes helpers are on AI helpers on staff screens.

On this page