Diff for /loncom/interface/lonquickgrades.pm between versions 1.82 and 1.83

version 1.82, 2011/03/26 22:37:47 version 1.83, 2011/03/28 01:26:39
Line 62  sub real_handler { Line 62  sub real_handler {
     $r->send_http_header;      $r->send_http_header;
   
     my $showPoints =      my $showPoints =
         $env{'course.'.$env{'request.course.id'}.'.grading'} eq 'standard';          (($env{'course.'.$env{'request.course.id'}.'.grading'} eq 'standard')
         || ($env{'course.'.$env{'request.course.id'}.'.grading'} eq 'categories'));
     my $notshowSPRSlink =      my $notshowSPRSlink =
         (($env{'course.'.$env{'request.course.id'}.'.grading'} eq 'external')          (($env{'course.'.$env{'request.course.id'}.'.grading'} eq 'external')
       || ($env{'course.'.$env{'request.course.id'}.'.grading'} eq 'externalnototals'));        || ($env{'course.'.$env{'request.course.id'}.'.grading'} eq 'externalnototals'));
Line 266  sub getData { Line 267  sub getData {
     $totalRight += $score;      $totalRight += $score;
     $partsCount += $curRes->weight($part);      $partsCount += $curRes->weight($part);
   
                       $curRes->{DATA}->{PROB_SCORE}  += $score;
                       $curRes->{DATA}->{PROB_WEIGHT} += $curRes->weight($part);
   
     if ($curRes->opendate($part) < $now) {      if ($curRes->opendate($part) < $now) {
  $totalPossible += $curRes->weight($part);   $totalPossible += $curRes->weight($part);
                           $curRes->{DATA}->{PROB_POSSIBLE} += $curRes->weight($part);
     }      }
     $totalParts += $curRes->weight($part);      $totalParts += $curRes->weight($part);
  } else {   } else {
Line 470  sub outputCategories { Line 475  sub outputCategories {
 #    my %data=&dumpdata($navmap);  #    my %data=&dumpdata($navmap);
 #    foreach (keys(%data)) {  #    foreach (keys(%data)) {
 #        $r->print("\n<br />".$_.'='.$data{$_});  #        $r->print("\n<br />".$_.'='.$data{$_});
 #     }  #    }
 }  }
   
 #  #
Line 491  sub dumpdata { Line 496  sub dumpdata {
     while ($depth > 0) {      while ($depth > 0) {
         if ($curRes == $iterator->BEGIN_MAP()) {$depth++;}          if ($curRes == $iterator->BEGIN_MAP()) {$depth++;}
         if ($curRes == $iterator->END_MAP()) { $depth--; }          if ($curRes == $iterator->END_MAP()) { $depth--; }
         if (ref($curRes) && $curRes->is_map()) {          if (ref($curRes)) {
             $returndata{$curRes->symb()}=$curRes->{DATA}->{CHILD_PARTS}.':'.$curRes->{DATA}->{CHILD_ATTEMPTED}.':'.$curRes->{DATA}->{CHILD_CORRECT};              if ($curRes->is_map()) {
                   $returndata{$curRes->symb()}='folder:'.$curRes->{DATA}->{CHILD_PARTS}.':'.$curRes->{DATA}->{CHILD_ATTEMPTED}.':'.$curRes->{DATA}->{CHILD_CORRECT};
               } else {
                   $returndata{$curRes->symb()}='res:'.$curRes->{DATA}->{PROB_WEIGHT}.':'.$curRes->{DATA}->{PROB_POSSIBLE}.':'.$curRes->{DATA}->{PROB_SCORE};
               } 
         }          }
         $curRes = $iterator->next();          $curRes = $iterator->next();
     }      }

Removed from v.1.82  
changed lines
  Added in v.1.83


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