# Course-Year-Module Curriculum Update

## Purpose

The academic curriculum is now defined independently of academic sessions. A course owns its years of study, each year owns its modules, and every module owns its curriculum units.

Example:

- Diploma in Business Management
  - Year 1
    - Module 1: Unit XYZ, Unit ABC, Unit DEF
    - Module 2: Unit GHI, Unit JKL
  - Year 2
    - Module 1: Unit MNO, Unit PQR

Academic sessions remain available only for operational activities such as class intake, reporting periods, marks processing and timetabling dates. They do not define the course curriculum.

## Workflow

1. Create the department.
2. Create the course and enter its years of study and modules per year.
3. Open **Course Modules** to create or generate modules for each course year.
4. Open **Course Curriculum** and assign units to a specific course module.
5. Create a class by selecting its course, academic session and course module.
6. Allocate the curriculum units to one or more matching classes.
7. Assign lecturers during lecturer allocation or timetable preparation.

## Key controls

- `course_modules` contains no session reference.
- A module is unique within a course and year of study.
- Curriculum mappings use `course_module_id`.
- A course selection displays every configured year/module and its assigned units, including modules that currently have no units.
- Course duration cannot be reduced below a year that already contains curriculum records.
- A linked course module cannot be moved to another course or year until its curriculum units and classes are removed.
- A class with unit allocations or timetable records cannot be moved to another course module.
- Increasing **Modules per Year** generates only missing modules and preserves custom names and existing mappings.
- Session-linked records formerly called modules are labelled **Reporting Periods** to avoid confusion with curriculum modules.

## Upgrade

Run:

`database_updates/course_year_module_curriculum.sql`

New installations already include the required schema in `college_erp_full_database.sql`.
