Skip to main content
Skip table of contents

Create short answer, multi-short answer and fill in the blank questions in myCourses

This article explains how to create Short Answer, Multi-short Answer, and Fill in the Blank questions in myCourses, and provides an overview of how to limit or expand text answers to quiz and survey questions.

In this article:

Short Answer questions

Short Answer questions require one-word answers or brief precise phrases to be typed by students.

  1. In the Question Text field, enter your Short Answer question details.

  2. In the Answers for Blank 1 field, enter the answer(s).

    If you want to add answers during or after a quiz, you must regrade the question to award points to your students for these answers.

  3. From the abc drop-down list for Blank 1, select the evaluation options for grading this type of question:

    • Text: Students will get full marks regardless of capital or lower-case letters.

    • Case Sensitive: Students will get zero if their answers aren’t the same case as the answer you typed in the box.

    • Regular Expression: You can specify more than one correct answer or various spellings. Students will get full marks even if they add extra words or letters to the beginning or end of the answer. This option is useful if you are looking for a specific word in a sentence or if students might add suffixes (e.g., -s or -ing) to a word. See below for more details on regular expressions.

  4. To add more blanks, click Add Blank and enter your answer(s). For additional blanks, select the desired evaluation option.

  5. In the Default Points field, enter the points students will receive for answering the question correctly.

  6. If you have more than one blank answer, you will need to select a How are points assigned to blanks? drop-down list option:

    • Students will receive part marks: The default points for each blank are calculated automatically and are evenly distributed.

    • Students must answer all blanks correctly: The default points will only be awarded if the student answers all blanks accurately.

  7. (Optional) From the Options drop-down list at the top-right, do one of the following:

    • To add overall feedback for the answer, select Add Feedback.

    • To add a hint to the question, select Add Hint.

    • To add a short description to the question, select Add Short Description.

  8. To remove a possible answer, click on the “X” icon.

  9. To verify that you have set up your question correctly, click Preview.

  10. Click Save.

    image-20240315-013023.png


    This is how a Short Answer question with the above settings would appear on a quiz or survey:

If the settings above were used for a quiz question, students would get full points for typing in “Mercury” or “Venus,” regardless of capitalization, as long as there were no spelling errors.

Although this question type is auto-graded, this grading is not always accurate and you should check students’ answers using manual grading.

Back to top


Multi-short Answer questions

Multi-short Answer questions are similar to Short Answer questions, but you can ask for multiple answers and students can enter their answers in any order.

  1. In the General area, enter your Multi-short Answer question details.

  2. In the Options area:

    • Input boxes: Specify the number of answer boxes that will be provided for the answers. You can specify a number that is greater than the number of correct answers to give students extra chances to get the correct answer(s) or you can specify fewer input boxes to make answering questions more stringent for students. For example, if there are three possible correct answers, you can choose to provide only two input boxes, and the student would have to enter 2 of the 3 correct answers.

    • In the Answer fields, enter the correct answers for your question.

    • Weight (%): Make sure the weights for the correct answers total 100%; otherwise, it won’t be possible for students to get full marks for the question.

  3. To assign more possible answers for the question, click Add Answer.

  4. To verify that you have set up your answers correctly, click Preview.

  5. Click Save.

image-20240315-013126.png

image-20240315-013142.png

This is how a Multi-short Answer question with the above settings would appear on a quiz or survey:

image-20240315-013159.png

Although this question type is auto-graded, this grading is not always accurate and you should check your students’ answers using manual grading.

Back to top


Fill in the Blank questions

