Streams, electives, languages — without the spreadsheet. PCM vs PCB. Three-language formula. Optional subject pool.
Define streams, electives, language groups and optional-subject pools that govern how Class 9–12 students choose subjects. Mutually exclusive PCM vs PCB, three-language formula, min-max range, prerequisites and conditional rules — all configurable per session.

Why Subject Groups exist — the Class 11 stream selection problem
It is May at a CBSE school in Kanpur. The Class 10 board results just came out. 240 students promote to Class 11 and the academic office has six weeks to lock in stream selection. Some students want Science PCM. Some want Science PCB. Some are switching to Commerce. Three want Humanities with Psychology. Two students want Mathematics in Commerce as the elective. One wants Physical Education as the sixth subject in the Science stream.
In Excel this becomes a nightmare. The academic head opens a spreadsheet with 240 rows and 12 columns of subject names, and starts ticking. By 8 PM she has 47 students in stream combinations the school does not actually run. Two students are in PCM and PCB simultaneously. Four are missing a second language. The marksheet template breaks because Class 11 PCB "Mathematics" doesn't exist as an offering. The principal cancels Friday's stream-allocation parent meeting because the data is not ready.
Inkwelly Subject Groups solves this at the structural level. You define PCM, PCB, Commerce-with-Maths, Commerce-with-IP, Humanities as four mutually exclusive groups in Subject Offerings. You define Second Language as a MANDATORY_ONE pool of three. You define Optional Sixth Subject as a FREE_CHOICE pool of five. When the parent or counsellor opens the student's enrolment screen, the system enforces these rules. Two students cannot accidentally end up in PCM and PCB. Every student gets exactly one second language. The marksheet template generates correctly because every student's subject set is internally consistent.

How Subject Groups actually works
A Subject Group is a named container of subject offerings plus the rules students must follow when choosing among them. The four group types — STREAM, LANGUAGE_GROUP, ELECTIVE_GROUP, MANDATORY_GROUP — cover every Indian-school choice scenario, from "all Class 9 students must take Computer Applications" to "Class 11 PCM students may add Applied Mathematics as the seventh subject only if they did not opt for Physical Education".
The Selection Mode is the workhorse. MANDATORY_ALL means every subject in the group is auto-enrolled — the PCM stream's Physics + Chemistry + Mathematics is one such group. MANDATORY_ONE means the student must pick exactly one — common for second-language pools (English, Hindi, Sanskrit). MANDATORY_RANGE lets you say "pick 1 to 2 from this elective pool of 4" — common for ICSE Group 2 electives. FREE_CHOICE lets students pick any number, including zero — common for optional sixth subjects. CONDITIONAL lets you encode dependent rules — "Advanced Mathematics is available only if PCM was selected".
Groups can declare a prerequisite — Class 11 stream must be locked before Class 11 second language can be picked. Groups can be mutually exclusive — choosing PCM excludes PCB, Commerce and Humanities. Groups carry a conditionalRules JSON that supports IF_SUBJECT and IF_NOT_SUBJECT triggers for advanced cases. Once a group has any active student enrolments, deletion is blocked — the API returns SUBJECT_GROUP_HAS_ENROLLMENTS and forces you down the safe Disable path.
What every group configures
- Name and code — "Science Stream PCM", code "PCM", unique per school+session combination
- Slug — auto-generated from name ("science-stream-pcm"), used in URL and audit log
- Description — free text shown to students and parents on the enrolment dialog
- Group Type — STREAM | LANGUAGE_GROUP | ELECTIVE_GROUP | MANDATORY_GROUP, drives the colour-coded badge and downstream marksheet routing
- Selection Mode — FREE_CHOICE | MANDATORY_ONE | MANDATORY_ALL | MANDATORY_RANGE | CONDITIONAL — the rule the student must obey
- minRequired and maxAllowed — for MANDATORY_RANGE, the lower and upper bound (e.g., min=1, max=2 for ICSE Group 2 electives)
- Mutual exclusion flag — when true, selecting this group prevents selection of any other group flagged the same (PCM vs PCB vs Commerce)
- Prerequisite group — must complete this group before the dependent group becomes available (lock stream first, then language)
- Conditional rules JSON — IF_SUBJECT / IF_NOT_SUBJECT trigger logic for cross-group dependencies
- Subject offerings list — many-to-many link to active offerings in this school+session, ordered for student-facing display
- Display order — controls how groups appear in the student enrolment UI and on the parent app
- Active toggle — switch a group off mid-session without losing any historical enrolment data
- Audit trail — every change to subjects, rules, mode and toggle captured for inspection
See it in action




