WeBWorK Main Forum

Upgrade 2.19: Issues with Hints, Solutions, Correct Answer, and EntryAssist (MathQuill)

Re: Upgrade 2.19: Issues with Hints, Solutions, Correct Answer, and EntryAssist (MathQuill)

by Glenn Rice -
Number of replies: 2

If your server is running Ubuntu, then rather than installing LibXML::XML from cpan, I recommend installing the Ubuntu package libxml-libxml-perl.

However, none of the Perl dependencies will have anything to do with the MathQuill issues.  That is all JavaScript, and none of the Perl dependencies affect that.

You mentioned that you are getting the warning "Content Security Policy (CSP) prevents the evaluation of arbitrary strings" regarding usage of things like "eval" and "new Function" and such.  None of WeBWorK or PG's javascript uses any of those things.  However, one thing that can cause that is if the JavaScript and CSS files are not being loaded correctly.  From your screenshot I can see that the third party JavaScript and CSS seems to be working  (I see that the MathJax rendered), and the webwork2 JavaScript and CSS seem to be working (at least the Bootstrap styles are in effect which come from webwork2 css), but the PG JavaScript seems to not be working (MathQuill is in PG).  So the thing to focus on is /opt/webwork/pg/htdocs/.  Make sure that the file /opt/webwork/pg/htdocs/statis-assets.json exists and has content (running "npm ci" in the pg/htdocs directory creates that file among other things).  Also, if you are proxying via apache2 (or any other proxy or related sort of thing -- like a load balancer), then make sure that you the pg_files route is properly configured with the proxy.  If you are proxying via apache2, then check the conf/webwork2.apache2.4.conf file.

Note that the display errors for specific problems are most likely the same issue as the MathQuill issue since many problems use PG JavaScript and CSS.

Additional warnings in problems could also be due to a change that we made to make those warnings that used to only go into the apache2 error log be shown in the user interface.  That is intentional so that problem authors start fixing their coding issues.  Those warnings are only displayed for instructors and not for students though.

In reply to Glenn Rice

Re: Upgrade 2.19: Issues with Hints, Solutions, Correct Answer, and EntryAssist (MathQuill)

by Bianca Sosnovski -
Hi Glenn,

Thanks for your help!

It turned out that the issue stemmed from mixing old macro files (v2.16) with our newer server (v2.19). Following the suggestions in this forum post https://webwork.maa.org/moodle/mod/forum/discuss.php?d=8651, I was able to identify and resolve the problem. The issue I posted above was related to this.

Everything is now running smoothly on our new server.
In reply to Bianca Sosnovski

Re: Upgrade 2.19: Issues with Hints, Solutions, Correct Answer, and EntryAssist (MathQuill)

by Glenn Rice -
I saw that you followed Alex's suggestion of ensuring that local modifications weren't causing an issue.  I am glad you resolved the issue.