Can't find SCORM API

Can't find SCORM API

by David Mozealous -
Number of replies: 24

I am really hoping someone can help me with this.  I just installed moodle on a linux system, and the install seemed to go great.  I got errors when creating the backup tables, but since they are backups I wasn't too concerned with the problem.  Well, here is my issue, no matter what content I put on my linux site, either SCORM 1.2, or 2004 the content can't ever find the SCORM API.  I have tried content from both Articulate Presenter, and from MM Captivate, but both experience the same issue.  The weird part is, I have an install on my WINXP machine, with the same build of moodle 1.5.3 as I do on my linux system, but on my WINXP system the exact same content works.

Anyone have any ideas on this?

Average of ratings: -
In reply to David Mozealous

Re: Can't find SCORM API

by David Mozealous -
Also, just an update..if I refresh the browser it is able to find the SCORM API.  If I am using Firefox it always seems to find the SCORM API.  Any ideas?
In reply to David Mozealous

Re: Can't find SCORM API

by Eduardo Hernandez -

Yes, I have an idea, but not the solution sad.

A year ago I had the same problem with Internet Explorer. The problem is that the content loads first, and in second place the API or to be precise the functions that allow the SCO to search for the API. So, the first time the SCO is launched, the API can't be found, as the content searches for the API before the API arrives, or before IE can find it.

That's the reason a refresh makes things work, because the API and functions to find it are already loaded and the refresh makes the SCO search for API once again.

At that time, when I was facing the problem I also had a warning of a JavaScript error, if debug is turned on in IE, you can track the issue, and you can realize that the functions are not available (a *.js files is not downloaded/loaded or available to IE - i don't know exactly what's going on), and that makes all things go bad.

To be honest, I don't know why this happen, and I don't know how to solve it as it was a problem with Internet Explorer (at least for me). Now, with the latest versions of Moodle it doesn't happen (to me).

Eduardo

In reply to Eduardo Hernandez

Re: Can't find SCORM API

by David Mozealous -

Thanks for the reply Eduardo.  The thing that really sucks about this is that I switched to a Linux hosting provider just for the sake of using Moodle.  Maybe I will ping them (dreamhost) and see if they have ever had that problem before.

Also, I am running 1.5.3 right now, but I also tried 1.6.x and still had the same problem.

In reply to David Mozealous

Re: Can't find SCORM API

by Marc G -

Dave,

We are just noting this problem on our linux box.  In addition, the delay in loading the API first, before the content is intermittent.  It truly appears there is no rhyme or reason to this anomaly.

