WeBWorK Problems

Flags for MathQuill? Perhaps not to use extra parentheses?

Flags for MathQuill? Perhaps not to use extra parentheses?

by Paul Seeburger -
Number of replies: 8

Are there any flags we can set for MathQuill?

It would be very helpful if there were a flag to keep it from constantly adding unneeded parentheses.  Perhaps it's just an improvement that should be made to the MathQuill code itself.  It would not be difficult to produce output without extra parentheses.

These have caused errors in problems in Context("LimitedFraction"), particularly when the answer was supposed to be a mixed number with flags:

Context("LimitedFraction")->flags->set(

         requireProperFractions=>1,

         showProperFractions =>1,

       );

For an example in the OPL, see problem: Library/NewHampshire/unh_schoolib/Fractions/fradrs201.pg

It thinks 3(1/3) is using implied multiplication in the LimitedFraction context.

It was expecting 3 1/3 as the correct answer.

I've had other algebra (or pre-algebra) problems where the added parentheses also caused an error.

Thanks!

Paul

In reply to Paul Seeburger

Re: Flags for MathQuill? Perhaps not to use extra parentheses?

by Paul Seeburger -

Even a way to force MathQuill to default to Text mode Tt in certain answer blanks would do the trick here.

Thanks!

Paul

In reply to Paul Seeburger

Re: Flags for MathQuill? Perhaps not to use extra parentheses?

by Glenn Rice -

That would not actually be an improvement, but would hinder the ability of WeBWorK to correctly process the answer as it appears to the student in almost all cases.  There are a few exceptions.  One is in the case of mixed numbers.  I am hoping at some point to make it so that if that context is used, MathQuill deals with mixed numbers in a different way.

In general, you have to think about order of operations properly.  Vertical fractions imply a different order of operations than single line mathematics.  The parentheses are there to ensure that the single line math answer that is sent to WeBWorK parses with the correct order of operations as it was intended by the student.

On a single line 5 * 6 / 3 means first multiply 5 and 6, and then divide by 3.

However if you have 5 multiplied by the vertical fraction 6 / 3, then that means first divide 6 by 3, and then multiply by 5.

I recommend that if you are using MathQuill, you also set the option "Display the evaluated student answer" under "PG - Problem Display/Answer Checking" to false.  Then the "Entered" column is not shown.  The advantage here when using MathQuill is that the answer the students sees in the MathQuill answer box and the answer in the "Preview" column of the results table are very similar.  In fact in most cases, they are the same.

Please stop generally complaining about the added parentheses.  They are correct in almost all cases.

In reply to Glenn Rice

Re: Flags for MathQuill? Perhaps not to use extra parentheses?

by Paul Seeburger -
Thank you for the suggestion to change the display Entered column, Glenn. That may indeed be helpful when using MathQuill.

I do understand that 3(1/3) is indeed showing implied multiplication. My complaint is really that this was not what the student entered.

My statement above should really have been that though MathQuill shows a clear mixed number with no needed (or shown) grouping symbols, it does not represent it as one, and instead added in the parentheses. Either it should not allow mixed numbers to be entered (force a times symbol between the number and fraction or force parentheses to be shown) or it should honor it and represent it in a way consistent with WeBWorK's LimitedFraction context.

Perhaps adding a mixed number option to the template (as an option) would be helpful as is true in MyMathLab, although I would not want it visible all the time even for this basic algebra course. Are there any flags that can be set to vary the options that are visible on this template?

The other place the added parentheses caused a problem for my students was in one of the standard WeBWork Orientation problems (Problem 4) where students were asked to enter a decimal and NOT a fraction. The grader was not using a MathObject, and so it did not understand the extra parentheses that MathQuill provided around a single entered fraction, so it returned the error, "Unexpected character '(' " when the student had just entered 5/8. It's clear that we will need to have a new set of Orientation problems when we use MathQuill. It should not be too difficult to work around that issue using updated templates.

All in all, I am just trying to make this transition to using MathQuill work well for my students and not be a steady source of confusion and frustration. The formatting is beautiful!

Thanks!

Paul
In reply to Paul Seeburger

Re: Flags for MathQuill? Perhaps not to use extra parentheses?

by Glenn Rice -
My point is that whether MathQuill shows an integer multiplied by a fraction or a mixed number is entirely a matter of context and interpretation. If an integer appears in front of a fraction, it is not necessary to have parentheses around the fraction for it to be intended as a product. Most of us would add the parentheses for clarity, but they are not required. This is part of why mathematicians so frequently object to mixed numbers. It generally would be better to write a mixed number like 3 1/3 as 3 + 1/3.

In the situation that you are describing, the problem asks for and allows mixed numbers, and hence in that context it would be interpreted as such. This is the situation where I would like the MathObjects context to automatically pass that to MathQuill, which would then behave differently.
In reply to Glenn Rice

Re: Flags for MathQuill? Perhaps not to use extra parentheses?

by Paul Seeburger -
Thanks, Glenn!

I agree that Mixed Numbers are a bit problematic in their form, but they are important for many applications.

Mixed numbers are non-standard in WeBWorK because it's confusing to parse, as you point out. And I agree that 3 + 1/3 removes all ambiguity.

These two problems in my Basic Algebra course actually require mixed number answers, not just allow them. That was what made this more confusing for my students. There was no way for them to get the problem correct unless they figured out to use the Test mode (as I now told them to do).

Paul
In reply to Paul Seeburger

Re: Flags for MathQuill? Perhaps not to use extra parentheses?

by Andras Balogh -

May I ask what the "test mode" is? I just encountered the issue of having some mixed numbers with MathQuill not working.

I am also thinking of removing the questions because I don't like mixed number representation.

In reply to Andras Balogh

Re: Flags for MathQuill? Perhaps not to use extra parentheses?

by Glenn Rice -

He meant "text mode".  You can enter text mode by hitting the "Tt" button on the toolbar, or by typing a double quote.

Even better, upgrade to WeBWorK 2.17, and then mixed numbers will work.