The WebCT Quiz Tool

WebCT 4.x

You can try out the following examples by clicking on WebCT Demo

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). Fig 1The question database contains the questions used in a quiz, the quiz editor organizes the questions from the database into a WebCT quiz, and the quiz index (technically referred to as the Quizzes/Surveys page) provides a quick index/link to all the quizzes and their results/statistics contained in the course module. This logical structuring allows the same question database to be used in a variety of different quizzes.  You can even export questions from the question database to self-tests.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.

  The Question Database

There are 5 different types of WebCT questions:

  • Multiple Choice: MC questions are of two types, students are allowed to select either one or multiple answers to a question. The following example only demonstrates the one answer type.

  • Short Answer: Students enter a word, phrase or short sentence, which is then matched against possible answers. Short answer type of questions can use the RegularExpression feature for evaluating answers (more on this feature later).

  • Matching: Students match items in relation to two columns.  This type of question uses a pull-down menu.

  • Paragraph: Students answer the question using a longer essay-type format. The instructor or the teaching assistant must grade this type of question manually.

  • Calculated: Students answer a mathematical question, which requires the use of a formula. In creating the question, the designer specifies the mathematical formula and the set of variables it uses, along with a range of values for each variable. Up to 100 different sets of answers are generated from the set of variables specified (each value in the table below is a variable, which in principle varies from one student to the next).

In each type of question shown above, one can link either to content contained within a WebCT directory or to content external to the WebCT course module.

  Linking to Images from a Quiz Question

Though it does vary slightly from question type to question type, the entry screen to create or edit a quiz question usually has seven sections: category, title, question, settings, answers, and general feedback.

As well, you can also add other sections, for example, I always add a section for the level of difficulty of a question:

However, these additional sections are only visible to the designer; the student does not view their contents in any way. Consequently, they cannot be used to deliver any type of quiz information to the student.

  Two Easy Methods of Linking to Images

  1. IMAGE FIELD: In the question database section accessed with the question editor, WebCT provides a field to link to images.

    This field is primarily useful when one common image is used to provide information for each possible answer in the question, for example:

    It is a simple matter to create the link to the image, click on the browse button to search the directory structure of WebCT for your graphic; one simply needs to know where the image is located in one's WebCT file structure.

  2. <IMG SRC=" ">: If you want to be a little more creative in the use of images in your questions, each of the question field, the answer # field, the feedback # field, and the general feedback field can contain code to images:

    such as the HTML image tag, <IMG SRC=" ">, which is used to automatically display graphics in a HTML page. (These fields can also contain anchor links <A HREF=" "> to other HTML pages or external web pages. More on this later.)

    For example, suppose you wanted a graphic associated with each answer in a question. Simply enter the appropriate <IMG SRC=" "> tag in the answer field for each possible answer in your question:

    I have created quizzes with up to 7 possible answers (I do not know the limit).

    An undocumented (though not undiscussed on the WebCT listserv) variable in WebCT is the variable.  This variable takes on the value of the course root name; you can use it to locate the path to the image:

    The value of using this variable is that it enables one to easily transfer a database of questions from one WebCT module to another, as long as the directory structure is logically the same. It also allows one to zip ones course into a different WebCT root name.

Even though I am using the multiple choice question as example, these methods of linking to files to provide content for a quiz apply to all the question types. The WebCT quiz environment is quite versatile and rich. Beyond the scope of this article, there are many other options that can be set at the individual question level, such as randomization of the index, multiple choice questions can be configured to accept only one answer or a number of possible answers each with a different value, etc. In addition, the quiz module itself, as distinct from the questions in the quiz, has a variety of different settings, which allow the quiz to be managed in a variety of different ways. In the section on supervising quizzes, I will discuss in some detail the quiz module settings.

In summary then, from within WebCT questions, there are two easy ways to link to images for display during a quiz, one is using the IMAGE FIELD in the question section and another is using the <IMG SRC=" "> tag within the question field, the answer # field, the feedback # field, and the general feedback field.

 Using JavaScript to Link to Files

Besides using HTML tags in the fields of a question, you can also use JavaScript to link to images, and this gives you the ability to create pop-up windows in your quizzes:

Besides linking to images, you can also link to other types of web documents, everything from standard HTML pages, to audio files, video files, PowerPoint files, etc. These links can be to files within your course or to files external to your course. For example, I frequently provide a link to the Merriam-Webster Online Dictionary for many of my quizzes.

A simple JavaScript to generate a pop-up window 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>
< 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),

and when the question is activated in a browser, it results in a link which creates a pop-up windows:

 Links From The Quiz Module

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('//root/calculated_question/probability_rules.htm')">Probability Rules</A>
< P><HR>

 Advanced Features with HTML and JavaScript

In two of the quizzes created for this module, I used some relatively advanced coding features of HTML and JavaScript.

  USE OF HTML IN QUESTION FIELD

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>&nbsp;
<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)

The population under study is a jar of marbles with the following composition:
COLOUR LARGE SMALL
RED {r2} {r3}
GREEN {g2} {g3}
BLUE {b2} {b3}
ORANGE {o2} {o3}

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).

  USE OF JavaScript MEMORY VARIABLES

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">
<!-- hide from old browsers

var main_term = "Not all income is taxable. (I, T)"
var p_term = "I"
var q_term = "T"
var all_p_are_q ="All "+ p_term +" are "+ q_term
var no_p_are_q = "No "+ p_term +" are "+ q_term
var some_p_are_q = "Some "+ p_term +" are "+ q_term
var some_p_are_not_q = "Some "+ p_term +" are not "+ q_term
var all_q_are_p = "All "+ q_term +" are "+ p_term
var some_q_are_p = "Some "+ q_term +" are "+ p_term
var some_q_are_not_p = "Some "+ q_term +" are not "+ p_term

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");
link.focus()
}

// end script hiding -->
</SCRIPT>
<P ALIGN=justify>Express the sentence as a <a href="javascript:new_window('/_COURSEID_/root/stndard_cat_claims/help_stnd_claims.htm')"><I><B>standard form categorical proposition</B></I></A> by selecting the correct Venn representation of the claim.
<P ALIGN=center><B>
<SCRIPT LANGUAGE="JavaScript">
<!-- hide from old browsers
document.write(main_term)
// end script hiding -->
</SCRIPT>
</B></P>

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>
<TD><B>
<SCRIPT LANGUAGE="JavaScript1.2">
<!-- hide from old browsers
document.write(p_term)
// end script hiding -->
</SCRIPT>
</B></TD><TD ALIGN=center>
<IMG SRC="/_COURSEID_/root/stndard_cat_claims/all_p_are_q.gif">
</TD><TD><B>
<SCRIPT LANGUAGE="JavaScript">
<!-- hide from old browsers
document.write(q_term)
// end script hiding -->
</SCRIPT>
</B></TD></TR></TABLE>
<P ALIGN=CENTER><B>
<SCRIPT LANGUAGE="JavaScript">
<!-- hide from old browsers
document.write(all_p_are_q)
// end script hiding -->
</SCRIPT>
</B><P><HR>

 Short Answer with RegularExpression

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