Expand description
Functions and structs for interacting with the database.
Each submodule corresponds to a database table.
Re-exports§
pub use self::error::HttpErrorType;pub use self::error::ModelError;pub use self::error::ModelErrorType;pub use self::error::ModelResult;
Modules§
- application_
task_ default_ language_ models - certificate_
configuration_ to_ requirements - certificate_
configurations - certificate_
fonts - chapter_
lock_ action_ logs - chapters
- chatbot_
action_ logs - chatbot_
configurations - chatbot_
configurations_ models - chatbot_
conversation_ message_ messages - chatbot_
conversation_ message_ reasoning - chatbot_
conversation_ message_ tool_ calls - chatbot_
conversation_ message_ tool_ outputs - chatbot_
conversation_ messages - chatbot_
conversation_ messages_ citations - chatbot_
conversation_ suggested_ messages - chatbot_
conversations - chatbot_
page_ sync_ statuses - cheating_
confirmation_ grade_ snapshots - cms_ai
- code_
giveaway_ codes - code_
giveaways - completion_
registration_ credit_ justifications - Why a student chose credits over a certificate, on the old completion registration page.
- course_
audiences - course_
background_ question_ answers - course_
background_ questions - course_
custom_ privacy_ policy_ checkbox_ texts - course_
designer_ analysis_ workspace - Serialized JSON shape for the Analysis stage workspace form (
workspace_dataoncourse_designer_plan_stages). - course_
designer_ plan_ members - course_
designer_ plans - course_
exams - course_
instance_ enrollments - course_
instances - course_
language_ groups - course_
module_ completion_ registered_ to_ study_ registries - course_
module_ completions - course_
module_ suotar_ configurations - What the credit registration pipeline keeps per course module, one row each: whether the last
configuration check accepted the module, whether its registration is paused, and how its last
enrolment-discovery listing went.
ensure_existscreates the row the writers update. - course_
modules - course_
page_ markdown_ content - course_
prerequisites - courses
- credit_
registration_ account_ linking_ emails - Dedup ledger for account-linking mails.
- credit_
registration_ admin_ actions - Audit of manual actions on the credit registration pipeline.
- credit_
registration_ daily_ snapshots - Daily queue depth per ledger state.
- credit_
registration_ enrolment_ check_ outcomes - The log of answered enrolment checks, which the check schedules are tuned from, and the dashboard’s reads over it.
- credit_
registration_ enrolment_ check_ signals - Visits to the registration page and check requests, per completion, kept whether or not the
completion has a ledger row or a linked student number yet. A row that starts waiting for an
enrolment takes its group from these; see
crate::library::credit_registration::preconditions. - credit_
registration_ enrolment_ routes - What a student said about enrolling, on the new registration page.
- credit_
registration_ events - Append-only audit trail for the credit registration ledger.
- credit_
registration_ phase_ state - Per-phase heartbeat and control for the credit registration pipeline.
- credit_
registration_ roster_ schedules - When enrolment discovery lists each course code’s roster.
- credit_
registrations - The credit registration ledger.
- email_
deliveries - email_
templates - email_
verification_ tokens - ended_
processed_ exams - error
- Contains error and result types for all the model functions.
- errors
- exams
- exercise_
answer_ uploads - Files uploaded to be named in an exercise answer, bound to the exercise and user they were uploaded for.
- exercise_
language_ groups - exercise_
repositories - exercise_
reset_ logs - exercise_
service_ info - exercise_
services - exercise_
slide_ submission_ shares - exercise_
slide_ submissions - exercise_
slides - exercise_
spec_ uploads - Files uploaded through the exercise-service upload route, which is how a teacher’s CMS editor and the playground store files.
- exercise_
task_ gradings - exercise_
task_ regrading_ submissions - exercise_
task_ spec_ files - The files an exercise task’s specs reference.
- exercise_
task_ submission_ files - Which host-stored files a task submission was made from.
- exercise_
task_ submissions - exercise_
tasks - exercises
- external_
courses - feedback
- file_
uploads - flagged_
answers - generated_
certificates - glossary
- join_
code_ uses - library
- marketing_
consents - material_
references - oauth_
access_ token - oauth_
auth_ code - oauth_
client - OAuth 2.1 / OIDC Client model
- oauth_
device_ codes - oauth_
dpop_ proofs - oauth_
refresh_ tokens - oauth_
user_ client_ scopes - offered_
answers_ to_ peer_ review_ temporary - open_
university_ registration_ links - organizations
- other_
domain_ to_ course_ redirections - page_
audio_ files - page_
history - page_
history_ spec_ files - The files each page-history version’s private specs reference.
- page_
language_ groups - page_
visit_ datum - page_
visit_ datum_ daily_ visit_ hashing_ keys - page_
visit_ datum_ summary_ by_ courses - page_
visit_ datum_ summary_ by_ courses_ countries - page_
visit_ datum_ summary_ by_ courses_ device_ types - page_
visit_ datum_ summary_ by_ pages - pages
- partner_
block - peer_
or_ self_ review_ configs - peer_
or_ self_ review_ question_ submissions - peer_
or_ self_ review_ questions - peer_
or_ self_ review_ submissions - peer_
review_ queue_ entries - pending_
roles - playground_
examples - points_
breakdowns - One user’s points in a course module, exercise by exercise, grouped by chapter and page.
- prelude
- Re-exports commonly used types for convenient use across the crate.
Intended to be glob-imported like
use crate::prelude::*;. - privacy_
link - proposed_
block_ edits - proposed_
page_ edits - re_
exports - regradings
- rejected_
exercise_ slide_ submissions - repository_
exercises - research_
forms - roles
- secret
- Wrapper types for sensitive values backed by the
secrecycrate. - student_
countries - student_
number_ verification_ tokens - study_
registry_ registrars - study_
registry_ student_ number_ conflicts - Student numbers a registrar reported that could not become a link because another stood in the way.
- suotar_
api_ calls - Per-request observability for calls to Suotar.
- suotar_
circuit_ breakers - The last state each worker process reported for its circuit breakers. The worker keeps the live state in memory; this copy is only for the dashboard, which runs in another process.
- suotar_
endpoint_ rate_ limits - The last limiter state the worker reported per rate-limited Suotar endpoint. The worker keeps the
live state in memory; this copy is only for the dashboard, which runs in another process. The
breakers are in
crate::suotar_circuit_breakers. - suspected_
cheaters - teacher_
grading_ decisions - url_
redirections - user_
ai_ usage_ notice_ acknowledgements - user_
chapter_ locking_ statuses - user_
course_ exercise_ service_ variables - user_
course_ settings - user_
details - user_
email_ codes - user_
exercise_ slide_ states - user_
exercise_ states - user_
exercise_ task_ states - user_
passwords - user_
research_ consents - users
- verified_
student_ numbers
Enums§
- Course
OrExam Id - Either a course or exam id.
- PKey
Policy - Helper struct to use with functions that insert data into the database.
Traits§
- Spec
Fetcher - A “trait alias” so this
for<'a>… string doesn’t need to be repeated everywhere Arguments:Url: The URL that the request is sent to (the exercise service’s endpoint)&str: Exercise type/service slugOption<Value>: The Json for the request, for example the private spec in a public spec request