Skip to content

PhD milestones + examination/grading fixes#1934

Merged
vikrantwiz02 merged 14 commits into
FusionIIIT:prod-testfrom
kotangale237:phd
Jul 19, 2026
Merged

PhD milestones + examination/grading fixes#1934
vikrantwiz02 merged 14 commits into
FusionIIIT:prod-testfrom
kotangale237:phd

Conversation

@kotangale237

Copy link
Copy Markdown
Contributor

Syncs the PhD work branch with prod/acad-react and adds the remaining PhD milestone backend.

What's included

  • PhD thesis review workflow: examiner invitations, review models (ThesisReview, ExaminerBankDetails, ReviewInvitation), emailed frontend links, and a scheduled process_review_invitations task.
  • New PhD milestones: comprehensive exam, open seminar, teaching credit, and PhD course registration (models + migrations 0029–0037; programme_curriculum 0044–0045, incl. seminar/teaching-credit renames).
  • Examination: registration-lineage CPI dedup that also counts PhD thesis/seminar/teaching-credit grades; transcript building consolidated into _build_grade_validation_semesters.
  • Settings: FRONTEND_URL for building examiner links; console email backend in dev.
  • Merged latest upstream/prod/acad-react (examination grade-access fixes, audit-log Decimal fix, promote/demote, etc.).

Notes

  • thesis_research module-access flag added in globals.
  • Requires running migrations after merge.

vikrantwiz02 and others added 14 commits July 8, 2026 16:46
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
@vikrantwiz02
vikrantwiz02 merged commit a04b5e2 into FusionIIIT:prod-test Jul 19, 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.

2 participants