I think that WeBWorK problems should show consistent output when loaded with the same seed. Since there are mechanisms for re-randomizing problems within a homework set, I don't think it is necessary to perform the re-randomization within the problem. Also, for me the expected behavior is that when I load a WeBWorK problem it will always show the same version unless I've specifically requested that it be re-randomized.
This is the way that PG behaves, so it only gets complicated when using external integrations. The R server connection has been set up so that the problem seed from WeBWorK is passed to R, which means that the behaviour is consistent with PG. I would suggest that for other integrations (Sage, GeoGebra, etc.) that either the randomization be done in PG then passed to the external system, or that the problem seed be used to initialize the environment in the external system.
Not sure if this warrants its own thread?
In Reply to Danny Glin's point:
I do see your point about consistency of the problem for a given seed. I can see that there might be an issue between the instructor and student if the student sends an email prompt to the instructor on a given problem. Without the enforced consistency the instructor would be presented a different function than what the student had.
There might be other unforeseen problems with permitting this randomization that we have not considered.
What issues do you see if we proceed with this form of re-randomization?
Here was our thinking on why we wanted re-randomization of the "sketch the derivative" problem:
1.) Permitting a "reset" option in the problem gives the student an arena with which to practice these types of problem. Some students get the lesson with just a few attempts, but others need much more practice. Permitting re-randomization seems like a better approach in that it provides ample practice for those that need/want it and does not burden the student who has already learned the lesson by assigning more of these problems.
2.) The fixed problem set for a given seed has a vulnerability for students that want to "cheat" the problem. Once the sketch of the derivative is shown such a student can make a screen capture or take a picture with their cell phone and then use the derivative image to answer the problem on further attempts, effectively bypassing the lesson. Showing the derivative sketch is a needed option, yes, but we would rather the student not be able to submit a score for that particular function once the derivative was revealed. Here we would want the option to reset for new function.
(That said we wish we had half your programming skills!)
Best, Tim Payer