Diff for /loncom/homework/grades.pm between versions 1.91 and 1.95

version 1.91, 2003/05/30 21:20:20 version 1.95, 2003/06/12 20:11:07
Line 2035  sub editgrades { Line 2035  sub editgrades {
     $result .= '</tr><tr bgcolor="#deffff">';      $result .= '</tr><tr bgcolor="#deffff">';
     $result .= $header;      $result .= $header;
     $result .= '</tr>'."\n";      $result .= '</tr>'."\n";
       my $noupdate;
     for ($i=0; $i<$ENV{'form.total'}; $i++) {      for ($i=0; $i<$ENV{'form.total'}; $i++) {
    my $line;
  my $user = $ENV{'form.ctr'.$i};   my $user = $ENV{'form.ctr'.$i};
  my ($uname,$udom)=split(/:/,$user);   my $usercolon = $user;
    $usercolon =~s/_/:/;
    my ($uname,$udom)=split(/_/,$user);
  my %newrecord;   my %newrecord;
  my $updateflag = 0;   my $updateflag = 0;
   
  $result .= '<tr bgcolor="#ffffde"><td>'.$uname.'&nbsp;</td><td>'.   $line .= '<tr bgcolor="#ffffde"><td>'.$uname.'&nbsp;</td><td>'.
     $udom.'&nbsp;</td><td>'.      $udom.'&nbsp;</td><td>'.
  $$fullname{$user}.'&nbsp;</td>';   $$fullname{$usercolon}.'&nbsp;</td>';
  foreach (@partid) {   foreach (@partid) {
     my $old_aw    = $ENV{'form.GD_'.$user.'_'.$_.'_awarded_s'};      my $old_aw    = $ENV{'form.GD_'.$user.'_'.$_.'_awarded_s'};
     my $old_part_pcr = $old_aw/($weight{$_} ne '0' ? $weight{$_}:1);      my $old_part_pcr = $old_aw/($weight{$_} ne '0' ? $weight{$_}:1);
Line 2064  sub editgrades { Line 2067  sub editgrades {
     }      }
     $score = 'excused' if (($ENV{'form.GD_'.$user.'_'.$_.'_solved'} eq 'excused') &&      $score = 'excused' if (($ENV{'form.GD_'.$user.'_'.$_.'_solved'} eq 'excused') &&
    ($score ne 'excused'));     ($score ne 'excused'));
     $result .= '<td align="center">'.$old_aw.'&nbsp;</td>'.      $line .= '<td align="center">'.$old_aw.'&nbsp;</td>'.
  '<td align="center">'.$awarded.   '<td align="center">'.$awarded.
  ($score eq 'excused' ? $score : '').'&nbsp;</td>';   ($score eq 'excused' ? $score : '').'&nbsp;</td>';
   
Line 2087  sub editgrades { Line 2090  sub editgrades {
     $newrecord{'resource.'.$part.'regrader'}="$ENV{'user.name'}:$ENV{'user.domain'}";      $newrecord{'resource.'.$part.'regrader'}="$ENV{'user.name'}:$ENV{'user.domain'}";
     $updateflag=1;      $updateflag=1;
  }   }
  $result .= '<td align="center">'.$old_aw.'&nbsp;</td>'.   $line .= '<td align="center">'.$old_aw.'&nbsp;</td>'.
     '<td align="center">'.$awarded.'&nbsp;</td>';      '<td align="center">'.$awarded.'&nbsp;</td>';
     }      }
  }   }
  $result .= '</tr>'."\n";   $line.='</tr>'."\n";
  if ($updateflag) {   if ($updateflag) {
     $count++;      $count++;
     &Apache::lonnet::cstore(\%newrecord,$symb,$ENV{'request.course.id'},      &Apache::lonnet::cstore(\%newrecord,$symb,$ENV{'request.course.id'},
     $udom,$uname);      $udom,$uname);
       $result.=$line;
    } else {
       $noupdate.=$line;
  }   }
     }      }
       if ($noupdate) {
    $result .= '<tr bgcolor="#ffffff"><td align="center" colspan="7">No Changes Occured For the Students Below</td></tr>'.$noupdate;
       }
     $result .= '</table></td></tr></table>'."\n".      $result .= '</table></td></tr></table>'."\n".
  &show_grading_menu_form ($symb,$url);   &show_grading_menu_form ($symb,$url);
     my $msg = '<b>Number of records updated = '.$rec_update.      my $msg = '<b>Number of records updated = '.$rec_update.
Line 2581  sub getSymbMap { Line 2590  sub getSymbMap {
     $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;      my $ctr=0;
     while ($mapdepth > 0 && $ctr < 100) {      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++; }
   
  if (ref($mapcurRes) && $mapcurRes->is_problem() && !$mapcurRes->randomout) {   if (ref($mapcurRes) && $mapcurRes->is_problem() && !$mapcurRes->randomout) {
     $countProblems++;      $countProblems++;
  }   }
  $ctr++;   $mapcurRes = $mapiterator->next();
     }      }
     if ($countProblems > 0) {      if ($countProblems > 0) {
  my $title = $curRes->compTitle();   my $title = $curRes->compTitle();

Removed from v.1.91  
changed lines
  Added in v.1.95


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