Skip to main content

Module course_modules

Module course_modules 

Source

Structs§

AutomaticCompletionRequirements
CourseAuditingModuleUpdate
CourseModule
Like CourseModulesSchema, but the automatic-completion columns are collapsed into completion_policy.
CourseModuleCreditRegistrationConfig
Per-module credit-registration configuration: the rollout switch and the module’s own fields merged with its course_module_suotar_configurations row. Every field of that row is optional here because a module with no configuration row is a valid, unconfigured module.
CourseModuleCreditRegistrationEdit
The module editor’s writable half of the Suotar configuration. The pause and the config-validation verdict are not here: their writers are the admin dashboard and the pipeline.
CourseModuleSuotarRealisationEdit
CourseModulesSchema 🔒
The subset of course_modules columns CourseModule is built from; the credit-registration ones are read through CourseModuleCreditRegistrationConfig, hence no SELECT * here.
ModifiedModule
ModuleSizeCounts
How many chapters and exercises a course module contains. Used for deciding whether the module is small enough to be exempt from the minimum cheater threshold.
ModuleUpdates
NewCourseModule
NewModule

Enums§

CompletionPolicy

Functions§

any_credit_registration_enabled
The gate for admin actions that are not tied to one course (e.g. resolving or manually linking a student number), where get_credit_registration_enabled_ids_for_course has no course to check against.
credit_registration_configs 🔒
Shared by every getter below, so the 13-column join lives in one place. enabled_only isn’t a “this id or any” filter like the other two: the by-id and by-course lookups want every module, opted in or not, while the all-modules listing wants only the opted-in ones.
delete
get_all_modules
get_all_suotar_enabled
Every module opted in to credit registration via Suotar, paused ones included.
get_all_uh_course_codes_for_open_university
get_by_course_id
get_by_course_id_as_map
Gets course modules for the given course as a map, indexed by the id field.
get_by_course_id_only_with_open_chapters
get_by_course_ids
Batched get_by_course_id: modules for many courses in one query, to group in memory instead of one query per course.
get_by_exercise_id
Gets course module where the given exercise belongs to. This will result in an error in the case of an exam exercise.
get_by_id
get_by_ids
get_chapter_and_exercise_counts
get_course_module_id_by_chapter
get_credit_registration_config
get_credit_registration_configs_by_course_id
Every module of one course with its Suotar configuration, opted in or not: the module editor has to show an unconfigured module’s empty fields.
get_credit_registration_course_ids_for_enrolled_user
Every course the user is enrolled on that has at least one module opted in to credit registration, so the profile page can list a course the student was never asked about.
get_credit_registration_enabled_ids_for_course
Ids of the course’s modules opted in to credit registration; the flag is not on the CourseModule DTO.
get_default_by_course_id
get_ids_by_course_slug_or_uh_course_code
Gets all course modules with a matching uh_course_code or course slug.
insert
non_empty 🔒
A blanked text field means “not configured”, not the empty string.
rename
set_credit_registration_config
Writes the module’s Suotar configuration row and reconciles its realisations. An unknown grade scale is refused here because otherwise it surfaces as no_grade_scale_mapping on every completion of the module, long after the teacher left the editor.
update
update_automatic_completion_status
update_certification_enabled
update_enable_registering_completion_to_uh_open_university
update_modules
update_uh_course_code
update_with_order_number
validate_one_credit_registration_path 🔒
Both paths would put the same attainment in Sisu. course_modules_one_credit_registration_path enforces this too; here it becomes an error the module editor can render.