Skip to content

Let a section be any short alphanumeric label, and publish the ones in use - #1965

Merged
vikrantwiz02 merged 1 commit into
FusionIIIT:prod/acad-reactfrom
vikrantwiz02:acad-alphanumeric-sections
Aug 23, 2026
Merged

Let a section be any short alphanumeric label, and publish the ones in use#1965
vikrantwiz02 merged 1 commit into
FusionIIIT:prod/acad-reactfrom
vikrantwiz02:acad-alphanumeric-sections

Conversation

@vikrantwiz02

Copy link
Copy Markdown
Member

Sections were fixed to the six letters A–F in three separate places, so an office that wants A1, CS2 or a numbered stream had nowhere to record it:

  • Student.section — a two-character column carrying an A–F choice list
  • assign_section — refused anything that was not one or two letters
  • the Add / Edit Course Instructor dropdowns — the six letters written out literally

Change

A section is now any label of up to eight letters or digits. The choice list is gone, Student.section and CourseInstructor.section_label are both eight characters wide, and the assignment endpoint enforces the same limit:

assigned result
A1 accepted
CS2 accepted
toolongsection 400 section must be up to 8 letters or digits.
B@ 400 section must be up to 8 letters or digits.

Where the list comes from

Sections exist because one was assigned, so there is nothing to enumerate them from. A new endpoint gathers the labels actually in use — from students holding one and from offerings teaching one — and orders them so plain letters lead and numbered variants follow:

GET /aims/api/section/in-use/   →  {"sections": ["A", "B", "C", "D", "E", "F"]}

after assigning CS2 to a couple of students:

{"sections": ["A", "B", "C", "CS2", "D", "E", "F"]}

The frontend counterpart (FusionIIIT/Fusion-client#297) reads that list in the course-instructor dropdowns, so a section invented on the assignment screen shows up there with no further work.

Worth knowing

The Submit Grades section picker deliberately still lists sections from CourseInstructor offerings rather than this endpoint: its roster is scoped by offering, and listing a section nobody teaches would let a professor open a roster that cannot resolve.

Two migrations, both applied and checked locally: academic_information/0009, programme_curriculum/0053. manage.py check clean, no pending migrations.

…n use

Sections were fixed to the letters A to F: the student field carried that
choice list in a two-character column, the assignment screen refused anything
that was not one or two letters, and the course-instructor dropdowns listed the
six letters literally. An office that wants A1, CS2 or a numbered stream had no
way to record it.

A section is now any label of up to eight letters or digits, stored without a
choice list, and the same limit is applied when one is assigned. The offering's
section label was widened to match.

Sections exist because they were assigned, so there is nothing to enumerate
them from; a new endpoint gathers the labels in use from the students who hold
one and the offerings that teach one, and returns them in an order that keeps
plain letters ahead of numbered variants. The course-instructor forms read that
list instead of the six hardcoded letters, so a section invented on the
assignment screen appears in those dropdowns without further work.
@vikrantwiz02
vikrantwiz02 merged commit 5c5764d into FusionIIIT:prod/acad-react Aug 23, 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