cbt.module developer manual

A blank
cbt.module
Developer Manual
by Peter Hill
Modulus Pty. Ltd.
Original 2/1//2006
Revision A 7/1//2006
Revision B (HTML Version) 22/10/2006
Revision C (V 1.21) 6/12/2006
Revision D (V 1.22) 31/8/2007
A cluster of hexes
A blank

Introduction

This document is a reference to using cbt.module to develop Computer-Based Training materials. CBT refers to Computer-Based Training, i.e. training which is performed on and/or evaluated on a computer. This incorporates Web-based training.

Intended Audience

This document is intended primarily to serve as a reference for CBT developers using the cbt.module toolkit. The document may also be useful to those seeking an overview of the cbt.module implementation.

Table of Contents

Authoring Computer-Based Training
Overview
What Is Needed
Using Javascript
   The Library
   Additional Functions
Delivery Methods & Media
Authoring Specifics
   The Form
The Author File
   General Information
   Options Information
   Evaluation Information
   Upload & Activate the Author File
   File Naming
Review Results
Appendix A: Browser Compatibility
Appendix B: Sample Author File
Appendix C: Comma Separated Values
End Notes

Authoring Computer-Based Training

cbt.module has the following design goals:

In order to meet these design goals, the central thrust of cbt.module content development is standard HTML authoring, taking into account the end-user's Web Browser capabilities. Consequently, some approaches and techniques to development are highly reliable ("What Works") whilst other techniques imply unwarranted and unnecessary assumptions about the end clients' environment and thus should be avoided ("What Doesn't Work").

Overview

To meet the cbt.module design goals, the authoring of cbt.module content is performed using HTML and some supporting, browser-supported technologies. This allows for rich, interactive content to be authored, with the quality of the content only limited by the author's competence with standardised HTML, CSS and dynamic HTML. Skills that are acquired in HTML, CSS and dynamic HTML in the process of authoring cbt.module content are core skills which can be reused in many internet-related areas and which may open up other potential business opportunities, in contrast with conventional CBT development, which is traditionally proprietary and close-ended. In order to meet the design goals, some restrictions on the range of technologies used in authoring are self-imposed; these are discussed in the subsequent sections "What Works" and "What Doesn't Work".

The HTML authoring environment used by the cbt.module developer is highly flexible; it can be whatever standard HTML authoring environment is familiar to the author, covering the full spectrum from Windows Notepad to Microsoft FrontPage.

In order to allow tests to be set with a random selection of questions from a larger database and to score the results of a test without exposing the answers to even the most exploratory student, cbt.module requires that the student has an active internet connection at the time of testing.

What Is Needed

Any HTML authoring techniques and capabilities which can reasonably be expected to be available from the end-user's Web Browser can be utilised. Thus, for example, an HTML document which makes use of the JavaScript scripting language can be utilised, since all modern Web Browsers incorporate support for JavaScript. Equally, Cascading Style Sheets can be used under the same logic. Consequently, very dynamic pages can be rendered by combining CSS capabilities with JavaScript conditional processing.

It is reasonable in a corporate environment, to expect reasonably modern web browsers to be the norm; what we define as "reasonably modern" is clarified in Appendix B: Browser Compatibility. The intention in limiting the range of supported browsers is not to artificially limit the supported environment, but rather to be able to create the most dynamic content possible for the real-world corporate environment.

Using Javascript

The Library

cbt.module comes packaged with a library of JavaScript functions, documented in "JavaScript Functional Reference for cbt.module". This library provides functions that are generically useful for CBT authoring; usually, you will include this library on each authored page for convenience and standardisation, especially since the functions are lightweight and carefully designed to be portable across browsers.

To include this library of functions, the script should be required in the header of the HTML document; in normal circumstances, you will be cloning a supplied header block so this inclusion will be already made.

The library will be updated regularly as part of the overall cbt.module product and tested against browsers in the target market.

Additional Functions

You may require additional functions to those present in the library. These can be readily added by creating a JavaScript program block, usually in the HEAD section of the document, as per the following example:
<SCRIPT language="JavaScript" type="text/javascript">
<!-- start hiding
function myFunc(myParam)
{
//do something
}
// end hiding -->
</SCRIPT>

Once a function has been declared in this manner, it can be subsequently invoked in the same manner as the library functions.

