WeBWorK Main Forum

Harvesting student answers with timestamps

Harvesting student answers with timestamps

by Philip Loewen -
Number of replies: 3

I'm at the early contemplation/design stage of a potential big-data project. The idea is to use the data stored deep inside WW to get quantitative insights into the degree of difficulty of my problems, and/or the work habits of my students.

Before tackling this myself, I should check: has someone else undertaken something similar before? If so, any pointers would be most welcome. If not, here below are two questions on which I would appreciate expert opinion.

Background: The WW server at my University is run by strangers in IT Services, who see me as just another "Instructor"-type user of the usual web front-end (also with LMS integration). But I can ask them for reasonable favours.

I already know how to harvest each student's score on each question, and the number of incorrect answers they have submitted, using the "Scoring Tools" feature of the web interface. This already gives me some clues about which questions are easy and which are hard.

Is there any way to get more granular info? E.g., I know that WW keeps a (timestamp,answer)-pair for each and every student submission. I'd like a way to get these -- ideally from the web interface. Is that possible? If not, is the whole idea futile without admin rights on the server? Or, is there some simple intermediate alternative like, "Ask your IT shop for the sqlite database file with the following standard path and name, and apply sqlitebrowser"?

As suggested in the preamble, I'm not sure what will come of this. If you have relevant info at your fingertips, please do share; but please don't let my half-formed plans distract you for more than a few minutes.

Thanks and warm regards, Philip

In reply to Philip Loewen

Re: Harvesting student answers with timestamps

by Alex Jordan -

In a course's file manager, navigate up one level and then into logs. You can get the answers log there which may help you. Also the login log may be of interest.

On the server there are also transaction logs. You either need server access or you need the server admin to give you read access to them via some course's file manager 

In reply to Alex Jordan

Re: Harvesting student answers with timestamps

by Philip Loewen -

Splendid. It looks like "answers.log" might be just what I asked for. Thanks!   - Philip

In reply to Philip Loewen

Re: Harvesting student answers with timestamps

by Danny Glin -

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.