Skip to content

Simplify the summer-semester label formula - #1994

Merged
vikrantwiz02 merged 1 commit into
FusionIIIT:prod/acad-reactfrom
vikrantwiz02:semester-summer-widen-backend
Sep 16, 2026
Merged

vikrantwiz02 merged 1 commit into
FusionIIIT:prod/acad-reactfrom
vikrantwiz02:semester-summer-widen-backend

Conversation

@vikrantwiz02

Copy link
Copy Markdown
Member

format_semester_display special-cased semester numbers 2, 4, 6 and 8 to "Summer 1" through "Summer 4", and only used the general semester_no // 2 formula for anything past that.

The formula already gives the identical answer for those four cases (2 // 2 = 1, 4 // 2 = 2, ...), so the special-casing never changed the output -- it just duplicated the same four numbers the fallback already handled correctly, the same way a duplicated grade list on the frontend had let one grade quietly fall out of sync elsewhere in this codebase.

Collapsed to the one line that was already doing the real work. No behaviour change for any semester number; verified semesters 2 through 16 all still resolve to Summer 1 through Summer 8.

format_semester_display special-cased semester 2, 4, 6 and 8 to Summer
1 through Summer 4 and only fell back to the general semester_no // 2
formula past that point. The formula already gives the same answer for
those four cases, so the special-casing was dead weight rather than a
guard against anything -- collapsed to the one line that was already
doing the real work.
@vikrantwiz02
vikrantwiz02 merged commit 9c703f1 into FusionIIIT:prod/acad-react Sep 16, 2026
1 check passed
@vikrantwiz02
vikrantwiz02 deleted the semester-summer-widen-backend branch September 16, 2026 16:21
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