[LON-CAPA-cvs] cvs: loncom /interface londocs.pm rat lonsequence.pm map.pm

albertel lon-capa-cvs-allow@mail.lon-capa.org
Sat, 01 Dec 2007 01:59:56 -0000


albertel		Fri Nov 30 20:59:56 2007 EDT

  Modified files:              
    /rat	map.pm lonsequence.pm 
    /loncom/interface	londocs.pm 
  Log:
  - the sorting of the resources in the maps is really really slow
    for larger (~80ish) maps make it avoidable if we don't care
  
  
Index: rat/map.pm
diff -u rat/map.pm:1.8 rat/map.pm:1.9
--- rat/map.pm:1.8	Wed Aug  1 21:47:42 2007
+++ rat/map.pm	Fri Nov 30 20:59:54 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # routines for modyfing .sequence and .page files
 #
-# $Id: map.pm,v 1.8 2007/08/02 01:47:42 albertel Exp $
+# $Id: map.pm,v 1.9 2007/12/01 01:59:54 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -145,7 +145,7 @@
 # Call lonsequence::attemptread to read from resource space
 #
 sub attemptread {
-    my $fn=shift;
+    my ($fn,$unsorted)=@_;
 
     my @links;
     my @theseres;
@@ -166,6 +166,9 @@
             $links[$number]=$content;
         }
     }
+    if ($unsorted) {
+       return @theseres;
+    }
 
 # --------------------------------------------------------------- Sort, sort of
 
Index: rat/lonsequence.pm
diff -u rat/lonsequence.pm:1.31 rat/lonsequence.pm:1.32
--- rat/lonsequence.pm:1.31	Wed Jul 11 19:51:02 2007
+++ rat/lonsequence.pm	Fri Nov 30 20:59:54 2007
@@ -2,7 +2,7 @@
 #
 # Sequence Handler
 #
-# $Id: lonsequence.pm,v 1.31 2007/07/11 23:51:02 albertel Exp $
+# $Id: lonsequence.pm,v 1.32 2007/12/01 01:59:54 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -46,10 +46,10 @@
 # ----------------------------------------- Attempt to read from resource space
 
 sub attemptread {
-    my $fn=shift;
+    my ($fn,$unsorted)=@_;
     &Apache::lonnet::repcopy($fn);
     if (-e $fn) {
-	return &LONCAPA::map::attemptread($fn);
+	return &LONCAPA::map::attemptread($fn,$unsorted);
     } else {
         return ();
     }
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.299 loncom/interface/londocs.pm:1.300
--- loncom/interface/londocs.pm:1.299	Thu Nov  8 17:20:32 2007
+++ loncom/interface/londocs.pm	Fri Nov 30 20:59:55 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Documents
 #
-# $Id: londocs.pm,v 1.299 2007/11/08 22:20:32 albertel Exp $
+# $Id: londocs.pm,v 1.300 2007/12/01 01:59:55 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1754,7 +1754,7 @@
 		# no copy for published maps
 		$nocopy = 1;
 	    } else {
-		foreach (&Apache::lonsequence::attemptread(&Apache::lonnet::filelocation('',$url))) {
+		foreach (&Apache::lonsequence::attemptread(&Apache::lonnet::filelocation('',$url),1)) {
 		    my ($title,$url,$ext,$type)=split(/\:/,$_);
 		    if (($url=~/\.(page|sequence)/) && ($type ne 'zombie')) {
 			$nocopy=1;