adaptlearning / adapt-contrib-spoor

A basic scorm tracking plugin for Adapt
GNU General Public License v3.0
14 stars 42 forks source link

Course won't complete if Trickle unlocks #319

Open matthorton16 opened 1 month ago

matthorton16 commented 1 month ago

Subject of the issue/enhancement/features

When viewing a trickled course that completes with_requireContentCompleted, logging out on the second last component breaks completion when returning to the course.

Your environment

Steps to reproduce

Complete a course that is locked by trickle to the second last component. Before clicking the last trickle button, close the course and open it again.

Expected behaviour

The course would unlock the last component, and the course would mark complete.

Actual behaviour

The checkCompletion method in tracking.js runs before setupEventListeners from adapt-sateful-sessions.js sets up listeners for tracking:complete. This means the course doesn't ever run onTrackingComplete.