Skip to content

Add academic year, last graded semester and degree standing to Grade Validation - #1998

Merged
vikrantwiz02 merged 1 commit into
FusionIIIT:prod/acad-reactfrom
vikrantwiz02:grade-validation-header-details
Sep 27, 2026
Merged

vikrantwiz02 merged 1 commit into
FusionIIIT:prod/acad-reactfrom
vikrantwiz02:grade-validation-header-details

Conversation

@vikrantwiz02

Copy link
Copy Markdown
Member

The Grade Validation document needs three details the API did not previously return.

Academic year per semester. Taken from Student_grades.academic_year, which is stored inconsistently as either 2024-25 or 2024-2025. A small normaliser expands both to the full span so the document always reads 2024-2025. Registered-but-ungraded semesters have no such column, so those derive the span from course_registration.working_year.

Last graded semester. The last semester in the payload that is not registration-only. It reuses the label the semester block already prints, so the header can never disagree with the block below it — and that label already handles summer terms correctly: a summer semester stored as semester=8 with type Summer Semester reads Summer Semester 4, not Semester 8.

Degree standing. One line stating either that the requirements are met or how many credits remain. This is computed server-side because the document is an official record, and because the batch ZIP export previously printed no standing line at all while the single-student download did — the two now share one source.

_degree_standing_text mirrors the frontend credit rules in lib/credits.js, including the parts that are easy to get wrong: dedupe by course code keeping the best-graded attempt, skip superseded rows, and discount swayam credits above the six-credit cap. It is undergraduate-only, since the 148-credit requirement is an undergraduate rule.

The server-side ZIP export gets the same header rows, with its table spans computed from the row count rather than hardcoded, so adding a row cannot silently mis-span the one beneath it.

@vikrantwiz02
vikrantwiz02 merged commit a2fdcab into FusionIIIT:prod/acad-react Sep 27, 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