[LON-CAPA-cvs] cvs: loncom /interface/spreadsheet Spreadsheet.pm

albertel lon-capa-cvs@mail.lon-capa.org
Fri, 29 Apr 2005 18:13:08 -0000


albertel		Fri Apr 29 14:13:08 2005 EDT

  Modified files:              
    /loncom/interface/spreadsheet	Spreadsheet.pm 
  Log:
  - forward port 1.37.2.2
  
  
Index: loncom/interface/spreadsheet/Spreadsheet.pm
diff -u loncom/interface/spreadsheet/Spreadsheet.pm:1.42 loncom/interface/spreadsheet/Spreadsheet.pm:1.43
--- loncom/interface/spreadsheet/Spreadsheet.pm:1.42	Thu Apr 21 13:29:16 2005
+++ loncom/interface/spreadsheet/Spreadsheet.pm	Fri Apr 29 14:13:07 2005
@@ -1,5 +1,5 @@
 #
-# $Id: Spreadsheet.pm,v 1.42 2005/04/21 17:29:16 albertel Exp $
+# $Id: Spreadsheet.pm,v 1.43 2005/04/29 18:13:07 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -596,7 +596,7 @@
     foreach (grep eval("/$mask/"),keys(%sheet_values)) {
 	push (@inside,$sheet_values{$_});
     }
-    @inside=sort(@inside);
+    @inside=sort {$a <=> $b} (@inside);
     my $sum=0; my $i;
     for ($i=$#inside;(($i>$#inside-$num) && ($i>=0));$i--) { 
         $sum+=$inside[$i];
@@ -623,7 +623,7 @@
     foreach (grep eval("/$mask/"),keys(%sheet_values)) {
 	$inside[$#inside+1]=$sheet_values{$_};
     }
-    @inside=sort(@inside);
+    @inside=sort {$a <=> $b} (@inside);
     my $sum=0; my $i;
     for ($i=0;(($i<$num) && ($i<=$#inside));$i++) { 
         $sum+=$inside[$i];