version 1.112, 2004/01/19 16:31:25
|
version 1.112.2.1, 2004/03/09 21:42:01
|
Line 1225 sub update_full_student_data {
|
Line 1225 sub update_full_student_data {
|
# However, there is one wrinkle: submissions which end in |
# However, there is one wrinkle: submissions which end in |
# and odd number of '\' cause insert errors to occur. |
# and odd number of '\' cause insert errors to occur. |
# Best trap this somehow... |
# Best trap this somehow... |
$value =~ s/\'/\\\'/g; |
$value = $dbh->quote($value); |
my ($offensive_string) = ($value =~ /(\\+)$/); |
|
if (length($offensive_string) % 2) { |
|
$value =~ s/\\$/\\\\/; |
|
} |
|
} |
} |
if ($field eq 'submissiongrading' || |
if ($field eq 'submissiongrading' || |
$field eq 'molecule') { |
$field eq 'molecule') { |
Line 2075 sub get_response_data {
|
Line 2071 sub get_response_data {
|
} |
} |
my $dataset = $sth->fetchall_arrayref(); |
my $dataset = $sth->fetchall_arrayref(); |
if (ref($dataset) eq 'ARRAY' && scalar(@$dataset)>0) { |
if (ref($dataset) eq 'ARRAY' && scalar(@$dataset)>0) { |
|
# Clear the \'s from around the submission |
|
for (my $i =0;$i<scalar(@$dataset);$i++) { |
|
$dataset->[$i]->[3] =~ s/(\'$|^\')//g; |
|
} |
return $dataset; |
return $dataset; |
} |
} |
} |
} |