Category: Javascript

Javascript’s parseInt

Javascript is a loosely typed language, which means it is possible to define a variable without specifying what type of data it holds (string, integer, floating point, etc.). This can cause problems if you think a particular value is a number when in fact it is a string. A string must be converted to a number to use it in calculations.

For example, when working with SCORM elearning software, scoring and performance data is stored in a Learning Management System as strings. If you need to do calculations with the data after retrieving it, the string data must be converted to integers or floating point type.

The parseInt() function can be used for this purpose. It parses a string and returns an integer. However use of the function without understanding the details can lead to unexpected results. If your string begins with a zero, the number will be evaluated in octal instead of decimal system. In Octal, 08, 09 are not valid numbers, and 010, 011, etc. will not represent the same values as they would in decimal system.

Continue reading

A SCORM-ready template: Part 1F. Modifying the CSS styles


Modifying the CSS styles

The css styles are defined in several sheets. Any of the styles can be overridden by adding a new definition for the selector to /css-local/userStyles.js or to individual pages or even individual elements on a page. YOU WILL NOT BE ABLE TO change any of the files inside the css/ folder but you can add your own overrides to userStyles.css.

Continue reading

Create Inter-sco navigation for SumTotal 6.5

SCORM courses in the SumTotal 6.5 Learning Management System are launched from a page that lists each SCO (lesson) in a list of links representing the course structure.

On clicking the “Enter the Lesson” button next to any SCO, a new frameset window opens. The screenshot below shows the “Enter the Lesson” page, with the course window open in front of it.


(Click to enlarge)

Continue reading

Randomizing Captivate Quizzes

Captivate quizzes are easy to create, but they lack some often-requested features. Even using version 2, it is difficult, if not impossible, to randomize questions within Captivate. The following method will alter the html wrapper generated when you publish a Captivate project so that it chooses from a bank of alternate Captivate SWF files when the page opens.

Download example HTML wrapper file

When you publish to Flash (SWF) in Captivate, Captivate creates an HTML wrapper which contains the SWF file in an object tag. (Usually titled “ProjectTitle.htm”) There is a variable, “strURLFile ,” which determines which Captivate file is launched. In the unaltered file, this variable is set to the project title you set when you published.

Continue reading