Skip to main content

build_teacher_registrations

Function build_teacher_registrations 

Source
pub(crate) async fn build_teacher_registrations(
    conn: &mut PgConnection,
    course_id: Uuid,
    rows: Vec<TeacherCreditRegistration>,
) -> Result<Vec<CourseCreditRegistration>, ControllerError>
Expand description

Enriches the ledger rows with the linking-mail status. A row only gets one when the account holds — or once held — a link, because the mail is addressed to a Sisu person.

Shared with the csv export so the file and the table cannot disagree about a row’s status or about how much of an address is shown.