Skip to content

B.Tech sectioning, per-section grade submission & course feedback - #1941

Merged
vikrantwiz02 merged 12 commits into
FusionIIIT:prod/acad-reactfrom
vikrantwiz02:sections-clean
Aug 2, 2026
Merged

B.Tech sectioning, per-section grade submission & course feedback#1941
vikrantwiz02 merged 12 commits into
FusionIIIT:prod/acad-reactfrom
vikrantwiz02:sections-clean

Conversation

@vikrantwiz02

Copy link
Copy Markdown
Member

Merges the sections work into prod/acad-react. Branched from the phd-free tip of sections and synced with the latest prod/acad-react, so this PR is sections-only (no phd) and migrates on a fresh DB with no --merge.

What's included

  • B.Tech sectioning (A–F)Student.section + compute_section; manual assignment via Academics → Section Assignment (auto-derivation removed).
  • Per-section course instructorsCourseInstructor.section_label; registrations/grades bound to their offering via resolve_offering.
  • Grade submission — per-section by the assigned faculty; acadadmin can also submit any section; section required for sectioned courses; roster/preview scoped to the owning faculty.
  • Course feedback — student feedback form (per registered course/instructor); section-aware admin responses view.
  • Section-aware roll lists (Generate Student List, faculty download).

Migrations

academic_information 0003, programme_curriculum 0033/0034, academic_procedures 0021/0022, online_cms 0005. Additive; apply cleanly on top of prod/acad-react (phd not included → no leaf conflict here).

Verified

Django check clean; migration graph conflict-free. Frontend counterpart: FusionIIIT/Fusion-client (sections-clean → acad-main).

- Add Student.section (A-F), derived from discipline + roll-number parity
  via compute_section(); assigned at student onboarding and recomputed on
  branch change. backfill_sections management command for existing students.
- Make CourseInstructor a per-section offering: add section_label and change
  uniqueness to (course, year, semester_type, section_label) so each section
  has exactly one owning faculty; single-offering enforcement for electives.
- Bind registrations and grades to their offering: add course_instructor FK
  to course_registration, FinalRegistration and Student_grades; resolve_offering()
  + binding at verification; bind_course_offerings management command.
- Scope grade submission per instructor/section in UploadGradesProfAPI (a
  faculty may only grade their own section); remove the acadadmin proxy
  submission path (SubmitGradesView / UploadGradesAPI).
- Harden ModerateStudentGradesAPI (term-aware, no MultipleObjectsReturned) and
  make GradeStatusAPI report status per section.
- Make the student roll list (generate_xlsheet_api) section-aware: optional
  section filter, Section column, section-aware instructor.
- Migrations: academic_information 0003, programme_curriculum 0033,
  academic_procedures 0021, online_cms 0005.
- Add StudentBatchUpload.section, auto-derived in save() from discipline +
  roll-number parity, so a student's section is decided when data is fed via
  Admin > Upcoming Batches (recomputed on every save, e.g. when a roll number
  is later assigned). Auto-exposed by StudentBatchUploadSerializer (fields '__all__').
- Migration: programme_curriculum 0034.
- get_batch_students now includes each student's section in its response so the
  Upcoming Batches admin view can display it (StudentBatchUpload.section, derived
  at admission from discipline + roll-number parity).
- New acadadmin Section Assignment API: section/batches, section/students, section/assign
- Stop auto-deriving Student.section (onboarding + StudentBatchUpload.save); branch change clears it
- get_batch_students shows the assigned section read-only (by roll number)
- available_courses exposes per-course sections from enrolled students' Student.section
- Faculty assigned-courses API returns each offering's section
- SubmitGradesProfAPI: allow acadadmin (lists all offerings that term) and
  return per-course sections (faculty = own offerings' section_labels, acadadmin
  = all); electives/interdisciplinary have none.
- UploadGradesProfAPI: allow acadadmin (bypass instructor ownership), accept an
  optional section to scope the roster; each grade still binds to the student's
  own offering via resolve_offering.
- download_template + PreviewGradesAPI: accept section to scope the roster.
student_questions now resolves each registered course's instructor via
resolve_offering (the student's own section offering), falling back to any
offering for single-offering / legacy no-section courses.
- FeedbackResponse.course_instructor FK (migration 0022) so responses are tied
  to the offering rated; student_submit binds it via the shown offering.
- student_questions: skip courses with no instructor; show the student's section instructor.
- admin_course_list: split sectioned courses into per-instructor rows (+ an
  "unassigned" row for responses with no offering recorded).
- admin_all_stats: filter by course_instructor (incl. isnull); fixed section order.
- GradeStatusAPI: report each offering by its own status; fall back to
  course-level only when no offering has grades bound (was marking unsubmitted
  sections as Submitted/Verified).
- download_template & PreviewGradesAPI: faculty may only access courses they
  teach (acadadmin/Dean: any); previously any faculty could pull any roster.
- UploadGradesProfAPI: reset reSubmit only for this submission's roster (never
  course-wide when programme_type is empty).
- student_submit: accept an option only if it belongs to the question, and
  derive the section from the question instead of trusting the request.
Bring sections up to date with the latest production while keeping its
section-aware / per-instructor grade-submission and B.Tech sectioning work.
Reconcile examination grade submission: keep section-aware roster scoping and
Summer CourseInstructor year handling, and adopt production's selected-role
acadadmin detection and registration-based acadadmin course list.
Sections are a UG-only concept (compute_section returns a section only for
B.Tech/B.Des). Gate all section handling on programme_type == UG in
download_template, UploadGradesProfAPI (section param + per-section roster
scoping) and PreviewGradesAPI, so PG/PhD grade submission ignores sections
and grades the whole programme's registered students together.
@vikrantwiz02
vikrantwiz02 merged commit bc08a17 into FusionIIIT:prod/acad-react Aug 2, 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