Expand description
Handlers for HTTP requests to /api/v0/main-frontend/credit-registrations.
Every handler filters by user.id in SQL and re-checks ownership before it writes. The stage a
student is shown is StudentFacingCreditRegistrationStatus, computed in the models crate and never
re-derived here.
Structs§
- Claim
Student Number Verification Token Result - Credit
Registration Settings - Deployment-wide switches the credit registration views adapt to.
- Linking
Email Status - What we can honestly say about the linking mail: our send status, never a delivery.
- Linking
Mail 🔒Cache - An account’s linking mails and their send status, fetched once per request rather than once per row: they are the same for every one of a student’s rows.
- Main
Frontend 🔒Credit Registrations ApiDoc - MyCredit
Justification - What the caller wrote about needing the credits rather than a certificate.
- MyCredit
Registration - MyCredit
Registration ForCourse Module - The live registration for one course module, with the attempts a newer one replaced.
- MyEnrolment
Route - The caller’s answer about where they enrol one module, and whether it can still be changed.
- MyVerified
Student Number - The account’s linked student number, unmasked: it is the holder’s own. Deliberately carries no Sisu-held names.
- Request
Credit Registration Enrolment Recheck Result - SetCredit
Justification Payload - SetEnrolment
Route Payload - Student
Number Verification Token Preview - What a mailed link would do, without doing it. Read-only on purpose: a mail scanner must not be able to spend the token. Deliberately carries no Sisu-held names.
- Unlink
MyStudent Number Result
Enums§
Constants§
- CREDIT_
JUSTIFICATION_ 🔒MAX_ LENGTH - Long enough for the few sentences the question asks for; a bound at all so a scripted client cannot park a book in the column.
Functions§
- _add_
routes - book_
roster_ 🔒listing_ for_ unlinked_ student - With account linking on, books a roster listing for a student we hold no number for; see
book_listing_for_unlinked_student. - build_
my_ 🔒credit_ registrations - Assembles the wire rows for one account, adding the enrolment link and the linking-mail status the ledger does not carry.
- build_
my_ 🔒enrolment_ route - claim_
student_ number_ verification_ token - POST
/api/v0/main-frontend/credit-registrations/student-number-verifications/{token}/claim- Spends a mailed link and links the student number to the signed-in account. - confirm_
my_ enrolment - POST
/api/v0/main-frontend/credit-registrations/my/by-course-module/{course_module_id}/enrolment-route/confirm - course_
name_ 🔒of_ token - dismiss_
credit_ registration_ enrolment_ banner - POST
/api/v0/main-frontend/credit-registrations/my/{id}/dismiss-enrolment-banner- Puts away the in-course re-enrol banner for one registration. - find_
conflicting_ 🔒account - Whether the token’s holder is already live on some other account of ours.
- get_
credit_ registration_ settings - GET
/api/v0/main-frontend/credit-registrations/settings- Deployment-wide credit registration switches. - get_
my_ credit_ registration_ enrolment_ banners - GET
/api/v0/main-frontend/credit-registrations/my/enrolment-banners/by-course/{course_id}- The caller’s registrations on one course that owe them the in-course re-enrol banner. - get_
my_ credit_ registration_ for_ course_ module - GET
/api/v0/main-frontend/credit-registrations/my/by-course-module/{course_module_id}- The signed-in account’s registration for one course module, or null when the pipeline has not created one yet. - get_
my_ credit_ registrations - GET
/api/v0/main-frontend/credit-registrations/my- Every credit registration of the signed-in account, newest completion first. - get_
my_ enrolment_ route - GET
/api/v0/main-frontend/credit-registrations/my/by-course-module/{course_module_id}/enrolment-route - get_
my_ verified_ student_ number - GET
/api/v0/main-frontend/credit-registrations/my/student-number- The student number linked to the signed-in account, or null. - get_
token_ 🔒or_ 404 - my_
completion_ 🔒for_ module - The caller’s completion for a module, as
my_registration_completion_for_module, but only on the push path. - my_
enrolment_ 🔒route - Kept apart from
build_my_enrolment_routeso a write can answer from the row it already returned, instead of reading the completion and the registration back a second time. - my_
live_ 🔒registration_ for_ module - The caller’s live registration for a module, or
Nonebefore the pipeline has created one. - my_
registration_ 🔒completion_ for_ module - The caller’s completion for a module, whichever registration path it is on, which is also the ownership check: the lookup is scoped to their own user, so a module someone else completed is a not-found rather than a forbidden.
- preview_
student_ number_ verification_ token - GET
/api/v0/main-frontend/credit-registrations/student-number-verifications/{token}- What the mailed link would link, without linking it. - record_
my_ enrolment_ page_ visit - POST
/api/v0/main-frontend/credit-registrations/my/by-course-module/{course_module_id}/enrolment-page-visit - request_
credit_ registration_ enrolment_ recheck - POST
/api/v0/main-frontend/credit-registrations/my/{id}/recheck-enrolment- Asks the pipeline to look for an enrolment again, for a row parked because the study registry had none. - resolve_
linking_ 🔒email - The latest linking mail for this account’s Sisu person on this course.
Nonefor an account that was never linked: the mail is addressed to a Sisu person, not to an email address. - set_
my_ credit_ justification - PUT
/api/v0/main-frontend/credit-registrations/my/by-course-module/{course_module_id}/credit-justification - set_
my_ enrolment_ route - PUT
/api/v0/main-frontend/credit-registrations/my/by-course-module/{course_module_id}/enrolment-route - to_
my_ 🔒credit_ registration - to_
my_ 🔒verified_ student_ number - unlink_
my_ student_ number - DELETE
/api/v0/main-frontend/credit-registrations/my/student-number- Unlinks the student number from the signed-in account. - withdraw_
my_ enrolment_ confirmation - DELETE
/api/v0/main-frontend/credit-registrations/my/by-course-module/{course_module_id}/enrolment-route/confirm