Repository navigation
Add academic year, last graded semester and degree standing to Grade Validation - #1998
Merged
vikrantwiz02 merged 1 commit intoSep 27, 2026
Conversation
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.
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 either2024-25or2024-2025. A small normaliser expands both to the full span so the document always reads2024-2025. Registered-but-ungraded semesters have no such column, so those derive the span fromcourse_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=8with typeSummer SemesterreadsSummer Semester 4, notSemester 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_textmirrors the frontend credit rules inlib/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.