--- loncom/interface/loncoursedata.pm 2005/10/04 18:27:32 1.150 +++ loncom/interface/loncoursedata.pm 2005/11/11 23:23:24 1.151 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: loncoursedata.pm,v 1.150 2005/10/04 18:27:32 albertel Exp $ +# $Id: loncoursedata.pm,v 1.151 2005/11/11 23:23:24 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1291,6 +1291,7 @@ sub store_student_data { while (my ($parameter,$value) = each(%$param_hash)) { next if ($parameter !~ /^resource\.(.*)\.(solved|awarded)$/); my $part = $1; + next if ($part =~ /\./); next if (exists($stored{$part})); $stored{$part}++; # @@ -2260,11 +2261,10 @@ sub count_stats { $request = 'CREATE TEMPORARY TABLE '.$stats_table.' '. 'SELECT a.student_id,'. - 'COUNT(a.award) AS count FROM '. + 'SUM(a.awarded) AS count FROM '. $performance_table.' AS a '. 'LEFT JOIN '.$student_table.' AS b ON a.student_id=b.student_id '. - 'WHERE ('.$symb_restriction.')'. - " AND a.award!='INCORRECT_ATTEMPTED'"; + 'WHERE ('.$symb_restriction.')'; if ($time_limits) { $request .= ' AND '.$time_limits; }