version 1.142, 2005/02/28 20:00:23
|
version 1.143, 2005/03/01 00:07:20
|
Line 2218 Returns: the sum of the score on the pro
|
Line 2218 Returns: the sum of the score on the pro
|
######################################################## |
######################################################## |
######################################################## |
######################################################## |
sub get_sum_of_scores { |
sub get_sum_of_scores { |
my ($resource,$part,$students,$courseid,$starttime,$endtime) = @_; |
my ($symb,$part,$students,$courseid,$starttime,$endtime) = @_; |
if (! defined($courseid)) { |
if (! defined($courseid)) { |
$courseid = $ENV{'request.course.id'}; |
$courseid = $ENV{'request.course.id'}; |
} |
} |
Line 2237 sub get_sum_of_scores {
|
Line 2237 sub get_sum_of_scores {
|
my $request = 'SELECT SUM(a.awarded*w.weight),SUM(w.weight) FROM '. |
my $request = 'SELECT SUM(a.awarded*w.weight),SUM(w.weight) FROM '. |
$performance_table.' AS a '. |
$performance_table.' AS a '. |
'NATURAL LEFT JOIN '.$weight_table.' AS w '; |
'NATURAL LEFT JOIN '.$weight_table.' AS w '; |
$request .= 'WHERE a.symb_id='.&get_symb_id($resource->{'symb'}). |
$request .= 'WHERE a.symb_id='.&get_symb_id($symb). |
' AND a.part_id='.&get_part_id($part); |
' AND a.part_id='.&get_part_id($part); |
if (defined($time_limits)) { |
if (defined($time_limits)) { |
$request .= ' AND '.$time_limits; |
$request .= ' AND '.$time_limits; |