[LON-CAPA-cvs] cvs: loncom /homework grades.pm

albertel lon-capa-cvs@mail.lon-capa.org
Fri, 30 May 2003 21:33:16 -0000


albertel		Fri May 30 17:33:16 2003 EDT

  Modified files:              
    /loncom/homework	grades.pm 
  Log:
  - last of BUG#1529 and BUG#1535
  
  
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.91 loncom/homework/grades.pm:1.92
--- loncom/homework/grades.pm:1.91	Fri May 30 17:20:20 2003
+++ loncom/homework/grades.pm	Fri May 30 17:33:15 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Grading handler
 #
-# $Id: grades.pm,v 1.91 2003/05/30 21:20:20 albertel Exp $
+# $Id: grades.pm,v 1.92 2003/05/30 21:33:15 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2038,13 +2038,15 @@
 
     for ($i=0; $i<$ENV{'form.total'}; $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 $updateflag = 0;
 
 	$result .= '<tr bgcolor="#ffffde"><td>'.$uname.'&nbsp;</td><td>'.
 	    $udom.'&nbsp;</td><td>'.
-		$$fullname{$user}.'&nbsp;</td>';
+		$$fullname{$usercolon}.'&nbsp;</td>';
 	foreach (@partid) {
 	    my $old_aw    = $ENV{'form.GD_'.$user.'_'.$_.'_awarded_s'};
 	    my $old_part_pcr = $old_aw/($weight{$_} ne '0' ? $weight{$_}:1);
@@ -2091,12 +2093,12 @@
 		    '<td align="center">'.$awarded.'&nbsp;</td>';
 	    }
 	}
-	$result .= '</tr>'."\n";
 	if ($updateflag) {
 	    $count++;
 	    &Apache::lonnet::cstore(\%newrecord,$symb,$ENV{'request.course.id'},
 				    $udom,$uname);
 	}
+	$result .= '</tr>'."\n";
     }
     $result .= '</table></td></tr></table>'."\n".
 	&show_grading_menu_form ($symb,$url);