Picture of Ben Simons
Scorm Wrapper Problem
by Ben Simons - Wednesday, 26 August 2015, 10:12 AM
 

Hi Guys,

I'm quite new to adapt but we have started using it quite a lot within our company which they love. However I recently updated to adapt 2.0, and I am getting a problem when launching my course from my LMS. Firstly when I launch my course I get an error occurred pop up, which stated ScormWrapper::getStatus: invalid lesson status "received from LMS. Then when I click OK on the popup I get a debug report which I will attach to this post. The course launches at this point but is really laggy and slow. I then shut the course down and cannot reopen it as when I do I get the loading circle. So I go into inspect element and then console and see that the APIadapter isn't working or is missing..... Very Strange as adapt 1.0 worked perfectly. I have got in touch with our LMS providers but they are pretty stumped as well. Any help would be amazing.

Regards

Ben


Picture of Matt Leathes
Re: Scorm Wrapper Problem
by Matt Leathes - Wednesday, 26 August 2015, 2:26 PM
 

Hi Ben

Based on the names of the SCORM properties shown in the debug log, it looks as though you're running Adapt as SCORM 2004 - which isn't officially supported... as in we don't do any testing of SCORM 2004 support.

That said, there's no particular reason it shouldn't work if you know how to package it up for SCORM 2004 properly.

The 'invalid lesson status' error I'm pretty sure is a correct one - from the debug log you include I can see that an empty status is being returned. I know for sure that lesson_status must not be an empty string in SCORM 1.2 and I'm pretty sure it's the same for SCORM 2004. So this is definitely one for your LMS team.

It does look as if something is going quite seriously wrong on the API side though, I can't see that the API is returning any valid data at all. Clearly if it's not then quite understandably Adapt is not going to work...

Have you tried running it as SCORM 1.2 instead?

Picture of Ben Simons
Re: Scorm Wrapper Problem
by Ben Simons - Wednesday, 26 August 2015, 3:06 PM
 

Hi Matt,

This is really strange, because I want it to be Scorm 1.2 not 2004. That said when I load it onto my LMS it registers as a scorm 1.2.... How would I zip it up as a Scorm 1.2?

Many thanks in advance.

Ben

Picture of Matt Leathes
Re: Scorm Wrapper Problem
by Matt Leathes - Wednesday, 26 August 2015, 6:37 PM
 

Ah OK, that's interesting... I wonder if your LMS (Kallidus?) is one of those that presents both versions of the SCORM API to the course - I know SABA does this.

We use the pipwerks api-wrapper in our code and, if it finds a SCORM 2004 API, will default to using that whether you want it to or not.

This line of code is supposed to stop that from happening, but I wonder if recent changes have stopped it from working/kicking in early enough... I'll do some investigation tomorrow for you.

Picture of Ben Simons
Re: Scorm Wrapper Problem
by Ben Simons - Thursday, 27 August 2015, 7:51 AM
 

Hi Matt,

Yeah we use kallidus, and they have said that the 'logging and the content is not passing the values/status we would expect for the content to track correctly.' Would this be done to it being a scorm 2004, and not a scorm 1.2 which the LMS thinks that it is?

It's really annoying because 2.0 in my opinion looks so much better and if now have to make my course in 1.1 it will be a shame.

Kind Regards

Ben

Picture of Paul Hilton
Re: Scorm Wrapper Problem
by Paul Hilton - Thursday, 27 August 2015, 8:43 AM
 

FYI we had this problem when working with Pipwerks and Kallidus (not with Adapt btw) . Despite our package being uploaded as 1.2 they exposed the 2004 API and as Matt says pipwerks then attempts to use it, but because Kalidus has identified its a 1.2 package it won't accept any data from it...

Picture of Ben Simons
Re: Scorm Wrapper Problem
by Ben Simons - Thursday, 27 August 2015, 8:54 AM
 

Paul, did you manage to get round it? or did you just remake your content in another piece of software? I would really like to avoid doing that but this course is due next Wednesday and I need to get a plan sorted. :/

Picture of Paul Hilton
Re: Scorm Wrapper Problem
by Paul Hilton - Thursday, 27 August 2015, 9:38 AM
 

We just forced Pipwerks to use 1.2 - Matt has indicated there is something in place that should make this happen. I'm afraid I'm not in a position to look into why thats not working, but I hope it means you are looking in the right place.