The Create New Question page for a Fill in the Blank question starts with two Textboxes and one Blank # box in the middle. You are also given several options for creating more complex questions.

  1. In the General area, enter your fill in the blank question details.

  2. In the Question Text area:

    • Add Blank: Click Add Blank to add another blank to the end of your question.

    • Add Text: Click Add Text to add more text to the end of your question after another blank.

    • Text: Enter the text in the textboxes that you want on either side of the blanks.

    • Size: Select a number from the drop-down menu to make the blank box longer or shorter in the question. This is useful if you have multiple blanks and want the size of the blanks to correspond to the length of the answers.

    • Add Answer: Click Add Answer to add other possible correct answers for a blank.

    • Evaluation: As with Short Answer questions, you can choose:

      • Case Insensitive: “chicken.” “Chicken,” or “CHICKen” would all be marked correct.

      • Case Sensitive: “chicken” would be accepted, but not “Chicken,” or “CHICKEN.”

      • Regular Expression: If you specify the answer as “chick” and then choose Regular Expression, “chick,” “chicks,” “chicken,” “chicken fingers,” etc. would be marked correct unless you added “limiting symbols” to the answer. See Regular Expressions below for more information.

  3. To verify that you have set up your question correctly, click Preview.

  4. Click Save.

The Text and Blanks on this page will appear to students in the same order as you enter them in your question.

This is how a Fill in the Blank question with the above settings would appear on a quiz or survey:

image-20240315-013256.png
image-20240315-013309.png

The Text and Blanks on this page will appear to students in the same order as you enter them in your question.

This is how a Fill in the Blank question with the above settings would appear on a quiz or survey:

image-20240315-013316.png
  • If you use Fill in the Blank questions, make sure you enter text that prompts the answer(s) you’re looking for. If your question reads: “_____ becomes ______ ,” your students may have difficulty finding an appropriate answer.

  • When setting up your question, new text and blanks are added to the end of the existing elements, and you can’t drag and drop them to rearrange the order. To place a blank at the beginning of a question, click the trash can to delete the first text element. If you have multiple blanks in the question, copy/paste between text elements to position the words around your blanks as needed.

  • Although this question type is auto-graded, this grading is not always accurate and you should check your students’ answers using manual grading.

Back to top


Regular Expressions

A Regular Expression is a grading option for quiz and survey questions that require students to type in their answers. This option allows you to use codes to define multiple correct text answers (e.g., alternate spellings, synonyms or units) as opposed to the exact text match that the Case Sensitive or Insensitive options require. The Regular Expression option is available for Short Answer, Multi-short Answer, and Fill in the Blank questions. It can also be used for units in Arithmetic and Significant Figures questions. A range of possible correct answers can help you avoid re-grading these questions manually.

Common Regular Expressions

Below is a list of common regular expressions to limit or expand possible text answer(s) to quiz and survey questions.

Symbol

Description

Purpose

^

Use the caret ^ before a word to require students’ answers to begin with that word.

This code is useful for creating a boundary for students’ answers as the Regular Expression option doesn't set boundaries by default.

$

Use the dollar sign after a word to require students’ answers to end with that word.

This code is useful for creating a boundary for students’ answers as the Regular Expression option doesn't set boundaries by default.

^ $

Use the caret ^ before a word and the dollar sign after the word to require students to write an exact word without allowing any extra words, prefixes or suffixes

This code is useful for creating a boundary for students’ answers as the Regular Expression option doesn't set boundaries by default.

\b

Use \b at the beginning and/or end of a word to set word boundaries, but still allow students to enter other words with their answer.

Note: Don't use a forward slash / or capital letter B or this expression won't work.

This code is useful for requiring students’ answers to contain a certain key word without allowing any prefixes or suffixes.

|

Use the vertical bar | between two answers to require students’ to give at least one of those answers.

This code is useful for allowing students’ to use synonyms for a key word that you are looking for in their answers.

?

Use a question mark before a letter to make that letter optional.

This code is useful for allowing alternate spellings or optional suffixes or prefixes in students’ answers (see below).

()

Use parentheses ( ) around a set of characters combined with another symbol to only apply that symbol to those characters.

This code is useful for combining with | to allow students’ answers to be case insensitive as the Regular Expression option requires case sensitive answers by default.

() ?

Combine parentheses () with a question mark to make a suffix or prefix optional

This code is useful to allow for the presence or absence of a suffix or prefix.

