Function
The course, its lessons in order, and this device's progress
The course tally, one tile state per lesson, and the continue target
Every figure comes from moduleProgress, which applies countsAsComplete,
so the tiles can never disagree with each other or with the module overview.
The video to continue is picked by findContinueTarget, the single
rule every continue surface shares (the continue-target capability), over
the whole course laid out lesson after lesson. The continue-watching record
anchors it only when it names a video of this course in the lesson it
records; a record for another course, or a stale one, is ignored and the
furthest progress anchors instead. A finished recorded video is never offered
again: the rule moves on to the next unfinished video, crossing into the next
lesson when needed.
Decides the course overview's progress: the course tally, each lesson's tile state, and the video the learner continues with.