Worst off, I just had firefox error-out on random launches of SCORM modules (we're using Articulate Presenter and Articulate Quizmaker).  With I.E. the success rate of SCORMs loading with no error message of "API can't be found" is random.  Given a half a dozen PCs, this error appeared at different rates.

We're examining code to see if any time delays can be implemented to allow the API to load, i.e. if API is properly launched, then load content.

Anyone find a solution that is sound?

In reply to Marc G

Re: Can't find SCORM API

by David Mozealous -

Unfortunately I got nothing from Dreamhost...who is my hosting provider.  I too was using Articulate Presenter, and Quizmaker, but just to make sure the problem wasn't limited to that content I tried using Captivate and Breeze Presenter, and they both exhibit the same problem....tracking does not occur.  Captivate and BP have no built in LMS debugging, but the fact that tracking did not occur means that they couldn't find the SCORM API either.

This is highly frustrating...I keep having all these great plans for how I can incorporate moodle into my site to provide training, but can't ever implement these plans becuase of the problems I am having with Moodle on both Linux and WIN servers.

Marc, if you ever figure out how to delay the API, I would love to here what you did.

In reply to David Mozealous

Re: Can't find SCORM API

by Kevin Brady -
Hi David,

I'm using Articulate Presenter and Quizmaker without any problems = output to SCROM 1.2. I haven't tested SCROM 2004 yet but can verify that it works with AICC.

My host - bugroom.com - allows me to change some php settings on the fly using a local php.ini file. 

You may want to check with your host to see if "register_globals" is on or off.  Most hosts have this off by default for 'security' reasons, but it's often needed to pass form elements (in this case to launch the SCORM api).

Kevin
In reply to Kevin Brady

Re: Can't find SCORM API

by David Mozealous -

Hey Kevin,

Thanks for the reply...Yeah, I have it working fine on my WIN XP local machine with Apache, but when I upload Moodle to my Linux host I can't ever seem to get it to work.

I checked with my hosting company, and I can only have register_globals set to off if I set my PHP version to 4.4.2.  So here is what I did:

  1. Deleted my current moodle install
  2. Created a new DB
  3. Set my PHP version to 4.4.2 since by default register_globals is set to off
  4. Installed moodle 1.6 Beta 5 (I now realize that I probably should have used 1.5.3)
  5. Uploaded content from Articulate
  6. Tried to launch the SCORM Articulate content
  7. Got a page not found error

sad

So then I tried setting my PHP version back to 5.1.2, just to see if perhaps that would work...and unforunately I got the message that it can't find the SCORM API.

The content still launches just fine in Firefox, but since over 90% of my visitors are using IE, I am still out of luck.

If your interested in trying it out, feel free:

http://learn.mozealous.com

Click the New Demo link in the main menu, then log in as guest.

In reply to David Mozealous

Re: Can't find SCORM API

by Kevin Brady -
Hi David,

Sorry I can't be of any more help - your content launched fine for me in IE6, IE7, and Firefox.

No problems from this end. I logged in as quest as you suggested.  We had this problem recently with one of our clients using a differnt lms (not to be named).  However, their content was on a differnt server than the lms, and were using AICC - cross-domain JavaScript errors. 

I would look at the 'JavaScript" debug issue mentioned above. Also, both browsers gave me pop-up security warnings because your cbt is trying to launch in a new window. You may also try removing the window launch and see if you have any more luck working in-frame (worth a shot).

Kevin

In reply to Kevin Brady

Re: Can't find SCORM API

by Marc G -

I'll check on the "register_globals" is on or off.  However, that implies to me its complete success of the API loading (register_globals = on) or no success (register_globals = off) on the successful load and tracking Articulate driven SCORM content.  We are seeing it completly on a random  basis, hit or miss.

As with the case of Dave saying IE fails to load Articulate Media and Kevin saying he's had success...sounds like what we noted.

IE vs Firefox
We examined the two browsers on 4 separate PCs.  Firefox would load the AP, Quizmaker, Captivate, etc SCORM properly.  On 30 attempts it did fail once for Articulate.  For IE, both IE6 and IE7 was about 20 success rate out of 30.

What were seeing is its on the client-side... with different browsers, different PCs, etc. denotes whether the API is loaded before the Content.  Timing can become screwed up.  That's why were all seeing the "API cannot be found" as completely random.

Solutions
We're trying to get knee deep in code and look at options to ensure 100% success rate of the API loading for Articulate Presenter, Articulate Quizmaker, and Captivate (assuming those three Dave, Breeze would work).  We want to ensure the API is loaded first, followed by Content (not the cart before the horse)  Below are three conceptual solutions we're examing.

  1. Ensure API loads before Content - within PHP, we're looking for a unique identifier that says the API is loaded, then "say" proceed with content.  We're trying to find that red flag.  Pause the remainder of loading the page until the red flag has surfaced.
  2. Time Delay.  Having some type of counter in playscorm.php that says do nothing for 5 seconds, then continue loading content (to give the API time to load then be found).  Not as rigorous as Idea 1, because we are assuming 5 second delay should allow the API to load versus being notified it was, then proceeding w/ content
  3. Refresh - we noted a refresh of the playscorm.php worked each time.  You get the error of "API cannot be found", do a refresh and all is well  We're thinking of adding code playscorm.php that forces 1 refresh of the page.  The least rigorous, but I'll take a quick solution at the moment to get a "tighter" on later.

Tracking Results
In the event the SCORM module loads (AP, Quizmaker, Captivate or Breeze) and your smooth sailing with no message of "Cannot find API", be sure at attempt the following Dave.

  1. Articulate Presenter - given a presentation, let it complete. AP viewer says "Course Complete".  Do not leave the playscorm.php page.  Click the button that says "Exit from SCORM Course.  (we are showing that results are properly tracked when the user does a formal exit from the SCORM course).
    A bummer because you would have to tell users to ensure they properly exit for progress to be tracked.
     
  2. Slides - Given an 8 slide presentation, we have noted greater success of tracking given a 9th slide that concludes a presentation.  In AP, stating that user must view a miminum of 8 slides for example.  This is true if grading is complete/incomplete and based on a number of slides viewed.
     
  3. Quizmaker - Given a Quiz done with Articulate Quizmaker, it gives the user the chance to press "Finish" and even close the browser window.  This may be done and the user has not selected "Exit from SCORM Course" within Moodle (which has showed 100% capture of results if they do a formal "Exit from SCORM course" at the end of taking a quiz, etc.
      
    We considered embedding a quiz in a 2-slide presentation in Articulate Presenter (1 for the imported quiz, 1 for a conclusion slide just so the Quiz does not include the "Finish" button and users close the browser.  This means in Articulate Presenter, this SCORM module is pass/fail based on the embedded quiz, not the number of slides used.

I'll keep folks in-the-loop on the efforts to ensure the API is loaded, before the Content is launched.  It appears to be completely random, based on the client and not the server, of which one loads first.   We're in the situation where we need 100% success rate.  1 event of "Can't find API" is not acceptable.

Marc

In reply to Marc G

Re: Can't find SCORM API

by David Mozealous -

Wow Marc, thanks for the through answer, and other suggestions.  I look forward to your solutions if you are able to find anything out.

"We're in the situation where we need 100% success rate.  1 event of "Can't find API" is not acceptable."

I completely agree on this one.

Thanks again.

In reply to David Mozealous

Re: Can't find SCORM API

by Marc G -

I may have errored on which php file is in-discussion, but the methodologies of solutions remain the same. 

Dave, given your learning site, looks like you are on a higher version of Moodle/Scorm that us.  However, same issue...should be same soluion.

In reply to Marc G

Re: Can't find SCORM API

by J Rogers -
I realize this is an old topic, but has Articulate made any progress on this front? Even two years later, people (like me) are still running into the issue. (see MDL-16185 )

I think the idea of making IE "refresh" before throwing an error if it doesn't find the API the first time is the quickest solution. It would require some changes to SCORMfunctions.js (by Rustici Software). I will see what I can come up with.

Has anyone else experienced this recently?

Jeremy
In reply to J Rogers

Re: Can't find SCORM API

by David Mozealous -

Hi Jeremy and Kris,

The issue that you are seeing I don't think is the same as the original issue as the original issue was reported way back in Moodle 1.5/1.6.

We at Articulate (with Mike Rustici's help, we use his SCORM code) actually did look at the issue in later versions of Moodle (1.8 I believe), and the issue was on the Moodle side, not the Articulate side. The issue after some we did some digging around with Firebug and it looks like the reason it can't find the API is that the LMS has an error and doesn't provide the API.

We were able to resolve the issue by upgrading to Moodle 1.9.2.  I have a test LMS up that here that we use, and it no longer has any problems.

So my suggestion for you, is if you have not done so already, upgrade to moodle 1.9.2.

-Dave

In reply to David Mozealous

Re: Can't find SCORM API

by Dan Marsden -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators
thanks Dave,

a lot of changes have gone invto SCORM over the past few months, so the best versions to use are the 1.9Weekly and 1.8Weekly versions available on the download.moodle.org page.
In reply to Dan Marsden

Re: Can't find SCORM API

by Kristian Besley -

Hi Dan,

Are you suggesting I update my whole Moodle or just the scorm module?

My scorm version is:

$module->version = 2007110500;

...and my Moodle version:

$version = 2007101520.03;

$release = '1.9.2+ (Build: 20080730)';

I'd rather not update the whole of Moodle if I can help it and would rather drop in a new copy of the scorm module. If I just steal the module from the weekly Moodle build would that work okay or are there dependencies? The version in the plugins downloads hasn't been updated since Thursday, 12 July 2007, 08:43 PM!

Thanks,

Kris

In reply to Kristian Besley

Re: Can't find SCORM API

by Dan Marsden -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators
My recommendation would always be to upgrade the whole lot, especially if you are relying on this forum for support. You could "try" just grabbing the Scorm folder and updating that, however that could potentially cause problems due to dependencies....if you decide to replace the folder and there are still issues, or other issues appear, please upgrade the whole lot.

good luck!
In reply to David Mozealous

Re: Can't find SCORM API

by Kristian Besley -

Hi Dave,

Unfortunately we already have 1.9.2 and it still isn't working. We upgraded to it from 1.8.

Kris

In reply to Kristian Besley

Re: Can't find SCORM API

by STRG Pune -
I face this problem when I test the SCORM package on the hosted env. When I try the same on my laptop, everything works fine.

The errors that I see are shown in the image. The errors are pasted in chronological sequence.
Attachment API_not_found.jpg
In reply to STRG Pune

Re: Can't find SCORM API

by Chris Shaltry -
I am attaching my php5.ini file, which you can see I modified by adding "cgi.fix_pathinfo = 1" at the top to get SCORM working in my Moodle 1.9.3 and 1.9.4 setups. You can see I also modified the system to accept uploads of up to 2GB, which is just a personal preference. This php5.ini file resides in the main /moodle directory alongside my old php.ini file. Doesn't seem to cause any issues. I'm not a programmer, so I had to find these mods and fixes all over the Internet. So if you have any additions or suggestions for improvement let me know. Hope this helps.

CS
In reply to Chris Shaltry

Re: Can't find SCORM API

by STRG Pune -
Thanks Chris for your time and valuable inputs.
I made necessary changes in php.ini suggested by you but it didn't work. Same errors occurred.

Regards,
STRG
In reply to STRG Pune

Re: Can't find SCORM API

by STRG Pune -
The above problem is specific to LCDS Author. I could load and run other SCORM packages.
In reply to STRG Pune

Re: Can't find SCORM API

by Pierre Clavet -

Hi!

I know this is old but did you find a solution to this issue.  I'm running 1.9.12+ and I'm still getting that error see screenshot.  I'm pretty sure it related to the same issue that you had.

thanks for any info that you might have.

Attachment scorm_error.png