--- loncom/interface/lonindexer.pm 2006/06/08 07:20:41 1.144
+++ loncom/interface/lonindexer.pm 2007/07/11 23:51:19 1.172
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Directory Indexer
#
-# $Id: lonindexer.pm,v 1.144 2006/06/08 07:20:41 www Exp $
+# $Id: lonindexer.pm,v 1.172 2007/07/11 23:51:19 albertel 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
@@ -123,7 +125,10 @@ sub handler {
%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;
}
@@ -131,9 +136,6 @@ sub handler {
}
}
{
- if ($env{'form.launch'} eq '1') {
- &start_fresh_session();
- }
#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 +173,18 @@ ENDSUBM
# --------------------- define extra fields and buttons in case of special mode
if ($env{'form.catalogmode'} eq 'interactive') {
$extrafield='