The WebCT Quiz ToolWebCT 4.x In contrast to some of the other WebCT tools, such as the
calendar or e-mail, the WebCT Quiz Tool is more an environment than
a single application. The WebCT Quiz Tool environment has four important
parts, one is the question database, another is the quiz index,
a third is the quiz editor and the fourth is the actual
WebCT quiz (see Figure 1). One accesses the Quiz Tool through the Control Panel. From the Control Panel one clicks on Quizzes/Surveys and that takes one to the Quizzes/Surveys page. Here one can create a new quiz or survey, edit an old quiz or survey, and modify the look of the Quizzes/Surveys homepage. From the Quizzes/Surveys page one can link to the question database. The Quizzes/Surveys page is the central hub of the Quiz Tool. As part of the content of a quiz, you can link to external sources, such as images or other file types (HTML, audio, video, PowerPoint, XLS, etc.). Though the student would not be aware, the code causing this linking can be contained either in the individual questions (in the question database) or in the quiz module (entered through quiz editor). I will discuss linking from individual questions to other files first, and then I will discuss linking from the quiz module to other files. JavaScript can be used in this linking process to significantly enhance quiz presentation. There are five different types of quizzes in WebCT, and one type, the short answer quiz, allows the student to enter either a single word or a more complex longer phrase as answer. The answers for these quizzes can be parsed using RegularExpression coding. This means that immaterial or trivial typing mistakes on the part of a student, such as an extra space between words, can be identified and will not be penalized. This reduces some of the anxiety often experienced with online testing. After discussing linking to files, I examine RegularExpression coding in some detail.
| ||||||||||||||||||||||||||||||||||||||||
| <SCRIPT LANGUAGE="JavaScript"> < !-- hide from old browsers function new_window(url) { link = window.open(url,"Link","toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=yes,resizable=yes,width=550,height=300,left=60,top=100"); link.focus() } // end script hiding --> < /SCRIPT> < HR WIDTH=50% ALIGN=center SIZE=5 NOSHADE> < H3 ALIGN=center>Reference Links</H3> < P ALIGN=center> < a href="javascript:new_window('http://www.m-w.com/home.htm')">Merriam-Webster Online Dictionary</A> < P><HR WIDTH=50% ALIGN=center SIZE=5 NOSHADE> < P ALIGN=justify>Say whether the item on the left is SUFFICIENT, or NECESSARY, or BOTH (necessary and sufficient), or NEITHER (necessary nor sufficient) for the item on the right. |
[The code in red is not part of the JavaScript required to create the pop-up window link.]
This script can be placed in the question field of a question template (only a portion of the JavaScript is shown in the following field),

The quiz module is created/edited through the Quizzes/Surveys link. Go to the Quizzes/Surveys page and select the quiz. When one clicks on the quiz name one is automatically put into the quiz editor. The quiz editor assembles and connects the various parts of a quiz (which I am referring to as the quiz module). Most importantly, through the quiz editor one links the questions from the question database to a quiz. Here one can add questions, delete questions, modify the settings for a quiz, and preview the quiz, to name but a few of its functions. This is where one can program WebCT to randomly generate a set of questions from a database of questions.
The quiz editor allows one to modify the page style of the quiz. One of the modifiable style features is the upper textblock.

In the textblock you can place a variety of JavaScripts. (Just a note of caution at this juncture: You should always do a backup of your course before you try any JavaScript in textblocks. Some JavaScript can completely disable a page. So, it is handy to have a backup of your course in case your JavaScript crashes your system.) When I want a link to the same information for every question in a quiz, I place the JavaScript code that creates the pop-up window/link in the upper textblock of the quiz module.

When the JavaScript is placed in the textblock, it operates on every page of the quiz.

The JavaScript code used to generate the pop-up window for the quiz linked to this page is:
| <SCRIPT LANGUAGE="JavaScript"> < !-- hide from old browsers function new_window(url) { link = window.open(url,"Link","toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=yes,resizable=yes,width=550,height=300,left=60,top=100"); link.focus() } // end script hiding --> < /SCRIPT> < P ALIGN=center>Reference: <a href="javascript:new_window('/ < P><HR> |
In two of the quizzes created for this module, I used some relatively advanced coding features of HTML and JavaScript.
For example, in the calculated question example

