SCORM

 
 
Rebo the Degu
Unable to find API Adapter problem
 
Hi,

I'm a newbie to SCORM and to Moodle, so please forgive me if I'm being a bit slow here ...

I've built a SCORM 1.2 package which uses the attached script to find the API (script is adapted from code in the ADL SCORM 1.2 standards documentation).  I'm receiving the error "Unable to find API adapter" when I try to launch the package in Moodle.

Are there any fellow code monkeys out there who are more experienced with SCORM development and can tell me whether this script should work in Moodle as it stands?

Also, how does Moodle determine which SCORM standard the SCO is using?  I assume it uses the manifest metadata?  A quick look at the api.php code (in the SCORM module) suggests that the SCORM 1.2 API is loaded by default, but in that case, how would I go about loading the 1.3 API (again, I assume it looks at the SCO manifest, but which part)?

Many thanks in advance for your help,
Geoff Martin
 
Average of ratings: -
Rebo the Degu
Re: Unable to find API Adapter problem
 
Hello again,

Just to say I've now solved the problem.

It seems that any resource which calls the API needs to be defined as "sco" not "asset" in the manifest (e.g. use the resource element attribute 'adlcp:scormtype="sco"').

Otherwise the API handlers are never loaded into the SCORM player, and any function call to use them will fail.

I hope that's of use to someone - I know several other people on the forum have mentioned getting the same error.

Geoff

PS: this discussion applies to SCORM module version 2005102800 - the latest release at the time of writing.
 
Average of ratings: -
Picture of Pedro Guevara
Re: Unable to find API Adapter problem
 
Hi
What if the resources are defined as "sco" and I still get the API message?

Thanks
 
Average of ratings: -
Picture of brent simpson
Re: Unable to find API Adapter problem
 
What browser are you using? My experience with this error message in the past is that it's often related to the browser, mostly Internet Explorer.

brent.
 
Average of ratings: -
Picture of Andrew Winter
Re: Unable to find API Adapter problem
 
I know it's not only IE as I have the same problem in FireFox, IE, and mozilla.
 
Average of ratings: -
Rebo the Degu
Re: Unable to find API Adapter problem
 
Certainly the problems I was having finding the API were in both IE and Firefox.

If you've got your resources defined as "sco", perhaps you've got something wrong higher up in the manifest? For example, the php code looks like it requires your schemaversion tag to contain "1.2" for SCORM 1.2, or "CAM 1.3" (from memory) for SCORM 2004. You'd also need different code to find the API for SCORM 2004 content.

I'm not in the office today so I can't post my manifest for you to compare yours with, but I'd be happy to on Monday, or to take a look at yours sooner.

There do seem to be some browser specific issues, but they are mainly cosmetic for me. For example the iframe containing the SCORM content seems to render below the content tree in IE, whereas it is to the right in Firefox. Also, if you have nested items in your content tree, the expanding / collapsing button doesn't seem to work in Firefox.

Geoff


 
Average of ratings: -
Picture of Pedro Guevara
Re: Unable to find API Adapter problem
 
Here it is the manifest file

One more word about it. If I use the same SCORM package in a Moodle instalation in my desktop PC, it works OK. I I use it in a Shared Web Server I get the API errors

Thanks
 
Average of ratings: -
Rebo the Degu
Re: Unable to find API Adapter problem
 
That's worrying - I'm developing / testing on a local server ... !

Certainly there's nothing glaringly wrong with your manifest file that I can see (if there's anyone out there with more experience writing manifests, feel free to jump in at this point).

