Per-module credit-registration configuration: 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.
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.
Whether a module’s completions are registered at all: it needs a course code and
completions_can_be_registered_to_sisu on. Mirrors the SQL side’s
TRIM(cm.uh_course_code) <> '' AND cm.completions_can_be_registered_to_sisu predicates.
Sets the UH course codes, ECTS credits and registration link overrides of the course’s modules
as the course auditing view edits them, leaving their other fields alone. Modules of other
courses are ignored. Returns the ids of the updated modules.
Applies the module editor’s changes to course_id in one transaction, through
upsert_from_snapshot, and records the modules and chapters it changed in their history.
Writes every field of the snapshot to the module, creating it with the snapshot’s id if it does
not exist and bringing it back if it is deleted. Does not record history.