Plain Text Quiz Builder Markup Language Tutorial

You can learn the basic markup language for the Plain Text QTI Quiz Builder in just a few minutes. This brief tutorial explains the main directives and provides examples of each question type supported. It also includes a complete sample quiz that puts everything together, and ends with a troubleshooting section that lists some of the most common mistakes users make when using the quiz builder. Since it is usually best to learn by doing, I recommend that you follow along by opening your favorite plain text editor and entering the examples yourself, or creating your own as you go.


Overview

The quiz builder uses a simple plain text markup language consisting of a few directives to help organize the quiz and question types that must be entered according to a specific format. While the quiz builder page provides a text box for you to enter your markup directly or paste it from another location, it is much better to use the text editor of your choice (e.g., Notepad on Windows or TextEdit on Mac), save the file, then upload it into the quiz builder.

Note: You must use a plain text editor to write your quiz and not a word processing program like Word or Pages.


Basic Quiz Structure

Creating Comments with #

Any line beginning with # is considered a comment and will be ignored by the quiz builder. Use comments to write notes or reminders to yourself as you are writing your quiz. Comments will never be seen by students. See the sample comment below.

# Don't forget to include a few questions from chapter 5 in this section!

Creating Quiz Sections with sec:

To organize a quiz more clearly, you can divide it into sections. Each section can have its own title and its own instructions. To begin a new section, use the following format:

sec:Title of Section|Instructions that apply to this section

The example below begins a section called Animal Vocabulary and gives instructions for that section:

sec:Animal Vocabulary|Choose the word that most logically completes each sentence.

Note: In the printable (DOCX/Word) version of a quiz, question numbering restarts at the beginning of each new section.

Setting Points per Answer with pv:

By default, each correct answer is worth 1 point. I say answer rather than question because some questions contain multiple answers. For example, a true/false question has only 1 answer, so it is worth 1 point by default. A fill-in-the-blank question with 3 blanks is worth 3 points by default because each blank counts as a separate answer. Likewise, a matching question with 10 matching pairs is worth 10 points, and a word bank question with 5 blanks is worth 5 points.

To change the point value per answer, enter pv: followed by the number of points on a line by itself. For example, the line below makes each answer worth 3 points going forward:

pv:3

If you want to change the point value again later, simply enter a new pv: directive. Each pv: directive remains in effect until another one is encountered.


Question Types

True or False Questions

To create a true/false question, simply type a statement and end it with /t if the statement is true or /f if the statement is false.

Examples:

Dogs are mammals./t
Cats are reptiles./f

Fill-in-the-Blank Questions

To create a fill-in-the-blank question, place the acceptable answer or answers for each blank between backticks (``). If a blank should accept more than one correct answer, separate the acceptable answers with semicolons (;).

In the example below, both the digit 4 and the word four will be accepted as correct answers:

Dogs have `4;four` legs.

You can include more than one blank in the same question by adding additional sets of backticks:

Cats are mammals, snakes are `reptiles`, and frogs are `amphibians`.

Multiple Choice Questions (Single Correct Answer)

To create a multiple choice question with exactly one correct answer, use this format:

Question text|correct answer|wrong answer 1|wrong answer 2|(etc.)

The most important rule is this: the answer after the first vertical bar (|) must be the correct answer.

Examples:

Dogs are ...|mammals|reptiles|fish
Snakes are ... that slither around.|reptiles|mammals|birds
Eagles are large ... that love to soar.|birds|reptiles|amphibians

Note: For single-answer multiple choice questions, the quiz builder automatically scrambles the choices, so you do not need to worry about the order of the incorrect answers. Just make sure the correct answer is the first one.

Multiple Choice Questions (Multiple Correct Answers)

To create a multiple choice question with more than one correct answer, place an asterisk (*) in front of each correct answer choice.

Examples:

Dogs can ...|*walk|*bark|sing opera|build computers
Snakes can ...|sing opera|*slither|*eat|teach Spanish
Spiders can ...|*make webs|sing opera|do calculus|*crawl

Note: Unlike single-answer multiple choice questions, the quiz builder does not scramble the answer choices for multiple-answer questions. They will appear in the same order in which you entered them.

Matching Questions

Matching questions span several lines. Begin with mat: on a line by itself. You may optionally place instructions after mat:. Then enter at least 2 matching pairs using the format item=match, one pair per line. End the question with :end on a line by itself.

To add distractors, place each distractor on its own line without an equals sign.

The example matching question below contains 5 matching pairs and 2 distractors:

mat:Match the animal on the left with the sound it makes on the right.
cow=moo
cat=meow
dog=bark
bird=chirp
pig=oink
quack
buzz
:end

Word Bank Questions

Word bank questions also span multiple lines. Begin with wb: on a line by itself. You may optionally place instructions after wb:. On the lines that follow, enter the text of the question. Each word or expression that should appear in the word bank must be surrounded by backticks.

There must be at least 2 word bank items. To add distractors, place each distractor on its own line and begin it with a colon.

Word bank questions are best learned by example:

wb:Fill in each blank with the most appropriate word from the word bank.
A `bird` is a type of animal that can fly. Sharks are `fish` that `swim` in the ocean. Dogs are `mammals` that like to `bark`. Cows are large animals that say `moo` and eat `grass`.
:quack
:reptiles
:end

