ENGLISH·COURSE API
    Preparing search index...
    • Renders the course's modules in sequence order, each with its lessons listed below. lessonsByModuleId is the precomputed map of moduleId → lessons (sorted by sequence) that the page passes in.

      Parameters

      • course: {
            course: {
                id: string & $brand<"CourseId">;
                slug: string & $brand<"Slug">;
                title: string;
                description: string;
                language: string;
                lessonCount: number;
                moduleCount: number;
                sequence: number;
                track: "level" | "reference";
                outcomes?: string[];
                audience?: string;
                highlights?: string[];
                sounds?: { vowels: string[]; consonants: string[] };
                translations?: Record<
                    string,
                    {
                        description?: string;
                        outcomes?: string[];
                        audience?: string;
                        highlights?: string[];
                    },
                >;
            };
            modules: {
                id: string & $brand<"ModuleId">;
                courseId: string & $brand<"CourseId">;
                slug: string & $brand<"Slug">;
                title: string;
                sequence: number;
            }[];
            lessonsByModuleId: Map<
                string,
                (
                    | {
                        kind: "reading";
                        id: string & $brand<"LessonId">;
                        courseId: string & $brand<"CourseId">;
                        moduleId: string & $brand<"ModuleId">;
                        sequence: number;
                        title: string;
                        body: string;
                    }
                    | {
                        kind: "video";
                        id: string & $brand<"LessonId">;
                        courseId: string & $brand<"CourseId">;
                        moduleId: string & $brand<"ModuleId">;
                        sequence: number;
                        title: string;
                        description: string;
                        source: string;
                        durationSeconds: number;
                        poster?: string;
                        uploadDate?: string;
                    }
                )[],
            >;
            currentLessonId: string & $brand<"LessonId">;
        }

        The course the modules belong to; passed through to each lesson link

      Returns Element

      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.