Hi Jun,
Let me add one additional comment to Mike's reply about cached images.
Assuming you are using WeBWorK 1.8, if you want to refresh images when you change seeds, you should put
$refreshCachedImages = 1; into
the .pg code for the problem. This disables WeBWorK's caching of images
but you still have to handle the browser's caching of images. You can
also set this as the default for the whole WeBWorK system or for a
single course, but this is not recommended (see below).
In typeset2 (dvipng) and typeset (latex2html) modes, WeBWorK caches the
images on the server in order to speed up processing the next time the
same problem is viewed. When a problem is viewed, WeBWorK checks that
the cached images are newer than the problem .pg code and if not,
regenerates the images. Thus if a problem is edited, the images are
regenerated. However, since it is very rare for the seeds to be
changed, no such check is done with seeds. Thus if a professor changes
the seed for a problem, it is up to the professor to delete any cached
images for that problem (or to set $refreshCachedImages = 1; for that
particular problem if seeds will be changed a lot). It would not be too
difficult to change the WeBWorK system code so that when the seed for a
problem is changed, all associated cached images are deleted but
WeBWorK does not currently work that way.
Here is the documentation on $refreshCachedImages taken from Global.pm: $Global::PG_environment{refreshCachedImages} = 0; # Set to 0 or 1. If set to 1, the cached images for # problems will never be used and Latex2html, dvipng, or any new # modes that use cached images will always be called # on to create or recreate all images. This can be very time # consuming so almost never should this variable be set to 1. # This default can be over ridden for an individual problem by # setting e.g. refreshCachedImages = 1 in the .pg file for the problem. # This is the real reason for the variable and is useful for # conditional problems where the second part of the problem # will be displayed only if a student answers the first part # correctly. In this case the cached images would only show # for the first part so the second part would never appear in # typeset, etc. mode.
<| Post or View Comments |>
|