CBSE Science PCM vs PCB — mutually exclusive streams
Most CBSE schools run two parallel Science streams: PCM (Physics, Chemistry, Mathematics) and PCB (Physics, Chemistry, Biology). The catch — once a student picks one, they cannot accidentally also pick the other. In Inkwelly you create both as STREAM group type with selectionMode=MANDATORY_ALL and isMutuallyExclusive=true. The student enrolment UI hides PCB the moment PCM is selected, and the API rejects any backend attempt to enrol the same student in both. Mid-year stream change works the way it should: drop PCM, pick PCB, the system creates a clean audit trail and the new term's marksheet template adjusts.


The three-language formula, configured as three groups
NEP 2020 expects schools to honour the three-language formula — students learn one language native to their region, one official language, and a third language of choice. In Inkwelly this becomes three LANGUAGE_GROUP type groups. First Language has Hindi and English as MANDATORY_ONE. Second Language has English, Hindi and Sanskrit as MANDATORY_ONE (auto-excluding whichever was chosen as first). Third Language has French, German, Marathi, Bengali and others as FREE_CHOICE — the student may add one or skip entirely. The Conditional Rules JSON handles the exclude-if-chosen-as-first logic so a student cannot pick Hindi as both first and second language.
ICSE Group 2 — pick 1 to 2 from a pool
ICSE Class 9–10 expects compulsory subjects + Group 1 (3 of 4) + Group 2 (1 of 3). The Group 2 pool — Home Science, Business Studies, Economics — uses ELECTIVE_GROUP with selectionMode=MANDATORY_RANGE, minRequired=1 and maxAllowed=2. The student enrolment UI shows real-time count ("1 of 2 selected"). The API blocks save until the count is in range. The marksheet template knows which Group 2 subjects each student took and prints only those rows. ICSE board paperwork at year-end is a one-click PDF export.


