Add API endpoint to export courses as ZIP and backfill session data#1888
Merged
vikrantwiz02 merged 1 commit intoMay 1, 2026
Merged
Conversation
…ion data in course registrations
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 a new API endpoint for exporting all course registration lists as Excel files packaged in a ZIP, and addresses issues with missing
sessionandsemester_typefields in thecourse_registrationmodel. It also includes a data migration to backfill these fields for existing records and ensures they are set on new records.New export feature:
export_all_courses_zipAPI endpoint, which allows academic admins and professors to export all courses (filtered by academic year, semester, programme, and list type) as individual Excel sheets bundled in a ZIP file. Each sheet contains detailed student lists, with improved formatting and instructor information. (FusionIIIT/applications/academic_information/api/views.py,FusionIIIT/applications/academic_information/api/urls.py) [1] [2]zipfilemodule to support the new export functionality. (FusionIIIT/applications/academic_information/api/views.py)Data integrity improvements:
verify_registrationfunction to set thesessionandsemester_typefields when creating newcourse_registrationrecords, ensuring these fields are always populated going forward. (FusionIIIT/applications/academic_procedures/api/views.py)sessionandsemester_typefor existingcourse_registrationrecords that are missing these fields, deriving values based onsemester_noandworking_year. (FusionIIIT/applications/academic_procedures/migrations/0020_backfill_course_registration_session.py)