Download VS SCORM 1.2 RTE Rev 1.0

At this time, I’m going to pause development of the VS SCORM 1.2 Run-Time Environment (RTE) since my implementation seems to work well enough for my purposes, and tidy it up for formal release as Rev 1.0.

As I noted in a previous post, I’ve made some significant changes to the code structure in order to move all database- and LMS-specific code to one place (the subs.php file), and to support multiple students/multiple SCOs.

Transferring the SCO Instance ID from the LMS to the API Code

These are the core components:

  • At the top level, there’s an HTML frameset that runs in the student’s browser. This consists of the frameset itself (rte.php), the SCO (you’ll have to define where that’s situated), and the JavaScript SCORM API (api.php).
     
  • The JavaScript API communicates with API code that sits on the server using AJAX calls.
     
  • The server-side API – written in PHP – consists of 4 scripts that initialize a SCO (initialize.php), read and write data elements in response to SCO requests (getValue.php and setValue.php), and finish the session (finish.php).
     
  • The PHP API scripts communicate with the LMS server through database-specific, and LMS-specific code that’s contained in the subs.php script.
     
  • Database login information is contained in the config.php file.
     
  • There are 3 utility files provided in the package:
    • index.html
    • ./utils/cleardb.php
    • ./utils/showdb.php

    These allow you to run the code on a webserver without access to a real LMS.
     

You can download the code bundle using this link.

 

If you’re planning to use this yourself, you’ll have some editing and customization to do. Here’s what you’ll have to do:

  1. Install all the code on a web server somewhere.
     
  2. Create a database table called ‘scormvars’. How you do this will depend on what database you’re using – I used MySQL for these experiments, but that doesn’t mean that you have to do the same. The scormvars.sql file included in the code bundle contains SQL commands to set up a MySQL table. Modify it to suit your own needs.
     
  3. Edit config.php to include login information for your database.
     
  4. Edit subs.php to suit the database that you’re using – again, this was written for MySQL.
     
  5. Install your SCO and, if necessary, edit the rte.php file to point to it.
     

Now, when you access the index.html file, things should start happening. Here’s what it should look like when it’s running.

VS SCORM 1.2 RTE Rev 1.0

NOTES

1. The utils/cleardb.php and utils/showdb.php files are both written for use with MySQL. If you plan to use them, you may need to translate them to suit the database that you’re using.

2. This is a technology demonstrator – not tested code – so please don’t blame me if you find bugs!

This entry was posted in Run Time Environment. Bookmark the permalink.

10 Responses to Download VS SCORM 1.2 RTE Rev 1.0

  1. jcasolutions says:

    I am very interested in how your project has turned out so far. I have downloaded it and will try to get you feedback as I evaluate the code.

  2. Pingback: Pragmatic eLearning » VS SCORM 1.2 RTE Rev 1.0 Available

  3. mwarner says:

    Hi Steve,

    this works great, but there is an error in the subs.php file. The function readElement in there is expecting only one var, but the call in getValue.php is sending two, causing no value to be retrieved from the db. I’ve changed readElement in subs.php to reflect this:

    function readElement($SCOInstanceID,$varName)

    Now, on to more testing. Thanks for building this. I was dreading building an API from scratch.

  4. mwarner says:

    actually…it was just that one call that was trying to pass two vars. The other readElement calls were fine, so I just removed the $SCOInstanceID from the call in getValue.php.

    I also modified the javascript in api.php so the function LMSInitialize returns a reference to itself (return this) instead of true.

    With those two modifications, all seems to be working well enough for me to begin integrating it with our LMS.

    Thanks,
    Mike

  5. Steve Addison says:

    Thanks for spotting the error! I’ll post a revised version of the RTE code.

  6. Steve Addison says:

    Thanks for spotting the error in getValue.php. I’ve posted a revised version of the code.

    As for changing the return value of LMSInitialize(), section 3.3.2.1 of the SCORM 1.2 RTE specification (page 3-8) states that LMSInitialize should return a string – either:

    • “true” indicating successful initalization; or
    • “false” indicating a problem with initialization

    So changing it to return a reference might have unexpected results.

  7. mwarner says:

    thanks for letting me know of the SCORM specs. It worked either way, but I changed it back to “true” to be safe.

    Thanks again for the great work. It saved me a bunch of time.

  8. Pingback: Desarrollando un LMS(con soporte de SCORM)

  9. praveenkumar says:

    Hi Everyone,

    I found a problem with the LMSGetValue();LMSSetValue(); functions

    ISSUE
    In ie7 there is a issue with Wininet.dll only supports 2 concurrent connections. This is by design:

    Some code has to be done to solve this issue….!!!

  10. Steve Addison says:

    Hi praveenkumar

    I’m afraid that I’m not a Windows programmer, so I’m not quite sure what you mean. Could you provide an example of what happens?

    Without knowing more about the problem, it’s difficult to offer any concrete advice. But, I did some quick research and came across this link – http://stackoverflow.com/questions/6049644/watin-hangs-on-aboutblank-for-multiple-concurrent-ie8-instances – which suggests that it’s a problem with the design of IE:

    The issue is deeply rooted in IE’s design architecture and how it interacts with 3rd party components. Because of this you will most likely encounter this issue on web sites that have AJAX requests.

    Sorry I can’t be of more help at this time.

    Steve

Leave a Reply

Your email address will not be published. Required fields are marked *