Register a new intake into the semester it is already in, and require Devanagari for the Hindi name - #1963
Merged
vikrantwiz02 merged 1 commit intoAug 20, 2026
Conversation
… 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
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 onPre Registration 1 <year>and every later cohort on its own target. An earlierPre Registration 0spelling 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:
Pre Registration 1 <year>for the intake;StudentRegistrationChecksrow — the page returns an existing registration before it consults the calendar, so stale rows keep being shown.manage.py checkclean, no migrations.