Skip to main content

Module learn_state

Module learn_state 

Source
Expand description

Learn page state: where the learner stands on the roadmap, the question that closes a lesson, and the optional practice behind it.

Everything here is pure (no Dioxus, no browser), so every rule is pinned by unit tests. The page renders these types and forwards clicks and keystrokes to them; it never keeps a second copy of the rules.

  • Journey walks the roadmap: which lesson is open and which are done. Any lesson can be opened; finishing one and moving on opens the next in roadmap order.
  • LessonQuiz is a lesson’s one question: answer it right, or try once and then ask to see the answer, and the learner may move on.
  • PracticeSession walks a lesson’s extra questions in order, bringing a missed one back after RETRY_GAP others.

Structs§

Journey
Where a learner stands on the roadmap: every lesson in order, the ones done, the one open.
LessonQuiz
A lesson’s one question.
PracticeSession
A walk through a lesson’s practice questions.

Enums§

QuizState
Where a lesson’s question stands.

Constants§

RETRY_GAP
How many other questions come between a missed one and its retry.