Posts Tagged ‘SCORM’

Tricks to debug Captivate SCORM 1.2 content

November 26, 2014 Leave a comment

If you have to make Captivate-generated SCORM 1.2 content in your (web) platform and you want *more* information about what’s going on, this guide might help.

One of the trickiest things about Captivate and SCORM is that Captivate doesn’t handle the credit/no-credit ( very well. This parameter, in combination with cmi.core.lesson_mode should let you retake exercises that you have already completed and passed.

In Chamilo, if you want to debug the SCORM interactions on the Chamilo side, use Firefox, login as admin, go to the learning paths list and click the ladybug icon in the action icons next to the learning path you want to debug. This will only affect you, so no worries about doing that in production.

ladybug debug iconThen enter the learning path itselt (simply click its name). Once you’re seeing the content, launch the Firefox debugger with SHIFT+F2 and go to the “Console” tab. Click on any item in the table of contents, and you should see the SCORM and LMS interactions pooring in. Something like the screenshot below.

Chamilo SCORM general debug screen

Chamilo SCORM general debug screen

This is already very nice to understand the interaction going on, and when Chamilo will save the information in its database, but it still lacks the possibility to understand what’s going on, on the Captivate side of things.

Captivate itself has debug features though, but they’re not prepared for just any tool. Luckily, we can tap into them with a moderate level of complexity.

First, you need to know where the Captivate content is on disk in your LMS. In Chamilo, this is typically in the {root-folder}/courses/{course-code}/scorm/{scorm-name}/{scorm-name}. For Captivate content, Chamilo usually generates its own folder, then Captivate, which means you have it duplicated.

You’ll have to get into that folder and, for each SCO (item in the table of content in the screen above), locate the scormdriver.js file.

Around line 1032 of scormdriver.js, you’ll find something like this:

function WriteToDebug(strInfo){if(blnDebug){var dtm=new Date();var strLine;strLine=aryDebug.length+”:”+dtm.toString()+” – “+strInfo;aryDebug[aryDebug.length]=strLine;if(winDebug&&!winDebug.closed){winDebug.document.write(strLine+”<br>\n”);}}

We’ll hack into that and just replace it straight away (keep a backup copy if you’re afraid) by the following line:

function WriteToDebug(strInfo){var dtm=new Date();var strLine;strLine=aryDebug.length+”:”+dtm.toString()+” – “+strInfo;aryDebug[aryDebug.length]=strLine; console.log(strLine); return;}

This will simply:

  • force the debug to be active (we don’t check blnDebug anymore, we assume it’s on!)
  • redirect the debug messages from this weird winDebug.document to the officially-supported-in-all-reasonnable-browsers “console.log”, which prints the log in the browser console, as illustrated above

Now, to get this to work, you need to clean the cache in your browser. My favorite way of doing this in Chamilo is to press CTRL+F5, then go *back* to the learning paths list, enter *another* learning path, then enter the hacked learning path again. Captivate debug information should start showing in your browser’s console:

Captivate logs in browser console

Captivate logs in browser console

Now you can analyze all the information flow.

That’s all, folks!

SCORM 1.2 and the interaction index in Dokeos

Extending a little bit on my latest post about howto test SCORM interactions in Dokeos, I’d like to add an important piece of information about our implementation of the SCORM 1.2 standard (and specifically the interactions).

Although the SCORM 1.2 Runtime Environment documentation is not very clear about this, there are two “hints” that interactions IDs must start at 0, and not at 1.

First, the description of the SetValue() method on says:

Definition: Unique identifier for an interaction.

Usage: Used to set a unique interactions id. SCO specific.

Format: Alpha-numeric string. No internal spaces.

LMS Behavior:
Initialization: Value is controlled by the SCO.
LMSGetValue(): LMS should set an error code according to the following and return an empty string (“”).
Error Code:
401 – Not implemented error. If this element is not supported an empty string is returned and an error code is set to indicate that the element is not supported.
404 – Element is write only. If a SCO tries to call LMSGetValue() on this element, the LMS should set the error code to 404 and return an empty string (“”).
LMSSetValue(): Sets the data model element to the supplied value. Value must match the data type for this element.
Example API call: LMSSetValue(“”,”I_001″)
Example Set Values:
Error Code:
205 – Incorrect Data Type: If an LMSSetValue() is invoked and the value to be used to set the element to is not of the correct Data Type.
401 – Not implemented error. If this element is not supported an error code is set to indicate that the element is not supported.

SCO Usage Example:
// Set the first interactions id

Although nothing is said in the description, the example given uses “0” as a first index.

The serious hint, though, comes from the _count property description:

Definition: The _count keyword is used to determine the current number of records in the cmi.interactions list. The total number of entries is returned. If the SCO does not know the count of the cmi.interactions records, it can begin the current student count with 0. This would overwrite any information about interactions currently stored in the first index position. Overwriting or appending is a decision that is made by the SCO author when he/she creates the SCO.

Usage: Used to determine the number of interactions stored by the LMS. SCOs could use this number to determine which interaction record to set. If “3′” is returned then the SCO knows that records 0-2 are occupied and the next available index is “3”.

Following these descriptions, we have decided in Dokeos to force the declaration of an interaction of index “0” before all possible other interaction declaration. Not doing so will return a SCORM API error, which will not be visible to the end user but will cause interactions *not to be* recorded.

Another way of doing it would have been to force the creation of all empty indexes between 0 and the one declared first, but I still feel this is wrong as it would introduce empty interactions, which could then be considered as accountable information by the SCO.

So if you have a problem with SCORM interactions in Dokeos, a good first step would be to check for this.

My contribution to SCORM 2.0 ideas

Following my article on SCORM 2.0 White Paper call, and the kind personal invitation to contribute from Mike Rustici, I decided to go ahead and submit my list of suggestions to the SCORM 2.0 thinking process team just before the deadline (I’ve been quite busy on other stuff, including urgent personal matters).

This is the first time ever that Dokeos contributes somehow (even though it’s a very little piece of the enormous puzzle) to the design of an e-learning standard. I am personally convinced that it shows an improvement in our team’s organisational level: we are now moving from following the standards to helping in their conception.

SCORM 2.0 wants to be more open (=follow more open standard to avoid restrictions on adoption), that’s officially what the goal of this new version is, so I can only hope that the work starting now will be taken seriously and lead to a much better standard.

About half of my suggestions are about documentation and removing the barriers to adoption, that were there in both 1.2 and 1.3.

You can find all the white papers submissions here, and comment freely:

Dokeos 1.8.5, SCORM and the annoying SCORM package name…

I just finished debugging one client’s portal. For some reason, he couldn’t see his SCORM content although he could see them in other LMS (Moodle, Claroline, …).

After spending 2 minutes checking the files and directories names, I realised he had stuff like this:


as root SCORM path. When I see something like that, my eyes get dragged upon “%20”, “[1]” and “/.”, so I tried updating the database path and the directory name to remove these elements (first all of them, then only one by one to check which was breaking it).

Well, the breaking one is “%20”, which surprised me at first but is only logical after a while… The idea is that the directory contains, on disk, a “%20”, but when loading the file through the web browser, “%20” is understood as the URL-escaping character for a white space. Thus, transforming the request into looking for a directory called “Act_Positive and negative[1]”.

Of course, as the operating system doesn’t translate %20 into spaces, there is no match between the HTTP request (with translated white spaces) and the filename, so a browser is not able to show the SCORM content page we are asking for.

What I did to quick-fix it is to pass the $src variable in both newscorm/lp_view.php and newscorm/lp_content.php through:

$src = str_replace(‘%20′,’%2520’,$src);

“%25” is actually the escape character for “%”, so the web server doesn’t alter the name of the directory. I have yet to determine if this is all a good idea, but so far and on this particular campus, it looks good… (I guess problems will come when we have a first file with spaces inside).

Categories: Dokkeos, English, Techie Tags: ,

End of July update on Dokeos development

July 29, 2008 1 comment

I thought I’ll write a short update on what we are doing at Dokeos at the moment, so you don’t think we’re just sleeping through the summer holidays…

Eric and Julian, of the French team, are currently working on a project for a specific hospital management school in France, and on a large and long-time review project before the migration of portals to version 1.8.5 for an important Belgian client. They have a few weeks of holiday here and there, so they’re pretty much busy full-time on these ones when they’re not gone.

The team of university developers (of whom Sven is half working for Dokeos now) is working on the development of Dokeos 2.0. They are expected to provide a first usable product for the Dokeos User’s Day in December, so I they seem to be putting a lot of efforts into this.

Thomas is busy providing course-building training to a few important medical and pharmaceutical clients.

Arnaud, our system administrator and occasionally developer of the videoconference tool, is pretty busy with new installations and the migration of portals from 1.8.4 to 1.8.5.

As for Daniel and Julio, they work under my supervision on several important projects, including a the development of a few new features for the quiz tool for a local (peruvian) client and the development of a new survey type for a belgian client.

I’ve been giving training for Dokeos administrators and teachers over the last three days of last week, and preparing a long development of new extensions to the quiz and learning path tools (with possible little steps towards SCORM 2004 implementation), and the review and finish of the new survey type development. I’ve also been studying web services quite deeply, and on my spare time I reviewed the possibilities of an integration with Drupal 5 or 6 as well as a few ideas for the SCORM 2.0 white papers call.

As you can see, we’re quite busy. We hope you enjoy your holidays though, if any!

Improved SCORM content migration from 1.6.5 to 1.8.6

I’ve had to review the SCORM content migration from 1.6 to 1.8 just today, and really, this is not something I’m enjoying. The complexity of migrating the old structure is enormous due to the lack of structure we had in 1.6, that lead many to launch a SCORM content through a simple link, rather than importing the SCORM content through the SCORM tool (yes, 1.6 allowed that and no, we are not going to allow this again because it makes a mess of the internal structure).

So basically, what have I done?

First, I made sure the links from the course introductions *and* the course links were both treated as possible sources of learning paths. There was something checking those links before, but they were only treated if there was a corresponding correctly-added learning path in the tool.

Second, I realised that, when checking if one of these links really pointed to a SCORM file, I didn’t actually take into account the fact that the old repository was placed, for the time of the migration, into another directory. So I was checking into the receiving courses directory (which at this point of the migration process is still empty) for a file that was in the old courses directory. This, of course, prevented the migration of such SCORM contents to be succesful. This has now been fixed.

These change comes a bit later than the official 1.8.5 stable release, so you won’t benefit from them if you download a stable version from the website now. However, you can still download the file and apply it on the main/install/ directory of the 1.8.5 package *before* you upgrade from 1.6.5 to 1.8.5.

Et voilà, I hope this helps the million of people out there still having held on before migrating from 1.6 to 1.8.

While doing all this, I also realised that some of the courses tools were not correctly moved from the Production section to the Interaction section, but I didn’t find how to fix it. The SQL query is there, it is apparently not working. This is just a matter of executing a little script afterwards though, or updating the database (I’ve seen the problem for the forum and the announcements tools).

You can fix it (in every course database) by issuing:

mysql> update tool set category=’interaction’ where name = ‘announcement’;

You can check out the script itself by clicking the “download” link in our subversion repository

Categories: Dokkeos, English, Techie Tags: ,

Call for White Papers for SCORM 2.0

LETSI, Learning Education Training Systems Interoperability, is entering a phase of study for the next version of SCORM, version 2.0.

Of course, given the little level of adoption of SCORM 2004 (or 1.3), this might seem a little premature for some, but the making of such a large norm takes time, so it’s probably better to get started early.

The 2.0 version is said (in the announcement of the Call for White Papers ) “to support the use of open software standards in learning technology”, which is a nice turn of event as, although SCORM 1.x was never against open standards, it never actually pretended to focus or support them. It just used “JavaScript” (which is not really standard in this appellation) and supposedly HTML or anything that would allow the use of JavaScript.

Dokeos hasn’t got any White Paper to submit though, mostly because we didn’t implement SCORM 2004 yet, so it’s pretty difficult to know what’s missing in the latest version… The White Papers submission deadline is August, 15 so we won’t be able to first support SCORM 2004 and then start thinking about things we would like to see there, but it would have been a pleasure for me to participate in the making of SCORM 2.0.

%d bloggers like this: