Let a section be any short alphanumeric label, and publish the ones in use - #1965
Merged
vikrantwiz02 merged 1 commit intoAug 23, 2026
Conversation
…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.
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.
Sections were fixed to the six letters A–F in three separate places, so an office that wants
A1,CS2or a numbered stream had nowhere to record it:Student.section— a two-character column carrying anA–Fchoice listassign_section— refused anything that was not one or two lettersChange
A section is now any label of up to eight letters or digits. The choice list is gone,
Student.sectionandCourseInstructor.section_labelare both eight characters wide, and the assignment endpoint enforces the same limit:A1CS2toolongsection400 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:
after assigning
CS2to a couple of students: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
CourseInstructorofferings 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 checkclean, no pending migrations.