Moodle

SCORM API Instance issue - Moodle doesn't connect to SCORM activity

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 2.1
  • Fix Version/s: 2.0
  • Component/s: SCORM
  • Labels:
    None
  • Affected Branches:
    MOODLE_21_STABLE
  • Fixed Branches:
    MOODLE_20_STABLE

Description

When I add a simple SCORM activity - with just one trackable activity - an API error appears. The exact text depends on which tool is used to create the SCORM activity - but the error is the same - "Could not get API instance".

Example SCORM file (that works perfects on previous versions of Moodle) http://www.contentgenerator.net/scorm/invaders.zip

When I upload it to any pre 2.0 version of Moodle they work without a problem. I've it them with multiple browsers and all seems fine.

When I upload and test them on the test Moodle 2.0 (at http://qa.moodle.net/) I encounter the error every time. The SCORM object is unable to connect to an API instance:
Screenshot here: http://www.contentgenerator.net/scorm/images/Capture%20invaders.JPG

I've also tested the issue with the default SCORM eXe example - the one included in the default features demo course. Here the same error occurs (different actual message, but this is because the message text relates to the specific message that has been programmed to appear when there is a failure to connect to the API instance):
Screenshot here: http://www.contentgenerator.net/scorm/images/Moodle_eXe%20Scorm%20package%20API%20issue.JPG

I also tested the problem with another example SCORM .zip that had been uploaded to the repository - an example fromSUMS Online (http://www.sums.co.uk/) available from the repository at http://moodle.org/mod/data/view.php?d=50&rid=2061. Again, the same error occurs. Moodle tries to display the SCORM object and there is a failure to connect to the API instance:
Screenshot here: http://www.contentgenerator.net/scorm/images/Capture_SUMS%20example.JPG

So, in summary:

  • I think there is a problem with the current Moodle 2.0 implementation of SCORM - a common issue meaning SCORM objects cannot connect to a current API instance.
  • Tested with a variety of browers and OS - but the above grabs come from using Firefox on a PC.
  • Tested it with my own Teacher Invaders example - download from: http://www.contentgenerator.net/scorm/invaders.zip
  • Tested it with the default SCORM eXe example files
  • Tested it with an example SUMS online SCORM .zip file: http://moodle.org/mod/data/view.php?d=50&rid=2061
  • Each time, the 'failed to connect to API' (or similarly worded error) occurs.

Activity

Hide
Mary Cooch added a comment -

I can confirm this - I tried both a Content Generator file and a SUMS file on my own test Moodle 2.0 site and got the same results

Show
Mary Cooch added a comment - I can confirm this - I tried both a Content Generator file and a SUMS file on my own test Moodle 2.0 site and got the same results
Hide
Piers Harding added a comment -

Hi -

I've played the package against latest HEAD (there were some commits yesterday), using both Chrome and FF - The package works, in that it can find the API, but I notice that it never calls Commit() - it just sets some values and Terminate()s.

Can you confirm that you have pulled the latest 2.0 form HEAD, and tried against that ?

Cheers,
Piers Harding.

Show
Piers Harding added a comment - Hi - I've played the package against latest HEAD (there were some commits yesterday), using both Chrome and FF - The package works, in that it can find the API, but I notice that it never calls Commit() - it just sets some values and Terminate()s. Can you confirm that you have pulled the latest 2.0 form HEAD, and tried against that ? Cheers, Piers Harding.
Hide
Andrew Field added a comment -

Screenshot illustrating the issue - this one is from the default example SCORM, clicking on 'Learner-content interactions'

Show
Andrew Field added a comment - Screenshot illustrating the issue - this one is from the default example SCORM, clicking on 'Learner-content interactions'
Hide
Andrew Field added a comment -

>Hi -
>
>I've played the package against latest HEAD (there were some commits yesterday), using both Chrome and FF - The package works, in that it can find the API, but I notice that it never calls Commit() - it just sets some values and >Terminate()s.
>
>Can you confirm that you have pulled the latest 2.0 form HEAD, and tried against that ?

I am using the Moodle install at http://qa.moodle.net/ - so no, haven't tried anything else - but I assumed that the Moodle install there was the latest one. The package in question ( http://www.contentgenerator.net/scorm/invaders.zip ) is a single game that students play. At the end of the game it reports the score back to the LMS. In this specific example there are just 3 questions - each question says 'test' and the answer is 'test'. Once your work through the game, the score should then be reported back.

However, I'm simply not even getting that far. I've just tried it again against the current http://qa.moodle.net/ and get the same error, my custom wording for the inability to find the API. I'll paste the screenshot as the next comment.

Show
Andrew Field added a comment - >Hi - > >I've played the package against latest HEAD (there were some commits yesterday), using both Chrome and FF - The package works, in that it can find the API, but I notice that it never calls Commit() - it just sets some values and >Terminate()s. > >Can you confirm that you have pulled the latest 2.0 form HEAD, and tried against that ? I am using the Moodle install at http://qa.moodle.net/ - so no, haven't tried anything else - but I assumed that the Moodle install there was the latest one. The package in question ( http://www.contentgenerator.net/scorm/invaders.zip ) is a single game that students play. At the end of the game it reports the score back to the LMS. In this specific example there are just 3 questions - each question says 'test' and the answer is 'test'. Once your work through the game, the score should then be reported back. However, I'm simply not even getting that far. I've just tried it again against the current http://qa.moodle.net/ and get the same error, my custom wording for the inability to find the API. I'll paste the screenshot as the next comment.
Hide
Andrew Field added a comment -

Error "No connection to your VLE. If using Moodle, make sure you click 'Start a new attempt' is custom wording for the API not being found.

Show
Andrew Field added a comment - Error "No connection to your VLE. If using Moodle, make sure you click 'Start a new attempt' is custom wording for the API not being found.
Hide
Dan Marsden added a comment -

Thanks for the report! - looks like there's a JS error introduced recently:

Error: unterminated string literal
Source file: http://qa.moodle.net/mod/scorm/api.php?a=2&scoid=9&currentorg=ORG-763578&attempt=1
Line: 318, Column: 48
Source code:
var sURL = "http://qa.moodle.net" + "/mod/scorm/prereqs.php?a=2&scoid=9&attempt=1&mode=&currentorg=<br />

should be an easy fix - will fix this after lunch (unless someone else beats me to it)

Show
Dan Marsden added a comment - Thanks for the report! - looks like there's a JS error introduced recently: Error: unterminated string literal Source file: http://qa.moodle.net/mod/scorm/api.php?a=2&scoid=9&currentorg=ORG-763578&attempt=1 Line: 318, Column: 48 Source code: var sURL = "http://qa.moodle.net" + "/mod/scorm/prereqs.php?a=2&scoid=9&attempt=1&mode=&currentorg=<br /> should be an easy fix - will fix this after lunch (unless someone else beats me to it)
Hide
Dan Marsden added a comment -

real issue coming from here:
Notice: Undefined variable: currentorg in /html/mod/scorm/datamodels/callback.js.php on line <i>53<

Show
Dan Marsden added a comment - real issue coming from here: Notice: Undefined variable: currentorg in /html/mod/scorm/datamodels/callback.js.php on line <i>53<
Hide
Dan Marsden added a comment -

fixed - I think the QA site is only updated daily so won't be until tomorrow that you can check it there.

Was an issue that only affected SCORM 2004 objects when Debugging and display errors was turned on.

thanks for the report!

Show
Dan Marsden added a comment - fixed - I think the QA site is only updated daily so won't be until tomorrow that you can check it there. Was an issue that only affected SCORM 2004 objects when Debugging and display errors was turned on. thanks for the report!

People

Vote (1)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: