Minor upgrades and bug fixes for WBT Manager 1.70.

Date: July 25, 2003

Version affected: v1.70.

Note: This document contains configuration instructions which are not present in the standard WBT Manager 1.70 documentation. Keep a copy of this document with your other WBT Manager documentation.

Contents:

This upgrade patch includes several minor upgrades and bug fixes to the WBT Manager Web Module.

See the individual feature instructions below for any additional configuration requirements.

Feature Usage:

Edit Certificate Program Status

As mentioned above, there is no function in the current version of WBT Manager to manually edit Certificate Program results. As a work-around until such functions become available we have created some utility script that can be called by a system-level administrator. The scripts are:

fixcert.asp Allows a student to be selected by entering their login id.
fixcert2.asp Lists the students certificate program assignments and allows user to select one for edit.
fixcert3.asp Allows user to edit assignment date, status, and completion date for certificate program assignment.


Usage:

  • Log onto WBT Manager as a system administrator
  • Jump directly to fixcert.asp by entering
    http://<yoursite>/<yourwbtmanagerdirectory>/asp/fixcert.asp
  • Enter a student's login id.
  • Select a certificate program.
  • Edit the the certificate properties as desired.

Notes:

  1. This utility is currently available in English only (text is hard-coded in the scripts).
  2. The utility directly edits the certificate program tables. It does not verify the data entered by the user against the status of the courses in the program (course statuses are displayed on the edit form). It is possible to set a program status to "complete" and create a certificate for the program even if the courses within the program are not all completed by the student.


Scripting Interface to enroll students in Certificate Programs

As mentioned above there is no mechanism to allow students to self-enroll in a certificate program in the current version of WBT Manager. We have added a script to the External Scripting Interface Kit to support enrollment in Certificate Programs. This script could be used to create a self-enrollment mechanism for Certificate Programs.

Script name: asp/enrollcertstud.asp
Include file: asp/enrollcertstud1.inc
Sample form: html/enrollcertstud.html

Purpose:

This script is used to enable storefront and other e-commerce applications to enroll students in certificate programs within WBT Manager. It may also be used to create custom self-enrollment mechanisms.

Parameters (must be POST parameters):

loginid

The student’s WBT Manager login ID.

programid

The program's WBT Manager internal ID number (class_id column from classes table).

silent

If set to "1" then the script will not redirect to one of the URLs listed below but instead will return a "text/plain" string containing a status code, followed on the next line by a status message. The status code/message combinations are:

0 "Successful"
1 "Student not found"
2 "The specified program is not valid."
3 "Student already enrolled"
4 "one or more course enrollments failed"
99 "Unexpected error" (may be replaced by a more specific message).

Note: If 99 is returned for the error code then the student may be partially enrolled in the program. The student's record should be examined to determine what corrective measures need to be taken.

Starting on the third line of the response will be a list of the courses contained in the program and the returned status from the attempt to enroll the student in each one. The format of each line is:

<status code>:<course name>

<status code> will contain the same numeric status as would be returned by the enrollstud.asp script for the same course and student. See the WBT Manager Installation and Customization manual for specific values.

The remaining parameters are Result Message Script URLs to which the script will redirect the user depending on the circumstance.

In each case the script will perform the re-direction by creating a page with a form which will automatically submit itself to the specified Result Message Script . A submit button will be included in case the form does not submit itself automatically.

The form will contain hidden fields duplicating the data originally submitted (excluding any fields named "submit"). Error fields errorcode and errortext will also be added containing the status information listed above.

successurl

The Result Message Script to redirect to if the student was enrolled in the certificate program successfully. Defaults to ../msgtemplates/enrollcertstudsuccess.asp.

successurlp

The Result Message Script to redirect to if the student was enrolled in the certificate program but one or more of the associated course enrollments failed. Defaults to ../msgtemplates/enrollcertstudsuccessp.asp.

nostudurl

The Result Message Script to redirect to if the student was not found in the WBT Manager database. Defaults to ../msgtemplates/enrollcdrtstudnostud.asp.

noprogurl

The URL to redirect to if the certificate program  was not found in the WBT Manager database. Defaults to customizable file ../msgtemplates/enrollcertstudnoprog.asp.

enrolledurl

The Result Message Script to redirect to if the student was already enrolled in the certificate program. Defaults to ../msgtemplates/enrollcertstudenrolled.asp.

failedurl

