--- loncom/interface/lonindexer.pm 2006/05/31 16:22:10 1.143 +++ loncom/interface/lonindexer.pm 2007/08/17 18:14:37 1.176 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Directory Indexer # -# $Id: lonindexer.pm,v 1.143 2006/05/31 16:22:10 www Exp $ +# $Id: lonindexer.pm,v 1.176 2007/08/17 18:14:37 banghart Exp $ # # Copyright Michigan State University Board of Trustees # @@ -53,7 +53,9 @@ use Apache::lonmeta; use Apache::File; use Apache::lonlocal; use Apache::lonsource(); +use Apache::groupsort(); use GDBM_File; +use LONCAPA qw(:match); # ---------------------------------------- variables used throughout the module my %hash; # global user-specific gdbm file @@ -104,7 +106,7 @@ sub handler { my $fileclr='#ffffe6'; my $line; - my (@attrchk,@openpath); + my (@attrchk,@openpath,$typeselect); my $uri=$r->uri; # -------------------------------------- see if called from an interactive mode @@ -119,21 +121,26 @@ sub handler { $extrafield=''; my $diropendb = - "/home/httpd/perl/tmp/$env{'user.domain'}_$env{'user.name'}_indexer.db"; + "/home/httpd/perl/tmp/$env{'user.domain'}_$env{'user.name'}_sel_res.db"; %hash = (); { my %dbfile; - if (tie(%dbfile,'GDBM_File',$diropendb,&GDBM_READER(),0640)) { + if (tie(%dbfile,'GDBM_File',$diropendb,&GDBM_WRITER(),0640)) { + if ($env{'form.launch'} eq '1') { + &start_fresh_session(\%dbfile); + } while(my($key,$value)=each(%dbfile)) { $hash{$key}=$value; } untie(%dbfile); } } - { - if ($env{'form.launch'} eq '1') { - &start_fresh_session(); +# - Evaluate actions from previous page (both cumulatively and chronologically) + if ($env{'form.catalogmode'} eq 'import' || $hash{'form.catalogmode'} eq 'import') { + &Apache::groupsort::update_actions_hash(\%hash); } + + { #Hijack lonindexer to verify a title and be close down. if ($env{'form.launch'} eq '2') { &Apache::loncommon::content_type($r,'text/html'); @@ -171,18 +178,18 @@ ENDSUBM # --------------------- define extra fields and buttons in case of special mode if ($env{'form.catalogmode'} eq 'interactive') { $extrafield='