Obviously questions of programming methods, style, documentation, portability and testing of JavaScript are beyond the scope of this document, but two points are worthy of note:

  1. sufficient testing should be carried out to ensure that the new functions are portable and reliable across all browsers in the target market and
  2. if the new functions are to be used frequently and repeatedly, it may be better to request their addition to the standard library to ensure ongoing testing, updating and documentation.

Delivery Methods & Media

The CBT which you develop can be delivered in a number of ways and on a variety of media.

Options for delivery include the following:

Authoring Specifics

Note that, for clarity of explanation, some formatting mark-up is omitted from the following examples. It is expected that an cbt.module Developer will have, or will acquire, a solid grasp of fundamental HTML mark-up.

The Form

The evaluation section of an cbt.module content comprises an HTML "Form", which is a call to the Perl script which actually generates the HTML from the database.
<FORM name="generate" id="generate" action="http://www.module.com.au/cgi-bin/cbt/cbt_generate_html.pl" method="POST">
   <INPUT TYPE="HIDDEN" NAME="action" VALUE="generateHTML">
   <INPUT TYPE="HIDDEN" NAME="module_name" VALUE="RR-001">
</FORM>

Note that there is no "Submit" button for the form, as the form submission is performed by Javascript when the document's "onLoad()" event is triggered. This raises the question of how to deal with the situation where Javascript is disabled; an appropriate approach is to make use of the HTML <NOSCRIPT> tag to provide a suitable message when Javascript (or scripting in general) is disabled, e.g.
<NOSCRIPT>
   Message requesting user to enable Javascript
</NOSCRIPT>

The actual HTML is slightly more complex, but the elements shown above are the key elements; in practice the HTML is copied and extended from a template.

The generation of the HTML (performed by the Perl program cbt_generate_html.pl) makes use of HTML fragments "header.inc" and "footer.inc", but once again, these are cloned from templates - neither of these HTML fragments is complex.

The Author File

For each CBT module which is prepared, a corresponding author file is created. The author file is the key to evaluating the module and contains two types of information, general and evaluation information. The author file is authored to complement the CBT itself, and then posted to the evaluation website. The author file is separated from the CBT itself so that the "answers" are not able to be revealed even by advanced users perusing the source of the CBT.

The author file is structured as a Windows "INI" file, that is it is a text file, containing a number of sections denoted by square brackets and, in each section, variables and there values, coupled by equal signs. The author file can be authored using any convenient ASCII editor, such as e.g. Windows Notepad. Care must be taken, when using e.g. Microsoft Word or text cut-and-pasted from e.g. Microsoft Word, not to introduce non-ASCII characters: examples of non-ASCII characters introduced by e.g. Microsoft Word include "smart" quotes, em-dashes etc.. A sample author file can be seen in Appendix B: "Sample Author File".

General Information

The section labelled [general] contains the following variables:

Options Information

The options section, labelled [options], contains a sequence of flags which can be set to control the behaviour of the cbt.module system. These are:

Evaluation Information

For each question included in the list of questions (see general section) a section exists with the following information

Taking the examples presented together, the meaning for evaluation is effectively: For the multi choice question "How many limestone structures comprise the 12 Apostles?", the offered answers are 6, 9, and 12 and scores of 1, 3 and 0 should be awarded respectively depending on the student's choice from these options. The question will be grouped together with other quaestions belonging to group 0.

Upload & Validate the Author File

The author file must be uploaded to the evaluation site prior to any evaluation taking place. To upload the author file, enter:
http://cbt.module.com.au/cbt_upload.html
in your browser's address line. After providing a User ID and Password, you will then be prompted to upload the author file. Rules that apply to uploading author files include:

Once the author file is uploaded, it can then be validated and activated.

The validation step checks that the file is readable, required fields are present and the values are "sensible" and also raises warnings if certain (non-fatal) conditions are noted. If there are errors noted in the validation of the author file, it cannot be activated. The errors must be corrected and the file uploaded again, so that validation can be once more performed.

Once the author file passes validation, it is ready for use. The author file cannot be used until it has been uploaded and validated.

File Naming

As the author files are hosted on a Unix system, files should use lower case letters only and may not include spaces.

Review Results

The results of module evaluation can be reviewed at any time. In your browser window, type the address:
http://cbt.module.com.au/cbt_utilities.html
You will be prompted to provide a developer ID and [optionally] a start and end date for the review.

Appendix A: Browser Compatibility

There are many Web Browsers available for many platforms and their capabilities are highly varied. However, in the normal corporate environment, a smaller subset is in common use and can be reasonably assumed as being available. This appendix enumerates the subset of browsers which is considered for cbt.module as reasonable to assume and therefore is also the subset of browsers for which compatibility testing of e.g. the JavaScript library is performed.

