Skip to content

Add API endpoint to export courses as ZIP and backfill session data#1888

Merged
vikrantwiz02 merged 1 commit into
FusionIIIT:prod/acad-reactfrom
vikrantwiz02:prod/acad-react
May 1, 2026
Merged

Add API endpoint to export courses as ZIP and backfill session data#1888
vikrantwiz02 merged 1 commit into
FusionIIIT:prod/acad-reactfrom
vikrantwiz02:prod/acad-react

Conversation

@vikrantwiz02
Copy link
Copy Markdown
Member

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 session and semester_type fields in the course_registration model. It also includes a data migration to backfill these fields for existing records and ensures they are set on new records.

New export feature:

  • Added the export_all_courses_zip API 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]
  • Imported the zipfile module to support the new export functionality. (FusionIIIT/applications/academic_information/api/views.py)

Data integrity improvements:

  • Updated the verify_registration function to set the session and semester_type fields when creating new course_registration records, ensuring these fields are always populated going forward. (FusionIIIT/applications/academic_procedures/api/views.py)
  • Added a Django migration to backfill session and semester_type for existing course_registration records that are missing these fields, deriving values based on semester_no and working_year. (FusionIIIT/applications/academic_procedures/migrations/0020_backfill_course_registration_session.py)

@vikrantwiz02 vikrantwiz02 merged commit ba81318 into FusionIIIT:prod/acad-react May 1, 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