WeBWorK Problems

Using Javascript in a WeBWorK problem

Using Javascript in a WeBWorK problem

by Steve Dalton -
Number of replies: 0
I have written a few problems for plotting points using the JSXGraph library, and am now trying to use them in a custom WeBWorK problem.  But no matter what I do, the javascript element does not display.

So I tried using a JS problem that does work on my machine, namely here.
When I load this problem in any of the browsers on my computer, it works fine.  When I copy all the files and their dependencies (including all the .pl files) to my local course, the canvas element does not appear.

For an even easier example of what I'm talking about, if I copy the graph_line.pg file available in this thread and try to use it as a problem in my course, once again the graph object does not display. This example is easier because there are no other files necessary for it to work.

Is there some setting to enable javascript problems to be allowed in a WeBWorK course? Does it matter that I am using a course hosted by the MAA and not my own school?

Any and all help is appreciated.