Hi Jason,
There are three ways to mine data.
The easiest is to just view the student's submitted answers. As a
professor go to the prof page, item 3, and click on the student.
The second way is the one you mention.
The most recent student answer is saved in the main database, e.g.
mth100_webwork_DB. This file is located in e.g. mth100/DATA/. The
answers are encoded to protect special characters and so that they
correspond to the correct answer_rule in a multi-part question. The
answers can be accessed by the getProblemStudentAnswer function. For
example near line 225 of processProblem8.pl, you will find: # If answers have not been submitted and previous answers have been saved, patch them in
unless ($answers_submitted or !$show_old_answers) { my $student_answers = getProblemStudentAnswer($probNum,$psvn); if (defined $student_answers) { my $rh_answer_hash = decode_submitted_answers($student_answers); my %answer_hash = %$rh_answer_hash; my ($label, $value); foreach $label (keys %answer_hash) {$inputs{$label} = $answer_hash{$label};} } }
You could write your own script to display answers. Of course, for a
general application these answers would probably be meaningless if
displayed independently from the problem. So usually the first method
would be more useful.
The third way to mine data is to set $logAccessData = 1; in Global.pm
or (for a single course in webworkCourse.ph). This will cause
everything a student does to be recorded and saved in the access_log
with the exception that student's passwords are not saved. Thus for
example all student answers will be recored and saved. The access file
will become huge and we have not writen scripts to mine it, but if you
want, all the data is there. For example you could trace all the
answers a student submits in progressing to the correct answer.
Arnie
<| Post or View Comments |>
|