Installation

Size of answer blanks too small after upgrading to 2.19

Size of answer blanks too small after upgrading to 2.19

by Jeremy Lounds -
Number of replies: 8

Hello,

First, I apologize if my terminology is incorrect - I mostly handle the server and database side and my colleagues work on the courses and problems.

After upgrading our dev server from webwork 2.14 to 2.19, it appears the size of the answer blanks are all the same (small) size. I found information (here https://webwork.maa.org/wiki/Answers_in_Option_Form_-_PGML) about entering the size in braces after the answer, which is how 99% of our problems are coded. But it is not working after the upgrade. Also, the method of using a bunch of underscores is not changing the width of the answer blank, either.

Am I failing to load the right macro? Or missed a configuration value somewhere? Something else entirely?

Thank you,

Jeremy


In reply to Jeremy Lounds

Re: Size of answer blanks too small after upgrading to 2.19

by Danny Glin -
Somewhere in between 2.14 and 2.19 (I think it was around 2.17) MathQuill became the default input method for answers. When MathQuill is enabled all text answer boxes begin with a width of one character, and expand to accommodate the text that is entered, so the size of answer blanks that is set within the problem is ignored.

You can disable MathQuill by adding the following to localOverrides.conf:
$pg{specialPGEnvironmentVars}{entryAssist} = '';

Be aware that MathQuill is now standard for WeBWorK problem authoring, so I don't recommend disabling it. In addition to missing out on the entry assistance features (e.g. the math notation toolbar and wysiwyg formula entry) there is also risk of recently authored problems not working well with MathQuill disabled.
In reply to Jeremy Lounds

Re: Size of answer blanks too small after upgrading to 2.19

by Alex Jordan -

If you are now using MathQuill, the answer blanks all start out small and grow as you enter content to fit whatever width is needed. So there is never any issue with needing to scroll within an answer blank.

If you disable MathQuill (in Course Config, Problem Display tab, "Assist with the student answer entry process." option) then you should see answer blanks of the specified width.

But again, with MQ running there is no need to honor the specified width. And I think it ultimately looks better than having the inconsistently sized answer blanks from problem to problem.

In reply to Jeremy Lounds

Re: Size of answer blanks too small after upgrading to 2.19

by Jeremy Lounds -

Me again... is there a way to pass a variable (ideally, the one in the braces following the answer) from PGML to the HTML output somewhere? Then we could create a custom CSS rule that expands the initial size of the answer blank but keep MathQuill. (apparently, this is an important feature for our faculty here)

Thank you!

Jeremy

In reply to Jeremy Lounds

Re: Size of answer blanks too small after upgrading to 2.19

by Glenn Rice -
There isn't such an option. May I ask why you want this? The MathQuill answer rules expand to fit the typed content, so there really is no need for such a setting.
In reply to Glenn Rice

Re: Size of answer blanks too small after upgrading to 2.19

by Sean Fitzpatrick -
It sounds to me like Jeremy is the sysadmin here, dealing with stubborn faculty who can't get past the fact that it looks different than it used to.

He is probably asking the same question of certain faculty members, and not getting any constructive answers. (Though I'll admit that I'm now curious to know why exactly someone thinks this is so important!)
In reply to Glenn Rice

Re: Size of answer blanks too small after upgrading to 2.19

by Jeremy Lounds -

That is correct, I am a sysadmin. According to the instructor who does the lion's share of the problem coding, they like having different sizes for the answer blanks to give subtle hints to the students on whether the solution is short or long.

In reply to Jeremy Lounds

Re: Size of answer blanks too small after upgrading to 2.19

by Alex Jordan -

You can let them know that nothing is possible for this right now. If it is more important to have those hints than MathQuill, you can turn off MathQuill, either on a course by course basis using the Course Config page, or globally with a setting in localOverrides.conf.

I'll share a thought about this. The answer blank width (without MathQuill) is meant to make sure the answer blank would be wide enough for reasonable student submissions across all random versions. It was not intended to actually hint at the length that is needed, just to try to make sure the student doesn't need to side scroll within the input field. Occasionally, there are questions where for some random versions the answer is short, while for others the answer is long. It can happen because of how a generic answer might simplify in some cases. So if one really wanted the answer blank width to hint at the length of the answer, that length would need to be computed dynamically for different random versions of a problem.

And one more thing about this. (Now I am going further into just sharing my personal philosophy.) Online homework ideally (imho) simulates pencil-and-paper assignments. If math exercises were assigned from a book using pencil and paper, there would be no hints like this about how long the answer is when written.

I do know the feeling of having invested lots of time carefully thinking about how to set these widths, and then with MathQuill that was all for nothing. Then again, it's not entirely for nothing as these widths are still respected in PDF hardcopy output.