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

albertel lon-capa-cvs@mail.lon-capa.org
Tue, 15 Mar 2005 16:55:22 -0000


albertel		Tue Mar 15 11:55:22 2005 EDT

  Modified files:              
    /loncom/homework	rankresponse.pm 
  Log:
  - BUG#4012, was sorting rank number submissions in text order not numerical order
  
  
Index: loncom/homework/rankresponse.pm
diff -u loncom/homework/rankresponse.pm:1.44 loncom/homework/rankresponse.pm:1.45
--- loncom/homework/rankresponse.pm:1.44	Mon Jan 31 17:00:40 2005
+++ loncom/homework/rankresponse.pm	Tue Mar 15 11:55:22 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # rank style response
 #
-# $Id: rankresponse.pm,v 1.44 2005/01/31 22:00:40 albertel Exp $
+# $Id: rankresponse.pm,v 1.45 2005/03/15 16:55:22 albertel Exp $
 # Copyright Michigan State University Board of Trustees
 #
 # This file is part of the LearningOnline Network with CAPA (LON-CAPA).
@@ -177,7 +177,7 @@
 
 sub check_response_order {
     my (%responsehash)=@_;
-    my @order=sort(values(%responsehash));
+    my @order=sort( {$a <=> $b} values(%responsehash));
     my $lastvalue=0;
     my $expected=1;
     my $malformed=0;