## WeBWorK Problems

### Graphs switched between problems

by Nathaniel Schwartz -
Number of replies: 3
I am just starting to use WW this spring. I have added problems to a set using the library browser 2. I deleted a couple that I didn't want, and now all the problems with graphs are switching graphs. I know it's not a local cache problem. I think it happens bc I deleted a problem and the server (MAA) has cached generated images for me for that problem, and now that they are reordered, it's still using the incorrect images. It doesn't make much sense though because I can't see pattern.

My question is, can I force the server to regen the graphs? How can I avoid this? I suspect students won't have this issue, but I have to make sure.

Any advice will be most appreciated. Also, I'm not sure what additional things might be helpful to post here, so any advice on that will be appreciated. Thanks!

### Re: Graphs switched between problems

by Robin Cruz -
Nathaniel,
You may keep the server from using cached images by inserting the following command in the problem file:

$refreshCachedImages=1; --rac In reply to Robin Cruz ### Re: Graphs switched between problems by Paul Pearson - Hi Nathaniel, Your students will not experience the problem you are having. When your students open a homework problem, they will see graphs that are generated specifically for them using their random seed. The images that are generated will be cached on the server, and using$refreshCachedImages = 0; means that the cached image will be used for the student (this is the default, I think). Using \$refreshCachedImages = 1; means that every time the student accesses that question, a new image will be generated and delivered to the student so that the cached version is never used.

The reason this problem arises when viewing problems in the homework sets editor or the library browser is that old cached versions of the images are being used. I am pretty sure that this bug has been on our radar for a while, but perhaps has not been a high enough priority to get fixed yet. In the future, we may want to circumvent this problem by switching from cached GIF files to dynamically generated and delivered SVG files (which Bill Wheeler already has done at Indiana U) or a similar HTML5 solution.

Best regards,

Paul Pearson