Platform Browser Version Notes
PC      
  MS IE Explorer 6.x  
  Netscape Navigator 6.x Tested with 6.2.2
    7.x Tested with 7.02
    8.x Tested with 8.0.4
  Opera 7.x Tested with 7.03
    8.x Tested with 8.5
    9.x Tested with 9.10
  Mozilla 1.3 Tested with 1.3
  Firefox 1.5 Tested with 1.5
Apple Macintosh      
  T.B.A.    

Appendix B: Sample Author File

		[general]
		title=Driver Safety
		developer_name=Change Factory
		module_name=DS-001
		client_name=Evaluate
		questions=Q1,Q2,Q3,Q4,Q5,Q6,Q7,Q8,Q9,Q10,Q11,Q12,Q13,Q14,Q15,Q16,Q17,Q18,Q19,Q20,Q21,Q22,Q23,Q24,Q25,Q26,Q27,Q28,Q29,Q30,Q31
		administrator_email=kevin.dwyer@changefactory.com.au
		developer_email=peter.hill@modulus.com.au
		total=150
		pass=75
		feedback_template=evaluate_feedback_template.html
		certificate_template=evaluate_certificate_template.html
		table_name=driver_safety
		resume_location=http://www.changefactory.com.au
		group_numbers=5,5,5
		group_texts=5-point questions,10-point questions,15-point questions
		image_url=http://www.module.com.au/evaluate/images
		[options]
		debug=false
		disabled=false
		show_answers=true
		email_on_evaluate=false
		email_on_pass=true
		email_on_fail=true
		record_results=true
		random_selection=true
		show_pass_fail=true
		[Q1]
		prompt=Identify the situation(s) which have a potential static electricity spark gap.
		type=multi
		answers=An electrical thunderstorm,Draining fuel into a stainless steel bucket with a static wire attached from the bucket to the outlet,Attaching a static wire from an outlet to an underground fill tube after transfer has commenced,Attaching a static wire from an outlet to an underground fill tube after unloading has commenced has been stopped and five minutes allowed to pass before filling has recommenced
		values=5,0,5,0
		group=1
		[Q2]
		prompt=Which of the following products has a risk of creating a static charge which needs to be dissipated?
		type=multi
		answers=Kerosene with a conductivity reading of 20 conductivity units,Jet A1 with conductivity reading of 60 conductivity units,Petrol with a conductivity reading of 5 conductivity units,Mineral turpentine with a conductivity reading of 400 conductivity units
		values=5,0,5,0
		group=1
		[Q3]
		prompt=Which of the following situations the highest probability fire risk?
		type=single
		answers=Diesel in an open drum with a match thrown into it,Petrol accumulating in a drain with a measured vapour content of 40% two meters from a non-flameproof switchboard,Kerosene spraying from a hole in a tank two meters from an idling petrol engine car,Petrol accumulating fifty meters down a hill from an open fire
		values=0,0,5,0
		group=0
		[Q4]
		prompt=Which of the following situations is most likely to form a situation where an explosion will occur?
		type=single
		answers=Bottom loading petrol into a compartment which previously contained petrol,Top loading petrol into a compartment which had previously contained petrol,Bottom loading kerosene into a compartment which had previously contained petrol,Splash loading diesel into a compartment which had previously contained petrol
		values=0,0,0,5
		group=0
		[Q5]
		prompt=Pick the inappropriate extinguisher to use on a petroleum fire.
		type=single
		answers=1,2,3,4
		values=0,0,5,0
		group=0
		image=extinguishers.gif
		alt=extinguishers
		[Q6]
		prompt=Which of the following switch loads has the potential for creating and unsafe condition?
		type=single
		answers=Home kerosene after heating oil,Petrol after low aromatic white spirit (LAWS),Diesel after ULP,Petrol after Toluol
		values=0,0,5,0
		group=0
		[Q7]
		prompt=Put the following scrambled bottom loading procedure into the correct order.
		type=sort
		answers=Check loading instructions,Raise locking bar,Remove dust caps,Open internal valves,Connect scully,Connect vapour recovery hose,Check switch loading requirements,Change product tags/tumblers,Connect loading arms,Select arms/compartments fill compartments
		values=10
		group=1
		[Q8]
		prompt=Put the following scrambled bottom loading procedure after the compartments have been filled into the correct order.
		type=sort
		answers=Uncouple and replace loading arms,Disconnect vapour recovery hose,Disconnect scully,Lower locking bar,Check caps hatches valves closed,Check placarding is correct,Finalise proceedings at bay controller,Walk around check of area,Proceed to gatehouse for documentation
		values=10
		group=1
		[Q9]
		prompt=Put the following scrambled top loading procedure into the correct order.
		type=sort
		answers=Check loading instructions,Check lines empty same product,Change product tags/tumblers,Ensure bottom outlets closed,Attach bonding strap,Open internal valve,Open main hatch dip hatch check dip,Connect loading hose to fill tube
		values=10
		group=1
		[Q10]
		prompt=Put the following scrambled top loading procedure into the correct order.
		type=sort
		answers=Start pump open supply valve fill compartment,Close valves cap & secure loading arm check dip,Close internal valve hatch & cap,Repeat steps for each compartment,Switch off pump disconnect bonding strap,Walk around check of area,Move vehicle clear of loading bay,Proceed to gatehouse
		values=10
		group=1
		[Q11]
		prompt=Put the following scrambled unloading procedure into the correct order.
		type=sort
		answers=Park truck apply park brake,Switch off electrics & engine,Check all clear around vehicle,Check storage tank ullage & product,Bring all to same potential,Connect vapour return if required,Connect delivery hoses securely,Stand by until drained,Drain hose
		values=10
		group=1
		[Q12]
		prompt=Identify the inappropriate behaviour at an accident scene?
		type=single
		answers=Giving police and other authorities the facts as you understand them,Keeping bystanders clear by 400 meters if there is a fire or you suspect there may be a fire,Creating dam walls using soil clothes or bricks to prevent fuel from entering drains,Giving an interview to the media
		values=0,0,0,5
		group=0
		[Q13]
		prompt=Who can ride in the cabin of a delivery truck carrying a placard load of dangerous goods?
		type=multi
		answers=Police officer,Employee of the owner,Unauthorised passengers,Fireman
		values=4,3,0,3
		group=1
		[Q14]
		prompt=When is it OK to unload dangerous goods in an unattended place?
		type=single
		answers=When the driver knows the place very well,When the driver prime contractor or consignor has agreed with the customer for the goods to be unloaded in a secure place,When safety equipment is present,When the customer representative is not available but has had a faultless approach to safety in all other deliveries
		values=0,5,0,0
		group=0
		[Q15]
		prompt=What fire fighting medium should be used to contain a fire with the following HAZCHEM code labelled product?
		type=single
		answers=Foam,Water jet,Water fog (spray),Dry agent (CO2 BCF Dry Chemical Dry Sand)
		values=5,0,0,0
		group=0
		image=1270.gif 
		alt=1270 Hazchem
		[Q16]
		prompt=Which of the following is an appropriate treatment for a burn?
		type=single
		answers=Hold the burnt area under cold gently running water until the area has returned to normal body temperature (up to 10 minutes),Apply a lotion or ointment,Cover the burnt area with cotton wool or a woollen blanket,Remove jewellery and clothing that is not stuck from around the burnt area
		values=5,0,0,0
		group=0
		[Q17]
		prompt=Which of the following will not result in reduced fatigue?
		type=multi
		answers=Regular exercise during your daily routine,Coffee,Alcohol,Regular sleep patterns
		values=5,0,0,5
		group=1
		[Q18]
		prompt=How many hours deprived of sleep has the same impact as a blood alcohol concentration of 0.05? 
		type=single
		answers=10 hours,30 hours,24 hours,17 hours
		values=0,0,0,5
		group=0
		[Q19]
		prompt=Only vapour burns, not liquid, true or false?
		type=single
		answers=True,False
		values=5,0
		group=0
		[Q20]
		prompt=Which of the following is not potential source of oxygen in a fire?
		type=single
		answers=Air,Pool chemicals,Fertilisers,Foam
		values=0,0,0,5
		group=0
		[Q21]
		prompt=What would you do with a gas fire escaping from a small tank when you cannot switch off the source of the gas?
		type=multi
		answers=Allow the gas to burn out whilst keeping the tank as cool as possible,Use foam,Attempt to close off the outlet through which the gas is escaping,Evacuate the surrounding area
		values=3,0,3,4
		group=1
		[Q22]
		prompt=What would you do next in relation to the following statement - "If filling a container without the use of a bonding wire, you should:"
		type=single
		answers=Connect the wire immediately,Carry on filling,Stop filling and connect the wire immediately,Stop filling wait for a while and then connect the wire
		values=0,0,0,5
		group=0
		[Q23]
		prompt=Pick the inappropriate extinguisher(s) to use on an electrical fire.
		type=multi
		answers=1,2,3,4
		values=3,3,4,0
		group=1
		image=extinguishers_2.gif
		alt=fire extiguishers
		[Q24]
		prompt=What could result from not declaring a small return of petrol (20 litres) when bottom loading diesel next?
		type=single
		answers=Contaminate the diesel making it unfit for use,Lowering of the diesel flashpoint creating a flammable/explosive vapour which may ignite if a source of ignition is nearby,Overfilling the compartment,Increase the conductivity of the diesel
		values=0,5,0,0
		group=0
		[Q25]
		prompt=What personal protection should be worn when dealing with the following HAZCHEM coded product?
		type=single
		answers=Boots gloves and breathing apparatus,Full chemical suit and breathing apparatus,Full chemical suit and breathing apparatus only in the case of fire,Boots gloves and breathing apparatus only in the case of fire
		values=0,0,0,5
		group=0
		image=1270.gif 
		alt=1270 Hazchem
		[Q26]
		prompt=In the case of a fire or spill of product with the following HAZCHEM code, should evacuation be considered?
		type=single
		answers=Yes,No
		values=5,0
		group=0
		image=1270.gif 
		alt=1270 Hazchem
		[Q27]
		prompt=Traffic is flowing along a freeway at the posted speed of 100 kph in the outside (far right) lane of the freeway with the inner two lanes travelling at 95 - 98 kph.  What is the preferred lane for delivery tankers to be travelling in?
		type=single
		answers=Any lane because it's within the speed limit,Either of the inside two lanes,Outside lane to pass the slow traffic and meet the required trip times,The left lane only
		values=0,15,0,0
		group=2
		[Q28]
		prompt=You are travelling on a freeway in heavy traffic at 50 kph.  What is the minimum distance you travel behind the vehicle in front? 
		type=single
		answers=4 seconds,6 seconds,10 seconds,30 metres
		values=15,0,0,0
		group=2
		[Q29]
		prompt=You are travelling on a dual highway at 95 kph.  What is the minimum distance you travel behind the vehicle in front?
		type=single
		answers=12 seconds,8 seconds,4 seconds,60 metres
		values=0,0,15,0
		group=2
		[Q30]
		prompt=You arrive at work to start a 12 hour shift after being kept awake at home throughout the night caring for a sick child. Do you:
		type=single
		answers=Complete your scheduled work as quickly so you can to finish earlier,Drink several cups of coffee to get you going,Inform your supervisor of the lack of sleep you have had,Complete your shift as normal because you feel OK
		values=0,0,15,0
		group=2
		[Q31]
		prompt=You are entering a service station to make a delivery and a customer's vehicle is making access to the delivery point difficult by parking to close but not completely restricting your access. Do you:
		type=single
		answers=Continue on taking extra care to avoid making contact with the vehicle,Ask another motorist to help guide you through,Wait for the vehicle to be moved to allow clear access,Tell the customer to move their vehicle
		values=0,0,15,0
		group=2
		

Appendix C: Comma Separated Values

Comma-separated-values lists are easy to understand, but some care needs to be taken in specific situations. A comman-separated-values list can be as simple as:
3,4,5
Equally, a CSV list can comprise text items, e.g.
One thing,Another thing,Some third thing

When one or more of the items itself contains a comma, that element of the list must be enclosed in quotations; assuming our list comprises these elements:
One thing
Another thing
Some third, unrelated, thing
then our list is rendered as:
One thing,Another thing,"Some third, unrelated, thing"

When one or more of the items itself contains quotations, each quotation mark has to be doubled and the whole element is enclosed in quotations; assuming our list comprises:
One thing
Another thing
Some third, "quoted", thing
then our list is rendered as:
One thing,Another thing,"Some third, ""quoted"", thing"

It should be noted that, where an element contains a quote at the start or end of the string, this will result in triple quotes; assuming our list comprises:
One thing
Another thing
"Golly", he cried
then our list is rendered as:
One thing,Another thing,"""Golly"", he cried"

End Notes

1) Use the shift key on PCs, the cmd key on MacIntosh
2) The width rendered on screen varies significantly from browser to browser.
3) The width and height rendered on screen varies significantly from browser to browser.


Copyright © 2007 Modulus Pty. Ltd.