version 1.150, 2005/10/04 18:27:32
|
version 1.151, 2005/11/11 23:23:24
|
Line 1291 sub store_student_data {
|
Line 1291 sub store_student_data {
|
while (my ($parameter,$value) = each(%$param_hash)) { |
while (my ($parameter,$value) = each(%$param_hash)) { |
next if ($parameter !~ /^resource\.(.*)\.(solved|awarded)$/); |
next if ($parameter !~ /^resource\.(.*)\.(solved|awarded)$/); |
my $part = $1; |
my $part = $1; |
|
next if ($part =~ /\./); |
next if (exists($stored{$part})); |
next if (exists($stored{$part})); |
$stored{$part}++; |
$stored{$part}++; |
# |
# |
Line 2260 sub count_stats {
|
Line 2261 sub count_stats {
|
$request = |
$request = |
'CREATE TEMPORARY TABLE '.$stats_table.' '. |
'CREATE TEMPORARY TABLE '.$stats_table.' '. |
'SELECT a.student_id,'. |
'SELECT a.student_id,'. |
'COUNT(a.award) AS count FROM '. |
'SUM(a.awarded) AS count FROM '. |
$performance_table.' AS a '. |
$performance_table.' AS a '. |
'LEFT JOIN '.$student_table.' AS b ON a.student_id=b.student_id '. |
'LEFT JOIN '.$student_table.' AS b ON a.student_id=b.student_id '. |
'WHERE ('.$symb_restriction.')'. |
'WHERE ('.$symb_restriction.')'; |
" AND a.award!='INCORRECT_ATTEMPTED'"; |
|
if ($time_limits) { |
if ($time_limits) { |
$request .= ' AND '.$time_limits; |
$request .= ' AND '.$time_limits; |
} |
} |