I would like to include the following on a test.

Factor:

x^2 - 2x + 1

The answer is (x-1)(x-1) or (x-1)^2. However, if a student enters (x - 1)(x - 1) it is marked wrong in Canvas. Notice, the only difference is the inclusion of additional spaces in the student answer. Does anyone use an add-on math editor that removes additional spaces?

Judith,

Generally speaking, you should not be using fill-in-the-blank questions to grade math content. As you discovered, it is case and space sensitive. Beyond that, it misses some of the correct answers.

What if I wanted to write (x-1)² where the ² is generated on a PC keyboard by holding down the Alt key while I type 0178 on the numeric keypad and then releasing the alt key (you can do the same thing with alt code 253). Or what if they wanted to write (1-x)(1-x), (1-x)^2, or (1-x)² ... all of which are also valid responses. Come to think of it, so are [x-1]^2, [x-1]², [1-x]^2, (1-x)^(5-4), and (x+2-1)^(2π/π). Not even going out there so far, you could write (x-1)*(x-1) or (1-x)*(1-x).

Your example is rather simple, but if you had asked to factor 6x²+5x-6, you would have to consider whether they wrote (2x+3)(3x-2), (2*x+3)(3x-2), (2*x+3)(3*x-2), (2*x+3)*(3*x-2), and all of those with the order of the factors reversed.

Quizzes.Next allows for the use of regular expressions in fill-in-the-blank questions, so you could fix some of that with things like /^\(\s*x\s*-\s*1\s*\)(^2|²)$/. While that would handle the space issue, it still wouldn't handle (1-x)².

The text editor does a simple string comparison. It does not understand mathematics. Mathematics is a foreign language, it takes a special system to understand it. Anything you try to do with Canvas is going to be a hack or imperfect work-around.

Some of the following my not be acceptable, none are perfect, but here are some things you can do.

I have not followed Quizzes.Next, but I am holding out hope that by making it an LTI, Canvas is opening the door for people to create their own question types. If/when that happens, then perhaps mathematics will finally get some tools we can use.