# Marks Entry Student-Link Correction

## Problem corrected

Marks saving could display:

> Marks entry could not link this student to the selected course, class, session, academic year, year and unit.

The validation depended mainly on readable text fields. After the Academic module was normalized, valid registrations could contain stable IDs while old course, year, module or session text remained different. The student was therefore shown on the marks page but rejected during saving.

## Correction

- Marks Entry now carries stable IDs for class, course, course module, session, academic year, class-unit allocation, curriculum unit and unit.
- Existing student-unit registrations are matched by stable IDs first, with readable fields retained as a compatibility fallback.
- A valid class link is accepted from the student record, semester enrolment or any existing class-unit registration.
- The selected class is treated as the authority for course, year and module details.
- Missing semester enrolment and unit registration are created automatically for students already linked to the class.
- Existing registrations are synchronized instead of unnecessarily duplicated.
- Error messages now identify the affected admission number and the exact unresolved relationship.
- Marksheet and transcript templates were not changed.

## Installation

Replace the application files with this package. No SQL migration is required.
