Diff for /loncom/interface/statistics/lonstudentassessment.pm between versions 1.8 and 1.11

version 1.8, 2002/08/13 00:37:18 version 1.11, 2002/09/01 06:23:19
Line 298  sub StudentReport { Line 298  sub StudentReport {
         return $Str;          return $Str;
     }      }
   
       my $hasVersion = 'false';
       my $hasFinalData = 'false';
     foreach my $sequence (@$showSequences) {      foreach my $sequence (@$showSequences) {
           my $hasData = 'false';
         my $characterCount=0;          my $characterCount=0;
         foreach my $problemID (split(':', $cache->{$sequence.':problems'})) {          foreach my $problemID (split(':', $cache->{$sequence.':problems'})) {
             my $problem = $cache->{$problemID.':problem'};              my $problem = $cache->{$problemID.':problem'};
Line 307  sub StudentReport { Line 310  sub StudentReport {
             # current problem in the correct order and prepare the output links              # current problem in the correct order and prepare the output links
             foreach(split(/\:/,$cache->{$sequence.':'.$problemID.              foreach(split(/\:/,$cache->{$sequence.':'.$problemID.
                                         ':parts'})) {                                          ':parts'})) {
                 $characterCount++;                  if($cache->{$name.':'.$problemID.':NoVersion'} eq 'true' ||
                 if(defined($cache->{$name.':'.$problemID.':NoVersion'}) ||                     $cache->{$name.':'.$problemID.':'.$_.':code'} eq ' ' ||
                    $cache->{$name.':'.$problemID.':'.$_.':code'} eq ' ') {                     $cache->{$name.':'.$problemID.':'.$_.':code'} eq '') {
                     $Str .= ' ';                      $Str .= ' ';
                       $characterCount++;
                     next;                      next;
                 }                  }
                   $hasVersion = 'true';
                   $hasData = 'true';
                 $Str .= '<a href="/adm/grades?symb=';                  $Str .= '<a href="/adm/grades?symb=';
                 $Str .= &Apache::lonnet::escape($problem);                  $Str .= &Apache::lonnet::escape($problem);
                 $Str .= '&student='.$username.'&domain='.$domain;                  $Str .= '&student='.$username.'&domain='.$domain;
Line 323  sub StudentReport { Line 329  sub StudentReport {
                     $code = $tries;                      $code = $tries;
                 }                  }
                 $Str .= $code;                  $Str .= $code;
                 $Str.='</a>';                  $Str .= '</a>';
                   $characterCount++;
             }              }
         }          }
   
Line 336  sub StudentReport { Line 343  sub StudentReport {
   
  my $outputProblemsCorrect = sprintf("%3d", $cache->{$name.':'.$sequence.   my $outputProblemsCorrect = sprintf("%3d", $cache->{$name.':'.$sequence.
                                                             ':problemsCorrect'});                                                              ':problemsCorrect'});
  $Str .= '<font color="#007700">'.$outputProblemsCorrect.'</font>';          if($hasData eq 'true') {
               $Str .= '<font color="#007700">'.$outputProblemsCorrect.'</font>';
               $hasFinalData = 'true';
           } else {
               $Str .= '<font color="#007700">   </font>';
           }
         $Str .= $spacing;          $Str .= $spacing;
     }      }
   
Line 345  sub StudentReport { Line 357  sub StudentReport {
     # a way to dynamically determine the space requirements.      # a way to dynamically determine the space requirements.
     my $outputProblemsSolved = sprintf("%4d", $cache->{$name.':problemsSolved'});      my $outputProblemsSolved = sprintf("%4d", $cache->{$name.':problemsSolved'});
     my $outputTotalProblems  = sprintf("%4d", $cache->{$name.':totalProblems'});      my $outputTotalProblems  = sprintf("%4d", $cache->{$name.':totalProblems'});
     $Str .= '<font color="#000088">'.$outputProblemsSolved.      if($hasFinalData eq 'true') {
           $Str .= '<font color="#000088">'.$outputProblemsSolved.
     ' / '.$outputTotalProblems.'</font>';      ' / '.$outputTotalProblems.'</font>';
       } else {
           $Str .= '<font color="#000088">           </font>';
       }
   
       if($hasVersion eq 'false') {
           $Str = '<b><font color="blue">No course data.</font></b>';
       }
   
     return $Str;      return $Str;
 }  }

Removed from v.1.8  
changed lines
  Added in v.1.11


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