version 1.112, 2004/01/19 16:31:25
|
version 1.112.2.2, 2004/04/30 20:09:18
|
Line 581 sub init_dbs {
|
Line 581 sub init_dbs {
|
restrictions => 'NOT NULL', |
restrictions => 'NOT NULL', |
auto_inc => 'yes', }, |
auto_inc => 'yes', }, |
{ name => 'part', |
{ name => 'part', |
type => 'VARCHAR(100)', |
type => 'VARCHAR(100) BINARY', |
restrictions => 'NOT NULL'}, |
restrictions => 'NOT NULL'}, |
], |
], |
'PRIMARY KEY' => ['part (100)'], |
'PRIMARY KEY' => ['part (100)'], |
Line 596 sub init_dbs {
|
Line 596 sub init_dbs {
|
restrictions => 'NOT NULL', |
restrictions => 'NOT NULL', |
auto_inc => 'yes', }, |
auto_inc => 'yes', }, |
{ name => 'student', |
{ name => 'student', |
type => 'VARCHAR(100)', |
type => 'VARCHAR(100) BINARY', |
restrictions => 'NOT NULL'}, |
restrictions => 'NOT NULL'}, |
{ name => 'classification', |
{ name => 'classification', |
type => 'varchar(100)', }, |
type => 'varchar(100) BINARY', }, |
], |
], |
'PRIMARY KEY' => ['student (100)'], |
'PRIMARY KEY' => ['student (100)'], |
'KEY' => [{ columns => ['student_id']},], |
'KEY' => [{ columns => ['student_id']},], |
Line 616 sub init_dbs {
|
Line 616 sub init_dbs {
|
{ name => 'fullupdatetime', |
{ name => 'fullupdatetime', |
type => 'INT UNSIGNED'}, |
type => 'INT UNSIGNED'}, |
{ name => 'section', |
{ name => 'section', |
type => 'VARCHAR(100)'}, |
type => 'VARCHAR(100) BINARY'}, |
{ name => 'classification', |
{ name => 'classification', |
type => 'VARCHAR(100)', }, |
type => 'VARCHAR(100) BINARY', }, |
], |
], |
'PRIMARY KEY' => ['student_id'], |
'PRIMARY KEY' => ['student_id'], |
}; |
}; |
Line 636 sub init_dbs {
|
Line 636 sub init_dbs {
|
type => 'MEDIUMINT UNSIGNED', |
type => 'MEDIUMINT UNSIGNED', |
restrictions => 'NOT NULL' }, |
restrictions => 'NOT NULL' }, |
{ name => 'part', |
{ name => 'part', |
type => 'VARCHAR(100)', |
type => 'VARCHAR(100) BINARY', |
restrictions => 'NOT NULL'}, |
restrictions => 'NOT NULL'}, |
{ name => 'solved', |
{ name => 'solved', |
type => 'TINYTEXT' }, |
type => 'TINYTEXT' }, |
Line 716 sub init_dbs {
|
Line 716 sub init_dbs {
|
{ name => 'awarddetail', |
{ name => 'awarddetail', |
type => 'TINYTEXT' }, |
type => 'TINYTEXT' }, |
# { name => 'message', |
# { name => 'message', |
# type => 'CHAR' }, |
# type => 'CHAR BINARY' }, |
{ name => 'response_specific', |
{ name => 'response_specific', |
type => 'TINYTEXT' }, |
type => 'TINYTEXT' }, |
{ name => 'response_specific_value', |
{ name => 'response_specific_value', |
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; |
} |
} |
} |
} |