WeBWorK Main Forum

saving student progress to excel file

Re: saving student progress to excel file

by Danny Glin -
Number of replies: 0
If you have access to your WeBWorK server it may be more convenient to get this data directly from the database, since it stores the number of incorrect and number of correct attempts a student had on each problem.

For example, you could run the following command:

echo 'SELECT user_id,set_id,problem_id,num_correct,num_incorrect,status FROM `[coursename]_problem_user` where set_id="Assignment_1"' |mysql -u webworkWrite -p webwork

(you will need to look up the password for the mysql user in your site.conf file)

This returns output like
user_id set_id problem_id num_correct num_incorrect status
student1 Assignment_1 1 0 1 0.25
student2 Assignment_1 1 0 0 0
student3 Assignment_1 1 0 0 0

The data is tab-delimited, so it is easy to import into excel.  Note that you can get the data for all assignments by leaving off the where clause before the |.  If you want the data saved to a file, add "> somefilename.txt" to the end of the command (without the quotes).