Overview of writing Mallard material
This document in intended to provide an introduction to and reference for writing Mallard questions. It provides the basic information necessary for you to start writing your own material.
Mallard gives question authors great power and flexibility, while maintaining an easy-to-use format. Mallard accomplishes this by using a simple question format that allows authors to use externally defined "modules" (called input types) to generate and correct questions. Question authors do not need to design these input types, but if they desire it, the flexibility is there.
In order to write Mallard questions and develop quizzes, you must have a Mallard account with developer or course director access.
The first thing to clarify is the term question. In Mallard, a question is not necessarily a single queston, but can be a collection of multiple versions. This is particularly useful if you want to provide variety in student quizzes. When you create a quiz, you can tell Mallard to choose one version (or a number of versions) of a given question. You may wish to consider grouping different questions together as multiple versions of a single question if any of the following is true:
It is advisable to avoid using a naming scheme that reflects your course
structure. For example HW23_P1 is a bad question ID, because it
contains information about the current placement of the question in
ithe course structure, instead of useful information about the question
content. If you later decide to change the homework organization or use
the question in another course, your question ID might need to be changed.
You may provide a title for your hint window by using a title
field. You may provide a link to your hint from either text or an
image, by using a link_text or link_image field:
A carnivore has a diet based mostly on what?
When writing questions with the Arith type, which use numeric
values, it is possible to have the question generate random values for the
problem within a certain author-specified range, and then create answers to
match these. To do so you will need to use the following tags:
The above tag will generate a variable named "var1", with a integer value
between -100 and 100 inclusive, aside from 0.
Conditional feedback is content (which may include HTML text,
links to other pages or pop-up windows, and even material containing
further questions!) which appears on the graded question page
only when the student's answer fulfills certain conditions.
Conditional feedback is commonly used to provide a hint tailored to the
student's particular wrong answer only when that answer is supplied.
The conditions under which to display the optional content are given inside
<if>, <elseif> and <else> tags.
The content is given following the tag specifying this condition, and the
entire section of conditional feedback is ended with the </if>
tag. All of these tags should be located inside the
<answer> </answer> block.
The <if>, <elseif> and <else> clauses
work just as they do in a high level programming language. If
the condition in the
<if> tag is satisfied, the content following it (until the
next <elseif>, <else> or </if> tag)
is printed to
the screen. If it is not, any number of <elseif> conditions
are examined, one at a time, in an exclusive manner. If one of these is
satisfied, the content following it is printed to the screen. Finally, if
none of the above are satisfied, the content following a final
<else> tag (and before the ending </if> tag)
will be printed to the screen.
Prototypes of the tags are given below:
Allowable relational operators are the same for all variables and
comparison values:
To print followup text only when the student
gets the problem wrong, use the following:
Similarly, to print some content only when the student gets
the answer correct, use
To print some content only on the graded answer page (i.e. not
when the question is in asking mode), but independent of the
student's answer, you may use
What are the basic components of a question file?
<param sign_error_penalty=50
feedback=medium>
<hint title="Informative Table" link_text="helpful hint">
If you do not provide text or an image, the link will default to the
simple text HINT.
If you do not provide a title, the title of the pop-up hint window will
default to the simple title Hint.
<hint title="Informative Table" link_image="table.gif">
The file begins with some question text in html. Actually, you may embed the
question's input and answer portions inside any type of html structure you
wish, including tables. I've provided a
<hint link_text="cute little suggestion" title="a suggestion">
You might want to use tables, images, and other nifty html tricks to
liven up your quiz text. You might like to provide reference tables and
such inside hints like this one.
</hint>
on how to do this here.
<input type=blank>
<param size=5 feedback=medium>
</input>
<answer>
meat
</answer>
What are the basic question types?
The basic, most widely used question types are the following:
You may also make use of the <random>,
<eval> and <var> tags with Arith
to use randomly generated numbers in your quiz problems.
How can I get random values to appear in my questions?
<random name=var1 range=-100-100 nonzero type=int>
What is
<random name=num1 range=1-100 type=int> +
<random name=num2 range=1-100 type=int>?
<input type=arith>
<param name=strict value=yes>
</input>
<answer>
<var name=num1> + <var name=num2>
</answer>
var1 is: <random name=var1 range=1-10 type=int>
<eval name=var2 noshow>
2 * <var name=var1>
</eval>
var2 is: <var name=var2>
How can I provide conditional feedback in my questions?
Note that it is allowed to have only an
<if> tag, or an <if> tag followed by one or
more <elseif> tags with no <else> tag. The
conditional feedback area is always terminated with a final
</if>
tag.
The allowable variables vary by question type:
<if score LT 100>
... followup text ...
</if>
<if score = 100>
... followup text ...
</if>
<if score LTE 100>
... followup text ...
</if>
What is the largest city in Illinois?
<input type=Blank case=yes feedback=high>
</input>
<answer>
Chicago
<if answer = Chicago>
You got it!
<if answer = Springfield>
No, Springfield is the CAPITAL of Illinois, but not the largest city.
<elseif answer = Urbana>
No, Urbana is home to the University of Illinois, but not very large.
<else>
Nope! Try again.
</if>
</answer>
What is 4 + 5?
<input type=Arith strict=yes feedback=high>
</input>
<answer>
9
<if answer LT 5>
Silly, you cannot ADD two positive numbers and get an answer smaller
than one of the numbers!
</if>
<if score LT 100>
Time to review your first grade math book!
</if>
</answer>
What is the largest city in Illinois?
<input type=Multiple_choice feedback=high>
Chicago
Springfield
Urbana
Rockford
</input>
<answer>
1
<if answer = 1>
You got it!
<if answer = 2>
No, Springfield is the CAPITAL of Illinois, but not the largest city.
<elseif answer = 3>
No, Urbana is home to the University of Illinois, but not very large.
<else>
Nope! Try again.
</if>
</answer>
Comments? Questions? General harassment? Mail it to
maiko@wocket.csl.uiuc.edu