version 1.285, 2005/04/18 21:10:41
|
version 1.286, 2005/04/18 22:33:38
|
Line 347 sub finalize_storage {
|
Line 347 sub finalize_storage {
|
# and corrects for each part for an instance of a problem, as appropriate. |
# and corrects for each part for an instance of a problem, as appropriate. |
sub store_aggregates { |
sub store_aggregates { |
my ($symb,$courseid) = @_; |
my ($symb,$courseid) = @_; |
my %aggregate = (); |
my %aggregate; |
my @parts = (); |
my @parts; |
my ($cdomain,$cname) = split/_/,$courseid; |
my ($cdomain,$cname) = split(/_/,$courseid); |
foreach my $key (keys %Apache::lonhomework::results) { |
foreach my $key (keys(%Apache::lonhomework::results)) { |
if ($key =~ /resource\.(\d+)\.tries/) { |
if ($key =~ /resource\.(\d+)\.tries/) { |
push @parts, $1; |
push(@parts, $1); |
} |
} |
} |
} |
foreach (@parts) { |
foreach my $part (@parts) { |
if ($Apache::lonhomework::results{'resource.'.$_.'.award'} eq 'APPROX_ANS' || $Apache::lonhomework::results{'resource.'.$_.'.award'} eq 'EXACT_ANS') { |
if ($Apache::lonhomework::results{'resource.'.$part.'.award'} |
$aggregate{$symb.'_'.$_.'_correct'} = 1; |
eq 'APPROX_ANS' || |
|
$Apache::lonhomework::results{'resource.'.$part.'.award'} |
|
eq 'EXACT_ANS') { |
|
$aggregate{$symb.'_'.$part.'_correct'} = 1; |
} |
} |
if ($Apache::lonhomework::results{'resource.'.$_.'.tries'} == 1) { |
if ($Apache::lonhomework::results{'resource.'.$part.'.tries'} == 1) { |
$aggregate{$symb.'_'.$_.'_users'} = 1; |
$aggregate{$symb.'_'.$part.'_users'} = 1; |
} |
} |
$aggregate{$symb.'_'.$_.'_attempts'} = 1; |
$aggregate{$symb.'_'.$part.'_attempts'} = 1; |
} |
} |
&Apache::lonnet::cinc('nohist_resourcetracker',\%aggregate,$cdomain,$cname); |
&Apache::lonnet::cinc('nohist_resourcetracker',\%aggregate, |
|
$cdomain,$cname); |
} |
} |
|
|
sub checkout_msg { |
sub checkout_msg { |