[]

Use square brackets [ ] around a set of characters to require students’ answers to contain at least one those characters.

This code is useful for allowing alternate spellings.

.

Use a period in place of a letter to allow students to substitute that letter’s position for any character.

This code is useful for allowing alternate spellings.

Advanced Regular Expressions

Below is a list of less common regular expressions to limit or expand possible text answer(s) to quiz questions. Due to their complexity, these expressions are recommended for advanced users.

Symbol

Description

Example

*

Matches the preceding character or sub-expression zero or more times.

  • equals {0,}

be* matches b or be or beeeeeeeeee

zo* matches z and zoo.

+

Matches the preceding character or sub-expression one or more times.

+ equals {1,}.

be+ matches be or bee but not b

?

When this character immediately follows any of the other quantifiers (*, +, ?, {n}, {n,}, {n,m}), the matching pattern is non-greedy. A non-greedy pattern matches as little of the searched string as possible, whereas the default greedy pattern matches as much of the searched string as possible.

In the string oooo, o+? matches a single o, while o+ matches all os.

()

Parentheses create a sub-string or item that you can apply meta-characters to.

a(bee)?t matches at or abeet but not abet

{n}

n is a non-negative integer. Matches exactly n times.

[0-9]{3} matches any three digits

o{2} doesn't match the o in Bob, but matches the two os in food.

b{4} matches bbbb

{n,}

n is a non-negative integer. Matches at least n times.

[0-9]{3,} matches any three or more digits

o{2,} doesn't match the "o" in "Bob" and matches all the o's in "foooood". 'o{1,}' is equivalent to 'o+'. 'o{0,}' is equivalent to 'o*'.

{n,m}

m and n are non-negative integers, where n <= m. Matches at least n and at most m times.

Note You can't put a space between the comma and the numbers.

[0-9]{3,5} matches any three, four, or five digits

"o{1,3}" matches the first three o's in "fooooood". 'o{0,1}' is equivalent to 'o?'.

c{2, 4} matches cc, ccc, cccc

.

Matches any single character except "\n".

To match any character including the '\n', use a pattern such as '[\s\S]'.

cat. matches catT and cat2 but not catty

(?!)

Makes the remainder of the regular expression case insensitive.

ca(?i)se matches caSE but not CASE

(pattern)

Matches pattern and captures the match. The captured match can be retrieved from the resulting Matches collection, using the SubMatches collection in VBScript or the $0$9 properties in JScript.

To match parentheses characters ( ), use '\(' or '\)'.

(jam){2} matches jamjam. First group matches jam.

(?:pattern)

Matches pattern but doesn't capture the match, that is, it is a non-capturing match that is not stored for possible later use.

This is useful for combining parts of a pattern with the "or" character (|).

'industr(?: y|ies) is a more economical expression than 'industry|industries'.

(?=pattern)

Positive lookahead matches the search string at any point where a string matching pattern begins. This is a non-capturing match, that is, the match is not captured for possible later use.

Lookaheads don't consume characters: after a match occurs, the search for the next match begins immediately following the last match, not after the characters that comprised the lookahead.

'Windows (?=95|98|NT|2000)' matches "Windows" in "Windows 2000" but not "Windows" in "Windows 3.1".

(?!pattern)

Negative lookahead matches the search string at any point where a string not matching pattern begins. This is a non-capturing match, that is, the match is not captured for possible later use.

Lookaheads don't consume characters, that is, after a match occurs, the search for the next match begins immediately following the last match, not after the characters that comprised the lookahead.

'Windows (?!95|98|NT|2000)' matches "Windows" in "Windows 3.1" but doesn't match "Windows" in "Windows 2000".

x|y

Matches x or y.

July (first|1st|1) will match July 1st but not July 2

'z|food' matches "z" or "food". '( z|f)ood' matches "zood" or "food".

[xyz]

A character set. Matches any one of the enclosed characters.

gr[ae]y matches gray or grey

'[abc]' matches the 'a' in "plain".

