WeBWorK Problems

Using unicode characters in PopUp( ) answers version 10 webwork.

Re: Using unicode characters in PopUp( ) answers version 10 webwork.

by Davide Cervone -
Number of replies: 0
Unfortunately, this message is from the Safe compartment. Apparently, something in the use of the Unicode characters is requiring perl to load some additional component, and that is being prevented by the Safe compartment. I don't know what package it is, but we ran into something like that once some time ago and added the utf8 package to the pg modules list. The line that is triggering the message is one where the correct answer is tested to see if it is non-blank using a regular expression. I suspect it is the regular expression code that is trying to load some information about unicode when it sees the intersection.

The only solution I can think of is to force the Safe compartment to load whatever it is that is needed prior to disabling the require command. That would take some experimenting, and the Safe compartment handling is pretty delicate, so it is not for the feint of heart.

An alternative would be to not use the unicode character but mark it in another way, and have some javascript go through the menus after they are in the browser to insert the unicode. To do that right would also require adjustments to the PopUp context so that the answers would show the proper character in the results table. It is a complete hack, but would be possible.