Midterm Reports

📝 Midterm Test Reports — Once per term

Generate midterm sheets that contain only midterm test scores (from CBTs with assessment_type='test' pushed to a Midterm column). These are separate from terminal reports (which contain CA1/CA2/Exam etc.) — both can coexist for same class/term/session, in sync via report_scores, not conflicting.

Tip: Create a Midterm Test CBT (type test), push its scores to a column named Midterm (create it in Report Cards → Columns if not exists), then generate here.

Select class/term/session to generate.

How it stays in sync with terminal reports

  • Same source: Both midterm and terminal read from report_scores → assessment_columns. Midterm filters name ILIKE 'midterm%' or cbt_assessment_type='test'; terminal uses all other columns. So updating a score via CBT push instantly reflects in both reports after re-generating.
  • No conflict: midterm_report_cards has unique(student_id_ref, class, term, session) separate from report_cards (report_cards is terminal). Same student can have both for same term.
  • Published flag: Tutors generate (published=false) first to preview, then publish. Students/parents only see published via get_midterm_report + RLS is_parent_of.