Diff for /loncom/homework/grades.pm between versions 1.100 and 1.101

version 1.100, 2003/06/18 17:37:46 version 1.101, 2003/06/18 18:59:20
Line 2597  sub getSymbMap { Line 2597  sub getSymbMap {
     my $countProblems = 0;      my $countProblems = 0;
     $mapiterator->next(); # skip the first BEGIN_MAP      $mapiterator->next(); # skip the first BEGIN_MAP
     my $mapcurRes = $mapiterator->next(); # for "current resource"      my $mapcurRes = $mapiterator->next(); # for "current resource"
     my $ctr=0;  
     while ($mapdepth > 0) {      while ($mapdepth > 0) {
  if($mapcurRes == $mapiterator->BEGIN_MAP) { $mapdepth++; }   if($mapcurRes == $mapiterator->BEGIN_MAP) { $mapdepth++; }
  if($mapcurRes == $mapiterator->END_MAP) { $mapdepth--; }   if($mapcurRes == $mapiterator->END_MAP) { $mapdepth--; }
Line 2668  sub displayPage { Line 2667  sub displayPage {
  '<td align="center"><b>&nbsp;No&nbsp;</b></td>'.   '<td align="center"><b>&nbsp;No&nbsp;</b></td>'.
  '<td><b>&nbsp;'.($ENV{'form.vProb'} eq 'no' ? 'Title' : 'Problem View').'/Grade</b></td></tr>';   '<td><b>&nbsp;'.($ENV{'form.vProb'} eq 'no' ? 'Title' : 'Problem View').'/Grade</b></td></tr>';
   
     my ($depth,$ctr,$question) = (1,0,1);      my ($depth,$question) = (1,1);
     $iterator->next(); # skip the first BEGIN_MAP      $iterator->next(); # skip the first BEGIN_MAP
     my $curRes = $iterator->next(); # for "current resource"      my $curRes = $iterator->next(); # for "current resource"
     while ($depth > 0 && $ctr < 100) { # ctr, just in case it never gets out of loop      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--; }
   
Line 2756  sub displayPage { Line 2755  sub displayPage {
   
        }         }
         $curRes = $iterator->next();          $curRes = $iterator->next();
  $ctr++;  
     }      }
   
     $navmap->untieHashes();      $navmap->untieHashes();
Line 2804  sub updateGradeByPage { Line 2802  sub updateGradeByPage {
   
     $iterator->next(); # skip the first BEGIN_MAP      $iterator->next(); # skip the first BEGIN_MAP
     my $curRes = $iterator->next(); # for "current resource"      my $curRes = $iterator->next(); # for "current resource"
     my ($depth,$ctr,$question,$changeflag)= (1,0,1,0);      my ($depth,$question,$changeflag)= (1,1,0);
     while ($depth > 0 && $ctr < 100) { # ctr, just in case it never gets out of loop      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--; }
   
Line 2867  sub updateGradeByPage { Line 2865  sub updateGradeByPage {
   
  }   }
         $curRes = $iterator->next();          $curRes = $iterator->next();
  $ctr++;  
     }      }
   
     $navmap->untieHashes();      $navmap->untieHashes();

Removed from v.1.100  
changed lines
  Added in v.1.101


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