[LON-CAPA-cvs] cvs: loncom /interface/statistics lonstudentassessment.pm
matthew
lon-capa-cvs@mail.lon-capa.org
Fri, 11 Mar 2005 20:26:32 -0000
matthew Fri Mar 11 15:26:32 2005 EDT
Modified files:
/loncom/interface/statistics lonstudentassessment.pm
Log:
Bug 4004: Mis-aligned headings in tries output of chart.
Also minor code cleanups and reduction in debugging spew.
Index: loncom/interface/statistics/lonstudentassessment.pm
diff -u loncom/interface/statistics/lonstudentassessment.pm:1.117 loncom/interface/statistics/lonstudentassessment.pm:1.118
--- loncom/interface/statistics/lonstudentassessment.pm:1.117 Thu Mar 10 12:33:58 2005
+++ loncom/interface/statistics/lonstudentassessment.pm Fri Mar 11 15:26:32 2005
@@ -1,6 +1,6 @@
# The LearningOnline Network with CAPA
#
-# $Id: lonstudentassessment.pm,v 1.117 2005/03/10 17:33:58 matthew Exp $
+# $Id: lonstudentassessment.pm,v 1.118 2005/03/11 20:26:32 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -177,7 +177,6 @@
my $initialize = \&html_initialize;
my $output_student = \&html_outputstudent;
my $finish = \&html_finish;
- &Apache::lonnet::logthis('got here! 1');
#
if ($output_mode eq 'excel') {
$initialize = \&excel_initialize;
@@ -189,7 +188,6 @@
$finish = \&csv_finish;
}
#
- &Apache::lonnet::logthis('got here! 2');
if($c->aborted()) { return ; }
#
# Determine which students we want to look at
@@ -214,7 +212,6 @@
#
# Call the initialize routine selected above
$initialize->($r);
- &Apache::lonnet::logthis('got here! 3');
foreach my $student (@Students) {
if($c->aborted()) {
$finish->($r);
@@ -683,7 +680,7 @@
# Use 1 digit for a space
$width{$symb}->{'width_sum'} += 1;
}
- $total_count += $width{$symb}->{'num_assess_parts'};
+ $total_count += &count_parts($navmap,$seq);
# Use 3 digits for the sum
$width{$symb}->{'width_sum'} += 3;
}
@@ -763,7 +760,7 @@
my $studentstats;
my $PerformanceStr = '';
foreach my $seq (@sequences) {
- &Apache::lonnet::logthis('computing student data for '.$seq->compTitle);
+ my $symb = $seq->symb;
my ($performance,$performance_length,$score,$seq_max,$rawdata);
if ($chosen_output->{'tries'}) {
($performance,$performance_length,$score,$seq_max,$rawdata) =
@@ -775,7 +772,8 @@
$navmap,$seq,$show_links);
}
my $ratio='';
- if ($chosen_output->{'every_problem'}) {
+ if ($chosen_output->{'every_problem'} &&
+ $chosen_output->{'sequence_sum'}) {
$ratio .= ' ';
}
if ($chosen_output->{'sequence_sum'} && $score ne ' ') {
@@ -795,15 +793,15 @@
$performance = '';
$performance_length=0;
}
- $performance .= ' 'x($width{$seq->symb}->{'width_total'} -
+ $performance .= ' 'x($width{$symb}->{'width_total'} -
$performance_length -
- $width{$seq->symb}->{'width_sum'}).
+ $width{$symb}->{'width_sum'}).
$ratio;
#
$Str .= $performance.$padding;
#
- $studentstats->{$seq->symb}->{'score'}= $score;
- $studentstats->{$seq->symb}->{'max'} = $seq_max;
+ $studentstats->{$symb}->{'score'}= $score;
+ $studentstats->{$symb}->{'max'} = $seq_max;
}
#
# Total it up and store the statistics info.