Picture of Matt Leathes
Re: Scorm Wrapper Problem
by Matt Leathes - Thursday, 27 August 2015, 9:45 AM
 

Useful info Paul, thanks

I'm sure this is something that can be resolved quite quickly. I'll look into it today.

Picture of Ben Simons
Re: Scorm Wrapper Problem
by Ben Simons - Thursday, 27 August 2015, 10:12 AM
 

Hi guys,

Just went back into the course, and I noticed that there were 22 JSlint problems appearing. Would this have anything to do with the problem?

Kind Regards

Ben


Picture of Matt Leathes
Re: Scorm Wrapper Problem
by Matt Leathes - Thursday, 27 August 2015, 11:27 AM
 

No. JSLint is a tool that checks to see if your code is written in the way Douglas Crockford thinks it should be written.

I prefer to use something a little less opinionated* and more configurable like JSHint.

There's a good post about this on stackoverflow.

* Seriously, it's complaining because there's a variable whose name starts with a double underscore... What's wrong with that??

Picture of Ben Simons
Re: Scorm Wrapper Problem
by Ben Simons - Thursday, 27 August 2015, 11:36 AM
 

So that doesn't mean anything then? And regarding the double underscore, I don't know why it has a problem with it.... its being very picky.

Picture of Matt Leathes
Re: Scorm Wrapper Problem
by Matt Leathes - Thursday, 27 August 2015, 2:44 PM
 

No, it's just being very nitpicky about how the code is formatted i.e. it's not done the way Mr Crockford thinks it should be done

For example he thinks all variable declarations should be at the top of functions - even the counters in for() loops... weird.

Picture of Matt Leathes
Re: Scorm Wrapper Problem
by Matt Leathes - Thursday, 27 August 2015, 7:39 PM
 

Right, well I've had a look and the theory I had (that the v2 update of spoor had changed the execution order somehow so that SCORM calls are being made before it's had a chance to force the version to 1.2) doesn't seem correct, the very first thing it does even before attempting to find the API is set the version, just as it should.

Let's try adding a bit more debugging to your course to see if we can figure out what's going on.

Could you take the javascript file from the attached zip and overwrite the same file that's in extensions\adapt-contrib-spoor\js\scorm\ in your course's src folder?

You'll then need to set the Adapt SCORM debug window to open by default by adding a couple of extra properties to the _spoor section in your config.json:

"_spoor": {
        "_isEnabled": true,
        "_tracking": {
                "_requireCourseCompleted": true,
                "_requireAssessmentPassed": true,
                "_shouldSubmitScore": false,
                "_shouldStoreResponses": false
        },
        "_reporting": {
                "_comment": "Your options here are 'completed', 'passed', 'failed', and 'incomplete'",
                "_onTrackingCriteriaMet": "completed",
                "_onAssessmentFailure": "incomplete"
        },
        "_advancedSettings": {
                "_showDebugWindow": true
        }
}

The additions (_advancedSettings and _showDebugWindow) are highlighted in bold, you may need to view this on the community site to be able to see that though.

Once that's done, build the course as usual, upload to your LMS, clear your cache, run the course and post what you get in the popup window back here for me to have a look at.

Picture of Ben Simons
Re: Scorm Wrapper Problem
by Ben Simons - Friday, 28 August 2015, 8:15 AM
 

Hi Matt,

I replaced the wrapper file and rebuilt the course, uploaded it cleared the cache and then ran it, it is now coming up as a scorm 2004 and nothing is happening. The course just gives me the loading circle and when i run the inspect element, it says that the APIadapter is playing up :/



Mark
Re: Scorm Wrapper Problem
by Mark Lynch - Friday, 28 August 2015, 9:00 AM
 

Hi,

 

The LMS should be getting the SCORM version from the imsmanifest.xml.

This file should be present as a requirement of the SCORM 1.2 and SCORM 2004 standards.  If the file is not present, this invalidates the content as being SCORM compliant.  If the above file does exist, you should be able to open it in a simple text editor such as Notepad or Wordpad.

Search for a <schemaversion> section, which should identify the version of SCORM that the content was packaged as:

<schemaversion>1.2</schemaversion>

(indicates SCORM 1.2)

 

With the old course that works, would you be able to compare the msmanifest.xml with the broken one you have uploaded?

 

Thanks,

 

Mark.

 

 

Picture of Ben Simons
Re: Scorm Wrapper Problem
by Ben Simons - Friday, 28 August 2015, 9:47 AM
 

