Function
The course the modules belong to; passed through to each lesson link
Each module title is a disclosure control, not a link: activating it expands or collapses that module's lessons in place, so the learner browses the course without leaving the lesson they are on. Any number of modules can be open at once — expanding one never collapses another — and the module owning the current lesson starts expanded.
Collapsed modules keep their lessons unmounted rather than hidden, which
matters on the 107-lesson course: the DOM, the accessibility tree, and the
tab order stay small. Because the revealed list is unmounted while
collapsed, the control carries aria-expanded alone and no
aria-controls — the latter would be a dangling reference.
Expansion is intentionally ephemeral: it is seeded on mount and never persisted, so a reload or a navigation returns to "current module open".
Each module title pins itself just below the outline heading while its own
lessons are on screen, so a learner scrolling a nine-exercise module never
loses sight of which module the exercises belong to. The offset comes from
--outline-heading-offset, published by the Outline. The title's
padding replaces what would otherwise be a transparent margin below it —
rows must pass behind the pinned title, never through a gap under it.
Renders the course's modules in
sequenceorder, each with its lessons listed below.lessonsByModuleIdis the precomputed map of moduleId → lessons (sorted by sequence) that the page passes in.