I create the table for the quiz using the following HTML code
| <P> Given the following population distribution, what is the probability calculation of <FONT SIZE=-1><B>(to 3 decimal places)</B></FONT>: <P ALIGN=center><B> P (<font color="#0000FF">B</font> and <B>S</B>) </B> <P ALIGN=center> <table width="75%" border="1" cellspacing="1" cellpadding="1" align=center> <tr> <td COLSPAN=3 align="center" height="50" ><b>The population under study is a jar of marbles with the following composition:</b></td> </tr> <tr align="center" bgcolor="#CCFFFF"> <td height="50"><b>COLOUR</b></td> <td height="50"><b>LARGE</b></td> <td height="50"><b>SMALL</b></td> </tr> <tr align="center" bgcolor="#CCCCCC"> <td height="50"><b><font color="#FF0000">RED</font></b></td> <td height="50"><b><font color="#FF0000">{r2}</font></b></td> <td height="50"><b><font color="#FF0000">{r3}</font></b></td> </tr> <tr align="center" bgcolor="#CCCCCC"> <td height="50"><b><font color="#339900">GREEN</font></b></td> <td height="50"><b><font color="#339900">{g2}</font></b></td> <td height="50"><b><font color="#339900">{g3}</font></b></td> </tr> <tr align="center" bgcolor="#CCCCCC"> <td height="50"><b><font color="#0000FF">BLUE</font></b></td> <td height="50"><b><font color="#0000FF">{b2}</font></b></td> <td height="50"><b><font color="#0000FF">{b3}</font></b></td> </tr> <tr align="center" bgcolor="#CCCCCC"> <td height="50"><b><FONT color="#FF8000">ORANGE</FONT></b></td> <td height="50"><b><FONT color="#FF8000">{o2}</FONT></b></td> <td height="50"><b><FONT color="#FF8000">{o3}</FONT></b></td> </tr> </table></P> |
Calculated questions allow the use of variables, and if you scan the above code you will notice the variables by looking for braces, e.g., { }. Using the variable feature of calculated questions, enables you to generate hundreds of examples from one question.
I created this code in the HTML editor Dreamweaver, which gives a WYSIWYG view of the variables:
|
Given the following population distribution, what is the probability calculation of (to 3 decimal places): P (B or O)
| ||||||||||||||||||
and then placed the code in the question field of the calculated question template (only the top part of the code is shown in the figure below).
In the multiple choice question displaying a graphic for each possible answer:

I use JavaScript memory variables to supply the category reference labels, as well as the standard form formulas. This enabled me to create one template to generate over 100 exercises; I only had to change the memory variable entry in one location rather than 8 locations for each question ( which is what I would have to do if I had entered the values as constants). The JavaScript code used to create the memory variables looks like:
|
<SCRIPT LANGUAGE="JavaScript"> var main_term = "Not all income is taxable. (I, T)" function new_window(url) { link =
window.open(url,"Link","toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=yes,resizable=yes,width=450,height=300,left=120,top=180"); // end script hiding --> |
Similar to the first example, the code is placed in the question field of the multiple choice question (again only the top part of the code displays in the example below):

Subsequently, each answer field has code similar to the following which makes use of the variables defined by the JavaScript in the question field::
|
<P><TABLE ALIGN=center BORDER=0
WIDTH=100%><TR> |
As is the case for the other quiz types, the entry screen for a short answer quiz generally has six sections: category, title, question, answers, and general feedback:

The answer section, however, is a little more complex than on the multiple choice question. In this question type, there is a pull down menu to select the grading option:

and one grading option is Regular Expression. The regular expression option enables one to parse the input. This assists in reducing the number of simple data entry errors, such as the student entering an extra space between words, in a multiple word answer.
In the example shown above, the ^ tells the parser that the entry has to begin at the beginning of the line; the + tells the parser that it can match one or more occurrences of the character immediately to the left (in this case a space); the \ tells the parser that the character following is a period (not a meta character); the ? tells the parser that the character to the left (the period) may or may not be there, but if it is there it should only occur once; and the $ tells the parser this should be the end of the entry. As I do not want my quizzes to be a course about typing, regular expressions can reduce significantly the number of answers marked incorrect due to trivial typing errors. This mean all the following would be treated as correct by the regular expression parser:
| Some O are F. |
| some o are f. |
| some o ARE F |
| SOME O ARE F |
| ............. |
The following are Links to pages about RegularExpression:
| Henk's Test a RegExp | |
| Henk's Quia Page | |
| The Regex Coach | |
| Regular Expression HOWTO | |
| Regular-Expressions.info |
One of the links is to an Applet, which tests your RegularExpression, another is to the Regex Coach, a program which can be downloaded. I have found both these tools invaluable when creating regular expressions. The other links are to online reference material about RegularExpression. Some of these links were created and are maintained by Henk Schotel. For those who have visited the WebCT Home Page and specifically the Dr. C support facility, you will recognize Henk as one of the experts who contributes to Dr. C.
1. Technically WebCT self-tests are separate and distinct from WebCT quizzes. In this presentation I discuss the WebCT Quiz Tool in contrast to the WebCT Self-test Tool. Self-tests are created in and associated with Content Modules, though questions for self-tests can be imported from the question database of the Quiz Tool.
This page, and all contents, are Copyright © 2006
Created by Dan O'Reilly
Personal Web Page