Skip to main content

Terms

Route: /dashboard/academic-calendar (Terms tab) File: app/dashboard/academic-calendar/_components/TermsTab.tsx

Term management lives on the Academic Calendar page under the Terms tab. Terms are grouped under their parent academic year so the relationship between a year and its terms is always visible.

Features

Grouped by Academic Year

Each academic year renders as its own section showing:

  • Year name with active/inactive and grading-model badges
  • An Add Term button per year (disabled when the year already has 3 terms or uses year-based grading)
  • A table of that year's terms (or an empty state)

Year-based grading years show an explanatory note instead of a table because they don't use terms.

Term Row

Each term row in the table shows:

  • Term name (Michaelmas, Hilary, Trinity)
  • Date range (start → end)
  • Exam / coursework weight badge
  • Ministry reporting indicator
  • Edit and Delete buttons

Create Term

A dialog opened from the year section's Add Term button with:

FieldRequiredDescription
NameYesmichaelmas, hilary, or trinity (only unused names are offered)
Start DateYesTerm start
End DateYesTerm end
Exam WeightYesPercentage (0-100)
Coursework WeightYesPercentage (must sum to 100 with exam)
Ministry ReportingNoToggle for ministry reporting period

Edit Term

Same form pre-filled with existing data.

Delete Term

Confirmation dialog. Fails if the term has existing assessments (shows error toast).

API Calls

ActionEndpoint
List academic yearsGET /api/academic-years
List terms (per year)GET /api/terms?yearId=<id>
CreatePOST /api/terms
UpdatePATCH /api/terms/:id
DeleteDELETE /api/terms/:id

The Terms tab fetches terms in parallel for each academic year (Promise.all over the years list) so all groups load together.