Found this content helpful? Log in or sign up to leave a like!

New Quizzes: regular expression answers in FITB questions

PatrickCoin
Community Explorer

Not a question, but a solution! I had asked about this previously, but cannot find that thread, so am starting a new one.

In the fill-in-the-blank (FITB) question type of New Quizzes, I would like to be able to do the following things all at once:

  1. Make answers case sensitive or not (usually NOT)
  2. Make the answers insensitive to white space, especially leading or trailing.
  3. Provide alternate correct answers.

This had looked like a job for the regular expression option, but I was not able to configure it correctly. I did some web searches and experimented today, and am now able to make it behave as desired. A simple example follows:

Question Stem:
What is your favorite color? `blue`

1-Case sensitivity (NOT)

Using the Open Entry, Regular Expression Match option in Canvas, I enter these regular expressions as the answer:

1a-For capitalization insensitivity.
[Bb]lue
Scores Blue or blue correct.

1b-Any case is good with proper spelling:
[Bb][Ll][Uu][Ee]
Scores blue, Blue, BLUE, BlUE, etc., correct.

2-Apparently white space is not an issue. The regular expression option seems to ignore leading and trailing white spaces. I have not tested this extensively, but it works when I test it.

3a-Alternate answer (OR conditional):
blue|green
Scores either blue or green correct.

3b-Combination of case and alternate answer.
[Bb][Ll][Uu][Ee]|[Gg][Rr][Ee][Ee][Nn]

Scores Blue, blue, BLUE, BluE, etc., OR Green, green, GReeN, etc. correct.

The software can be made to do what I want, and I am quite happy about about this. Perhaps Instructure people will be comment and formulate a help document to assist us on the instructional side? I may not have covered all the useful options, but it is a start.

Labels (1)