Diff for /loncom/interface/statistics/lonstudentassessment.pm between versions 1.174 and 1.178

version 1.174, 2014/03/28 14:43:26 version 1.178, 2025/06/28 14:34:53
Line 605  sub count_parts { Line 605  sub count_parts {
 sub get_resources {  sub get_resources {
     my ($navmap,$sequence) = @_;      my ($navmap,$sequence) = @_;
     my @resources = $navmap->retrieveResources($sequence,      my @resources = $navmap->retrieveResources($sequence,
                                                sub { shift->is_problem(); },                                                 sub { shift->is_gradable(); },
                                                0,0,0);                                                 0,0,0);
     return @resources;      return @resources;
 }  }
Line 744  NEW_WINDOW_CHECKBOX Line 744  NEW_WINDOW_CHECKBOX
                             length($title)                              length($title)
                             )).$padding;                              )).$padding;
     }      }
     $total_sum_width = length($total_count)+1;      $total_sum_width = length($total_count);
       if ($total_sum_width < 6) {
           $total_sum_width = 6;
       }
     $Str .= "    total</pre>\n";      $Str .= "    total</pre>\n";
     $Str .= "<pre>";      $Str .= "<pre>";
   
Line 938  sub html_outputstudent { Line 941  sub html_outputstudent {
         $score = sprintf("%.2f",$score);          $score = sprintf("%.2f",$score);
         $score = (' 'x(6-length($score))).$score;          $score = (' 'x(6-length($score))).$score;
     }      }
       $max = sprintf("%.2f",$max);
     $Str .= ' '.' 'x($total_sum_width-length($score)).$score.' / '.$max;      $Str .= ' '.' 'x($total_sum_width-length($score)).$score.' / '.$max;
     $Str .= " \n";      $Str .= " \n";
     #      #
Line 2085  sub student_performance_on_sequence { Line 2089  sub student_performance_on_sequence {
                 $awarded = 0 if (! $awarded);                  $awarded = 0 if (! $awarded);
                 $hasdata = 1;                  $hasdata = 1;
             }              }
               my $latefrac;
               if (exists($resource_data->{'resource.'.$part.'.latefrac'})) {
                   $latefrac = $resource_data->{'resource.'.$part.'.latefrac'};
               }
             #              #
             $partscore = &Apache::grades::compute_points($weight,$awarded);              $partscore = &Apache::grades::compute_points($weight,$awarded,$latefrac);
             if (! defined($awarded)) {              if (! defined($awarded)) {
                 $partscore = undef;                  $partscore = undef;
             }              }
Line 2144  sub student_performance_on_sequence { Line 2152  sub student_performance_on_sequence {
     }      }
     if ($randompick) {      if ($randompick) {
         my @uniquetotals = keys(%ptsfreq);          my @uniquetotals = keys(%ptsfreq);
         if ((@uniquetotals = 1) && ($ptsfreq{$uniquetotals[0]} > 0)) {          if ((@uniquetotals == 1) && ($ptsfreq{$uniquetotals[0]} > 0)) {
             $max = $max * $randompick/$ptsfreq{$uniquetotals[0]};              $max = $max * $randompick/$ptsfreq{$uniquetotals[0]};
         }          }
     }      }

Removed from v.1.174  
changed lines
  Added in v.1.178


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