This release corrects an error in ‘getValue.php’ where the ‘readElement’ function is incorrectly called with 2 input parameters.
You can download the code bundle using this link. |
For instructions on using this code, please see this page.
This release corrects an error in ‘getValue.php’ where the ‘readElement’ function is incorrectly called with 2 input parameters.
You can download the code bundle using this link. |
For instructions on using this code, please see this page.
This code bundle is a LOT simpler than the bundle for the VSSCORM 1.2 RTE (Run-Time Environment) that I posted a couple of months ago. It consists of 2 files:
In other words, if you wanted to incorporate the code into a real system, you would only need the content of subs.php.
The system requirements for running this code are pretty simple – you just need to have PHP 5 or above (PHP 4 doesn’t support the DOM extension that I’m using to parse the XML manifest file).
To help you get started, I’ve also included the 2 sample manifest files that I’ve been using.
You can download the code bundle using this link. |
Time to see if everything works. I’m going to test my code using two different manifest files:
To be honest, I don’t think I’ve ever come across a multiple-SCO content package in a real application, but I do need to be able to handle it if I do stumble across it.
Finally, I’ll add the code which connects the item and resource data together to create the data that the “imaginary” LMS needs.
At last, an easy bit. I’m going to add the following code to my readIMSManifestFile() function.
This is the new routine that I’m going to use to resolve the resource dependencies in the package manifest file.
I’m going to re-examine the XML format that the SCORM 1.2 CAM specifies for the manifest file. As a reminder, here’s the <resource> tag that I’m trying to understand.
Time to start writing the readIMSManifestFile() function. Let’s create the basic structure.
In my last two posts, I figured out how to read resource and organization data from the manifest file that describes the content package. But the code that I wrote really wasn’t that solid, and wouldn’t be particularly easy to integrate with my “imaginary” LMS. So I’m going to take the lessons that I learned there and see if I can create something a little better.
Having read the resource information from the manifest file, I’m going to extend the code to read the organization information. As a reminder, the <organizations> section of my manifest file looks like this.