One of the biggest complaints we get by students in lower-level classes is the difficulty of entering long math expressions with multiple levels parentheses, etc., into webwork answer blanks.

I was wondering if anyone was aware of a (javascript, probably) routine which could be used externally to webwork (on a separate webpage, for example) which could provide a collection of templates that would allow students to fill in blanks for numerators/denominators of fractions, bases and exponents for a power expression, etc.. Then, by pushing a button, the appropriate text input for webwork would copied to their clipboard. Students would then just paste the result into the webwork answer blank.

For a simple example, they type in the value 'num' of the numerator, tab down to type in the value 'den' for the denominator (these fields would be displayed to students in standard fraction form) and the result '(num)/(den)' is then copied to their clipboard. For more complicated expressions, they can then paste this result directly from their clipboard into other templates to obtain, say 'sqrt((num)/(den))' to paste into webwork.

Not exactly a wysiwyg editor front-end for webwork, just a separate copy-and-paste aid for students. (I don't know javascript or I would try to create something like this myself.)

### javascript to aid student input?

by Patti Lamm -
In reply to Patti Lamm
Thursday, 30 December 2010, 6:01 PM

### Re: javascript to aid student input?

by Dick Lane -
Perhaps DragMath

http://web.mat.bham.ac.uk/C.J.Sangwin/dragmath/

could be used with WeBWorK to serve the moderate-size audience you describe (and to supplement the existing Preview). DragMath is an open-source Java applet which provides a "drag and drop" expression editor.

It is not clear whether DragMath could be enabled at the level of an individual course (e.g., via its PGcourse.pl file) or if enabling it would need to be system-wide.

It may be worth considering whether WeBWorK might benefit by emulating STACK (http://www.stack.bham.ac.uk/) by using a two-stage process for processing an answer:

1) answer is checked for valid syntax (and displayed as 2D math)

2) correctness is checked and feedback is provided

http://web.mat.bham.ac.uk/C.J.Sangwin/dragmath/

could be used with WeBWorK to serve the moderate-size audience you describe (and to supplement the existing Preview). DragMath is an open-source Java applet which provides a "drag and drop" expression editor.

It is not clear whether DragMath could be enabled at the level of an individual course (e.g., via its PGcourse.pl file) or if enabling it would need to be system-wide.

It may be worth considering whether WeBWorK might benefit by emulating STACK (http://www.stack.bham.ac.uk/) by using a two-stage process for processing an answer:

1) answer is checked for valid syntax (and displayed as 2D math)

2) correctness is checked and feedback is provided