Diff for /loncom/interface/statistics/lonstudentassessment.pm between versions 1.24 and 1.25

version 1.24, 2003/01/03 23:54:05 version 1.25, 2003/01/09 15:59:17
Line 425  sub StudentAverageTotal { Line 425  sub StudentAverageTotal {
  $ProblemsSolved += $cache->{$name.':problemsSolved'};   $ProblemsSolved += $cache->{$name.':problemsSolved'};
         $TotalProblems += $cache->{$name.':totalProblems'};          $TotalProblems += $cache->{$name.':totalProblems'};
     }      }
     $ProblemsSolved /= $StudentCount;      if ($StudentCount) { 
     $TotalProblems /= $StudentCount;          $ProblemsSolved /= $StudentCount;
               $TotalProblems /= $StudentCount;
       } else {
           $ProblemsSolved = 0;
           $TotalProblems  = 0;
       }
     $Str .= '<table border=2 cellspacing="1">'."\n";      $Str .= '<table border=2 cellspacing="1">'."\n";
     $Str .= '<tr><td><b>Students Count</b></td><td><b>'.      $Str .= '<tr><td><b>Students Count</b></td><td><b>'.
             $StudentCount.'</b></td></tr>'."\n";              $StudentCount.'</b></td></tr>'."\n";
Line 446  sub StudentAverageTotal { Line 450  sub StudentAverageTotal {
  #my @problems=split(':', $cache->{$S.':problems'});   #my @problems=split(':', $cache->{$S.':problems'});
  #my $pCount=scalar @problems;   #my $pCount=scalar @problems;
  my $pCount=MaxSeqPr($cache,@$students[0],$S);   my $pCount=MaxSeqPr($cache,@$students[0],$S);
  my $crr=sprintf( "%.2f", $Correct{$S}/$StudentCount );          my $crr;
    if ($StudentCount) {
               $crr=sprintf( "%.2f", $Correct{$S}/$StudentCount );
           } else {
               $crr="0.00";
           }
         $Str .= '<tr><td>'.$title.          $Str .= '<tr><td>'.$title.
                 '</td><td align=center>'.$pCount.                  '</td><td align=center>'.$pCount.
                 '</td><td align=center>'.$crr.                  '</td><td align=center>'.$crr.

Removed from v.1.24  
changed lines
  Added in v.1.25


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>