Skip to content

FAC-120 feat: enhance bulk course provisioning with cascading dropdowns and inline table #285

@y4nder

Description

@y4nder

Summary

Enhance the bulk course provisioning flow by replacing free-text inputs and CSV upload with cascading dropdown selectors (Semester → Department → Program) and an inline editable table for course data entry.

Problem

The current bulk course provisioning flow only drills down to Campus + Department with free-text inputs and requires CSV file upload. This doesn't match the actual Moodle category hierarchy and forces users to manually type values and date ranges that could be derived from existing data.

Solution

API Changes

  • New GET /admin/filters/semesters endpoint returning semesters with computed date ranges from semester code
  • Updated GET /admin/filters/departments to accept optional semesterId query parameter
  • New POST /moodle/provision/courses/bulk/preview endpoint (JSON body, replaces CSV)
  • New POST /moodle/provision/courses/bulk/execute endpoint with audit trail
  • Server-side hierarchy validation (semester → department → program relationship integrity)
  • Backend duplicate course code validation within batch

Admin Frontend Changes

  • Cascading dropdown selectors: Semester → Department → Program
  • Auto-fill start/end dates from semester selection (editable)
  • Inline editable table for course data entry (replaces CSV upload)
  • Client-side duplicate course code validation
  • Preview → Execute two-step pattern preserved

Acceptance Criteria

  • Semester dropdown shows all synced semesters with campus code, label, and academic year
  • Selecting a semester auto-fills dates and populates department dropdown
  • Selecting a department populates program dropdown
  • Changing semester/department resets downstream selections
  • Inline table supports add/remove rows with courseCode + descriptiveTitle
  • Preview generates correct shortnames, fullnames, and category paths
  • Execute creates courses in Moodle with audit trail
  • 409 conflict response on concurrent provisioning
  • 502 Bad Gateway on Moodle unreachable
  • 400 Bad Request on invalid/mismatched program hierarchy

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions