Skip to main content

derive_exercise_progress

Function derive_exercise_progress 

Source
fn derive_exercise_progress(
    exercise_id: Uuid,
    score_maximum: i32,
    state: Option<&UserExerciseState>,
) -> ExerciseProgress
Expand description

Derives the client-facing per-exercise progress from an exercise’s maximum score and the user’s exercise state (absent when the user has never touched the exercise).