Index

public.course_module_suotar_realisations

Description

Which Sisu course unit realisations a module maps to, one per term. Enrolment discovery polls the active ones. The last-run counters give teachers and admins feedback that the configuration is right without reading logs.

Columns

Name Type Default Nullable Children Parents Comment
active boolean true false Whether enrolment discovery currently polls this realisation.
consecutive_listing_failures integer 0 false Failed listing attempts since the last successful one.
course_module_id uuid false public.course_modules The module this realisation belongs to.
course_unit_realisation_id varchar(255) false The Sisu course unit realisation id.
created_at timestamp with time zone now() false Timestamp when the record was created.
deleted_at timestamp with time zone true Timestamp when the record was deleted. If null, the record is not deleted.
id uuid uuid_generate_v4() false A unique, stable identifier for the record.
label varchar(255) true Human-readable label for the realisation, for the admin and teacher views.
last_already_linked_count integer true Of the last listing, how many persons already had a linked account.
last_fast_track_skipped_account_has_number_count integer true Of the last listing, how many matched accounts already held a different student number. Replacing one silently is worse than mailing the link, whose confirmation screen names both numbers.
last_fast_track_skipped_name_mismatch_count integer true Of the last listing, how many matched accounts carried a name unlike the one the study registry holds. A rise here is the observable signature of a university address reissued to a different person.
last_fast_track_skipped_no_account_count integer true Of the last listing, how many primary addresses matched no live account here. The ordinary linking mail covers these, and this is the bucket the whole linking flow exists for.
last_fast_track_skipped_stale_verification_count integer true Of the last listing, how many matched accounts had a proof older than the configured recency bound.
last_fast_track_skipped_unlinked_before_count integer true Of the last listing, how many matched accounts had already unlinked an automatic link for this person. Relinking them would make the unlink button theatre.
last_fast_track_skipped_unverified_count integer true Of the last listing, how many primary addresses matched an account that has never proved control of it. This is the population an email-verification campaign would convert into fast tracks.
last_fast_tracked_count integer true Of the last listing, how many persons were linked without a mail because the study registry holds a verified account address for them.
last_listed_at timestamp with time zone true When enrolment discovery last listed this realisation.
last_listed_person_count integer true How many persons the last listing returned.
last_listing_attempted_at timestamp with time zone true When enrolment discovery last tried to list this realisation, whether or not the roster arrived. Orders the listing queue, so a realisation that keeps failing cannot starve the rest.
last_listing_error credit_registration_error_code true Why the last listing attempt failed, null once one succeeds. What separates a failed listing from an empty course: the last_* counters keep describing the last roster that did arrive.
last_mailed_count integer true Of the last listing, how many linking mails were queued.
last_no_address_count integer true Of the last listing, how many persons had no usable address to mail.
last_suppressed_by_dedup_count integer true Of the last listing, how many mails were suppressed because we had already mailed that person and address for this course.
last_suppressed_by_rate_cap_count integer true Of the last listing, how many mails were suppressed by a per-person rate cap.
updated_at timestamp with time zone now() false Timestamp when the record was last updated. The field is updated automatically by the set_timestamp trigger.

Viewpoints

Name Definition
Credit registration How a completed course module becomes a credit in the University of Helsinki study registry. Enrolment on the course is itself the student’s consent to register the credit; once a student number is proven to be theirs, one ledger row per completion is pushed to Sisu through Suotar and polled until the registry confirms the attainment.

Constraints

Name Type Definition
course_module_suotar_realis_consecutive_listing_failur_not_null n NOT NULL consecutive_listing_failures
course_module_suotar_realis_course_unit_realisation_id_not_null n NOT NULL course_unit_realisation_id
course_module_suotar_realisations_active_not_null n NOT NULL active
course_module_suotar_realisations_course_module_id_fkey FOREIGN KEY FOREIGN KEY (course_module_id) REFERENCES course_modules(id)
course_module_suotar_realisations_course_module_id_not_null n NOT NULL course_module_id
course_module_suotar_realisations_created_at_not_null n NOT NULL created_at
course_module_suotar_realisations_id_not_null n NOT NULL id
course_module_suotar_realisations_pkey PRIMARY KEY PRIMARY KEY (id)
course_module_suotar_realisations_updated_at_not_null n NOT NULL updated_at

Indexes

Name Definition
course_module_suotar_realisations_pkey CREATE UNIQUE INDEX course_module_suotar_realisations_pkey ON public.course_module_suotar_realisations USING btree (id)
uq_course_module_suotar_realisations CREATE UNIQUE INDEX uq_course_module_suotar_realisations ON public.course_module_suotar_realisations USING btree (course_module_id, course_unit_realisation_id, deleted_at) NULLS NOT DISTINCT

Triggers

Name Definition
set_timestamp CREATE TRIGGER set_timestamp BEFORE UPDATE ON public.course_module_suotar_realisations FOR EACH ROW EXECUTE FUNCTION trigger_set_timestamp()

Relations

er

Generated by tbls