# Unit, Class and Timetable Allocation Update

## Changes

- Removed lecturer selection from Create Unit and Edit Unit.
- Removed the lecturer column from the Units listing.
- Units remain reusable academic records and are no longer tied to one lecturer.
- Class Unit Assignment now supports selecting one or several classes at once.
- Selected units are assigned to every selected class without deleting unrelated existing assignments.
- Class choices are filtered by course, module and year.
- Timetable rule synchronization no longer copies a lecturer from the unit record.
- Existing timetable lecturer selections are preserved when class-unit rules are synchronized again.
- Timetable Generation Rules include a lecturer dropdown on every class-unit row.
- Multiple lecturer allocations can be saved in one action.
- The same unit can be assigned to different lecturers for different classes.
- Automatic timetable generation is blocked until every active class-unit rule has a lecturer.
- Lecturer access mappings are synchronized when timetable rules or manual timetable rows are saved.

## Workflow

1. Create the unit under Academics > Units.
2. Open Academics > Class Unit Assignment.
3. Select the course, module and year.
4. Select one or more classes.
5. Select one or more units and save.
6. Open Timetable and run Sync Rules from Class Units.
7. Choose a lecturer for each class-unit row and save lecturer allocations.
8. Set hours, pattern and venue, then generate the timetable.

## Database

No new table or column is required. The existing `units.lecturer` column is retained only for backward database compatibility and is no longer used by the Create Unit workflow or timetable rule synchronization.
