--- loncom/interface/loncoursedata.pm 2003/09/26 18:31:31 1.89 +++ loncom/interface/loncoursedata.pm 2003/09/26 19:23:14 1.90 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: loncoursedata.pm,v 1.89 2003/09/26 18:31:31 matthew Exp $ +# $Id: loncoursedata.pm,v 1.90 2003/09/26 19:23:14 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1157,7 +1157,15 @@ sub update_full_student_data { next; } elsif ($parameter eq 'version') { next; - } elsif ($parameter =~ /^resource\.(.*)\.(tries|award|awarded|previous|solved|awarddetail|submission)\s*$/){ + } elsif ($parameter =~ /^resource\.(.*)\.(tries| + award| + awarded| + previous| + solved| + awarddetail| + submission| + submissiongrading| + molecule)\s*$/x){ # we do not have enough information to store an # entire row, so we save it up until later. my ($part_and_resp_id,$field) = ($1,$2); @@ -1169,11 +1177,18 @@ sub update_full_student_data { } else { $part_id = &get_part_id($part_and_resp_id); } + # Deal with part specific data if ($field =~ /^(tries|award|awarded|previous)$/) { $partdata->{$symb_id}->{$part_id}->{$transaction}->{$field}=$value; } + # deal with response specific data if (defined($resp_id) && - $field =~ /^(tries|awarddetail|awarded|submission)$/) { + $field =~ /^(tries| + awarddetail| + awarded| + submission| + submissiongrading| + molecule)$/x) { if ($field eq 'submission') { # We have to be careful with user supplied input. # most of the time we are okay because it is escaped. @@ -1185,7 +1200,13 @@ sub update_full_student_data { $value =~ s/\\$/\\\\/; } } - $respdata->{$symb_id}->{$part_id}->{$resp_id}->{$transaction}->{$field}=$value; + if ($field eq 'submissiongrading' || + $field eq 'molecule') { + $respdata->{$symb_id}->{$part_id}->{$resp_id}->{$transaction}->{'response_specific'}=$field; + $respdata->{$symb_id}->{$part_id}->{$resp_id}->{$transaction}->{'response_specific_value'}=$value; + } else { + $respdata->{$symb_id}->{$part_id}->{$resp_id}->{$transaction}->{$field}=$value; + } } } } @@ -1232,7 +1253,8 @@ sub update_full_student_data { $data->{'tries'}, $data->{'awarddetail'}, $data->{'awarded'}, - '','', + $data->{'response_specific'}, + $data->{'response_specific_value'}, $data->{'submission'})."'),"; $store_rows++; }