Diff for /loncom/interface/lonquickgrades.pm between versions 1.118 and 1.119

version 1.118, 2020/09/01 03:35:54 version 1.119, 2020/09/01 03:39:38
Line 246  ENDCLOSE Line 246  ENDCLOSE
     my $showCategories=      my $showCategories=
         $env{'course.'.$env{'request.course.id'}.'.grading'} eq 'categories';          $env{'course.'.$env{'request.course.id'}.'.grading'} eq 'categories';
   
     my ($navmap,$totalParts,$totalPossible,$totalRight,$totalAttempted,$topLevelParts,$topLevelRight,$topLevelAttempted)=      my ($navmap,$totalParts,$totalPossible,$totalRight,$totalAttempted,$topLevelParts,
        &getData($showPoints,$uname,$udom);          $topLevelRight,$topLevelAttempted) = &getData($showPoints,$uname,$udom);
   
     if (ref($navmap)) {      if (ref($navmap)) {
         if ($showCategories) {          if ($showCategories) {
             &outputCategories($r,$showPoints,$notshowTotals,              &outputCategories($r,$showPoints,$notshowTotals,$navmap,$totalParts,$totalPossible,
                 $navmap,$totalParts,$totalPossible,$totalRight,$totalAttempted,$topLevelParts,$topLevelRight,$topLevelAttempted);                                $totalRight,$totalAttempted,$topLevelParts,$topLevelRight,
                                 $topLevelAttempted);
         } else {          } else {
             &outputTable($r,$showPoints,$notshowTotals,              &outputTable($r,$showPoints,$notshowTotals,$navmap,$totalParts,$totalPossible,
                 $navmap,$totalParts,$totalPossible,$totalRight,$totalAttempted,$topLevelParts,$topLevelRight,$topLevelAttempted);                           $totalRight,$totalAttempted,$topLevelParts,$topLevelRight,
                            $topLevelAttempted);
         }          }
     } else {      } else {
         if ($cangrade) { $r->print("\n</form>\n"); }          if ($cangrade) { $r->print("\n</form>\n"); }
Line 266  ENDCLOSE Line 268  ENDCLOSE
     if ($cangrade) { $r->print("\n</form>\n"); }      if ($cangrade) { $r->print("\n</form>\n"); }
     &endGradeScreen($r);      &endGradeScreen($r);
     return OK;      return OK;
   
 }  }
   
 sub grades_blocked {  sub grades_blocked {
Line 338  sub startGradeScreen { Line 339  sub startGradeScreen {
         (($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')
       || ($env{'course.'.$env{'request.course.id'}.'.grading'} eq 'categories'));        || ($env{'course.'.$env{'request.course.id'}.'.grading'} eq 'categories'));
     my $notshowTotals=      my $notshowTotals =
         $env{'course.'.$env{'request.course.id'}.'.grading'} eq 'externalnototals';          $env{'course.'.$env{'request.course.id'}.'.grading'} eq 'externalnototals';
     my $showSPRSlink =      my $showSPRSlink =
         $env{'course.'.$env{'request.course.id'}.'.grading'} eq 'spreadsheet';          $env{'course.'.$env{'request.course.id'}.'.grading'} eq 'spreadsheet';
     my $showCategories=      my $showCategories =
         $env{'course.'.$env{'request.course.id'}.'.grading'} eq 'categories';          $env{'course.'.$env{'request.course.id'}.'.grading'} eq 'categories';
     
     my $allowed_to_view = &Apache::lonnet::allowed('vgr',$env{'request.course.id'});      my $allowed_to_view = &Apache::lonnet::allowed('vgr',$env{'request.course.id'});
Line 402  sub startGradeScreen { Line 403  sub startGradeScreen {
 }  }
   
 sub endGradeScreen {  sub endGradeScreen {
    my ($r)=@_;      my ($r)=@_;
    $r->print('</div></div></div>'.&Apache::loncommon::end_page());      $r->print('</div></div></div>'.&Apache::loncommon::end_page());
    return;      return;
 }  }
   
 # -----------  # -----------
Line 487  sub getData { Line 488  sub getData {
     my $depth = 1;      my $depth = 1;
     $iterator->next(); # ignore first BEGIN_MAP      $iterator->next(); # ignore first BEGIN_MAP
     my $curRes = $iterator->next();      my $curRes = $iterator->next();
       
     # General overview of the following: Walk along the course resources.      # General overview of the following: Walk along the course resources.
     # For every problem in the resource, tell its parent maps how many      # For every problem in the resource, tell its parent maps how many
     # parts and how many parts correct it has. After that, each map will      # parts and how many parts correct it has. After that, each map will
Line 601  sub getData { Line 602  sub getData {
         }          }
         $curRes = $iterator->next();          $curRes = $iterator->next();
     }      }
     return ($navmap,$totalParts,$totalPossible,$totalRight,$totalAttempted,$topLevelParts,$topLevelRight,$topLevelAttempted);      return ($navmap,$totalParts,$totalPossible,$totalRight,$totalAttempted,
               $topLevelParts,$topLevelRight,$topLevelAttempted);
 }  }
   
 #  #
Line 610  sub getData { Line 612  sub getData {
   
 sub outputTable {  sub outputTable {
   
     my ($r,$showPoints,$notshowTotals,      my ($r,$showPoints,$notshowTotals,$navmap,$totalParts,$totalPossible,$totalRight,
            $navmap,$totalParts,$totalPossible,$totalRight,$totalAttempted,$topLevelParts,$topLevelRight,$topLevelAttempted)=@_;          $totalAttempted,$topLevelParts,$topLevelRight,$topLevelAttempted)=@_;
   
     my @start = (255, 255, 192);      my @start = (255, 255, 192);
     my @end   = (0, 192, 0);      my @end   = (0, 192, 0);

Removed from v.1.118  
changed lines
  Added in v.1.119


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