AICC/SCORM JavaScript API
for WBT Manager
December 1,
2000
Overview
In conjunction with the ADL/SCORM initiative, the AICC added a new interface mechanism in revision 3 of the AICC CMI specification. This new interface consists of a set of standard function calls that encapsulate LMS communications functions so that the content developer no longer needs to deal with lower-level protocols such as HACP. Instead, the LMS vendor provides an "API adapter" object available to the lesson content as a JavaScript object.
For a complete description of the functions and their behavior see the AICC CMI specification CMI001 available from www.aicc.org.
Integrity eLearning has developed an API Adapter for WBT Manager 1.5 that supports the AICC/SCORM standard. This adapter consists of a Java Applet that is embedded in the course menu. On lesson launch the applet's functions are made available to the lesson as a JavaScript object residing in the "opener" window of the lesson. This upgrade also includes an upgrade of the HACP interface to support CMI001 version 3.02.
Standards support
The current version of the adapter supports all 8 LMS functions and has passed a self-test under the ADL SCORM test suite (test log).
The following data elements are supported:
LMS to Lesson
cmi.core.student_id
cmi.core.student_name
cmi.core.lesson_location
cmi.core.credit
cmi.core.lesson_status
cmi.core.entry
cmi.core.score.raw
cmi.core.score.min
cmi.core.score.max
cmi.core.lesson_mode
cmi.core.total_time
cmi.suspend_data
cmi.launch_data
cmi.student_data.attempt_number
cmi.student_data.mastery_scoreLesson to LMS
cmi.core.lesson_location
cmi.core.lesson_status
cmi.core.exit
cmi.core.score.raw
cmi.core.score.min
cmi.core.score.max
cmi.core.session_time
cmi.suspend_data
Restrictions
The WBT Manager API Adapter has been tested with MSIE 4+, and Netscape 4.5+ and is not supported with older browser versions.
Netscape 6 is not currently supported. A Netscape 6 compatible version
will be posted to our support site as soon as it is available.
Under MSIE the lesson content must reside in the same domain as the WBT Manager web-server application or a security error will occur. This is intentional behavior on the part of the browser to prevent pages on one web site from affecting the contents of pages from another web site. We are investigating mechanisms to get around this difficulty.
Installation
In order to install the LMS API upgrade you must first have installed the WBT Manager 1.5 web-server application and verified that it is working correctly. What follows assumes that you have already downloaded and unzipped the upgrade files to a temporary directory.
Installing the upgrade files
Install the file wbtman2g.dll by copying it from the dll subdirectory into the Windows System directory on the web server. This will typically be c:\winnt\system32. You will find wbtman2*.dll in this directory already.
Register the DLL by opening a Command Prompt (MS-DOS prompt) on the web server, changing directory to the system directory, and running the regsvr32 program like this:
regsvr32.exe wbtman2g.dll
You should be rewarded with a message box like this:
Now copy the contents of the jar subdirectory into the WBT Manager jar subdirectory.
Finally, copy the contents of the asp subdirectory into the WBT Manager asp subdirectory.
Adding the new menu styles
Using the copy of runsql.exe that came with your copy of WBT Manager (in the utilities/database directory), connect to the WBT Manager database and run the script apimenu.sql. This will add 4 new menu styles:
Std Menu (API support)
Tree Menu (API support)
Tabbed Menu (API support)
Std Menu (API debug)The first 3 new menu styles are identical in appearance to the original WBT Manager menu styles. The difference is that they embed the WBT Manager LMSAPI adapter applet in a hidden frame. Std Menu (API debug) is different in that the frame containing the API applet is not hidden and you can see the LMS function call activity on the applet's surface. The API menu styles use the same menu generation scripts as the standard menus but parameters are added to turn API support and debugging support on.
Using the API
To allow your lessons to have access to the LMS API merely set the menu style for the course that contains them to one of the styles with API support. Then include the code to locate the API object (as described in the AICC specification) in each lesson. HACP is still supported in the new menu styles so you can mix the two interface mechanisms in the same course.
When you wish to call an API function you first find the API using the code mentioned above. Then call the function as a member function of that object.
Usage Hints
You must call LMSInitialize once and only once per lesson.
You must call LMSFinish once before exiting.
You can call LMSGetLastError after a function call to see if it completed successfully.
If you set any values to be sent back to WBT Manager you should always set cmi.core.lesson_status and cmi.core.score.raw. If you do not then WBT Manager will assume that you intended them to be empty and update the student's record accordingly. The prior value will not be used (the assumption is that status and score belong to the current session). There is enough vagueness in the specification that other LMSs may use the previous value for the new session and record unexpected results. In order to have consistent results you should always set data elements to the values you want and not depend on default behavior of the LMS.
Sample code
A simple HTML sample lesson has been provided. This sample consists of 2 lessons.
Lesson 1 has a single page with a set of links that allow you to send a specific status along with a random time to WBT Manager.
Lesson 2 is an HTML form with links to call various API functions and receive results.
To install the sample course:
Copy the lmsapisamp directory to the courses directory in the WBT Manager installation.
Use the course import utility to import lmsapisamp.crs into WBT Manager. Set the menu style for the course to one of the API support styles.
Now you can assign a student to the course and try out the lessons.
Copyright (C) 2000, Integrity
eLearning
All rights reserved.