The example above creates a scrambled word bank containing the terms bird, fish, swim, mammals, bark, moo, and grass, along with the distractors quack and reptiles.

Note: There is a maximum of 10 word bank questions per quiz and a maximum of 25 entries per word bank question.

Essay Questions

To create an essay question, type es: on a line by itself. Then enter the essay prompt on the lines that follow. End the question with :end on a line by itself.

Because the default point value is 1 point per answer, most teachers will want to use the pv: directive before an essay question in order to assign a higher number of points. The example essay question below will be worth 20 points:

Example:

pv:20
es:
In 8-10 sentences, discuss the differences between reptiles and mammals.
Do NOT use AI to assist you. Please do your own work.
:end

Note: In Canvas, essay questions provide students with a text box in which to type their response. For the printable (DOCX) version, the quiz builder inserts a block of 20 horizontal lines by default where students can write their answers (to simulate lines on a sheet of notebook paper). If you want to change the number of printed lines, place the desired number immediately after es:. The example below creates an essay question with 10 printed lines for students to write their answers on the DOCX version of the quiz:

es:10
In a short paragraph of 4-6 sentences, describe your favorite animal.
:end

Note: If you do not want any lines to appear on the printable version of the quiz (e.g., because students will write their answers on a separate sheet of paper), set the number of lines to 0.


Additional Features

Creating Text Blocks with tb:

Quizzes often include complex instructions, short readings, or other multi-line text that should appear before one or more questions. For this purpose, you can create a text block with the tb: directive.

Begin the block with tb: on a line by itself. Then enter the text you want to include on the following lines. End the block with :end on a line by itself.

Text blocks are especially useful for reading comprehension activities. The example below includes a short reading passage followed by three true/false questions:

sec:Reading Comprehension|Read the short passage below, then answer the questions that follow.

tb:
Reptiles are animals like snakes, turtles, lizards, and crocodiles. They have dry, scaly skin and are cold-blooded, which means their bodies get warmer or cooler depending on the weather around them. Many reptiles lay eggs, and they can live in places like deserts, forests, rivers, and oceans. Reptiles are important because they help keep nature in balance.
:end

Snakes, turtles, and crocodiles are all examples of reptiles./t
Reptiles are warm-blooded./f
Reptiles help keep nature in balance./t

Inserting Horizontal Lines with hr:

You can enter hr: on a line by itself to insert a horizontal line in a quiz question. This can help to separate areas of text. Below is the same reading comprehension activity from the previous section, this time with a horizontal line inserted to more clearly separate the reading from the first question related to it.

sec:Reading Comprehension|Read the short passage below, then answer the questions that follow.

tb:
Reptiles are animals like snakes, turtles, lizards, and crocodiles. They have dry, scaly skin and are cold-blooded, which means their bodies get warmer or cooler depending on the weather around them. Many reptiles lay eggs, and they can live in places like deserts, forests, rivers, and oceans. Reptiles are important because they help keep nature in balance.
:end

hr:

Snakes, turtles, and crocodiles are all examples of reptiles./t
Reptiles are warm-blooded./f
Reptiles help keep nature in balance./t

Defining Reusable Multiple Choice Options with dc:

It is often desirable to create several multiple choice questions that all use the same set of answer choices, in the same order. For those cases, you can define the choices once with the dc: directive and then reuse them in several questions. This can save time and keep your quiz file shorter and easier to edit, especially when many questions use the same set of choices.

To define a reusable set of answer choices, type dc: followed by the choices separated by vertical bars. The example below defines the choices mammal, reptile, bird, and fish:

dc:mammal|reptile|bird|fish

The quiz builder then assigns numbers to the above choices in the order in which you entered them:

You can then create multiple choice questions that use those predefined choices by ending the question with /@ followed by the number of the correct answer.

Examples:

A dog is a .../@1
A snake is a .../@2
An eagle is a .../@3
A shark is a .../@4

Each of the questions above will display the same four answer choices defined by the dc: line, and the number after /@ tells the quiz builder which choice is correct.

Note: The quiz builder allows 2-6 predefined choices at a time.


Complete Sample Quiz

The sample below combines several of the directives and question types covered in this tutorial. A helpful exercise would be to copy the sample quiz below, paste it into the Plain Text Quiz Builder and modify/expand it until you are comfortable with the markup language. After a bit of practice, you will be able to create Canvas quizzes quickly and efficiently using just a plain text editor.

sec:Animal Facts|Answer the questions below about animals.

Dogs are mammals./t
Cats have `4;four` legs.
Snakes are ...|reptiles|mammals|birds
Birds can ...|*fly|*lay eggs|drive cars|do calculus

mat:Match each animal with its sound.
cow=moo
cat=meow
dog=bark
buzz
:end

wb:Fill in each blank with the most appropriate word from the word bank.
A `bird` has feathers.
A `fish` lives in water.
Dogs like to `bark`.
:reptile
:end

pv:10
es:8
In a short paragraph, describe your favorite animal and explain why you like it.
:end

Troubleshooting and Common Mistakes

Below are a few common mistakes users make when writing their quizzes: