Add API for course allocation and enhance allocation logic - #1939
Merged
vikrantwiz02 merged 1 commit intoJul 30, 2026
Conversation
…ogic to handle skipped courses
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 introduces improvements to the course allocation process, focusing on data integrity and user control during allocation. The key changes add validation to ensure all registered courses are properly linked to their slots, allow skipping problematic courses, and provide an API for admins to quickly fix missing course-slot associations.
Enhancements to course allocation and slot validation:
validate_course_slots) before allocation begins to ensure all registered courses are present in their respective course slots. If any are missing, the allocation is halted and a detailed list of issues is returned to the client. [1] [2]random_algoto support skipping specific courses (bycourse_id) during allocation. Skipped courses are not allocated, and the response includes details about skipped courses and affected students. [1] [2] [3] [4]New administrative API endpoint:
add_course_to_slots_apiendpoint, allowing academic admins to add a course to multiple course slots in bulk, addressing missing associations flagged by validation. [1] [2]API and codebase improvements:
skip_course_ids,slot_ids) in the relevant API endpoints. [1] [2]These changes improve the reliability of course allocation, provide better diagnostics for admins, and introduce tools to quickly resolve data inconsistencies.