adaptlearning / adapt-contrib-spoor

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

Fix: Add pagehide event (Fixes #314) #315

Closed canstudios-nicolaw closed 5 months ago

canstudios-nicolaw commented 6 months ago

Fixes https://github.com/adaptlearning/adapt-contrib-spoor/issues/314

Fix

Added the pagehide event next to the unload event with the same behaviour so that end-users won't notice when Google Chrome stops supporting unload. This is the same fix as was applied in the latest version of Spoor https://github.com/adaptlearning/adapt-contrib-spoor/pull/298/files.

Testing

To test this I tried removing the unload events entirely and switching to pagehide events. I created and published a course and I was able to see that my progress was saved if I closed the window part-way through.

Note

I'm not sure if there is a process for updating an older version of a plugin like this. I created a release-3.3 branch from the v3.3.2 tag. I have made a pull request to add this fix to the release-3.3 branch and I propose we tag v3.3.3 from the release-3.3 branch. I'm open to other suggestions if this isn't the way this is normally done in Adapt.

oliverfoster commented 5 months ago

@canstudios-nicolaw perfect invention of process. I suggest deleting the release branch after doing a manual version release (only the master branch is covered by the automated release process).

Then we can just follow this process any time we need to do similar again, with no leftovers.