Skip to main content

Module course_settings

Module course_settings 

Source
Expand description

patch_course_settings: course and module settings. Publishing switches stay read-only.

Structs§

Audience
A target audience of the course.
CompletionPolicy
Module completion. The treshold spelling matches the stored field names.
CourseSettings
The settings document get_course_settings shows and patch_course_settings edits.
CourseSettingsCourse
The course’s own settings. Its fields are EDITABLE_COURSE_FIELDS, READ_ONLY_COURSE_FIELDS and audiences.
ModuleSettings
One module’s settings. Its fields are id, name and EDITABLE_MODULE_FIELDS.
SettingsResult
The new state after a successful call. Nothing is stored until the caller stages it.

Enums§

AiPolicy
The course’s AI policy with the names agents use; mirrors the models’ CourseAiPolicy.
CompletionPolicyKind
Whether a module completes on its own when its thresholds are met.

Constants§

EDITABLE_COURSE_FIELDS 🔒
Course fields agents may set.
EDITABLE_MODULE_FIELDS 🔒
Module fields agents may set with this tool; the structure tool renames modules.
POLICY_FIELDS 🔒
The fields of a completion policy.
READ_ONLY_COURSE_FIELDS 🔒
Course fields agents see but only teachers change.

Functions§

apply
Applies ops in order to doc.
apply_op 🔒
boolean 🔒
course_op 🔒
module_op 🔒
parse_policy 🔒
set_policy_field 🔒
Sets one policy field, or clears it with None, and checks the result. Owns the errors for unknown and misspelled field names.
unknown_course_field 🔒
path names no course setting agents can edit.
validate_policy 🔒
whole_number 🔒
The value as a whole number from 0 to i32::MAX.