Skip to content

Register a new intake into the semester it is already in, and require Devanagari for the Hindi name - #1963

Merged
vikrantwiz02 merged 1 commit into
FusionIIIT:prod/acad-reactfrom
vikrantwiz02:acad-first-semester-registration
Aug 20, 2026
Merged

Register a new intake into the semester it is already in, and require Devanagari for the Hindi name#1963
vikrantwiz02 merged 1 commit into
FusionIIIT:prod/acad-reactfrom
vikrantwiz02:acad-first-semester-registration

Conversation

@vikrantwiz02

Copy link
Copy Markdown
Member

A new intake could not pre-register for its own first semester

Pre-registration stores rows against the semester being registered into, which for a continuing student is the one after the semester they are in. Applied to a batch that has just arrived, that rule skipped the first semester: those students were offered the second semester's courses, and no calendar name could open the first semester at all.

The target semester is now decided by whether the student has anything registered in the semester they are in:

student registers into
just admitted — first semester, nothing registered that same semester
first semester, courses already registered the next one
any later semester the next one

The rule corrects itself: once the intake's first-semester registration exists, that student's next pre-registration targets the following semester, with no flag to unset.

Checked against a copy of production: a first-semester student with no courses is offered 6 slots, all from semester 1 of their own curriculum, where previously they were offered semester 2. Students with 18 and 32 registrations behind them are unaffected, as is a first-semester student who already has courses.

Verification follows the same rule rather than assuming the next semester — otherwise it would look for a registration that does not exist — and it promotes a student only when the semester registered is ahead of the one they are in. Without that, verifying an intake's first-semester registration would move them into the second semester on the day they arrived.

The calendar convention now has no exceptions. The number in Pre Registration <n> <year> is always the semester being registered into, so the intake opens on Pre Registration 1 <year> and every later cohort on its own target. An earlier Pre Registration 0 spelling has been removed.

Course lists are unchanged and remain per branch: slots come from student → batch → curriculum → semester, so each discipline sees only its own first-semester courses.

The Hindi name must be in Devanagari

The first-login profile popup collects a Hindi name beside the Latin one, and accepted anything — an English repeat of the name carried no information. It now requires at least one Devanagari character and permits only Devanagari, spaces and the punctuation names use, including the zero-width joiners conjuncts need. Latin letters, digits and mixed spellings are rejected, on the server and in the form.

Three tests added: English rejected, mixed spelling rejected, Devanagari with spaces accepted and stored.

Deploying

Two follow-ups on the production database, neither of which this migration can do:

  • rename the calendar event to Pre Registration 1 <year> for the intake;
  • clear any pre-registration rows a first-semester student created under the second semester while the old rule applied, together with their StudentRegistrationChecks row — the page returns an existing registration before it consults the calendar, so stale rows keep being shown.

manage.py check clean, no migrations.

… Devanagari for the Hindi name

Pre-registration writes rows against the semester being registered into, which
for a continuing student is the one after the semester they are in. A newly
admitted batch has nothing registered in its first semester yet, so applying
that rule to them skipped semester one entirely: they were offered the second
semester's courses, and the office had no calendar name that could open the
first semester at all.

The target semester is now decided by whether the student has anything
registered in the semester they are in. If they do, they register into the
next one, exactly as before. If they do not -- which is only true of an intake
that has just arrived -- they register into the semester they are in. The rule
corrects itself: once that first registration exists, the same student's next
pre-registration targets the following semester.

Verification follows the same rule rather than assuming the next semester, so
it finds the registration to verify, and it promotes a student only when the
semester registered is ahead of the one they are in. Without that, verifying an
intake's first-semester registration would have moved them into the second
semester on the day they arrived.

The calendar convention is unchanged and now has no exceptions: the number in
"Pre Registration <n> <year>" is always the semester being registered into, so
the intake opens on "Pre Registration 1".

Separately, the Hindi name collected in the first-login profile popup must be
written in Devanagari. The Latin spelling is already the name field, so an
English repeat there carried nothing. Devanagari, spaces and the punctuation
names use are accepted, including the zero-width joiners conjuncts need.
@vikrantwiz02
vikrantwiz02 merged commit eb3b47a into FusionIIIT:prod/acad-react Aug 20, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant