version 1.92, 2003/09/30 12:09:48
|
version 1.94, 2003/09/30 15:35:56
|
Line 460 The response table holds data (documente
|
Line 460 The response table holds data (documente
|
associated with a particular response id which is stored when a student |
associated with a particular response id which is stored when a student |
attempts a problem. The following are the columns of the table, in order: |
attempts a problem. The following are the columns of the table, in order: |
'symb_id','part_id','response_id','student_id','transaction','tries', |
'symb_id','part_id','response_id','student_id','transaction','tries', |
'awarddetail', 'awarded','response_specific' (data particular to the response |
'awarddetail', 'response_specific' (data particular to the response |
type), 'response_specific_value', and 'submission (the text of the students |
type), 'response_specific_value', and 'submission (the text of the students |
submission). The primary key is based on the first five columns listed above. |
submission). The primary key is based on the first five columns listed above. |
|
|
Line 716 sub init_dbs {
|
Line 716 sub init_dbs {
|
restrictions => 'NOT NULL' }, |
restrictions => 'NOT NULL' }, |
{ name => 'awarddetail', |
{ name => 'awarddetail', |
type => 'TINYTEXT' }, |
type => 'TINYTEXT' }, |
{ name => 'awarded', |
|
type => 'TINYTEXT' }, |
|
# { name => 'message', |
# { name => 'message', |
# type => 'CHAR' }, |
# type => 'CHAR' }, |
{ name => 'response_specific', |
{ name => 'response_specific', |
Line 1189 sub update_full_student_data {
|
Line 1187 sub update_full_student_data {
|
if (defined($resp_id) && |
if (defined($resp_id) && |
$field =~ /^(tries| |
$field =~ /^(tries| |
awarddetail| |
awarddetail| |
awarded| |
|
submission| |
submission| |
submissiongrading| |
submissiongrading| |
molecule)$/x) { |
molecule)$/x) { |
Line 1256 sub update_full_student_data {
|
Line 1253 sub update_full_student_data {
|
$transaction, |
$transaction, |
$data->{'tries'}, |
$data->{'tries'}, |
$data->{'awarddetail'}, |
$data->{'awarddetail'}, |
$data->{'awarded'}, |
|
$data->{'response_specific'}, |
$data->{'response_specific'}, |
$data->{'response_specific_value'}, |
$data->{'response_specific_value'}, |
$data->{'submission'})."'),"; |
$data->{'submission'})."'),"; |
Line 1437 sub store_student_data {
|
Line 1433 sub store_student_data {
|
chop $store_performance_command; |
chop $store_performance_command; |
chop $store_performance_command; |
chop $store_performance_command; |
my $start = Time::HiRes::time; |
my $start = Time::HiRes::time; |
|
$dbh->do($store_performance_command); |
|
if ($dbh->err()) { |
|
&Apache::lonnet::logthis(' bigass insert error:'.$dbh->errstr()); |
|
&Apache::lonnet::logthis('command = '.$store_performance_command); |
|
$returnstatus = 'error: unable to insert performance into database'; |
|
return ($returnstatus,$student_data); |
|
} |
$dbh->do($store_parameters_command) if ($num_parameters>0); |
$dbh->do($store_parameters_command) if ($num_parameters>0); |
if ($dbh->err()) { |
if ($dbh->err()) { |
&Apache::lonnet::logthis(' bigass insert error:'.$dbh->errstr()); |
&Apache::lonnet::logthis(' bigass insert error:'.$dbh->errstr()); |
Line 1446 sub store_student_data {
|
Line 1449 sub store_student_data {
|
$returnstatus = 'error: unable to insert parameters into database'; |
$returnstatus = 'error: unable to insert parameters into database'; |
return ($returnstatus,$student_data); |
return ($returnstatus,$student_data); |
} |
} |
$dbh->do($store_performance_command); |
|
if ($dbh->err()) { |
|
&Apache::lonnet::logthis(' bigass insert error:'.$dbh->errstr()); |
|
&Apache::lonnet::logthis('command = '.$store_performance_command); |
|
$returnstatus = 'error: unable to insert performance into database'; |
|
return ($returnstatus,$student_data); |
|
} |
|
$elapsed += Time::HiRes::time - $start; |
$elapsed += Time::HiRes::time - $start; |
return ($returnstatus,$student_data); |
return ($returnstatus,$student_data); |
} |
} |