Prerequisites and conditional rules
Real Indian schools have ordering rules. Class 11 stream must be picked before second language. Advanced Mathematics is offered only to PCM students. Painting elective requires Class 9 Art credit. Subject Groups encodes both via prerequisiteGroupId (one group must complete before another becomes selectable) and conditionalRules JSON (IF_SUBJECT / IF_NOT_SUBJECT triggers). The student enrolment UI shows a locked icon on dependent groups until the prerequisite is satisfied. The API validates server-side too, so even custom integrations cannot bypass the rules. Cycle detection prevents accidentally chaining A → B → A; the create endpoint returns PREREQUISITE_CYCLE_DETECTED.
“PCM aur PCB ke beech students ka mix-up har saal Class 12 ke marksheet pe pakda jaata tha. Inkwelly ke Subject Groups me mutual exclusion daala — ab admission desk pe hi UI rok deta hai. Six months me ek bhi ghalti nahi hui.”
Real-world scenarios from Indian schools
1. CBSE school locking Class 11 stream selection. In May, the academic head creates four STREAM groups — PCM, PCB, Commerce-with-Maths, Commerce-with-IP, Humanities — all isMutuallyExclusive=true. Each contains the right Subject Offerings. Class 10 results land. Counsellors open each student's profile and pick exactly one stream from the dropdown. The system auto-enrols all the MANDATORY_ALL subjects. The 240-student stream allocation, which used to take three weeks of Excel work, finishes in five days end-to-end.
2. ICSE Class 9 elective allocation. The school has Compulsory subjects (auto-enrolled), Group 1 = 3 of 4 (Hindi, History, Geography, Civics), Group 2 = 1 of 3 (Home Science, Business Studies, Economics), and a free-choice Music/Art/Dance pool. Four Subject Groups handle this — MANDATORY_GROUP for Compulsory, ELECTIVE_GROUP with MANDATORY_RANGE (3,3) for Group 1, ELECTIVE_GROUP with MANDATORY_RANGE (1,1) for Group 2, FREE_CHOICE for Arts pool. The student enrolment dialog shows live counts and blocks invalid saves.
3. NEP 2020 three-language formula in a State Board school. A Marathi-medium school in Pune offers Marathi (first language), English (mandatory second), and Hindi/Sanskrit/French (third, optional). Three LANGUAGE_GROUP groups encode the rules. The Conditional Rules JSON ensures Marathi cannot also be picked as third language. Parent app shows the chosen languages on the student profile in their script.
4. Mid-year stream change request. A PCB student wants to switch to PCM in October. The academic head opens the student profile, deselects PCB (which removes Biology enrolment), selects PCM (which adds Mathematics enrolment via MANDATORY_ALL). The audit log captures the change with timestamp and user. Term 1 marks for Biology stay archived; Term 2 marksheet now shows Mathematics. No data corruption, no orphan rows.
5. ICSE elective cap enforcement at scale. A 1,800-student ICSE school across Class 9–12 wants to enforce "no student can carry more than 7 academic subjects". One STREAM group (MANDATORY_ALL = 5 core), one ELECTIVE_GROUP with MANDATORY_RANGE (1,2) for Electives, plus FREE_CHOICE for 0–1 hobby subjects. The system blocks any student configuration that exceeds the cap. The principal's quarterly board report uses the audit log to show stream-and-elective compliance for every student.
Common operations covered
- Create a new STREAM group with auto-enrol logic for Class 11 / Class 12
- Create a LANGUAGE_GROUP with MANDATORY_ONE for first or second language
- Create an ELECTIVE_GROUP with MANDATORY_RANGE for ICSE Group 1, Group 2 or IGCSE pools
- Mark groups as mutually exclusive — picking PCM auto-blocks PCB, Commerce, Humanities
- Chain groups via prerequisites — lock stream before language, lock Class 9 before Class 10 promotion
- Add or remove subject offerings from a group via the detail page
- Toggle a group active or inactive without losing existing student enrolments
- Export the per-session group configuration as PDF — used for CBSE/ICSE board paperwork
- Audit log per group — captures who changed which rule, when, with the previous value
- Filter groups by type (STREAM, LANGUAGE_GROUP, ELECTIVE_GROUP, MANDATORY_GROUP) or selection mode
- Search by group name, code or slug — Devanagari and Latin both supported
- Drill from a group into the teaching batches currently using its subjects
See Subject Groups solve real CBSE Class 11 stream allocation
30-minute walkthrough on a real Indian school's Class 11 PCM/PCB/Commerce/Humanities setup. We show you mutual exclusion, three-language formula and the ICSE Group 2 elective rules.
Limits, safety and the small print
Maximum subjects per group. No hard cap, but the UI is optimized for 3–15 subjects per group. Beyond 30, consider splitting into multiple smaller groups to keep the student enrolment dialog scannable on a phone screen.
Code and slug uniqueness. Group code and slug must be unique per (school, session, organization) combination. Duplicate creates return SUBJECT_GROUP_ALREADY_EXISTS (HTTP 409). Codes like "PCM", "PCB", "COM-MATHS" are valid; spaces and special characters are auto-stripped from the slug.
Prerequisite cycles are detected. You cannot create A → B → A or A → B → C → A. The create endpoint runs a topological-sort check and returns PREREQUISITE_CYCLE_DETECTED (HTTP 400) before any record is written.
Subject offering must be active and in the same session. A group can only contain offerings that are already active for the same session. The API returns SUBJECT_OFFERING_NOT_FOUND if you try to attach an offering that does not exist in this session — protects against cross-session data leaks.
Range validation. For MANDATORY_RANGE, maxAllowed must be ≥ minRequired. The validator returns a clear error message rather than silently clamping. minRequired cannot exceed the count of subjects in the group.
Deletion is blocked when enrolments exist. Once any active student is enrolled via the group, the API returns SUBJECT_GROUP_HAS_ENROLLMENTS (HTTP 400) on delete attempts. Use the Active toggle to disable instead — historical enrolment data stays intact for parent app, transcript and inspection use cases.
Permissions. Only roles with academics.subject_groups.write can create, update, or delete groups. The role is part of Identity & Access Management and can be granted on a per-school basis to a regional academic head without exposing other school admin functions.
किस मॉड्यूल का हिस्सा
1 moduleअक्सर पूछे गए सवाल
8 सवालDo I need separate Subject Groups for Class 11 and Class 12 streams?
Typically no — the same four streams (PCM, PCB, Commerce, Humanities) span both Class 11 and 12 with the same subjects. You create one set of groups per academic session, and Class 12 students stay in the same group they enrolled in for Class 11. Some schools create separate Class 12 groups when they offer extra Applied subjects only to Class 12 — both patterns work. The Group's display order controls which group shows up first in the enrolment dropdown.
Can a student be in two streams at the same time?
No. STREAM groups marked `isMutuallyExclusive=true` enforce single-stream selection. The student enrolment UI hides other mutually exclusive groups the moment one is picked, and the API returns a validation error if a backend integration tries to create a second stream enrolment. This is the bug that catches CBSE schools every October at marksheet print time — Subject Groups makes it structurally impossible.
How does this handle the NEP 2020 three-language formula?
You create three LANGUAGE_GROUP type groups: First Language, Second Language, Third Language. First and Second are MANDATORY_ONE; Third is FREE_CHOICE. The Conditional Rules JSON encodes the *exclude-if-chosen-as-first* logic so a student cannot pick Hindi as both first and second language. The marksheet template prints all three columns with the right student-specific values for every report card.
What if a student wants to change stream mid-year?
Open the student profile, deselect the old stream, select the new one. The system removes the old MANDATORY_ALL subject enrolments and adds the new ones. Term 1 marks for the dropped subjects stay archived (transcripts still show them), and Term 2 onwards uses the new stream. Audit log captures the change with timestamp, user, and the previous configuration.
Can I run different groups in different branches of the same trust?
Yes. Subject Groups are per-school per-session, even though the underlying subjects live at the organization level. A CBSE branch in Lucknow can run Sanskrit as second language while an ICSE branch in Bahraich runs French as third language — both share the same org subject catalogue but configure their own groups independently. The trust's central academic head sees a consolidated audit view across all branches.
How does Subject Groups feed marksheets and report cards?
The marksheet generator reads each student's enrolled groups, expands them into individual [subject offerings](/features/subject-offerings), and prints only the relevant rows. A PCM student's report card shows Physics, Chemistry, Mathematics, English Core and the chosen optional sixth subject — never PCB's Biology. Group metadata (Stream Type, Selection Mode) is also stamped on the transcript so a CBSE inspector can verify scheme compliance from the document alone.
What happens to historical group changes when CBSE comes for an inspection?
Every change to a Subject Group — name, type, mode, subjects added/removed, prerequisites, mutual exclusion flag — is captured in the audit log with timestamp, user, and before/after values. The audit log is exportable as PDF or CSV from the org dashboard. Inspections requesting "how did your stream allocation work in Session 2024-25?" get a verifiable answer in minutes, not days.
Is the subject groups data stored in India?
Yes. All Inkwelly data including subject groups, student enrolments, audit logs and inspection-ready exports is stored on servers in Mumbai and is compliant with India's DPDP Act 2023. Backups are encrypted and retained for 30 days. Trust-level admins can request a full per-school data export at any time.
आपको ये भी पसंद आ सकता है
2 लेखInkwelly आपके स्कूल पर — खुद देखें
30 मिनट का डेमो। आपके मौजूदा ERP को आपके साथ खोलकर, कॉल पर ही आपका डेटा Inkwelly में लोड करते हैं। कॉल ख़त्म होते-होते एक तय तारीख़ का गो-लाइव प्लान आपके हाथ में।