Hi Mark,

I checked out a msmanifest of a course that worked against my broken one and the main difference is there seems to be ![CDATA] all over the broken one. What does this mean.

 

-<langstring xml:lang="x-none">
<![CDATA[Adapt SCORM]]>
</langstring> </title> -<description> -<langstring xml:lang="x-none">
<![CDATA[Responsive SCORM generated by the Adapt Learning Framework]]>
</langstring> </description> </general> </lom> </metadata> -<organizations default="adapt_scorm"> -<organization identifier="adapt_scorm"> -<title>
<![CDATA[Adapt SCORM]]>
</title> -<item identifier="item_1" identifierref="res1" isvisible="true"> -<title>
<![CDATA[Adapt SCORM]]>
</title> 

 

This is the broken manifest

Picture of Matt Leathes
Re: Scorm Wrapper Problem
by Matt Leathes - Friday, 28 August 2015, 10:08 AM
 

The CDATA tags are fine. If they weren't there you wouldn't be able to use accented characters in the course title or description.

Mark
Re: Scorm Wrapper Problem
by Mark Lynch - Friday, 28 August 2015, 10:26 AM
 

Hi Ben,

Drop the good one into the v2 course (replace the bad one) zip it up and upload it, see what happens.

Not sure if it'll help but worth a try

Mark.

Picture of Matt Leathes
Re: Scorm Wrapper Problem
by Matt Leathes - Friday, 28 August 2015, 12:19 PM
 

I don't think it's going to be the manifest - the source of the problem is definitely the fact that ScormWrapper.setVersion('2004') is being called somehow. There's no possible way the manifest can affect this.

Looking at the code, the only way you could make this happen is to either add _scormVersion: "2004" to config.json or to manually change the JavaScript code in somewhere like adapt-contrib-spoor.js

There is only one call to ScormWrapper.setVersion in the whole of Adapt and it's on line 47 of adapt-contrib-spoor.js

Picture of Matt Leathes
Re: Scorm Wrapper Problem
by Matt Leathes - Friday, 28 August 2015, 9:03 AM
 

Could you share your config.json here? Or better, are you able to share the whole course (src included) via PM?

Picture of Ben Simons
Re: Scorm Wrapper Problem
by Ben Simons - Friday, 28 August 2015, 9:25 AM
 

{
"_defaultLanguage": "en",
"_defaultDirection": "ltr",
"_questionWeight": 1,
"_accessibility": {
"_isEnabled": true,
"_shouldSupportLegacyBrowsers": false,
"_isTextProcessorEnabled": true
},
"_drawer": {
"_showEasing": "easeOutQuart",
"_hideEasing": "easeInQuart",
"_duration": 400
},
"_spoor": {
"_isEnabled": true,
"_tracking": {
"_requireCourseCompleted": true,
"_requireAssessmentPassed": true,
"_shouldSubmitScore": true
},
"_reporting": {
"_comment": "Your options here are 'completed', 'passed', 'failed', and 'incomplete'",
"_onTrackingCriteriaMet": "completed",
"_onAssessmentFailure": "incomplete"
},
"_advancedSettings": {
"_showDebugWindow": true
}
}
}

 

This is the config.json, How would I PM you, I can't find a way to attach it in a message to yourself.

Picture of Matt Leathes
Re: Scorm Wrapper Problem
by Matt Leathes - Friday, 28 August 2015, 10:07 AM
 

Hmm all looks fine to me, I really can't see what's triggering it to jump into SCORM 2004 mode! Hopefully I'll be able to see from your src files.

Picture of Ian Threadgold
Re: Scorm Wrapper Problem
by Ian Threadgold - Friday, 9 October 2015, 4:06 PM
 

Sorry  a bit late to this but someone here flagged it up to me

Yes Kallidus does present both API's we sometimes have problems where courses look for the APIs and whichever they find first the content assumes it will work this way

Happy to help try and solve this for you

Picture of Matt Leathes
Re: Scorm Wrapper Problem
by Matt Leathes - Friday, 9 October 2015, 7:18 PM
 

Hi Ian

Thanks for jumping in - I think Ben managed to find a workaround for this in the end.

A colleague of mine has since got to the bottom of the issue - it's supposed to set to version 1.2 by default but the way the code is written the call to set this default doesn't get made unless you include an _advancedSettings property in the _spoor section of config.json. We'll be rolling out a fix for this very soon.