Skip to main content

Module course_credit_registrations

Module course_credit_registrations 

Source
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§

CourseCreditRegistration
CourseCreditRegistrationEvent
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.
CourseCreditRegistrationModuleConfigs
Every module of the course with its Suotar configuration, for the module editor.
CourseCreditRegistrationModuleSummary
CourseCreditRegistrationSummary
CourseCreditRegistrationUserIdsPayload
Body for the students-tab batch: the users of the current identity-list page.
CourseCreditRegistrationsPage
CreditRegistrationDetails
CreditRegistrationStateCount
GetCourseCreditRegistrationsQuery
MainFrontendCourseCreditRegistrationsApiDoc 🔒
ResendLinkingEmailPayload
ResendLinkingEmailResult
TeacherLinkingEmailStatus
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 ViewAndManageCreditRegistrations and 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 ResendLinkEmail action 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 into details.
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. None when the account has never held one.