(photo by Adaptive Curriculum sample screenshots)

Solution Grove has a client who wanted to try out Adaptive Curriculum's (AC) Activity Objects (AO) inside Moodle.  This initially sounded trivial since they provide SCORM compliant packages and I thought it was easy as just creating a SCORM activity for the AO.  It turned out that AC's AOs are not standalone and they require authentication when installed on third party servers.  Their objects use standard SCORM API calls for getting the user and session information then use these values to authenticate.  The first part's the easy one since I don't need to write any code for that because Moodle already has API for SCORM 1.2.

The problem I encountered was that the authentication method used by AC needs to be run in a stateless manner through a server-to-server HTTP post using the user and session information that originated from the third party server (in this case, the moodle installation). This presents a problem for server-to-server communication because in moodle, the session id for the user is stored in a cookie and we will only be able to get that cookie if the script is run in the browser where it was issued.  At this point, we are now in contact with AC to ask a few questions so that I can proceed implementing a code to support their AOs.

The solution I implemented was to store the user's session inside the database for a temporary amount of time so that the AC server can query if the user trying to access the AO is currently logged in and is indeed using the session which the browser claims it to be.  This was done by creating another table to store the session information and modifying the /mod/scorm/player.php so that it stores the session when the user launches the AO.  I then created a .php page that the AC server will post to for authentication.  I also needed to add a few lines to the scorm_cron function inside /mod/scorm/lib.php so that stored session information will be cleared out every once in a while.

Next, we touched base with AC and instructed them to point to to the mod/scorm/validate_ao.php file for the authentication page and after doing their own changes we are ready to test.  There were a few hiccups at first but after a few rounds of testing with the AC folks and doing some minor tweaks to the code, we are now able to launch the Adaptive Curriculum Activity Object from inside a moodle course.

 

 

sample screenshot of the working integration

If you are interested with integrating with AC for your Moodle installations you can download the patch below and apply it to your mod/scorm directory.  This was tested against a cvs checkout of moodle 1.9.2+ as of August 14, 2008.  Depending on your moodle version, you may need to do some additional manual adjustments if the file doesn't patch cleanly.

To apply the patch:

  1. download the patch
  2. go to your command shell
  3. unzip the patch on a temporary directory
  4. cd into your moodle/mod/scorm directory
  5. issue a "patch -p1 < /path/to/your/moodle-scorm-adaptive-curriculum-support.patch"
  6. if the patch was successful you can then visit your moodle admin page using your browser to install the upgrade to scorm, if not then you may need to review the output of the patch command and do the necessary changes then repeat this step
Next: How to use this object in a LAMS sequence
posted in ,
Add comment