WeBWorK Main Forum

Harvesting student answers with timestamps

Re: Harvesting student answers with timestamps

by Danny Glin -
Number of replies: 0

The answer.log file is no longer the primary repository for student answers.  They are now stored in the database as well, and that is what is used to display them to instructors.  As has been identified there may be issues with the way answers are written to the answer.log file.  The reason it was suggested here is because an instructor can easily access that file, whereas getting at the database is harder (especially if you don't have access to the server).

I can give you two suggestions as to how to get at the version of the logged answers stored in the database:

  1. Ask your IT folks if they can provide you with a copy of the [coursename]_past_answer table from the database, where [coursename] is the course you are looking at.  If you have access to a mysql server to load the data, then they can simply send you a mysqldump.  If you want it exported to something more readable then you can ask them to do something like "SELECT INTO OUTFILE"
  2. You can generate your own csv from the "Show Past Answers" page:
    Visit any problem in any set in the course, and click the "Show Past Answers" button
    Highlight all of the students, all of the sets and all of the Problems (or some subset if you prefer), check the "Create CSV" button, then click the "Display Past Answers" button.  This should generate a csv of all of the answers taken from the database, so it should avoid any issues present in the answer.log file.