The Result Message Script to redirect to if the student could not be enrolled in the certificate program due to an unexpected error. Defaults to ../msgtemplates/enrollcertstudfailed.asp.

An additional user customizable include file called enrollcertstud1.inc is included at the beginning of enrollcertstud.asp. This file can be used to perform additional validation of the request before the student is enrolled in the course. The supplied version of the file contains sample code that restricts the domains from which the script can be called.

By default, all access to the enrollcertstud.asp script is blocked. To enable it you must edit enrollcertstud1.inc and comment out the following code found near the top of the file.

'Response.Write "Function not enabled!"
'Response.End

Script operation:

The WBT Manager database is searched for a student with the specified logonid. If the student is not found the following error is returned:

1 "Student not found"

The database is searched for a certificate program with an internal id number which matches the specified  programid . If the certificate program is not found then the following error is returned:

2 "The specified program is not valid"

The script will return the following error code if the student is already enrolled in the certificate program :

3 "Student already enrolled"

4 "one or more course enrollments failed"

Redirection mechanism:

In order allow the most flexibility in use the script does not perform an HTTP "redirect". Instead, the script produces an intermediate form that automatically submits itself to the desired Result Message Script. This form will contain hidden input fields holding all of the data that was originally submitted to the interface script (with the exception of any field named "submit"). In addition, hidden input fields called errorcode and errortext will be added to communicate the status of the request.

Using this mechanism allows the initiating form to pass any custom data fields through the interface script to the Result Message Script.


Disable specific navigation buttons

As mentioned above a number of WBT Manager Clients have requested that various buttons be removed from the navigation bar in the web module. This can be done by modifying nav1.asp and nav1_old.asp directly (these files are designated as user customizable files). We have added some control flags to the appsettings.ini file to allow the most common changes to be made without programming experience.

The following text should appear in the "[flags]" group in appsettings.ini (if it does not exist then add it):

;navbuttonmask removes specific buttons from the navigation bar.
; buttons are specified by adding
; the following codes together
;1 - Help Button (student)
;2 - Help Button (administrator)
;128 - Reports Button (student)
;256 - Reports Button (administrator)
;512 - Change PW Button (student)
;1024 - Change PW Button (administrator)
;8192 - Catalog Button (student)
navbuttonmask=0

Set navbuttonmask to the desired value (add the values for the buttons to be disabled) and run the reload.asp script.

Note: This feature requires that the new versions of nav1.asp and nav1_old.asp be loaded from the patch. If you have made customizations to those files you will need to re-do the customizations.


Cross-Domain SCORM API work-around

Under modern browsers (IE5+, NS6+), lessons which use the AICC/SCORM API cannot access the API functions when the lesson content is served from a different host than that on which the LMS resides. For example:

The reason this happens is that browsers protect the HTML and JavaScript components of an HTML page from access by a page from another host to prevent hacking. A discussion of this in regard to IE can be found at http://msdn.microsoft.com/library/default.asp?url=/workshop/author/om/xframe_scripting_security.asp.

The following work-around will allow you to put API content on a host different than the LMS site by telling the browser to the domain name when checking for cross-domain scripting instead of the full host name.

The work-around

The work-around is based on the document.domain property of the HTML DOM (Document Object Model). Both IE and NS allow client-side script code to modify this value from the full host name to the domain name (ie. from lms.yoursite.com to yoursite.com). By setting the domain property this way content on content.yoursite.com will be able to communicate with the API on lms.yoursite.com.

If your content is actually on a host in another domain (as in content.partnersite.com) then this work-around will not work unless you have the capability of mapping the content site to a host name within yourdomain.com by setting up the appropriate DNS mappings.

This work-around has been tested with NS4.5 and IE6 and works correctly. It does not work with NS6+ because of additional applet-level security in that browser. When running under NS6+ the selected lesson will fail to launch. The JavaScript and Java consoles will show an "OriginNotAllowedException". If we are able to identify a work-around for NS6+ we will post it on our "patches" site.

Setup

Because the cross-domain work-around has to be included in content files as well as the lms files (content that does not include the work-around will not operate with the LMS if the work-around is in place on the LMS) the code is controlled by a special menu style.

Cross-Domain API Menu Style settings

crsmenu.asp parameters:

api=1 enables the SCORM API for the menu style.
apidebug=1 sets the API to "debug" mode (remove for production)
xdomainapi=1 sets the menu style to use the cross-domain api work-around.

