File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
FusionIIIT/applications/academic_information/api Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -533,7 +533,12 @@ def generate_xlsheet_api(request):
533533 ws ['A2' ].alignment = Alignment (horizontal = "center" )
534534
535535 # Get instructor information
536- year_int = int (academic_year .split ('-' )[0 ])
536+ year_parts = academic_year .split ('-' )
537+ if semester_type == "Even Semester" :
538+ year_int = int (year_parts [0 ]) + 1
539+ else :
540+ year_int = int (year_parts [0 ])
541+
537542 instructor_name = "TBA"
538543 course_instructor = CourseInstructor .objects .filter (course_id = course_id , year = year_int , semester_type = semester_type ).first ()
539544 if course_instructor :
@@ -963,7 +968,12 @@ def available_courses(request):
963968 courses = Courses .objects .filter (id__in = course_ids )
964969
965970 data = []
966- year_int = int (year .split ('-' )[0 ])
971+ # Calculate correct year based on semester type
972+ year_parts = year .split ('-' )
973+ if sem == "Even Semester" :
974+ year_int = int (year_parts [0 ]) + 1 # Even semester is in second year (e.g., 2026 for 2025-26)
975+ else :
976+ year_int = int (year_parts [0 ]) # Odd/Summer semester is in first year (e.g., 2025 for 2025-26)
967977
968978 for c in courses :
969979 instructor_name = "TBA"
You can’t perform that action at this time.
0 commit comments