ENGLISH·COURSE API
    Preparing search index...
    • The learner's tickets, prizes and distinction, as this device's progress stands.

      Parameters

      • levels: readonly AchievementLevel[]

        Every catalog course with its modules and lesson slices

      Returns LearnerAchievements

      The derived achievements

      A ticket is earned the first time its lesson counts as complete, by the same rule useCourseWatchProgress counts with — marked complete, or watched past the finish threshold — so an achievement can never disagree with a progress meter on the way up. The ticket is then stored and kept, which is why un-marking a lesson no longer takes it away.

      Reading the achievements is also what records tickets for lessons that were already complete, so a device that finished lessons before tickets were stored keeps them from its first visit here.

      Browser-side only — do NOT call from a Server Component.

      const { ticketsEarned, ticketCount, distinction } = useLearnerAchievements(levels);