Comments (3)
Hi,
Apologies, I didn't catch a notification from github that this was opened.
Reading through your code, it looks like we need to take a closer look at the 'unload' event stack.
Although, I do see happyEnding is set and committed on the 'load' function. This would imply something else is interfering on exit.
player.exit(); isn't known in the code here, so I'm not sure what its doing, but knowing what SCOBot does I'll itemize here to hopefully help you isolate.
'unload' event gets triggered and SCOBot internally will call exitSCO(). You'll see a trace like "SCO is being unloaded, forcing exit...". After that, you should see a completion and success status trace.
If the connection is active, it will internally trigger the 'unload' event your listening to above.
This means -
- Your player.exit() is called
- SB.happyEnding();
- SB.finish();
Then, SCOBot will look at your default exit type can call finish based on your settings. Worst case, this is just doubling up calls, but shouldn't trigger any scoring/status changes.
Exit issues are hard to trace down unless you can persist the console tracing. You could also try the bookmarklet - https://www.cybercussion.com/bookmarklets/SCORM/. This would monitor the LMS API while you interact with it.
General Button behavior tip:
I've seen cases where a button click needs to return false, or it changes the DOM and causes a refresh of your whole SCO due to placing a '#" in the URL (http://stackoverflow.com/questions/1878264/how-do-i-make-an-html-button-not-reload-the-page). This would essentially reload the page and re-initialize SCOBot as the browser is exiting. Since exit type is 'finish' the LMS behavior is to start a new attempt which could be erasing your prior attempt with the proper status/scoring.
In SCORM 2004 a 'cmi.exit' of normal will end the attempt.
I suspect this may be why your having to do the exitAll call to force the LMS to stop your SCO from reloading.
from scobot.
Hey,
We did further investigations, and it seems SB.happyEnding(); isn't working for us. We solved our problem by replacing this call with cmi.complete_status, cmi.success_status, etc. on the exit button click event, as we just needed to set a complete status when a user launches a course:
We added a self.close() function to force the window to shut down in some cases.
from scobot.
Hi,
Ok, I did a quick test with https://dl.dropboxusercontent.com/u/3459294/HPPYENDTST-2004-4th-Edition.zip on cloud.scorm.com, and things seemed to work ok. But, at least you found a workaround for your situation.
With a SB.finish
call it will actually set the 'adl.nav.request' for you if it doesn't equal 'none' by default too; since you have set that up in the default parameters instantiating SCOBot.
from scobot.
Related Issues (10)
- Trouble with scorm.setvalue('adl.nav.request', 'continue'); HOT 12
- Updating an interaction HOT 2
- Suspend data is null after refreshing the page when the course is launched very first time. HOT 1
- "use strict" Causes a 301 Error in Pegasus With Chrome HOT 7
- Tests always expect Pacific time HOT 2
- SCORM Player HOT 2
- AICC Player HOT 1
- Can you use SCObot with scormpool player to emulate an LMS> HOT 3
- cmi data not saved HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scobot.