In Step 48, I introduced a flag to indicate whether a session had been finished or not. In that post, it was used to ensure that LMSFinish wasn’t called multiple times. But I really ought to extend it to make sure that none of the API functions are processed after the session has been closed.
Continue reading →
I recently spotted a bug in VS SCORM 1.2 RTE Rev 2.0. Line 54 of finish.php reads:
$rawscore = readElement('cmi.score.raw');
It should read:
$rawscore = readElement('cmi.core.score.raw');
I’ll incorporate this fix in a new release of the RTE once I’ve made a few other improvements.
If you want a very simple test case, you can use this content package – a single SCO consisting of:
- a title page;
- 3 test questions (the correct answer in each case is “true”); and
- a results page.
Continue reading →
Rev 2.0 of the VS SCORM RTE – the first version with client-side caching – is now available for you to download.
Continue reading →
A reader has identified a problem with Rev 1.0 of the IMS Manifest File Reader which causes the parser to fail when there’s a resource that doesn’t have any files associated with it. Rev 1.1 corrects this bug. The only changes are to the resolveIMSManifestDependencies() function in subs.php, and deal with the case where $file is not an array.
| You can download the code bundle using this link. |
All other details – including system requirements – are the same as for Rev 1.0.
Time to run a few tests. I start with the test case that I’ve been using since Step 3. Just to make sure that everything is working, I run it part-way through then close the window using the ‘x’ at the top of the window to make sure that my LMSCommit() and LMSFinish() calls are operating as expected.
Continue reading →
I’ve addressed handling of the LMSSetValue() and LMSGetValue(), LMSCommit(), and LMSFinish() calls. The remaining piece of the puzzle is to look at how the RTE is initialized.
In Rev 1 of the code, the course/SCO call to LMSInitialize() caused an AJAX request to be sent to the server where a script called initialize.php was executed. The one thing that this doesn’t do is to transfer all of the data element values from the database into the local cache. In theory, I could simply use one or more additional AJAX calls to transfer the data from the server to the local cache. But I think there’s a better way.
Continue reading →
In theory, the way that I handle the LMSFinish() API call should be pretty much the same as for Rev 1 of my code. I simply generate an AJAX request to the server which runs a PHP script that carries out a series of actions on the data elements stored in the LMS database (persistent storage). But the use of the cache introduces some wrinkles.
Continue reading →
The LMSCommit() API call is a little more complicated, but it bears a strong resemblence to the way that I handled LMSSetValue() in Rev 1 of the code – see this post for more details. What I’m going to do is to create a POST request and submit it to the server. But, where the old LMSSetValue() code only passed one variable value across, here I’m going to be passing all of the SCO-writeable data element values.
Continue reading →
Unless I’m missing something obvious, reading from and writing to the cache is pretty simple – certainly a lot simpler than the AJAX calls that I was having to make! Here’s how I’m going to handle it.
Continue reading →