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

banghart lon-capa-cvs-allow@mail.lon-capa.org
Thu, 28 Jun 2007 21:42:49 -0000


banghart		Thu Jun 28 17:42:49 2007 EDT

  Modified files:              
    /loncom/interface	lonindexer.pm 
  Log:
  	Make the resource selection stick after opening or closing
  	directories.
  
  
Index: loncom/interface/lonindexer.pm
diff -u loncom/interface/lonindexer.pm:1.163 loncom/interface/lonindexer.pm:1.164
--- loncom/interface/lonindexer.pm:1.163	Wed Jun 27 19:27:23 2007
+++ loncom/interface/lonindexer.pm	Thu Jun 28 17:42:49 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Directory Indexer
 #
-# $Id: lonindexer.pm,v 1.163 2007/06/27 23:27:23 banghart Exp $
+# $Id: lonindexer.pm,v 1.164 2007/06/28 21:42:49 banghart Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -128,7 +128,6 @@
 	    if ($env{'form.launch'} eq '1') {
 		&start_fresh_session(\%dbfile);
 	    }
-
 	    while(my($key,$value)=each(%dbfile)) {
 		$hash{$key}=$value;
 	    }
@@ -409,11 +408,10 @@
 		$ac++;
 	    }
 	    # sorting through the actions and changing the global database hash
-	    foreach (sort {$achash{$a}<=>$achash{$b}} (keys %ahash)) {
-		my $key=$_;
+	    foreach my $key (sort {$achash{$a}<=>$achash{$b}} (keys %ahash)) {
 		if ($ahash{$key} eq '1') {
-		    $hash{'store_'.$hash{'pre_'.$key.'_link'}}=
-			$hash{'pre_'.$key.'_title'};
+		    $hash{'store_'.$hash{'pre_'.$key.'_link'}}=1;
+		    # $hash{'pre_'.$key.'_title'};
 		    $hash{'storectr_'.$hash{'pre_'.$key.'_link'}}=
 			$hash{'storectr'}+0;
 		    $hash{'storectr'}++;