Diff for /loncom/homework/grades.pm between versions 1.247 and 1.248

version 1.247, 2005/02/17 08:58:16 version 1.248, 2005/02/18 23:36:12
Line 695  LISTJAVASCRIPT Line 695  LISTJAVASCRIPT
     (%status) =&student_gradeStatus($url,$symb,$udom,$uname,$partlist);      (%status) =&student_gradeStatus($url,$symb,$udom,$uname,$partlist);
     my $submitted = 0;      my $submitted = 0;
     my $graded = 0;      my $graded = 0;
       my $incorrect = 0;
     foreach (keys(%status)) {      foreach (keys(%status)) {
  $submitted = 1 if ($status{$_} ne 'nothing');   $submitted = 1 if ($status{$_} ne 'nothing');
  $graded = 1 if ($status{$_} !~ /^correct/);   $graded = 1 if ($status{$_} =~ /^ungraded/);
    $incorrect = 1 if ($status{$_} =~ /^incorrect/);
   
  my ($foo,$partid,$foo1) = split(/\./,$_);   my ($foo,$partid,$foo1) = split(/\./,$_);
  if ($status{'resource.'.$partid.'.submitted_by'} ne '') {   if ($status{'resource.'.$partid.'.submitted_by'} ne '') {
     $submitted = 0;      $submitted = 0;
Line 708  LISTJAVASCRIPT Line 710  LISTJAVASCRIPT
  $status{'resource.'.$partid.'.submitted_by'}.'" />';   $status{'resource.'.$partid.'.submitted_by'}.'" />';
  }   }
     }      }
       
     next if (!$submitted && ($submitonly eq 'yes' ||      next if (!$submitted && ($submitonly eq 'yes' ||
      $submitonly eq 'incorrect' ||       $submitonly eq 'incorrect' ||
      $submitonly eq 'graded'));       $submitonly eq 'graded'));
     next if (!$graded && ($submitonly eq 'graded' ||      next if (!$graded && ($submitonly eq 'graded'));
   $submitonly eq 'incorrect'));      next if (!$incorrect && $submitonly eq 'incorrect');
  }   }
   
  $ctr++;   $ctr++;
Line 720  LISTJAVASCRIPT Line 723  LISTJAVASCRIPT
     $gradeTable.='<tr bgcolor="#ffffe6">' if ($ctr%2 ==1);      $gradeTable.='<tr bgcolor="#ffffe6">' if ($ctr%2 ==1);
     $gradeTable.='<td align="right">'.$ctr.'&nbsp;</td>'.      $gradeTable.='<td align="right">'.$ctr.'&nbsp;</td>'.
  '<td align="center"><input type=checkbox name="stuinfo" value="'.   '<td align="center"><input type=checkbox name="stuinfo" value="'.
  $student.':'.$$fullname{$student}.'&nbsp;"></td>'."\n".   $student.':'.$$fullname{$student}.'&nbsp;" /></td>'."\n".
  '<td>'.&nameUserString(undef,$$fullname{$student},$uname,$udom).'</td>'."\n";   '<td>'.&nameUserString(undef,$$fullname{$student},$uname,$udom).'</td>'."\n";
   
     if ($ENV{'form.showgrading'} eq 'yes' && $submitonly ne 'all') {      if ($ENV{'form.showgrading'} eq 'yes' && $submitonly ne 'all') {
Line 2006  sub processHandGrade { Line 2009  sub processHandGrade {
 #    my %record = &Apache::lonnet::restore($symb,$ENV{'request.course.id'},$udom,$uname);  #    my %record = &Apache::lonnet::restore($symb,$ENV{'request.course.id'},$udom,$uname);
     my %status=&student_gradeStatus($url,$symb,$udom,$uname,$partlist);      my %status=&student_gradeStatus($url,$symb,$udom,$uname,$partlist);
     my $submitted = 0;      my $submitted = 0;
     my $graded = 1;      my $ungraded = 0;
       my $incorrect = 0;
     foreach (keys(%status)) {      foreach (keys(%status)) {
  $submitted = 1 if ($status{$_} ne 'nothing');   $submitted = 1 if ($status{$_} ne 'nothing');
  $graded = 0 if ($status{$_} =~ /^correct/);   $ungraded = 1 if ($status{$_} =~ /^ungraded/);
    $incorrect = 1 if ($status{$_} =~ /^incorrect/);
  my ($foo,$partid,$foo1) = split(/\./,$_);   my ($foo,$partid,$foo1) = split(/\./,$_);
  if ($status{'resource.'.$partid.'.submitted_by'} ne '') {   if ($status{'resource.'.$partid.'.submitted_by'} ne '') {
     $submitted = 0;      $submitted = 0;
Line 2018  sub processHandGrade { Line 2023  sub processHandGrade {
     next if (!$submitted && ($submitonly eq 'yes' ||      next if (!$submitted && ($submitonly eq 'yes' ||
      $submitonly eq 'incorrect' ||       $submitonly eq 'incorrect' ||
      $submitonly eq 'graded'));       $submitonly eq 'graded'));
     next if (!$graded && ($submitonly eq 'graded' ||      next if (!$ungraded && ($submitonly eq 'graded'));
   $submitonly eq 'incorrect'));      next if (!$incorrect && $submitonly eq 'incorrect');
  }   }
  push @nextlist,$student if ($ctr < $ntstu);   push @nextlist,$student if ($ctr < $ntstu);
  last if ($ctr == $ntstu);   last if ($ctr == $ntstu);

Removed from v.1.247  
changed lines
  Added in v.1.248


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