PhD milestones + examination/grading fixes#1934
Merged
Merged
Conversation
apply_demotion endpoint moves selected students one semester back (floored at sem 1); safe inverse of an accidental promotion — decrements curr_semester_no only, without deleting course registrations.
create_course_audit_log stored old/new data and versions into JSONField columns whose default encoder can't serialize Decimal (Course.version is a DecimalField). The course row saved first, then the audit log insert raised -> 500, leaving the course added in the DB while the UI showed failure (and "already exists" on retry). Coerce audit values to JSON-native types via DjangoJSONEncoder before saving.
Refactor grade calculation and improve course audit logging
- Add acadadmin to SubmitGradesProfAPI and UploadGradesProfAPI role gates - acadadmin sees every course offered in the selected term (admin-wide listing); faculty stay scoped to the courses they teach
Examination: allow acadadmin to submit and upload grades
- SubmitGradesProfAPI: acadadmin's course list is registration-based (session + semester_type) instead of gated by CourseInstructor, so courses with no assigned faculty (e.g. project/BTP courses) appear - UploadGradesProfAPI: acadadmin bypasses the instructor-ownership check; faculty remain scoped to courses they are assigned to teach
Examination: let acadadmin submit grades for any course
…designation - SubmitGradesProfAPI and UploadGradesProfAPI now treat a user as acadadmin only when acting as acadadmin (Role=acadadmin) AND holding the designation - Fixes faculty who also hold acadadmin seeing all courses / bypassing the instructor-ownership check while submitting as faculty
…ookups CourseInstructor stores Odd/Summer under the start year and Even under the end year, but parse_academic_year keys Summer on the end year (to match Student_grades). Add course_instructor_year() helper and use it for every CourseInstructor filter (submit dropdown, upload ownership, download grades, PDF, grade status) so a faculty's Summer courses are found. parse_academic_year and Student_grades storage are left unchanged.
Restrict acadadmin course access by role and update Summer course lookups
…d-react # Conflicts: # FusionIIIT/applications/programme_curriculum/api/views.py
… registration - New models + migrations 0029-0037 (comprehensive exam, open seminar, teaching credit, PhD course registration; seminar/teaching-credit renames) - programme_curriculum: teaching credit + seminar models/serializers/forms (0044-0045) - examination: registration-lineage CPI dedup with PhD thesis/seminar/teaching-credit grades; consolidate transcript building into _build_grade_validation_semesters helper - Resolved merge with upstream/prod/acad-react
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.
Syncs the PhD work branch with
prod/acad-reactand adds the remaining PhD milestone backend.What's included
ThesisReview,ExaminerBankDetails,ReviewInvitation), emailed frontend links, and a scheduledprocess_review_invitationstask._build_grade_validation_semesters.FRONTEND_URLfor building examiner links; console email backend in dev.upstream/prod/acad-react(examination grade-access fixes, audit-log Decimal fix, promote/demote, etc.).Notes
thesis_researchmodule-access flag added inglobals.