[^xyz]

A negative character set. Matches any character not enclosed.

1[^02] matches 13 or 11 but not 10 or 12

[^abc]' matches the 'p' in "plain".

[a-z]

A range of characters. Matches any character in the specified range.

[1-9] matches any single digit EXCEPT 0

'[a-z]' matches any lowercase alphabetic character in the range 'a' through 'z'.

[^a-z]

A negative range characters.

Matches any character not in the specified range.

'[^a-z]' matches any character not in the range 'a through 'z'

\b

Matches a word boundary: the position between a word and a space.

'er\b' matches the 'er' in "never" but not the 'er' in "verb".

\B

Matches a nonword boundary.

'er\B' matches the 'er' in "verb" but not the 'er' in "never".

\cx

Matches the control character indicated by x.

The value of x must be in the range of A-Z or a-z.

If not, c is assumed to be a literal 'c' character.

\cM matches a Control-M or carriage return character.

\d

Matches a digit character.

Equivalent to [0-9]

\D

Matches a non-digit character

Equivalent to [^0-9]

\f

Matches a form-feed character.

Equivalent to \x0c and \cL

\n

Matches a new-line character.

Equivalent to \x0a and \cJ

\r

Matches a carriage return character.

Equivalent to \x0d and \cM

\s

Matches any white space character including space, tab, form-feed, etc.

Equivalent to [ \f\n\r\t\v]

Can be combined in the same way as [\d\s], which matches a character that is a digit or whitespace.

\S

Matches any non-white space character.

Equivalent to [^ \f\n\r\t\v]

\t

Matches a tab character.

Equivalent to \x09 and \cI

\v

Matches a vertical tab character.

Equivalent to \x0b and \cK

\w

Matches any word character including underscore.

Equivalent to '[A-Za-z0-9_]'

\W

Matches any non-word character.

Equivalent to '[^A-Za-z0-9_]'

You should only use \D, \W and \S outside character classes.

\Z

Matches the end of the string the regular expression is applied to. Matches a position, but never matches before line breaks.

.\Z matches k in jol\hok

\xn

Matches n, where n is a hexadecimal escape value.

Hexadecimal escape values must be exactly two digits long.

Allows ASCII codes to be used in regular expressions.

'\x41' matches "A". '\x041' is equivalent to '\x04' & "1"

\num

Matches num, where num is a positive integer.

A reference back to captured matches.

'(.)\1' matches two consecutive identical characters

\n

Identifies either an octal escape value or a back-reference.

If \n is preceded by at least n captured sub-expressions, n is a back-reference.

Otherwise, n is an octal escape value if n is an octal digit (0-7).

“\11” and “\011” both match a tab character. “\0011” is the equivalent of “1”.

\nm

Identifies either an octal escape value or a back-reference.

If \nm is preceded by at least nm captured sub-expressions, nm is a back-reference.

If \nm is preceded by at least n captures, n is a back-reference followed by literal m.

If neither of the preceding conditions exists, \nm matches octal escape value nm when n and m are octal digits (0-7).

\nml

Matches octal escape value nml when n is an octal digit (0-3) and m and l are octal digits (0-7).

\un

Matches n, where n is a Unicode character expressed as four hexadecimal digits.

For example, \u00A9 matches the copyright symbol (©).

Back to top


While this resource is accessible worldwide, McGill University is on land which has served and continues to serve as a site of meeting and exchange amongst Indigenous peoples, including the Haudenosaunee and Anishinabeg nations. Teaching and Learning Services acknowledges and thanks the diverse Indigenous peoples whose footsteps mark this territory on which peoples of the world now gather. This land acknowledgment is shared as a starting point to provide context for further learning and action.

TLS-logo_rgb_horizontal_EN.png

McLennan Library Building 3415 McTavish Street Suite MS-12 (ground level), Montreal, Quebec H3A 0C8 | Tel.: 514-398-6648 | Fax: 514-398-8465 | Email: tls@mcgill.ca


JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.