Diff for /loncom/interface/lonquickgrades.pm between versions 1.96 and 1.97

version 1.96, 2011/06/01 20:32:30 version 1.97, 2011/06/01 21:32:50
Line 244  sub getData { Line 244  sub getData {
             for my $part (@{$parts}) {              for my $part (@{$parts}) {
  my $completionStatus = $curRes->getCompletionStatus($part);   my $completionStatus = $curRes->getCompletionStatus($part);
  my $dateStatus = $curRes->getDateStatus($part);   my $dateStatus = $curRes->getDateStatus($part);
                   my $weight = $curRes->weight($part);
                   my $problemstatus = $curRes->problemstatus($part);
   
                 if ($completionStatus == $curRes->EXCUSED()) {                  if ($completionStatus == $curRes->EXCUSED()) {
                     next;                      next;
                 }                  }
Line 252  sub getData { Line 254  sub getData {
     my $score = 0;      my $score = 0;
     # If we're not telling status and the answer date isn't passed yet,       # If we're not telling status and the answer date isn't passed yet, 
     # it's an "attempted" point      # it's an "attempted" point
     if ((($curRes->problemstatus($part) eq 'no') ||      if ((($problemstatus eq 'no') ||
                         ($curRes->problemstatus($part) eq 'no_feedback_ever')) &&                           ($problemstatus eq 'no_feedback_ever')) &&
  ($dateStatus != $curRes->ANSWER_OPEN)) {   ($dateStatus != $curRes->ANSWER_OPEN)) {
  my $status = $curRes->simpleStatus($part);   my $status = $curRes->simpleStatus($part);
  if ($status == $curRes->ATTEMPTED) {   if ($status == $curRes->ATTEMPTED) {
     $partsAttempted += $curRes->weight($part);      $partsAttempted += $weight;
     $totalAttempted += $partsAttempted;      $totalAttempted += $partsAttempted;
  }   }
     } else {      } else {
  $score = &Apache::grades::compute_points($curRes->weight($part), $curRes->awarded($part));   $score = &Apache::grades::compute_points($weight, $curRes->awarded($part));
     }      }
     $partsRight += $score;      $partsRight += $score;
     $totalRight += $score;      $totalRight += $score;
     $partsCount += $curRes->weight($part);      $partsCount += $weight;
   
                     $curRes->{DATA}->{PROB_SCORE}  += $score;                      $curRes->{DATA}->{PROB_SCORE}  += $score;
                     $curRes->{DATA}->{PROB_WEIGHT} += $curRes->weight($part);                      $curRes->{DATA}->{PROB_WEIGHT} += $weight;
   
     if ($curRes->opendate($part) < $now) {      if ($curRes->opendate($part) < $now) {
  $totalPossible += $curRes->weight($part);   $totalPossible += $weight;
                         $curRes->{DATA}->{PROB_POSSIBLE} += $curRes->weight($part);                          $curRes->{DATA}->{PROB_POSSIBLE} += $weight;
     }      }
     $totalParts += $curRes->weight($part);      $totalParts += $weight;
  } else {   } else {
     my $status = $curRes->simpleStatus($part);      my $status = $curRes->simpleStatus($part);
     my $thisright = 0;      my $thisright = 0;
Line 291  sub getData { Line 293  sub getData {
  $totalAttempted++;   $totalAttempted++;
     }      }
           
     my $dateStatus = $curRes->getDateStatus($part);  
     $totalParts++;      $totalParts++;
     if ($curRes->opendate($part) < $now) {      if ($curRes->opendate($part) < $now) {
  $totalPossible++;   $totalPossible++;

Removed from v.1.96  
changed lines
  Added in v.1.97


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