Enhance course request views with semester information - #1946
Merged
vikrantwiz02 merged 1 commit intoAug 11, 2026
Conversation
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.
This pull request enhances the academic procedures API by improving the detail and robustness of course request listings and batch allocation logic. The main changes include adding semester information to various request endpoints, ensuring related data is efficiently fetched, and making the batch allocation process for course replacements more resilient when expected registrations are missing.
Improvements to API Response Data:
Added the
semesternumber (fromcourse_slot.semester.semester_no) to the response objects for course replacement, add, and drop requests in both student and admin listing endpoints. This provides more context in API responses for consumers. [1] [2] [3] [4] [5]Updated queryset
select_relatedcalls in admin list endpoints (admin_list_requests,admin_list_add_requests,admin_list_drop_requests) to includecourse_slot__semester, optimizing database queries and reducing the number of queries required when accessing semester information. [1] [2] [3]Robustness in Batch Course Replacement Allocation:
Modified the
allocate_allfunction to allow processing only a subset of request IDs if provided, making the batch process more flexible.Improved handling when a course registration to be replaced does not exist: such requests are now skipped (with a status and reason returned), instead of causing the batch process to fail. This ensures the batch continues processing valid requests even if some are inconsistent.