Category Archives: Run Time Environment

Step 61 – Error Checking in LMSSetValue and LMSGetValue

I want to carry a couple of basic tests within LMSSetValue and LMSGetValue to see: whether the specified data element is supported; and whether it has the necessary read or write privileges and then set the error code appropriately. This … Continue reading

Posted in Run Time Environment | 8 Comments

Step 60 – Supported Data Elements

One of the things that has caught me out in a couple of recent cases is that the SCORM standard makes SCO developers rely on error codes to determine whether or not certain elements are supported. I describe one specific … Continue reading

Posted in Run Time Environment | Leave a comment

Step 59 – LMSGetLastError, LMSGetErrorString and LMSGetDiagnostic

The three API functions that return information to the SCO can now be connected to the error code variable that I implemented in Step 58, and to the error messages that I set up in Step 57.

Posted in Run Time Environment | 1 Comment

Step 58 – Setting and Storing the Error Code

OK – an easy step here. I want a place to store the error code, so I introduce a new variable called ‘errorCode’ into api.php.

Posted in Run Time Environment | 1 Comment

Step 57 – Error Codes

The SCORM 1.2 Runtime Environment (RTE) uses a system of error codes that are set by the API, and which can be read by the SCO using three API functions: LMSGetLastError() LMSGetErrorString() LMSGetDiagnostic() I’ve already implemented “stubs” for these functions … Continue reading

Posted in Run Time Environment | Leave a comment

Step 56 – mysql_escape_string

I don’t refer to the PHP manual very much for commonly used functions, so I almost missed this one. The ‘mysql_escape_string’ function that’s used in subs.php to prepare data for insertion into the database is deprecated as of PHP 5.3 … Continue reading

Posted in Run Time Environment | 2 Comments

Step 55 – Delaying Loading of the SCO

In the past, I’ve had some intermittent problems with a SCO loading but showing a Javascript error. Although I couldn’t pin it down conclusively, it seemed to result from an incomplete download of some kind. Since forcing a reload with … Continue reading

Posted in Run Time Environment | 4 Comments

Step 54 – Error Handling?

The problem SCO described in Step 52 is now working correctly, so why do I need to look any further? There’s a more subtle problem. The ‘datamodel.element._children’ mechanism described in the SCORM RTE specification seems to have been developed so … Continue reading

Posted in Run Time Environment | 1 Comment

Step 53 – Delaying the Closing Sequence

I’m still trying to fix the problem that my reader’s SCO highlighted (described in this post). I’ve implemented the optional data element that it’s trying to use – cmi.comments – but that hasn’t fixed the problem. So I need to … Continue reading

Posted in Run Time Environment | 4 Comments

Step 52 – cmi.comments and cmi.comments_from_lms

A reader recently contacted me with a problem that raised some interesting issues. Hopefully, we’ve now resolved the problem but, since the issues might well occur with other SCOs, what I’d like to do is to walk through the process … Continue reading

Posted in Run Time Environment | 2 Comments