Expand description
Handlers for HTTP requests to /api/v0/main-frontend/course-credit-registrations.
Teachers see the unmasked student number, but recipient addresses are masked to their domain, the study registry’s own error text is never returned, and nothing here can override a rate cap.
Every handler with a student in it authorizes on ViewAndManageCreditRegistrations, which an
assistant does not hold: ViewUserProgressOrDetails and Edit would both let a course’s assistants —
often students on the same programme — list and export every classmate’s national study registry
identity. The one exception is the module configuration, which names no student.
Every mutating handler writes exactly one credit_registration_admin_actions row with
actor_role = 'course_teacher', in the transaction that has the effect.
Modules§
- actions 🔒
- What has been done by hand to this course’s credit registrations, so two teachers do not both click retry.
- export 🔒
- The course’s credit registrations as a downloadable csv.
- retry 🔒
- Putting a course’s failed registrations back on the pipeline, one row or a whole course at a time.
Structs§
- Course
Credit Registration - Course
Credit Registration Event - One event of the item timeline, without the stored request and response bodies: those are the admin dashboard’s, and the study registry’s own wording is never rendered.
- Course
Credit Registration Module Configs - Every module of the course with its Suotar configuration, for the module editor.
- Course
Credit Registration Module Summary - Course
Credit Registration Summary - Course
Credit Registration User IdsPayload - Body for the students-tab batch: the users of the current identity-list page.
- Course
Credit Registrations Page - Credit
Registration Details - Credit
Registration State Count - GetCourse
Credit Registrations Query - Main
Frontend 🔒Course Credit Registrations ApiDoc - Resend
Linking Email Payload - Resend
Linking Email Result - Teacher
Linking Email Status - What we can honestly say about a linking mail: our send status and the address’s domain.
Constants§
- MAX_
ROWS_ 🔒PER_ REQUEST MAX_USER_IDS_PER_REQUEST* a generous per-student attempt count would allow a ~25,000-row join per request; this is the real ceiling. A course with this many attempts across the named students needs a narrower request, not a bigger response.- MAX_
TEACHER_ 🔒RESENDS_ PER_ HOUR - A fat-finger guard on top of the per-person caps, which this endpoint cannot relax.
- MAX_
USER_ 🔒IDS_ PER_ REQUEST - The by-user-ids lookup is bounded by what the caller names rather than by a page, so the payload itself has to be bounded. Comfortably above the students tab’s page size.
- RESEND_
CALLER 🔒 - Marks the resend’s study registry call in the call log as a manual action, not worker traffic.
Functions§
- _add_
routes - authorize_
credit_ 🔒registration_ teacher - Every handler here that names a student gates on this; see the module doc for why
ViewAndManageCreditRegistrationsand not a broader course permission. - build_
teacher_ 🔒registrations - 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.
- count_
failed_ 🔒linking_ emails - Linking mails of this course we could not hand over at all.
- finish_
resend 🔒 - Audits the attempt whatever it did, and reports where the person’s linking mail now stands.
- get_
course_ credit_ registration_ module_ configs - GET
/api/v0/main-frontend/course-credit-registrations/courses/{course_id}/module-configs- The course’s per-module credit registration configuration. - get_
course_ credit_ registration_ summary - GET
/api/v0/main-frontend/course-credit-registrations/courses/{course_id}/summary- Per-module counts plus the two reasons a student of this course will not get credits. - get_
course_ credit_ registrations - GET
/api/v0/main-frontend/course-credit-registrations/courses/{course_id}/list- A page of the course’s registrations, filtered by state and searched by student name, email or student number. - get_
course_ credit_ registrations_ for_ users - POST
/api/v0/main-frontend/course-credit-registrations/courses/{course_id}/by-user-ids- The registrations of the named students, for the students tab’s current page. - get_
credit_ registration_ details - GET
/api/v0/main-frontend/course-credit-registrations/registrations/{credit_registration_id}- One registration with its timeline and the other attempts for the same completion. - latest_
linking_ 🔒email_ status - linking_
email_ 🔒status_ of - linking_
email_ 🔒statuses - The newest linking mail’s send status for each row waiting for a number, by row id. A fixed number of queries whatever the page holds, because only the listed people are looked up.
- record_
resend_ 🔒and_ fetch_ mails - Records a
ResendLinkEmailaction against the course and fetches this student’s linking mails for it. Shared by the teacher and admin resend endpoints, which differ only in who they blame it on, whether they widen the action to the whole course (actor_course_id), and what extra detail goes intodetails. - resend_
course_ credit_ registration_ linking_ email - POST
/api/v0/main-frontend/course-credit-registrations/courses/{course_id}/resend-linking-email- Sets off another account-linking mail for one person on this course. - resolve_
resend_ 🔒target - The person the body names, as a student number.
Nonewhen the account has never held one.