Set course to new menu style

The menu style settings above will cause the course menu for the affected courses to execute the following code (or its equivalent) on each menu page that must reference the API. 

//use crossdomain API work-around?
var sURL = new String(document.location);
sURL.toLowerCase();
if( sURL.indexOf("xdomainapi=1") > 0 )
{
  //set to 2nd-level domain
  if( document.domain != "undefined")
    if( document.domain.indexOf('.') > 0 ) //must have a subdomain
      document.domain = document.domain.substring(document.domain.indexOf('.')+1);
}

All content pages that reference the API, and any content pages that reference those pages, must contain the following script or its equivalent.

//use crossdomain API work-around? 
//set to 2nd-level domain 
if( document.domain != "undefined") 
  if( document.domain.indexOf('.') > 0 ) //must have a subdomain 
    document.domain = document.domain.substring(document.domain.indexOf('.')+1);

NOTES:

Once the above code has been added to the content then that content will no longer work with menu styles that do not set the xdomainapi flag. You also cannot mix cross-domain lessons with unmodified lessons in the same course even if the unmodified lessons reside on the same host as WBT Manager.

If the above constraints or the lack of support for NS6+ are an issue then your only standards based option is to use the AICC HACP communication protocol. In order to do this effectively from an HTML page you will need a signed Java Applet or ActiveX component (must be signed to communicate with a host other than the one containing the Applet or component itself). There is some discussion of this approach on the AICC forums at www.aicc.org/cgi-bin/yabb/YaBB.pl.


Automatically create objective definitions for SCORM lessons

As mentioned above the SCORM course structure interchange files do not include objectives definition or assignment information. Objectives can be manually created and associated with lessons in WBT Manager or a new setting can be used to create an objective the first time the interface receives data from the SCORM API for that objective. To enable this "autocreate objectives" feature add the following to the "[flags]" group in appsettings.ini if it does not already exist:

;autoaddscormobjectives controls whether objective records
;are created automatically and assigned
;to lessons when an unrecognized objective id is sent by a lesson.
; NOTE: auto add of objectives is currently supported only for
; lessons using the API in SCORM mode.
; setting this value to anything other than "Y" will
; disable auto add of objectives. Defaults to "N" if missing.
autoaddscormobjectives = N

Set autoaddscormobjectives to "Y" and run reload.asp to enable this feature.


Support SkillSoft Business Skills courseware

As mentioned above, SkillSoft Business Skills courseware requires a special interface to operate properly. Specifically, the [objectives_status] group in the AICC specification must be returned to each lesson exactly as it was sent the previous time the student was in that lesson. (The AICC specification allows for data to be resequenced. The SkillSoft courseware cannot deal with this).

We have added a special mode to our AICC interface to support this non-standard requirement. We call the mode "Echo Objectives" mode. "Echo Objectives" mode is enabled by the lesson calling aicc_int_c1.asp instead of aicc_int.asp to communicate with WBT Manager.

In the current version of WBT Manager (1.70) there is no way to specify a special AICC interface script for a specific lesson. This leaves 2 methods causing the special interface mode to be used.

Modify global.asa so that all lessons use the special interface mode

The major drawback to this method is that it may cause courseware other than SkillSoft's that uses objectives to fail.

Create an HTML launch page for each SkillSoft lesson

<html>
 <head>
  <title>WBT Manager - SkillSoft redirector</title>

  <script language="javascript">

    //cause SkillSoft content to use custom WBT Manager interface
    //by modifying the AICC_URL parameter and then launching SkillSoft's start
    //page for the lesson.
    var strLessonPage = "comm0606b.htm";  //change this to match the SkillSoft launch page
    var strLoc = document.location + "";
    var i = strLoc.indexOf("?");
    var strParams="";

    //extract the launch parameters
    if( i > 0 )
    {
      strParams = strLoc.substring( i, strLoc.length );
    }

    //alert( strParams );

    //change the interface script from "aicc_int.asp" to "aicc_int_c1.asp"
    strParams = strParams.toLowerCase();
    strParams = strParams.replace( "aicc%5fint%2easp", "aicc%5fint%5fc1%2easp" );

    //alert( strParams );

    //jump to Skillsoft startup page
    //alert( strLessonPage + strParams );
    document.location = strLessonPage + strParams;
  </script>

</head><body></body></html>


 

 

Version 1.7 Patches