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

albertel lon-capa-cvs@mail.lon-capa.org
Wed, 02 Oct 2002 21:24:35 -0000


albertel		Wed Oct  2 17:24:35 2002 EDT

  Modified files:              
    /loncom/homework	grades.pm 
  Log:
  - fixes for BUG*785 sorts idependant of case now
  
  
  
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.52 loncom/homework/grades.pm:1.53
--- loncom/homework/grades.pm:1.52	Fri Sep 20 20:08:17 2002
+++ loncom/homework/grades.pm	Wed Oct  2 17:24:35 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Grading handler
 #
-# $Id: grades.pm,v 1.52 2002/09/21 00:08:17 albertel Exp $
+# $Id: grades.pm,v 1.53 2002/10/02 21:24:35 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -265,7 +265,7 @@
     my ($string,$contents,$matches) = ('','',0);
     my ($classlist,$seclist,$ids,$stusec,$fullname) = &getclasslist('all','0');
     
-    foreach (sort {$$fullname{$a} cmp $$fullname{$b} } keys %$fullname) {
+    foreach (sort {lc($$fullname{$a}) cmp lc($$fullname{$b}) } keys %$fullname) {
 	my ($uname,$udom)=split(/\:/);
 	if ($receipt eq 
 	    &Apache::lonnet::ireceipt($uname,$udom,$courseid,$symb)) {
@@ -401,7 +401,7 @@
     $gradeTable.='</tr>'."\n";
 
     my $ctr = 0;
-    foreach my $student (sort {$$fullname{$a} cmp $$fullname{$b} } keys %$fullname) {
+    foreach my $student (sort {lc($$fullname{$a}) cmp lc($$fullname{$b}) } keys %$fullname) {
 	my ($uname,$udom) = split(/:/,$student);
 	my (%status) =&student_gradeStatus($url,$symb,$udom,$uname,$partlist);
 	my $statusflg = '';
@@ -1300,7 +1300,7 @@
     my ($classlist,$seclist,$ids,$stusec,$fullname) = &getclasslist($ENV{'form.section'},'0');
     my (@parsedlist,@nextlist);
     my ($nextflg) = 0;
-    foreach (sort {$$fullname{$a} cmp $$fullname{$b} } keys %$fullname) {
+    foreach (sort {lc($$fullname{$a}) cmp lc($$fullname{$b}) } keys %$fullname) {
 	if ($nextflg == 1 && $button =~ /Next$/) {
 	    push @parsedlist,$_;
 	}
@@ -1669,11 +1669,11 @@
 	if ($display =~ /^Partial Credit Factor/) {
 	    $_ = $display;
 	    my ($partid) = /.*?(\d+).*/;
-	    $result.='<td><b>Score Part '.$partid.'<br>(weight = '.
+	    $result.='<td><b>Score Part '.$partid.'<br />(weight = '.
 		$weight{$partid}.')</b></td>'."\n";
 	    next;
 	}
-	$display =~ s/Problem Status/Grade Status<br>/;
+	$display =~ s|Problem Status|Grade Status<br />|;
 	$result.='<td><b>'.$display.'</b></td>'."\n";
     }
     $result.='</tr>';
@@ -1682,7 +1682,7 @@
     #list all the students - with points and grade status
     my ($classlist,$seclist,$ids,$stusec,$fullname) = &getclasslist($ENV{'form.section'},'0');
     my $ctr = 0;
-    foreach (sort {$$fullname{$a} cmp $$fullname{$b} } keys %$fullname) {
+    foreach (sort {lc($$fullname{$a}) cmp lc($$fullname{$b}) } keys %$fullname) {
 	my ($uname,$udom) = split(/:/);
 	$result.='<input type="hidden" name="ctr'.$ctr.'" value="'.$uname.'" />'."\n";
 	$result.=&viewstudentgrade($url,$symb,$ENV{'request.course.id'},