Hi Ray,

What, if any, is the best way for an author or course coordinator to prevent students' browsers caching answers in a problem?

I doubt this is a caching issue.

When rendering a problem the response header sent to the browser by LON-CAPA includes:

Pragma: no-cache
Cache-Control: no-cache
Expires: <current date/time>

However, if the problem is being displayed after a student has made prior submissions, and the status is CAN_ANSWER then the most recent submission will be displayed in the textbox where the student enters an answer.

Some possibilities which could be implemented currently:

(a) Set the question type for the problem to "New Randomization Each N Tries (default N=1)"

or

(b) Add a javascript function to be called on page load to set the value attribute for all <input> form elements with name or id beginning with the string: HWVAL_ to ''.

Other possibilities, which would require modifications to LON-CAPA, would be to optionally exclude $oldresponse from the value attribute on the server side when the content is being rendered, and also to add a javascript function, as outlined in (b), to LON-CAPA itself, and then provide a parameter, settable by the CC, to determine whether to exclude $oldresponse and also run the javascript function on page load.


Stuart Raeburn
LON-CAPA Academic Consortium


Quoting Raymond Batchelor <batch...@sfu.ca>:

Hi All,
What, if any, is the best way for an author or course coordinator to prevent students' browsers caching answers in a problem?

--
Ray
_______________________________________________
LON-CAPA-users mailing list
LON-CAPA-users@mail.lon-capa.org
http://mail.lon-capa.org/mailman/listinfo/lon-capa-users

_______________________________________________
LON-CAPA-users mailing list
LON-CAPA-users@mail.lon-capa.org
http://mail.lon-capa.org/mailman/listinfo/lon-capa-users

Reply via email to