Help:Quiz/How to create a quiz using the quiz tool
The WikiEducator quiz feature offers functionality to create multiple-choice (single response and multiple response), true-false, short answer (typed response), cloze (providing missing word(s) in a phrase), numerical response, and tabular response questions using wikitext. In addition, the quiz feature includes a feedback option (e.g., for each option in a multiple-choice question), as well as the ability to include images, animations, audio, and hyperlinks.
Contents
- 1 How to insert a quiz into your page
- 2 Basic question types
- 2.1 Multiple choice / single response
- 2.2 Multiple choice / single response
- 2.3 True/false questions
- 2.4 Multiple choice / multiple response
- 2.5 Typed response (short answer)
- 2.6 Gapfill / cloze
- 2.7 Numerical response
- 2.8 Tabular response type with radio buttons
- 2.9 Tabular response type with checkboxes
- 3 Advanced stuff
- 4 Troubleshooting
- 5 About the WikiEducator quiz feature
- 6 Acknowledgements
How to insert a quiz into your page
The quiz feature has two components: 1) the quiz tag with optional attributes and 2) the question text and wikitext to specify the question type.
The quiz tag
The <quiz> </quiz> wikitext tags implement the basic quiz functioning (see first row in the table below.) The second row in the table displays the code to suppress the display of the scoring table; the quiz score is then displayed as #right/total following the quiz. The third row displays the code to suppress the question shuffle feature.
| wikitext (what you write) |
rendering (what you see) |
comments | |
|---|---|---|---|
| <quiz> insert questions here </quiz> |
|
The quiz feature parses the text between the quiz tags, to the extent possible, to create quiz questions. The quiz tags create the following quiz elements:
Note that at this time, it is not possible to score, separately, questions occurring on the same page, even if placed in separate quiz tags. | |
| <quiz display=simple> insert questions here </quiz> |
|
Use "display=simple" as an attribute in the quiz tag to remove the "scoring points" table at the top. Consider using this option when:
| |
| <quiz shuffle=none> insert questions here </quiz> |
|
Use "shuffle=none" as an attribute in the quiz tag to remove the Shuffle questions button. |
Inserting questions
The basic structure of the question component includes
- The question text (or the characters "
", called the non-breaking space code, because some text is required at this point). - The type of question, which indicates the type of response area:
- type="()" displays a radio button next to each option (only one choice allowed)
- type="[]" displays a check box next to each item(two or more choices allowed)
- type="{}" displays a textbox (the size of the text box can be adjusted larger or smaller)
- The answer choices, if displayed, as in multiple-choice and true/false questions
- An indication or listing of the right answer(s)
- Feedback text for a text box or each answer choice (optional)
How you arrange these few features creates the various question types which may be included in a quiz.
The next section includes instructions for how to code for each of the basic question types.
Basic question types
The basic question types are described below by example. Both wikitext and rendering are provided. The wikitext shows you the code, which you may copy and paste into your pages, or just read and understand. The rendering shows you what the result will look like.
The wikitext has been slightly simplified in order to help understanding. If you copy and paste, you must insert the quiz tags, <quiz> and </quiz>, before and after the markup. You may wish to use the quiz tags with the "display=simple" option as described above.
For clarity, the examples provided below are displayed in a table. However, when a quiz is inserted into a table, the appearance of a quiz is modified, for example, boxes appear around some elements in the quiz. When a page includes a quiz not in a table, the boxes are not displayed and the format of the quiz appears simpler.
All the examples below are functioning quizzes. Don't be afraid to try them out. Hitting the Submit button is OK - it won't change or damage this page.
Multiple choice / single response
| wikitext | rendering | comments | |
|---|---|---|---|
{Question
|type="()"}
+ The correct answer.
- Distractor.
- Distractor.
- Distractor.
|
|
|
Multiple choice / single response
| wikitext | rendering | comments | |
|---|---|---|---|
{Question
|type="()"}
+ The correct answer.
- Distractor.
- Distractor.
- Distractor.
|
|
True/false questions
| wikitext | rendering | comments | |
|---|---|---|---|
{Bulgaria and Rumania joined the
European Union in 2007.
|type="()"}
+ TRUE.
- FALSE.
{Switzerland is a member of the
European Union.
|type="()"}
- TRUE.
+ FALSE.
{Anyone can be a Citizen Journalist.
|type="()"}
+ TRUE.
- FALSE.
|
|
|
Multiple choice / multiple response
| wikitext | rendering | comments | |
|---|---|---|---|
{Question
|type="[]"}
+ Correct answer.
- Incorrect answer.
+ Correct answer.
- Incorrect answer.
|
|
|
Typed response (short answer)
| wikitext | rendering | comments | |
|---|---|---|---|
{
|type="{}"}
Where was Aristotle born?
{ Stageira }
{
|type="{}"}
Name Aristotle's famous mentor.
{ Plato }
{
|type="{}"}
{ Alexander } was Aristotle's most
famous pupil.
|
|
| |
{
|type="{}"}
Name a famous Greek philosopher.
{ Aristotle|Plato }
|
|
| |
{
|type="{}"}
Name Aristotle's famous mentor.
{ Plato _6 }
|
|
| |
{ Complete each box with a synonym
of the following words
|type="{}"}
<ol>
<li>free: { gratis _6 }</li>
<li>well: { good _4 }</li>
</ol>
|
|
| |
{
|type="{}"}
Where did Aristotle die?
{ Chalcis (i) }
|
|
|
Gapfill / cloze
| wikitext |
{Complete the text from the Wikipedia article on [[w:Aristotle|Aristotle]].
|type="{}"}
Aristotle was born in { Stageira _8 } in Chalcidice. His parents were { Phaestis _8 }
and { Nicomachus _10 }, who became physician to King Amyntas of Macedon. Aristotle
was educated as a member of the aristocracy. At about the age of { eighteen|18 _8},
he went to { Athens _6 } to continue his education at { Plato _5 }'s Academy.
Aristotle remained at the Academy for nearly twenty years, not leaving until after
Plato's death in { 347 _3 } BC.
| |
| rendering |
| |
| comments |
|
Numerical response
| wikitext | rendering | comments | |
|---|---|---|---|
{In which year was Plato born?
|type="{}"}
He was born in { 427-428 _5 } BC.
|
|
| |
{How far is the earth from the sun?
|type="{}"}
{ 91-95 _3 } million miles.
|
|
| |
{What is 10 times 10?
|type="{}"}
{ 100 5% _3 }
|
|
| |
|
| ||
Tabular response type with radio buttons
| wikitext | rendering | comments | |
|---|---|---|---|
{Question
|type="()"}
| A | B | C
+-- A is correct.
-+- B is correct.
--+ C is correct.
|
|
|
Tabular response type with checkboxes
| wikitext | rendering | comments | |
|---|---|---|---|
{Question
|type="[]"}
| Option A | Option B | Option C
++- Question 1
(Clue: A and B are correct).
-++ Question 2 (
Clue: B and C are correct).
--+ Question 3
(Clue: C is correct).
|
|
|
Advanced stuff
Inserting feedback
| wikitext | rendering | comments | |
|---|---|---|---|
{Question
|type="()"}
+ The correct answer.
|| Feedback for correct answer.
- Distractor.
|| Feedback for distractor.
- Distractor.
|| Feedback for distractor.
- Distractor.
|| Feedback for distractor.
|
|
|
Inserting blocks of text between questions
| wikitext | rendering | comments | |
|---|---|---|---|
{This is the first question.
|type="()"}
+ The correct answer.
- Distractor.
- Distractor.
{This is a block of text.}
{This is the second question.
|type="()"}
+ The correct answer.
- Distractor.
- Distractor.
|
|
|
Using images as answers
| wikitext | rendered | comments | |
|---|---|---|---|
<quiz display=simple>
{ Which of these are not nuts? }
- [[Image:Walnut03.jpg|100px]]
+ [[Image:Peanuts.jpg|100px]]
+ [[Image:Malus-Idared on tree.jpg|100px]]
- [[Image:Pistachios in a bag.jpg|100px]]
- [[Image:Chestnut.jpg|100px]]
+ [[Image:P10802511.JPG|100px]]
</quiz>
|
|
|
Using images in the question
| wikitext | rendered | comments | |
|---|---|---|---|
<quiz display=simple>
{ What is this? [[Image:Butterfly tongue.jpg|100px| ]]
| type="()" }
- Tiger
+ Butterfly
- Bee
- Fly
</quiz>
|
|
In this example, the image is part of the question. You just use normal wiki-markup to insert the image(s). |
Using animations
The section adds no new technical tricks, but it looks pretty.
|
|
|
Hyperlinks and other markup
Markup that works inside quizzes
- Hyperlinks: [[....]].
- Images: [[Image:....]].
- Other media: [[....]].
- Bold and italic.
- <big> and <br />
Markup that partly works inside quizzes
- Templates: {{....}}.
- subst doesn't work.
- Tables: {|....|}.
- Headings: e.g. ===....===.
- Warning: At the moment there is a problem with the toc.
- Lists and indents: using #, * and :
Adding music and sound effects
This is similar to insertion of images. Standard wiki markup is used.
Configuring points
| wikitext (what you write) |
rendering (what you see) |
comments | |
|---|---|---|---|
<quiz points="3/1!">
{Try this question now.}
+ Plus 3 points for this one.
- Minus 1 point for this one.
</quiz>
|
|
| |
<quiz display=simple>
{Try this question now.
|type="()" }
+ 1 points for this one.
- 0 points for this one.
{Try this question now.
|type="()" coef="2"}
+ 2 points for this one.
- 0 points for this one.
{Try this question now.
|type="()" coef="4"}
+ 4 points for this one.
- 0 points for this one.
{Try this question now.
|type="()" coef="0.5"}
+ 1/2 point for this one.
- 0 points for this one.
</quiz>
|
|
|
Troubleshooting
- You cannot test out the quiz while editing a page, because the submit button is grayed out. If you wish to test your new quiz, then create a sandbox page somewhere else first (e.g. as a subpage of your user page), then test the quiz there, and finally transfer the quiz to its final location (and test it again anyway).
- The quiz was developed for IE6, IE7, Firefox (and Opera?), but display quality on Opera may not be optimal, and there may be display differences between browsers.
- A reminder: each question must be separated by a blank line, otherwise the questions are merged together into one question.
About the WikiEducator quiz feature
The quiz feature is powered by MediaWiki's quiz extension; see the WikiMedia project page for specifics about the extension, as well as discussion and development of future functionality.
Acknowledgements
Portions of this page were adapted from:
- Help:Quiz. In Wikiversity, retrieved 24 August 2011.