WeBWorK Problems

Using a Canvas Applet in a problem

Using a Canvas Applet in a problem

by Steve Dalton -
Number of replies: 1
I have seen the sample problem available for using a CanvasObject, but I was hoping there might be a more detailed introduction/example out there for building an applet using an HTML5 canvas?

In particular, in the problem I've attached (which works OK), a big problem is that the canvas is cleared upon submission, because I don't know how to save all the points of the graph persistently.  I think this could be handled (among other things) if I was using an applet and not just a canvas element directly in the problem.

Any help would be most appreciated.
In reply to Steve Dalton

Re: Using a Canvas Applet in a problem

by Paul Seeburger -
See the attached problem for a way that some of the information from the canvas and JavaScript part of the problem is stored in hidden answer blanks in the WeBWorK problem.

I hope this helps!

Paul