The error I reported was due to the SCORM player not including the file which contains the JavaScript API code (it's in moodle/mod/scorm/datamodels). I'm guessing here, but maybe some setting on your shared web server is also preventing the script being included, so your package can not access the API.

Exactly what the setting might be is sadly not something I can help with ...
 
Average of ratings: -
Picture of Pedro Guevara
Re: Unable to find API Adapter problem
 
Thanks Geoff

Anyone else can imagin what is hapening?

Thanks a lot
 
Average of ratings: -
Picture of Andrew Winter
Re: Unable to find API Adapter problem
 

Youre not by chance using MySQL 5 as your DB are you?  I've noticed a lot of things break when using MySQL 5 in strict mode.

 
Average of ratings: -
Picture of Pedro Guevara
Re: Unable to find API Adapter problem
 
It is the same with explorer and netscape
Thanks
 
Average of ratings: -
Picture of Tudor Danes
Re: Unable to find API Adapter problem
 
Try setting CFG variable slasharguments to 2nd option (file.php/pic.jpg)
It worked for me.
 
Average of ratings: -
Picture of Andrei Thomaz
Re: Unable to find API Adapter problem
 
hello,

I changed the AcceptPathInfo variable, as explained at http://moodle.org/mod/glossary/showentry.php?courseid=5&concept=Uploaded+files+give+%22File+not+found%22,
and the JavaScript functions still doesn't find the API (in IE and in Firefox)

I am running the last vestion of Moodle (downloaded yesterday), locally, with XAMP.

The same SCORM package works with Dokeos, in IE and Firefox.

bye,
andrei




 
Average of ratings: -
Picture of Paul Atreides
Re: Unable to find API Adapter problem
 
Make sure you try 1.5.3+ before 1.6 if that is what you are doing.

Also, depending on what compliancy you are publishing to, scorm 1.0 almost always works better (more compatible) than scorm 1.1, 1.2 and 2004.

And also, if you are passing along variables you may find that the variables are what is messing up your LMS, especially if you get errors upon returning to a scorm resource and not on the initial load.

You may wish to implement a navigation based feedback structure, rather than a variable one. If you have something like "if box 2 is checked then go to correct answer page" and "if box 3 is checked go to correct feedback page, and then go to the question page again" this way you create a navigation based loop that can force the correct answer, but not involve variables (if you cant solve the variable issue)

That may be helpful, or it may not!
 
Average of ratings: -
Picture of Anil Sharma
Re: Unable to find API Adapter problem
 

Geoff

I have been facing this problem for a long time ..and guess what, i found the solution today.  I had enabled zlib compression by putting this code in .htaccess :

php_flag zlib.output_compression On
php_value zlib.output_compression_level 5  

The moment zlib compression was removed, problems with SCORM were gone !!

hope this helps

 
Average of ratings: -
Picture of Waleed SULTAN
Re: Unable to find API Adapter problem
 

Hello every one, Solving the above proplem due to this reason:

The reason is because we are launching SCO without LMS, meaning LMS is locating for SCO and wise versa.

Ref to LMSInitialize and LMSFinish, mainly if you have more than one page displaying some SCOs.

Pleaze email me with a subject SCORM if you have any further inquires.

Hope this will help guys,

 
Average of ratings: -
Tina
Re: Unable to find API Adapter problem
 

Hi,

I am still having trouble with the "Unalbe to find API Adapter" message that others seem to be having. I have made the changes that are suggested in this thread- if I have been able to figure out what everyone has been talking about but am still not having any luck.

I noticed a solution posted by Waleed Sultan, but as I don't understand it I have not been able to do anything about the message. Is anyone able to help me?

The original SCORM I used was done in eXe following one of the messages in this thread I used Reload to redo the SCORM- this did not work. I changed the "asset" in the manifest to "sco" and have checked the database none of this has helped. The SCORM I am using is just a simple multiple choice one page SCORM it is not complex and similar SCORM's that I have used in the past have not had this issue. I am using Vista which does seem to manage to upset any program knonw to man but I would not have thought it would creating this particular problem.

If anyone can help I would be greatful.

Thanks,

Tina

 
Average of ratings: -
Picture of Marshal Anderson
Re: Unable to find API Adapter problem
 
It seems there's more ways of getting this error than there reasons to stay in bed smile For what it's worth, one that's currently causing problems in a package I'm working om is caused by calling the API from a new browser window. I haven't sorted a solution yet, but it might be causing your problem here Tina - just a shot in the dark.

Marshal
 
Average of ratings: -
Picture of Arien Hilhorst
Re: Unable to find API Adapter problem
 

Hi,

Had the problem myself. One of the manymanymany reasons could be that the wrong datamodel is loaded.

In manifest scorm_cam1.3 is mentioned by some generators, while content isn't 1.3 but 1.2

I hacked the code for this an works perfectly!

Try to find out which jslib is loaded (using firefox/firebug. Is it scorm1.3.js? Is your content scorm1.2? Bingo!

Hope this helps, let me know.....

Arien Hilhorst

 
Average of ratings: -
Picture of Dan Marsden
Re: Unable to find API Adapter problem
Group DevelopersGroup Moodle Course Creator Certificate holdersGroup Particularly helpful MoodlersGroup Translators
Hi Guys,

what version of Moodle are you using? - and Arien - have you logged this as a bug in the tracker? - if not, can you? - and include any "hacks" you made to make it work?

thanks!

smile

Dan
 
Average of ratings: -
Picture of Arien Hilhorst
Re: Unable to find API Adapter problem
 

Hi Dan

Did some fiddling around in the code.... I will revert it back to 1.9.2 original and change it again, documenting it properly. If done, I will submit the code in the bugtracker.... It 'll include a status fix (completed icon in start screen/toc instead of suspended when course is completed), omitting scores in the TOC bar (sometimes not wanted!) and returning correct status on reentering suspended scorm.

Takes me some time to do it, but i think it 's worth it. It seems scorm is getting more and more important....

In Moodle 1.6, student interactions were saved and reloaded on re-entry without the use of suspend_data. In 1.9 its no longer. Is this a bug or scorm conformant?

I wonder someone is busy fixing (1.2) sequencing?? My php knowledge is below what i think is minimal to attribute code :-$ , but i would greatly appreciate it if it was no longer a thing under construction....

Thanks back !

smile

/\rien.

 
Average of ratings: -
Picture of Marcus Hoberg
Re: Unable to find API Adapter problem
 

Hi Arien,

is there any progress on this?

I today received a SCROM module where we find still find the same glitch: If the SCORM is embeded into the moodle page (version 1.9.4.), the user name is transported correctly into a quiz certificate. If the same module starts in a new window, the SCORM module tells me that it is "unable to find api adapter".

Thankfull for any kind of solution for this,

Marcus

 
Average of ratings: -