Storyline 3/360 Change Variable on Browser Window Close
I am currently working on quite a unique path that a learning would follow on Storyline. As part of this is it essential that we determin if a user has closed their browser or exited a course early.
I have read several discussions where we can prompt a user before closing, using the event onunload which I can get working but I believe the connection to the LMS has stopped and Storylines own Unload function has ran before anything inside the course will run.
I am wondering if anyone has seen this before. If it helps I have set up limited attempts on a course and a timed lockout between each attempt. I am trying to make it so that if the user closes the window it counts as an attempt. (Adjusts a variable).
I believe I could also make it work if I could revert the user to the first slide when they revisit but keep all variables (which the player reset option doesnt do).
Hope someone has an idea :)
Edit: I think this could be done by adding code to change the variable in one of the JS files, inside the Unload function but would prefer to do this from the course itself as it will cover a large quantity of test and asking designers to edit a .js file could cause more issues.