Closed BlazeCell closed 11 years ago
Hi, Try setting the adl.nav.request then call SB.commit then SB.finish or SB.suspend depending.
My partner says adl.nav.request is a 4th Edition feature so that might be the next place to look.
Thanks, Mark
Sent from my iPhone
On Dec 4, 2012, at 7:47 PM, BlazeCell notifications@github.com wrote:
I'm having trouble getting the LMS to move on to the next SCO after calling
scorm.setvalue('adl.nav.request', 'continue'); I copied the ScoBot.finish() function and came up with this:
/**
- Next
- This will move to the next sco in the sequence.
- @returns {String} 'true' or 'false' */ this.next = function () { if (isStarted) { scorm.debug(settings.prefix + ": I am moving next...", 3); scorm.setvalue('adl.nav.request', 'continue'); updateStatus(); scorm.commit(); } return notStartedYet(); }; But whenever I call my ScoBot.next() function, the SCO page does not move on to the next one in the manifest.
I've tried calling
scorm.set('success_status', 'passed'); to work with updateStatus() but I'm still getting no dice.
It appears to me that SCORM_API is set up to create standalone SCOs, not a squence of SCOs in a single content package, so maybe I'm trying to do something that's not intended... =/
Any direction on this issue would most appreciated.
Thank you.
— Reply to this email directly or view it on GitHub.
Ok, not on my phone now.
Looks like a recommendation might be to go this way -
this.next = function() {
if(isStarted) { // Sorry my previous example had a ! (checking false instead of true)
scorm.debug(settings.prefix + ": I am moving next. Is continue allowed? " + scorm.getvalue('adl.nav.request_valid.continue'), 3);
//if (scorm.getvalue('adl.nav.request_valid.continue') === 'true') { // This value can be 'true' or 'false' as well as 'unknown' string.
// Then call 'continue'
//scorm.setvalue('adl.nav.request', 'continue');
//}
SB.commit();
scorm.setvalue('adl.nav.request', 'continue'); // The LMS will do its work to check the validity of the navigation on/after commit
return SB.suspend(); // or finish() - you could use SB[scorm.get('exit_type')](); to so it uses your default behavior.
} else {
return notStartedYet();
}
}
We looked into 3rd Edition and looks like ADL stuff is there so ignore my message about 4th edition. You may need to set some scoring values to satisfy the LMS, but I'd have to look into the rules. I think 'continue' may be enough, but your right I didn't get to any ADL requests yet in my project. Thanks for attempting to get that part going.
Mark
Thanks for replying, Mark.
Unfortunately, your proposed fix isn't working either. I'm getting an error in the console that says:
SCOBot: You didn't call 'start()' yet, or you already terminated, ignoring.
Sorry, take the "!" off "if (isStarted)". It was late and I goofed.
Also please note I updated a 'makeBoolean' call to turn the string returned from 'adl.nav.request_valid.continue'. That would of failed. Sample above updated.
I've tried your latest fix, but it's unfortunately still not working.
This is what I get in the console when I trigger the next() function:
LOG: SCOBot: I am suspending...
SCORM_API: Terminating true [object HTMLObjectElement]
LOG: SCORM_API: completion_status = incomplete|| success_status = passed
LOG: SCORM_API: Committing data
LOG: SCORM_API: Terminated.
I adjusted the code above to trace out whether your LMS is providing support for 'continue'. See - scorm.debug(settings.prefix + ": I am moving next. Is continue allowed? " + scorm.getvalue('adl.nav.request_valid.continue'), 3); That should narrow down if the LMS is returning 'false'. You could attempt to not check for support, and set it anyway but that might shed some light to if the LMS features support to advance to the next SCO on terminate.
Well, I'm using ADL's example LMS, so I don't think support for the 'continue' feature is the issue as the example content packages from ADL work fine.
Which of ADL's examples are you finding work fine? It could be how something is specified in the manifest too.
I've tried ADL's:
You can find those resources here: http://www.adlnet.gov/capabilities/scorm#tab-learn
BlazeCell, I'm taking a look at the scenario quick to identify what would make a LMS evaluate the manifest seq & nav tree as something that can be continued. Right now I did a quick test and its getting evaluated as 'false'. Have a feeling it may be some parameters in the CAM (imsmanifest.xml) that need to be adjusted. I'll follow up in a bit.
BlazeCell, In order to enable Flow you'd have to add -
<imsss:sequencing>
<imsss:controlMode choice="false" choiceExit="false" flow="true" forwardOnly = "true"/>
</imsss:sequencing>
to a tier above your SCO items in the manifest.
I added this to the project now and updated some tests so everything checked out. I had to add this sequencing information at the top tier/item above my QUnit tests (3). If I enabled 'continue' it auto-advanced thru all of them and worked fine.
Let me know if you have any other issues.
Notes: If any one else has this issue, understand that the LMS can have
<adlnav:presentation>
<adlnav:navigationInterface>
<adlnav:hideLMSUI>continue</adlnav:hideLMSUI>
<adlnav:hideLMSUI>previous</adlnav:hideLMSUI>
<adlnav:hideLMSUI>suspendAll</adlnav:hideLMSUI>
</adlnav:navigationInterface>
</adlnav:presentation>
So a SCO may use 'adl.nav.request_valid.continue' if they wish to display the "continue" button, but you can just attempt to set:
scorm.setvalue('adl.nav.request', 'continue');
and when the SCO terminates the LMS will advance you to the next SCO in the tree if its allowed. It is all hinged on your imsmanifest.xml being configured. I've committed what was discussed here to the project so it would have an example.
I'm going to close this out. If you have any other questions please feel free.
I'm having trouble getting the LMS to move on to the next SCO after calling
I copied the ScoBot.finish() function and came up with this:
But whenever I call my ScoBot.next() function, the SCO page does not move on to the next one in the manifest.
I've tried calling
to work with updateStatus() but I'm still getting no dice.
It appears to me that SCORM_API is set up to create standalone SCOs, not a squence of SCOs in a single content package, so maybe I'm trying to do something that's not intended... =/
Any direction on this issue would most appreciated.
Thank you.